Skip to Content
avatar image
Former Member

Tabstrip navigation restriction

Dear All,

I have a tabstrip with two tabs, say Tab1, and Tab2.

In the tab Tab1, i have an input field, say input1, type D.

In the tab Tab2 i have an input field, say input2, type I.

Now i enter a string in the input field Input1 of tab Tab1, and presses second tab Tab2.

Here the navigation happens, rather i want to stop the navigation, and wants the system auto generated mesage and also it should not allow me to go to tab Tab2 till i correct the error.

Is there any logic for this, or any settings needs to be done to achieve this?

Actually i am able to get the system generated error message but cannot stop navigation into another tab.

Please suggest me something.

Thank you,

Shashi.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jul 23, 2008 at 05:15 AM

    There is a property called SelectedTab for TabStrip, set it back to the previous tab when there is an error in event handler of onSelect of the TabStrip

    Check if there is any message using IS_EMPTY method of the message manager

    Abhi

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Thomas Jung

      You are correct using the default settings of the tabStrip. My application that I had tested with implements the onSelect Event and the selectionChangeBehaviour of the tabStrip is set to manual. In this case the Phase Model does cause the onSelect Event handler not to be fired when an error message is issued in the WDDOBEFOREACTION and since the onSelect is needed to change the context attribute bound to the selectedTab property of the tabStrip - no tab change occurs

      Thanks, that works fine!

  • avatar image
    Former Member
    Jul 25, 2008 at 04:24 AM

    Dear All,

    First of all Thanks a lot to all the people replied to this thread..

    I have come to know various reasons of checking the error messages.

    I have another problem related to this, How shall we stop navigation if we catch the error messages?

    When the error message is present in the tab1 should not allow me to navigate to tab2 untill I correct the error.

    Any code chunk would give me an idea..

    Thank you once again for all the replies.

    Good day!

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I have another problem related to this, How shall we stop navigation if we catch the error messages?

      When the error message is present in the tab1 should not allow me to navigate to tab2 untill I correct the error.

      Just follow the procedure of Abhimanyu Lagis, its described quite well.

      So its no big deal.

      1. Bind the TabStrip-property selectedTabto a context-attribute (e.g. SELTAB, type: String)

      2. Set the TabStrip-property selectionChangeBehavior to manual (recommendation of Thomas Jung)

      3. Create an Event-Handler for the onSelect-Event (e.g. CHANGE_TAB)

      4. Create a method (e.g. SET_SELTAB) to set the context-attribute (SELTAB)

      with an importing parameter (e.g. I_SELTAB), here you can use the wizzard, to do this.

      5.1: in your Event-Handler (CHANGE_TAB), you can check your error_messages,

      described in the previous answers.

      5.2. then you have to call the SET_SELTAB() method with standard parameters (TAB, OLD_TAB)

      so if there is no error : set_seltab(i_seltab = tab),

      else if there is an error: set_seltab(i_seltab = old_tab)

      For furhter Information related to Tabstrip (Properties, Event and Standardparameters) check following links of the SAP Online Help:

      Link: [TabStrip Properties|http://help.sap.com/saphelp_nw04s/helpdata/en/f0/e5a8411fdbcc46e10000000a155106/frameset.htm]

      Link: [TabStrip Events|http://help.sap.com/saphelp_nw04s/helpdata/en/a6/4aae42e5adcd6ae10000000a155106/content.htm]