cancel
Showing results for 
Search instead for 
Did you mean: 

Can't make Tabstrip works as "View - Programming UI and Navigation.pdf"

Former Member
0 Kudos

Hello:

At document: "View - Programming UI and Navigation.pdf"

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9214b1e5-0601-0010-fdb0-ec32d43b06e0">download</a><a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9214b1e5-0601-0010-fdb0-ec32d43b06e0">Download PDF</a>

page 224 (4.1.34 TabStrip) says:

<b>"If the width of the TabStrip element is not sufficient to display all tabs, as shown in the

example above, the user can navigate through the tabs using the two integrated scroll tabs

with little arrows."</b>

I have a Static element Tabstrip its properties height and width are set to 10px. At runtime I add 200 tab elements (wdDoModifyView), instead of appeared as the PDF shows, a large and big horizontal srcoll windows is display, and the two integrated scroll tabs with little arrows never appeard.

I need the two integrated scroll tabs with little arrows to make a excelent user interface. I couln't find a tutorial showing that layout, all that I found was simple tabstrip/tab tutorials showing the use of 2 or 3 tabs in a tabstrip, nothing showing the two integrated scroll tabs with little arrows.

I'm working in a webdynpro proyect with:

NWDS Version: 2.0.16 Build id: 200602130353

WAS 6.40 Portal 6.0 SP 16.

Thanks a lot for your time.

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Answers (1)

Answers (1)

Former Member
0 Kudos

If automatic tab scrolling is not yet available in your Web Dynpro version, you could use the following workaround.

Create context attributes "FirstVisibleTabIndex", "VisibleTabCount" of type integer,

and an attribute "UpdateVisibleTabs" of type boolean.

In wdDoModifyView():

if ( wdContext.currentContextElement().getUpdateVisibleTabs() )
{
  IWDTabStrip tabstrip = (IWDTabStrip) view.getElement("ID-of-TabStrip");
  for (int i = 0; i < tabstrip.numberOfTabs(); ++i)
  {
    tabstrip.getTab(i).setVisible
    (
      i >= wdContext.currentContextElement().getFirstVisibleTabIndex() &&
      i < wdContext.currentContextElement().getFirstVisibleTabIndex() + wdContext.currentContextElement().getVisibleTabCount()
    );
  }
  wdContext.currentContextElement().setUpdateVisibleTabs(false); 
}

Now you can control the visible tabs by setting these context attribute values and the update flag. This might be done from

action handlers of paginator buttons.

Armin