on 10-06-2007 1:08 PM
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.
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.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.