on 09-19-2006 10:02 AM
Hi,
I have a tabstrip with several tabs. To go from one tab to another I could click the tab. But I need to have another option as well, with buttons. On each tab I have buttons ("Next" and "previous"). What do I need to do so that when the user clicks the button they are taken to the next tab? I'm still new to Webdynpros I know I need to create an action for my button, but I don't know how to code the method for my action so that I will end up on the next tab.
Thanks, Ira
Lets assume your tabs are named as Tab1, Tab2, Tab3..etc and your tabstrip is called MyTabStrip
Create a context attribute of type string , lets call it Tab.
In the wdDoModifyView, write the following code:
IWDTabStrip tabElement = (IWDTabStrip) view.getElement("MyTabStrip");
tabElement.setSelectedTab(wdContext.currentContextElement().getTab());
This should be the code for your button Action:
For Tab1 - method onActionTab1
public void onActionTab1(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionTab1(ServerEvent)
wdContext.currentContextElement().setTab("Tab1");
//@@end
}
Regards,
Subramanian V.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am sorry, I can't write Web Dynpro for ABAP Code, but I can give an idea what needs to be done :
a) Let the name of tabstrip be MyTabStrip
b) Let the name of tabs be Tab1, Tab2
c) Create a context attribute of type string called TAB
c) In the method wdDoModifyView , you need to get the reference of the element "MyTabStrip"
d) Change the selectedTab attribute of this Tabstrip to Tab1 or Tab2 depending upon which button the user has clicked
User clicks Tab1
=================
When user clicks Tab1, set the value of context attribute TAB to Tab1
User clicks Tab2
=================
When user clicks Tab2, set the value of context attribute TAB to Tab2
Regards,
Subramanian V.
Don't use a TabStrip for visualizing a sequential process. Use a RoadMap or PhaseIndicator instead.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
See this Samples and Tutorials
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/b1a3e990-0201-0010-aeb2-a2ef5bc3da8e">creating an Extended Web Dynpro Application</a>
Kind Regards
Mukesh
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 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.