cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in TabStrip Eventing

Former Member
0 Kudos

Hi all,

I have a TabStrip UI Element with id <b>tab</b> which contains 4 tabs and each of these 4 tabs contains a TabStrip UI Element each named <b>tab1</b>,<b>tab2</b>,<b>tab3</b> and <b>tab4</b> . Now in wdDoModifyView if I try to add a source mapping to these tabstrips , it gives me runtime exception saying that parameter tab1 is not found . It refuses to accept any id except for tab . My source code is as follows:

<b>In wdDoModifyView:</b>

if (firstTime) 
		{
			objTabElement1 = (IWDTabStrip)view.getElement("tab1");
objTabElement1.mappingOfOnSelect().addSourceMapping("tab1","strTabIndex");
}

<b>The corresponding onSelect action of this TabStrip has the following code:</b>

for(int i=0;i<20;i++)
		{
			//Condition apply if the "Tabs"+i is equal to strTabIndex
			if (("Tabs"+i).equalsIgnoreCase(strTabIndex))
			{
				wdContext.currentContextElement().setCtx_RowIndex(i);
				break;
			}//end of if (("Tabs"+i).equalsIgnoreCase(strTabIndex))
		}//end of for(int i=0;i<15;i++)

Any help in this matter will be highly appreciated and suitably rewarded with points.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

The first parameter of the addSourceMapping() statement is the name of a UI element event parameter.

In this case, the event parameter that holds the ID of the selected tab is named "tab". In your code, better use the type-safe constant <b>IWDTabStrip.IWDOnSelect.TAB</b>. I introduced them exactly for that purpose.

See https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/api...

Armin