on 04-10-2010 7:58 AM
In the personal address of ESS we had added four extra fields for communication.
We need to hide the fields when value is zero.
The coding is written in wdDoModifyView of Reviewview in VcPerAddressUSReview
we will get the value of Communication fields like below.Com01 is the context name for communication
String com1 = wdThis.wdGetContext().currentSelectedInfotypeElement().getCom01();
After that if com1 is zero we are trying to hide the fields in that line
by creating a Context node Fcom01 of type com.sap.ide.webdynpro.uielementdefinitions.Visibility and setting Fcom01 to NONE as below.
WDVisibility vsble = wdContext.currentFlagsElement().getFcom01() ;
wdContext.currentFlagsElement().setFcom01(vsble.NONE);
and Fcom01 is linked in the prpoerty of visible condition of comm fields
No error is showing but when we run it is showing a Null pointer exception
in portal for the Review page.
Thanks and regards,
Safeer.I
Hello,
are you checking that com1 is actually populated
do a check like:
if (com1 == null || com1.equalsString("0") )
{
blah
}
Sorry - syntax is unlikely to be correct - but hopefully you get the idea - just because you retrieve a value from the context does not mean that it is non-null.
Cheers,
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chris,
Thanks for your reply but my problem is that even if IF condition is commented and direclty tried to hide
the comm fields using the code
wdcontext.currentFlagsElement.setFcom01(wdvisibility.none)
But it is not hiding the fields dyanamicllay .
Any other property need to be set for the flags Fcom01 as the code is not changing the visibility condition of the fields.
Thanks and regards,
Safeer.I
Hi Safeer,
have you checked to see what the visibilty of the UI Element is bound to - I don't think it is bound to the context attribute Fcom01 - that's the value of the field I think...
You may need to define a new attribute in your context and then in the layout assign this attribute to the visiblity of the UI element that you want to hide.
Then in your code, assign the visibility (or not) of this attribute - not the field value.
Cheers,
Chris
Hi Chris,
Thanks for your reply.
Visibility property of UI element is already bound with the context element.
After that also it is not hiding the fileds.
Finally I solved it by calling the IWD elements with their names and hide it directly
and it is working fine for me.
But still I dont know why the hidingof fields not working with visibilty condition flag setting method.
I am closing the thread
Safeer.I
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.