Skip to Content
author's profile photo Former Member
Former Member

Select tabstrip tab

Hello

If I have a tabstrip with several tabs, how can I code to switch to other tab ?

I want the user to select one item in tabview, and then automatically select next/other tab to se more information of selected item.

Regards,

Ole-André Haugen

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 17, 2004 at 07:43 AM

    Hi Ole-André,

    store the index of the selected tab as an attribute in your model and provide a getter and setter method. In your page use the tabStrip element like this

    <htmlb:tabStrip id = "someID"
                 width = "100%"
             selection = "<%= model->get_selected_tab( ) %>" >

    In your code where you process your item-selection-next-step logic you set the wanted tab with the setter of the model.

    By the way, data binding with the selection attribute is not possible.

    Regards,

    Sebastian

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 17, 2004 at 07:42 AM

    Take a look at the BSP Application in se80 in your system called SBSPEXT_HTMLB or SBSPEXT_XHTMLB depending on what tabstrip you are using.

    By simply activating the parameters onSelection the tabstrip will fire the OnInputProcessing event when someone clicks it then from there you can read which tabstrip is selected and do whatever you like.

    If you can provide a few more details we might be able to help you out more.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 17, 2004 at 10:24 AM

    My code:

    <%@page language="abap"%>

    <%@extension name="htmlb" prefix="htmlb"%>

    <%@extension name="bsp" prefix="bsp"%>

    <htmlb:content id="content" design="design2003" controlRendering="sap">

    <htmlb:page title="LogNet - CRM">

    <htmlb:form>

    <htmlb:tabStrip id = "MainTab"

    bodyHeight = "700"

    width = "100%"

    horizontalAlignment = "LEFT"

    verticalAlignment = "TOP"

    selection = "<%= p_tabix %>" >

    <htmlb:tabStripItem id="myTabStripItem1" index="1" onSelect="myTabStripItemSelect1" title="List" tooltip="Customer List">

    <htmlb:tabStripItemBody>

    customer_list.do" comp_id=" customer_list.htm"/>

    </htmlb:tabStripItemBody>

    </htmlb:tabStripItem>

    <htmlb:tabStripItem id="myTabStripItem2" index="2" title="Detail" tooltip="Customer Detail">

    <htmlb:tabStripItemBody>

    customer_detail.do" comp_id=" customer_detail.htm"/>

    </htmlb:tabStripItemBody>

    </htmlb:tabStripItem>

    </htmlb:tabStrip>

    </htmlb:form>

    </htmlb:page>

    </htmlb:content>

    Just adding selection and using seledction as a controlled field, everyting worked fine.

    Thank you for your fast respons. I really enjoy SDN !!!

    Regards

    Ole-André Haugen

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.