on 07-31-2008 3:24 PM
Hello Friends,
I am facing a strange problem, actually I have a lable and input filed, both have visibilits property as context element ( Visibility.addressfield ). The Context node Visibility is also avaiable in 2nd view via controller ( so its mapped node i.e. Visibility is mapped node). So far things works fine i.e from 1st view where actually the lable and input field is, I can regulate the visiblity in the 2nd view. And after some processing when I come back in 1st view and try to set the visiblity.none its not working..... the UI element are still visible in first view, I tried following to make it none.
wdThis.wdGetPOEntryCompController().wdGetContext().currentVisibilityElement().setAddressField(WDVisibility.NONE);
OR tried like this as well
wdContext.currentVisibilityElement().setAddressField(WDVisibility.NONE);
Buth both ways, in debug it shows me the visiblity none, but the element are still visible ..... any idea how I can fix it ??
Thanks and regards,
That sounds strange. Please check again
- if node "Visibility" has cardinality 1:1, selection 1:1
- mapping of node "Visibility" is correct from both views
- lifetime of views
- all code positions the attribute values for the visibility are changed
- data binding of "visible" property for Label and InputField
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
when I do 1:1, I got exception...
com.sap.tc.webdynpro.progmodel.context.ContextException: Node(POEntryView.Visibility): must not add elements to a Node of cardinality 0..1 or 1..1
Anyway I have fix the exception, cardinality is now 1:1 too, but still it does not work for me......... I cant make the lable and inputfiled on 1st view none ( after comming back from 2nd view )....
Edited by: Shah H on Aug 1, 2008 10:18 AM
Hi,
1. Make sure you are not invalidating the VisibilityElement(), while coming back from the 2 nd view.
2. Are you doing this
wdContext.currentVisibilityElement().setAddressField(WDVisibility.NONE); inside if(firstTime) in wdDoModify??? if yes then do it out side if(firatRime).
If none of the above cases is true, then
do one thing,
inside your first view you will have an inbound plug from view2 to view1. there you include the above part.
i.e.,
wdContext.currentVisibilityElement().setAddressField(WDVisibility.NONE);
Regards,
Srinivas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shah,
Where you are writing this code?
if you didnt do it, do as satya said, and write your code ( code to make visibility none) in the back button in second iview (view2). i.e. onAction method of a button by clicking which you are coming back to view 1.
PradeeP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi pradeep ,
Actually I have no button which bring me back to 1st view....the logic is as follows..
on 1st view I have a dropdownkey, when user selects the dropdown ( dropdown values is not initial) then I opan a window ( my 2nd view ) , and also make the lable1 and button1 visible . User selects something form the 2nd View, and close then 2nd view...now the lable1 and button1 is visible ( which I make them visible from my 2nd view)
After user enters the values on 1st view and click button submit, I refresh the screen and there I want to make the lable1 and button1 again NONE....but when onActionSubmit when I try to do so, it does not work-out for me...
Any suggestion ???
Regards,
Hi,
take a context attribute say, 'visible' in context and change its type to Visiblity.
Local Dictionary, UIelement definitions,Visibility.
Then bind the visible property of (in properties) your lable and input filed to this context attribute.u can have a button, and an action for it and the in that action u set the visibility of the context attribute 'visible to NONE.
let me know if u need more clarity.
Regards,
Satya.
Edited by: Satya on Aug 1, 2008 8:24 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.