How to determine selected Tab in runtime

Hi,
Is there a workaround to figure out which tab we are currently on in a tab set? This would help dynamically enable/disable some components.
Thanks
Manohar

There is currently no way to let the model know which tab is currently selected.  This would be a nice feature to have in a future release.
Regards,
Gerrit

Similar Messages

  • How to dynamic select based on runtime value ?

    how to dynamic select based on runtime value ?
    I want to write a select function, which do selecting based on parameters. eg,
    CREATE OR REPLACE FUNCTION myfunction
    (tableName VARCHAR2, pkName VARCHAR2, pkValue VARCHAR2, requestString VARCHAR2)
    RETURN VARCHAR2 AS
    BEGIN
    select requestString from tableName where pkName=pkValue;
    RETURN NULL;
    END;
    myfunction('users', 'user_id', '100', 'user_name'); it will select 'user_name' from table 'users' where 'user_id' = '100'.
    This way could save lots of coding. but it can't pass compiler. how to work out ?
    Thanks.

    While this may save code, if used frequently it will be ineffecient as all [explicative deleted]. The danger is that it would be used even for repeatable statements.
    This mode of operation ensures that every statement [calling the funciton] needs to be reparsed, which is extremely expensive in Oracle (in CPU cycles, recursive SQL and shared pool memory).
    Such reparsing is rarely a good thing for the environment ... it could easily lead to buying more CPU (bigger box) and therefore adding more Oracle license ... which could quickly exceed the typical developer's salary.
    However - if you really, really want to do this, look up 'execute immendiate' in the PL/SQL manuals.

  • Event handler for dropdownlistbox how to determine selection ?

    Hello,
    As a newby in BSP programming, I'm trying to build a small application with a menu structure . This menu is defined in a page fragment and consists of dropdownlistboxes. The event handling is located in the main page which contains the page fragment.
    My problem is that I cannot get these dropdownlist boxes to work. The coding in the page fragment is :
    ==========================
    <htmlb:content>
      <htmlb:form>
        <htmlb:dropdownListBox id             = "myDropdownListBox1"
                                 tooltip        = "Tooltip for my DropdownListBox"
                                 onClientSelect = "alert('myDropdownListBox1')"
                                 onSelect       = "mySelect" >
            <htmlb:listBoxItem key   = "k1"
                               value = "MenuChoice1" />
            <htmlb:listBoxItem key   = "k2"
                               value = "MenuChoice2" />
            <htmlb:listBoxItem key   = "k3"
                               value = "MenuChoice3" />
            <htmlb:listBoxItem key   = "k4"
                               value = "MenuChoice4" />
            <htmlb:listBoxItem key   = "k5"
                               value = "MenuChoice5" />
            <htmlb:listBoxItem key   = "k6"
                               value = "MenuChoice6" />
          </htmlb:dropdownListBox>
        </htmlb:form>
    </htmlb:content>
    ==========================
    The event handler ( OnInputProcessing ) code is :
    ==========================
    CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
      DATA: event TYPE REF TO if_htmlb_data,
            ddlb_event TYPE REF TO CL_HTMLB_EVENT_SELECTION.
      event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
      IF event IS NOT INITIAL AND event->event_name =
                 'dropdownListBox'.
          ddlb_event ?= event.
        CASE event->event_id.
          WHEN 'myDropdownListBox1'.
            CASE ddlb_event->selection.
           WHEN 'k1'.
            .......( Contains other statements )
           WHEN 'k2'.
            .......( Contains other statements )
           WHEN 'k3'.
            .......( Contains other statements )
           WHEN 'k4'.
            .......( Contains other statements )
           WHEN 'k5'.
            .......( Contains other statements )
           WHEN 'k6'.
            .......( Contains other statements )
         ENDCASE.
        ENDCASE.
        ENDIF.
    ==========================
    I have tried several different event handlers including the example in the documentation of the dropdownlistbox HTMLB element, but in the event handler I don't know how to determine the selection made.
    I would appreciate it hugely if someone could give me an example how to do this ?
    With regards,
    Fred van de Langenberg

    Hello,
    Thanks for your answers & suggestions Subramanian, Ulli & Sebastian.
    I forgot the <htmlb:content> tags ( thanks Ulli ) and eventually I got things working with the following :
    Main page layout : dopdownlistbox element
       <htmlb:dropdownListBox
                id          = "Ddlb1"
                onSelect    = "OnInputProcessing" >
                selection   = "<%= selection1 %>"
            <htmlb:listBoxItem key   = " "
                               value = " "/>
            <htmlb:listBoxItem key   = "k1"
                               value = "k1" />
            <htmlb:listBoxItem key   = "k2"
                               value = "k2" />
            <htmlb:listBoxItem key   = "k3"
                               value = "k3" />
            <htmlb:listBoxItem key   = "k4"
                               value = "k4" />
            <htmlb:listBoxItem key   = "k5"
                               value = "k5" />
          </htmlb:dropdownListBox>
    Event handler
    CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
    IF event_id = CL_HTMLB_MANAGER=>EVENT_ID.
    Scenario 1: Read event from manager.
      DATA: event TYPE REF TO CL_HTMLB_EVENT.
      event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
      IF event IS NOT INITIAL AND event->name = 'dropdownListBox'.
        DATA: data TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX.
        data ?= CL_HTMLB_MANAGER=>GET_DATA(
                  request = runtime->server->request
                  name    = 'dropdownListBox'
                  id      = 'Ddlb1'
         CASE data->selection.
           WHEN 'k1'.
           WHEN 'k2'.
           WHEN 'k3'.
           WHEN 'k4'.
           WHEN 'k5'.
         ENDCASE.
       ENDIF.
    ENDIF.
    Fred van de Langenberg

  • ADF Faces: af:menuTabs - How to set selected tab

    I cannot find any documentation on how to set the selected tab of an af:menuTabs instance.
    Please help.

    Hi,
    the method above works if you manually inserts the menu items into a menu component, but not if you declaratively bind each component to a menu model.
    Following the ADF developer's guide, I created a dynamic menu using menuTabs (Section 11.2 Using dynamic menus for navigation). But somehow I don't get a difference in appearance between the selected and unselected tabs.
    I am also confused with the explanation in the tutorial. It says "The menu model in conjuction with nodeStamp controls whether a menu item is rendered as selected. As described earlier, a menu model is created from a tree model, which contains viewId information for each node. ViewIdPropertyMenuModel, which is an instance of MenuModel, uses the viewId of a node to determine the focus rowKey. Each item in the menu model is stamped based on the current rowKey. As the user navigates and the current viewId changes, the focus path of the model also changes and a new set of items is accessed. MenuModel has a method getFocusRowKey(), which determines which page has focus, and automatically renders a node as selected if the node is on the focus path."
    Any suggestions where I should add code to change the appearance of the selected tab? I am using the default Oracle skin.
    Greetings,
    Birgit

  • How to insure selected tabs are visible in JTabbedPane

    Hello all,
    How can you insure that the selected tab in a JTabbedPane is visible.
    Here is the code:
    import javax.swing.*;
    import java.awt.*;
    public class TabbedPaneTest extends JTabbedPane implements Runnable
    public TabbedPaneTest()
    super(JTabbedPane.TOP, JTabbedPane.SCROLL_TAB_LAYOUT);
    } // end TabbedPaneTest constructor
    public void run ()
    for (int i = 1; i <= 10; i ++)
    try
    this.addTab(Integer.toString(i), createDefaultPanel (i));
    this.getModel().setSelectedIndex(i - 1);
    Thread.sleep(3000);
    } // end try block
    catch (Exception e)
    e.printStackTrace();
    } // end catch block
    } // end for loop
    } // end run method
    private JPanel createDefaultPanel (int index)
    JPanel defaultPanel = new JPanel ();
    defaultPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLoweredBevelBorder(), Integer.toString(index)));
    return defaultPanel;
    } // end createDefaultPanel method
    public static void main (String args [])
    JFrame frame = new JFrame ();
    TabbedPaneTest tpt = new TabbedPaneTest ();
    frame.getContentPane().add(tpt);
    frame.setSize(200, 200);
    Thread newThread = new Thread (tpt);
    newThread.start();
    frame.setVisible(true);
    } // end main method
    } // end TabbedPaneTest class
    I've crated a JTabbedPane with the tabLayoutPolicy set to JTabbedPane.SCROLL_TAB_LAYOUT.
    If I add enough tabs the scroll buttons appear but the newly adde tab is hidden behind them,
    even though I have set the selection index to the added tab. The content of the panel associated
    with the tab is visible but the tab itself is hidden.
    So the selected tab is hidden behind the scroll buttons.
    Any one know how to insure that if a tab is selected it is visible to the user.
    Thanks

    This is an interesting question so I tried it out. After some poking around to see how Swing does this for mouse clicking (try setting things up so that a tab is only partially visible and then click on the visable part - notice how the whole tab is scrolled into view) I found this:    /**
         * This inner class is marked "public" due to a compiler bug.
         * This class should be treated as a "protected" inner class.
         * Instantiate it only within subclasses of BasicTabbedPaneUI.
        public class TabSelectionHandler implements ChangeListener {
            public void stateChanged(ChangeEvent e) {
                JTabbedPane tabPane = (JTabbedPane)e.getSource();
                tabPane.revalidate();
                tabPane.repaint();
                if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) {
                    int index = tabPane.getSelectedIndex();
                    if (index < rects.length && index != -1) {
                        tabScroller.tabPanel.scrollRectToVisible(rects[index]);
        }Which is called when the selected tab changes. The member theScroller is a private inner class that handles the scrolling tabs. The call to scrollRectToVisible is executed for each of your new tabs. Sometimes when I stopped in the debugger and then continued things worked and your new tab scrolled into view.
    So I tried putting your code into a Runnable class and invoked it later:          final int newIndex = i;
              SwingUtilities.invokeLater (new Runnable ()  {
                   public void run ()  {
                        addTab(Integer.toString(newIndex), createDefaultPanel (newIndex));
                        getModel().setSelectedIndex(newIndex - 1);
              });But that did not work. That is as far as I got so far and I have to stop now. Perhaps this can inspire someone else to a solution.
    IL
    PS. I first tried Rammensee's solution and it did not work.
    Rammensee, you said you hoped you had it right - perhaps you are close.

  • How to highlight selected tab instead of getting the first tab by defaultly

    Hi All ,
    I had one problem with the Jquery accordian. When I am selecting one tab in Jquery accordian then that tab is not getting highlited.
    By defaultly the first tab is getting highlited or selected. The page for that selected tab is opening but the tab is not opening. By defaultly the first tab in accordian is getting selected.
    Can some one help me on this.
    Thanks & Regards,
    P.Mohan Reddy

    My question is like when we click on the first tab in the accordian then that page will open and in the accordian the 1st tab will be opened and other tabs r closed in the jquery accordian. But in the same way when i am selecting the 2nd tab or other tabs in the accordian then that particular tab is not opening even in that case also the 1st tab is opening and the selected tab is not opening.

  • How to determine triggering event at runtime

    Hello,
    I was wondering how it is possible to determine which event was triggered to initiate a workflow.  I have a basic workflow that may be started via several events and would like to be able to determine within a method which event was the actual trigger.
    The key is to make this determination within the first standard task that is called after the event is triggered.  I thought I would be able to make this work by reading SWWLOGHIST using the top level WI_ID and method 'SWW_WI_CREATE_VIA_EVENT_INTERN' (event name is in PARA_VAL2 field).  This approach does not seem to work however and was wondering what the syntax would be to provide this value.
    Thanks in advance,
    Adam

    Hi,
    In the workflow header in the Version Independent(task) -> Start Event tab, Add the follwowing Binding
    &_EVT_NAME&  -> &eventname&
    (Where eventname is a container with HRS1212-EVENT type)
    You can use this as an import parameter in your method and utilize it.
    Regards
    Gautam

  • How to determine WD application at runtime?

    Hello,
    I have a WD compent which contains two WD applications.
    At runtime I want to control the layout by the WD aplication which was called. How can I do this?
    Thanks for you help,
    Thomas

    Hello Thomas,
    from the IF_WD_RR_APPLICATION you can get the current application name.
      data lo_comp_api type ref to if_wd_component.
      data lo_app type ref to if_wd_application.
      data lo_app_rr type ref to if_wd_rr_application.
      data lv_app_name type string.
      lo_comp_api = wd_comp_controller->wd_get_api( ).
      lo_app = lo_comp_api->get_application( ).
      lo_app_rr = lo_app->get_application_info( ).
      lv_app_name = lo_app_rr->get_name( ).
    BR, Saravanan

  • How to determine method name at runtime

    hello,
    i try to get method name at runtime..i have a logger and i need this info for logger
    private void method(){
    myLogger.debug( "exception in " + getExecutedMethod() ); /* output should be: exception in method */
    }best regards
    cem

    bcem wrote:
    what i needed was
    [http://today.java.net/pub/a/today/2008/04/24/add-logging-at-class-load-time-with-instrumentation.html|http://today.java.net/pub/a/today/2008/04/24/add-logging-at-class-load-time-with-instrumentation.html]
    regards
    cemYou could also use AOP to add logging. But really, any sort of injected logging is going to be of limited value, since it's very generic and "this method was called with these parameters"-esque. Explicit logging is a lot more descriptive and useful, particularly to support staff who probably won't know what any particular method does

  • How to determine the target system during runtime of a Generic DS?

    Hi Experts, good afternoon.
    I am coding a Generic Extractor using Function Module. I have to select the field TIMESTAMP on table ROOSPRMSC. To do so, I need the value of RLOGSYS that is the BW system that is calling the Extractor.
    Do anybody knows how to determine via ABAP the RLOGSYS (Remote Logical System) during the runtime of the Generic DataSource Function Module?
    The table ROOSPRMSC keep the TIMESTAMPs values of the last delta upload for each DataSource and for each BW target system. As I have 2 BW's loading data from the same SAP ECC system, I need to know, during runtime of my Generic DataSource, the actual system that is requesting the delta. That's the reason why I need to know the BW's logical system name that is "runnig" the delta InfoPackage.
    Plese, help!!!
    Thanks in advance!
    Leandro Vani

    Leandro,
    The calling program of your FM should have a local variable I_RLOGSYS which is populated with the BW server ID.
    If you don't know how to access a variable in a program that is in call stack using field symbols, search SDN.
    I haven't tested this, so you may have to explore a little.
    Good luck.

  • How to Pre-Select a View for ALV dashboard at runtime

    Hello Experts,
    The requirement is to pre-select 1 view initially (out of several configured) for 'All' users and disable the 'View-selection' dropdown function in a standard ALV dashboard. So whenever the dashboard loads, a particular view has to be set automatically for all users.
    I need your help for the first part, which is to always pre-set a 'View' in a standard dashboard.
    I tried to implement the suggestion provided in the following thread:
    How to apply ALV view at runtime
    However I couldn't make this work in my case. I created a Post-Exit of a method in Comp Ctlr of dashboard (Initialize method) - where I receive the refrence 'IWCI_SALV_WD_TABLE'. Then calling the method 'GET_CONFIG_DATA' with action 'if_salv_wd_table=>set', I try to set the view, but it has no effect.
    Thanks a lot for your help,
    Abir

    Hi abir,
    Use this and alv1 is my alv component name
        DATA LO_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
        LO_CMP_USAGE =   WD_THIS->WD_CPUSE_ALV1( ).
        IF LO_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
          LO_CMP_USAGE->CREATE_COMPONENT( ).
        ENDIF.
        DATA LO_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
        LO_INTERFACECONTROLLER =   WD_THIS->WD_CPIFC_ALV1( ).
    LS_PARAM_IN TYPE IF_SALV_WD_TABLE=>S_TYPE_PARAM_CONFIG_IN.
    ls_param_in-default = "your view name " ( view is of type wdr_pers_variant)
        DATA LO_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
        LO_VALUE = LO_INTERFACECONTROLLER->GET_CONFIG_DATA( ls_param_in )
    Regards
    Srinivas
    Edited by: sanasrinivas on Dec 30, 2011 7:15 AM

  • How to debug a ABAP Routine which is in Infopackage Data selection Tab

    Hi ,
       Please let me know How to debug a ABAP Routine which is in Infopackage Data selection Tab.

    Hi,
    You can try to create infinite loop:
    DATA: STOP.
    WHILE STOP IS INITIAL. ENDWHILE.
    Start InfoPackage and then go to SM50 and swich on debugging for your process. Then in debugger you can change value of STOP variable to skip the loop.
    Krzys

  • How to get id of selected Tab in WebDynpro abap

    HI,
        How to get id of selected Tab in WebDynpro for abap? THANKS!

    Hi,
    In the action method for onSelect try using,
      DATA:
        lv_select_tab type string.          "Selected tab value
      DATA:
        lt_events type WDR_EVENT_PARAMETER_LIST,
        ls_events type WDR_EVENT_PARAMETER.
      field-symbols: <fs_value> type any.   "Attribute value in events table
      lt_events = wdevent->parameters.
      read table  lt_events into ls_events with key name = 'TABSTRIPID'.
      if sy-subrc eq 0.
        assign ls_events-value->* to <fs_value>.        
        if sy-subrc eq 0.
          lv_select_tab = <fs_value>.                    "Tab selected
        endif.               
      endif.               
    Hope it helps!
    Regards,
    Radhika,

  • How to formulate where clause in select query at runtime..??

    I am facing a problem..
    I have to generate a select query during runtime..For Ex: when user selects a row in an alv report, particular date field is to be read and another report is to be opened for that data..
    I know how to make drill down report but my problem is concatenating  date field...
    Plz tell a solution....

    Hi,
    Try like this....
    refresh : gt_tvarvc_temp[].                                       
      gt_tvarvc_temp[] = lt_tvarvc[].                                   
          loop at gt_tvarvc_temp into gs_tvarvc_temp
                                  where name = 'CREDIT_MEMO_DOC_TYPE'.  
            r_blart-sign = gs_tvarvc_temp-sign.                         
            r_blart-option = gs_tvarvc_temp-opti.                      
            r_blart-low = gs_tvarvc_temp-low.                           
            append r_blart.                                            
            clear r_blart.                                             
          endloop.                                                     
          concatenate 'BLART IN ' 'r_blart' into lv_condition
          separated by space.
    if not lv_customer_cond is initial.
          if lv_condition is initial.
            concatenate lv_customer_cond lv_condition
                into lv_condition separated by space.
          else.
            concatenate lv_condition 'AND' lv_customer_cond
                into lv_condition separated by space.
          endif.
        endif.
    select bukrs belnr gjahr appending corresponding fields        
                                        of table lt_potential_credits
                                        from bsid
                                        where (lv_condition).
    Hope its helps

  • How To Add InfoObject in the Data Selection Tab of InfoPackages in 2004s

    Hi Y'all!
    I would like to ask how to add an infoobject in the Data Selection Tab of the InfoPackage in 2004s.  It says its optional, this definintion of selection criteria for the infopackage.
    My apologies, I don't understand how this is done.  Surely, I would like, however, to understand how to add an infoobject in this data selection Tab of the InfoPackage in 2004s.
    Can any kind soul out there (gurus) please lend me your thoughts?
    Regards,
    Philips

    Hello Rajani!
    Thank you very mcuh for that!  I super appreciate it!  Can you prescribe how I can do this step by step please?  Where exactly in the DS can I locate this "field for selection" option in the DataSource?
    Regards!
    Philips

Maybe you are looking for