cancel
Showing results for 
Search instead for 
Did you mean: 

Issues Regarding refreshing the values and uielements

Former Member
0 Kudos

Hi Experts,

I need something like this...

1.>>> View A having UIelement Label And Input field and Submit button.After clicking submit it navigates to View B.View B has one back button. After clicking Back button I will come back to View A but all the UIelements should be hidden.

2.>>> A with a Drop down and a TextField. By selecting any dropdown value i will navigate to B. But after returning back to A same selected value is present in dropdown. I want it to be refreshed.

Can it be possible?

If so then please reply.

Thanks and Regards,

Nutan.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Nutan,

1.>>> View A having UIelement Label And Input field and Submit button.After clicking submit it navigates to View B.View B has one back button. After clicking Back button I will come back to View A but all the UIelements should be hidden.

In your navigation modeler you can create outbound and inbound plugs and link them. Finally you can create one action from view A's submit button that will fire the outbound plug from viewA and take you to the viewB. In viewB you can create one action for its back button that will fire the outbound plug from viewB to viewA. To hide the elements on coming back from viewB--> Create a context in component controller and set its type to com.sap.ide.webdynpro.uielementdefinitions.Visibility(clicking on the browse button). Now map this to both viewA and viewB from your data modeler. Bind this context to all the UI elements that you want to hide in viewA to its visibility property. And in action of back button before firing the plug, set their visibility to NONE eg. wdContext.currentContextElement.set<name of the attriubet>(WDVisibility.NONE);

2. Follow the above mentioned steps for navigation and creating actions. Create a node in component controller for dropdown and bind this to the dropdown in viewA. Now in viewB before firing the plug just set its lead selection to 0 eg. wdContext.node<name of the node>().setLeadSelection(0);

Warm Regards,

Murtuza

Answers (3)

Answers (3)

namrata_d
Active Participant
0 Kudos

Hi Nautan,

(1) for all the UI elements in view A initiaaly in wdDoInit keep the visiblity as WDVISIBLITY.VISIBLE and later when u come back from the View B to view A in the onPlugFromViewB set the visiblity to WDVISIBLITY.NONE

(2) As above in the onPlugFromViewB fir the context node select the LeadSelection as -1.

Thanks

Namrata

Former Member
0 Kudos

Thanks to all of you. I got the answer...

Regards

Nutan

Former Member
0 Kudos

Hi Nutan,

1.>>> View A having UIelement Label And Input field and Submit button.After clicking submit it navigates to View B.View B has one back button. After clicking Back button I will come back to View A but all the UIelements should be hidden.

create an attribute of type <b>WDVisibility</b> and bind this attribute to the <b>visible</b> property of the Label And Input field .

set the value of this attribute initially to WDVisibility.VISIBLE and when returning back from from viewB to WDVisibility.NONE.

2.>>> A with a Drop down and a TextField. By selecting any dropdown value i will navigate to B. But after returning back to A same selected value is present in dropdown. I want it to be refreshed.

set the LeadSelection of the node to -1

Regards

Ayyapparaj

Former Member
0 Kudos

1)In the plugFromViewB method of View A, hide all the ui elements (assign WDVisibility type for context attributes that bind to these UI elements -- or read a beginner's tutorial)

2)Same as the above, in the plug method in View A, set value of the context attribute of drop down to an empty string "".

Rajit

Message was edited by:

Armin Reichert