cancel
Showing results for 
Search instead for 
Did you mean: 

Tab Strip eventing

Former Member
0 Kudos

Hi,

I have 4 tabs in data container, each tab associated with different event. Whenever i click on a tab , i want to display some data on top of the tab as dispaly only. what is the better approach?

I am thinking to create 4 web dynpro views and based on the selected tab, i will show that perticular view or is there any efficient way to do this instead o creating 4 web dynpro views , can i create one and flip te data based on selected event?

Please write the detailed steps to achieve the above task?

Thanks

Sri

Accepted Solutions (1)

Accepted Solutions (1)

former_member197348
Active Contributor
0 Kudos

Hi Sri,

Instead of creating 4 views, try to use 4 different transparent containers. Place the in corresponding containers. Create 4 different context attributes of the type com.sap.tc.webdynpro.progmodel.api.WDVisibility.

Procedure:

Click on "..." button in the properties of the context attribute. Select Local Dictionary -> Expand uielementdefinitions -> Select WDVisibility.

After binding each context attributesto the corresponding visibility property of the transparent containers.

Use this code to change the visibility in Tab strip event handler.

If (selectedTab.EqualsIgonreCase("Tab1")  )
{
wdContext.currentContextElement().set<conatiner1Vis>(WDVisibility.VISIBLE);
wdContext.currentContextElement().set<conatiner2Vis>(WDVisibility.NONE);
wdContext.currentContextElement().set<conatiner3Vis>(WDVisibility.NONE);
wdContext.currentContextElement().set<conatiner4Vis>(WDVisibility.NONE);
}
else if (selectedTab.EqualsIgonreCase("Tab2")  )
// .................

Feel free to revert in case of any issues.

Regards,

Siva

Answers (1)

Answers (1)

Former Member
0 Kudos

Just define a context attribute that stores the text to be displayed in this screen area, bind whatever UI element to this attribute and set the attribute value in the "onSelect" action handler of the TabStrip.

Armin

Former Member
0 Kudos

Hello,

Thanks for Shiva and Armin for replying my question.

Shiva:

I think i will start work on with this approach and it looks good to me compare to what i thought initially. Let me give a try with this and let me reply if i see any issues.

Armin,

***Just define a context attribute that stores the text to be displayed in this screen area:

i have to display 6 values on the screen area (top of the tabs) based on the selected tab. So, i have to creeate only one context attribute and bind this attribute with ui elements like (text views ) or do I need to create 6 context attributes and bind the each attribute to their corresponding ui?

Once i get a clarification on this, i think I can use this display based on the selected tab event.

Appreciate you guys help.....Thanks

Sri

Former Member
0 Kudos

You can define as many attributes as you want but the TextView in the end must be bound to one attribute that contains the displayed text.

Armin

Former Member
0 Kudos

Thanks friends.

I got an idea how to implement this and I am working on this simultanously along with other stuff. I am closing this thread.

Thanks

Srini