Dropdownlistbox in dynpage

hi
        iam using  dynpage  where i have
       used  DROPDOWNLISTBOX   which has mutiple
     items , now on i need to fetch the index and text of the
      items in the dropdown  using java script , how is this possible
   can any one help me , its very urgent ?

What is "dynpage"?
Armin

Similar Messages

  • Event handling in Dynpage

    Hi all,
    This is my first post in SDN.
    Can any one tell me how to submit a form in DYNPAGE via radio button. If I check the radio button on, it should submit the form and should return the same page.
    Appreciate you help.
    Thanks,
    Karthik

    Hi,
    The following code regarding Event Handling for Dynpage. May be this example code useful for you.
    package com.customer.training;
    import com.sapportals.htmlb.Button;
    import com.sapportals.htmlb.Component;
    import com.sapportals.htmlb.DropdownListBox;
    import com.sapportals.htmlb.Form;
    import com.sapportals.htmlb.FormLayout;
    import com.sapportals.htmlb.GridLayout;
    import com.sapportals.htmlb.InputField;
    import com.sapportals.htmlb.Label;
    import com.sapportals.htmlb.TextView;
    import com.sapportals.htmlb.enum.ButtonDesign;
    import com.sapportals.htmlb.enum.TextViewDesign;
    import com.sapportals.htmlb.event.Event;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.htmlb.rendering.IPageContext;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    public class Suresh_SearchDynPage extends PageProcessorComponent {
      public DynPage getPage() {
        return new Suresh_SearchDynPageDynPage();
      public static class Suresh_SearchDynPageDynPage extends DynPage {
         public int flag ;
         public final static int disp_info = 1;
         public final static int read_info = 2;
         public final static int error_info = 3;
         public static String flag_info = "MyFlag";
         public static String disp_drop = " ";
         public String errorMessage;
           String firstName ;
           String lastName ;
           String Email ;
           String dropsel;
    Initialization code executed once per user.
        public void doInitialization() {
                        flag = read_info;          
                        IPageContext ctx = this.getPageContext();
                        ctx.setAttribute("FirstName","");
                        ctx.setAttribute("LastName","");
                        ctx.setAttribute("email","");     
    Input handling code. In general called the first time with the second page request from the user.
        public void doProcessAfterInput() throws PageException {
              Component comp;
              comp = this.getComponentByName("FirstName");
              if (comp instanceof InputField)
                        firstName = ((InputField) comp).getString().getValue();
              comp = this.getComponentByName("LastName");
              if (comp instanceof InputField)
                                  lastName = ((InputField) comp).getString().getValue();
              comp = this.getComponentByName("email");
                        if (comp instanceof InputField)
                                            Email = ((InputField) comp).getString().getValue();
              comp = this.getComponentByName("DisplayType");
                        if (comp instanceof DropdownListBox)
                             dropsel = ((DropdownListBox) comp).getSelection();          
    // Store the selected values in corresponding field name for nextScreen                         
              IPageContext ctx = this.getPageContext();
              flag = new Integer(ctx.getAttribute(flag_info).toString()).intValue();
              ctx.setAttribute("FirstName",firstName);
              ctx.setAttribute("LastName",lastName);
              ctx.setAttribute("email",Email);
              ctx.setAttribute("DisplayName",dropsel);                                   
    Create output. Called once per request.
        public void doProcessBeforeOutput() throws PageException {
          Form myForm = this.getForm();
           this.getPageContext().setAttribute(flag_info,new Integer(flag));
         switch(flag)
          case read_info:
                    FormLayout f1 = new FormLayout();
                    TextView t1 = new TextView();
                    t1.setDesign(TextViewDesign.HEADER2);
                    t1.setText("This is the Info U Entered................");
                    TextView t2 = new TextView();
                    t2.setText(firstName);
                    Label dispFname = new Label("dispFirstName");
                    dispFname.setText("First Name");
                    dispFname.setLabelFor(t2);
                    TextView t3 = new TextView();
                    t3.setText(lastName);
                    Label dispLname = new Label("dispLastName");
                    dispLname.setText("Last Name");
                    dispLname.setLabelFor(t3);
                    TextView t4 = new TextView();
                    t4.setText(Email);
                    Label dispEmail = new Label("dispEmail");
                    dispEmail.setText("Email");
                    dispEmail.setLabelFor(t4);
                    TextView t5 = new TextView();
                    t5.setText(dropsel);
                    Label dispType = new Label("dispInfo");
                    dispType.setText("Display Info");
                    dispType.setLabelFor(t5);
                    Button btnback = new Button("Back");
                    btnback.setText("Back");
                    btnback.setOnClick("Back");
                    f1.addComponent(1,1,t1);
                    f1.addComponent(2,1,dispFname);
                    f1.addComponent(2,2,t2);
                    f1.addComponent(3,1,dispLname);
                    f1.addComponent(3,2,t3);
                    f1.addComponent(4,1,dispEmail);
                    f1.addComponent(4,2,t4);
                    f1.addComponent(5,1,dispType);
                    f1.addComponent(5,2,t5);
                    f1.addComponent(6,1,btnback);
                    myForm.addComponent(f1);
               break;
          case error_info:
                    FormLayout f2 = new FormLayout();
                    IPageContext ctx = this.getPageContext();
                    TextView t6 = new TextView();
                    t6.setText("Error : ");
                    t6.setDesign(TextViewDesign.HEADER2);
                    t6.setText(errorMessage);
                    f2.addComponent(3,1,t6);
                    myForm.addComponent(f2);
               break;
                default:
                              // create your GUI here....
                                        GridLayout g1 = new GridLayout();
    //                                    IPageContext ctx1 = this.getPageContext();
                                        Label first_l = new Label("First Name");
                                        InputField first_if = new InputField("FirstName");
                                        Label last_l  =  new Label("Last Name");
                                        InputField last_if = new InputField("LastName");
                                        Label email_l = new Label("E-Mail Address");
                                        InputField email_if = new InputField("email");
                                        Label info_l = new Label("Display Info for");
                                        DropdownListBox displayType = new DropdownListBox("DisplayType");
                                        displayType.addItem("userinfo", "User Info");
                                        displayType.addItem("groupinfo", "Group Membership");
                                        displayType.addItem("roleinfo", "Role Assignment");     
    //                                    displayType.setSelection(ctx1.getAttribute("DisplayType").toString());
                                        Button btn = new Button("submit");            
                                        btn.setText("Get Info");
                                        btn.setDesign(ButtonDesign.EMPHASIZED);
                                        btn.setOnClick("Get");
    //                                    add the ui controls to grid
                                        g1.setCellPadding(4);
                                        g1.addComponent(1,1,first_l);
                                        g1.addComponent(1,2,first_if);
                                        g1.addComponent(2,1,last_l);
                                        g1.addComponent(2,2,last_if);
                                        g1.addComponent(3,1,email_l);
                                        g1.addComponent(3,2,email_if);
                                        g1.addComponent(4,1,info_l);
                                        g1.addComponent(4,2,displayType);
                                        g1.addColSpanComponent(5,1,btn,2);
                                        g1.setHeightPercentage(50);
                                        g1.setColumnSize(50);
                                        myForm.setFocusedControl(displayType);
                                        myForm.setMessageBarAtFormEnd(true);
                                        myForm.setWidthInHundredPercent(true);
                                        myForm.addComponent(g1);     
                                        break;
        public void onGet(Event e)
         if(firstName.length()== 0)
              flag = error_info;
              errorMessage = "Invalid Input..............";
         else
              flag = read_info;
          public void onBack(Event e1)
                flag = disp_info;

  • Ajax in dynpages

    hi
        is it possible to use ajax in dynpages ,
        i have a scenario  where i need to use ajax in 
        dynpages .      and where can i write the exact  coding
        of ajax  in dynpage

    hi
       thanks for the reply  ,
         DropdownListBox drp = new DropdownListBox("coutry");
                drp.addItem("1","india");
              drp.addItem("2","UK");  
                 i have  written the above  for the dynpage
           now onchange of each item in the dropdown
            a javascript  has to be called which can fetch the
              index and text of the item inthe dropdown .
                 this was possible using inputfield
         as 
                     in the javascript i have used  var x = getValue()
            i am able to fetch the text from the input ,
      similarly whats is the procedure that is used in the  javascript
       to fetch the index and text from the dropdownbox 
    can any one help me out  ?  its very urgent ?

  • A problem about dropdownListBox

    Hi,everyone.
    I write a dropdownListBox.
    <hbj:dropdownListBox
               id="Class1Select"
               selection="No"
               onSelect="Class1_Selection"
               >
                <hbj:listBoxItem key="No" value="No"    />
                <hbj:listBoxItem key="NB" value="NB"    />
                <hbj:listBoxItem key="Mp3 "value="MP3" />
                <hbj:listBoxItem key="LCD" value="LCD"  />
    </hbj:dropdownListBox>
    I want to get the value when event onSelect is triggered.
    So i write some codes in doProcessAfterInput()
    DropdownListBox mySelect=(DropdownListBox) getComponentByName("Class1Select");
    But i always get nothing.
    Is it something wrong?
    Thx

    HI,
    Your Jsp is OK.
    JspDynpage Code
    =================
    package com.cts.anand;
    import com.sapportals.htmlb.DropdownListBox;
    import com.sapportals.htmlb.RadioButtonGroup;
    import com.sapportals.htmlb.event.Event;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    public class SDN11 extends PageProcessorComponent {
      public DynPage getPage(){
        return new SDN11DynPage();
      public static class SDN11DynPage extends JSPDynPage{
        public void doInitialization(){
         public void Class1_Selection(Event e) {
        public void doProcessAfterInput() throws PageException {
              DropdownListBox mySelect=(DropdownListBox)this.getComponentByName("Class1Select");
                        String s =mySelect.getSelection();
                        IPortalComponentResponse resp = (IPortalComponentResponse)this.getResponse();
                        resp.write(s);  
        public void doProcessBeforeOutput() throws PageException {
          this.setJspName("SDN11.jsp");

  • How to read vales from dropdownlistbox placed in tableView Cells

    Hi,
      Thanks for reply.. I got problem of reading values from Dropdownlist box placed in tableView Cells. Please correct me or give some sample to read vales from dropdownlistbox placed in tableView Cells.
    TableView column defined as
            <htmlb:tableViewColumn columnName = "OT_REASON_CODE"
                                   title      = "OT Reason"
                                   type       = "User"
                                   width = "6"
                                   edit       = "true" >
              <htmlb:dropdownListBox id                = "rcode"
                                     table             = "<%= I_YH008 %>"
                                     nameOfKeyColumn   = "OT_REASON_CODE"
                                     nameOfValueColumn = "OT_REASON_DESC" />
            </htmlb:tableViewColumn>
    OnInput processing I am trying to read dorpdown list values selected.
              W_YH022-ENDUZ = TABLE_EVENT->GET_CELL_VALUE(
              ROW_INDEX = SY-TABIX
              COLUMN_INDEX = 3 ).  " Get time
    DATA: data TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX.
    DATA: value type string.
         value = TABLE_EVENT->GET_CELL_ID( row_index    = SY-TABIX
                                      column_index = '7').  " get Cell ID
    data ?= CL_HTMLB_MANAGER=>GET_DATA(
                                     request = runtime->server->request
                                     name    = 'dropdownlistbox'
                                     id      = value
    IF data IS NOT INITIAL.
    W_YH022-OT_REASON_CODE = data->selection. " +Cell Values...I am not getting cell values here+
    endif.

    Hi:
    Do like this
    Layout
          <htmlb:dropdownListBox id="mydropdownlist" >
            <htmlb:listBoxItem key   = "bpno"
                               value = "Business Partner Details" />
            <htmlb:listBoxItem key   = "bpaddress"
                               value = "Business Partner Address" />
          </htmlb:dropdownListBox>
    OnInpurProcessing event - >
    DATA: lcl_dropdown TYPE REF TO cl_htmlb_dropdownlistbox.
    data : selection2 type string.
    lcl_dropdown ?= cl_htmlb_manager=>get_data(
        request = runtime->server->request
        name    = 'dropdownListBox'
        id      = 'mydropdownlist' ).   
    IF NOT lcl_dropdown->selection IS INITIAL.
      selection2 = lcl_dropdown->selection.
    ENDIF.
    Regards
    Shshi

  • Display of  icons in the items of dropdownListBox for a single item

    Dear BSP Gurus,
    Do you know if it is possible to display icons in the items of dropdownListBox for every single item?
    To assign and display icon to buttons I do:
        lv_image->id = 'UserSelectionCancel2'.
        lv_image->src = '/sap/public/bc/icons/s_B_OKYE.gif'.
        lv_image->tooltip = ''.
        clear lv_image_string.
        lv_image_string = lv_image->IF_BSP_BEE~RENDER_TO_STRING( page_context ).
                  %>
                  <xhtmlb:toolbarButton id      = "<%= ywfx1_b_bcontinueWF %>"
                                        design  = "STANDARD"
                                        text    = "<%= lv_image_string %> <%= otr(YWF11/ContWF) %>"
    But I could not managed to do it for the " <htmlb:dropdownListBox ...".
    We have application developed in ABAP WebDynpro and there it is possible, so I want to do exactly the same with BSP.
    Any idea?
    Thanks in advance,
    Valentin

    Hallo Alexandre,
    But what if I use table for defining the items?
    Like:
    htmlb:dropdownListBox id  = "DropDownCommands"
                      table             = "<%= application->mt_commands %>"
                      nameOfKeyColumn   = "VAL_COMMAND".."
    Where "application->mt_commands" is table of strings?
    Would it be some how possible?
    Regards,
    Valentin

  • How can I call a RFC from dynpage ?

    Hi!
    I would like to know how can I call a RFC from a Portal aplication, dynpage or jspdynpage. there include some libraries ?
    any idea?
    thanks

    for deploying SAP Jra :
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ad09cd07-0a01-0010-93a9-933e247d3ba4#search=%22how%20to%20use%20jca%20sapjra%20site%3Asap.com%22
    For lookup of SAP Jra use:
    com.sapportals.connector.connection.IConnectionFactory connectionFactory =(IConnectionFactory) initctx.lookup( "deployedAdapters/SAPFactory/shareable/SAPFactory");
    Using SAP Jra
    http://help.sap.com/saphelp_nw04s/helpdata/en/47/13044258bdd417e10000000a1550b0/content.htm
    The important jars required are:
    connector.jar
    Genericconnector.jar
    prtjndisupport.jar
    Thanks

  • How to set a default value in a dropdownlistbox

    Hi,
    In CRM 2007 WEBUII have created a dropdownlistbox (ddlb)  filled with currency codes.
    Now I want the default value of the ddlb to be the currency of the country of the loggedin user, ie : 'EUR'
    Anyone an creative idea how I can achieve this ?
    In first place I need to know how I can set a default value of a ddlb.
    --> ddlb type ref to CL_CRM_UIU_DDLB.
    regards,
    Abjuh

    Hello Wolfgang,
    If the method does not exist yet, you can create it in your enhanced (Z) context node.
    Definition:
    ATTRIBUTE_PATH Importing     Type                  STRING
    ITERATOR          Importing           Type Ref To     IF_BOL_BO_COL_ITERATOR
    VALUE                    Returning        Type                  STRING
    Implementation:
    method GET_BP_GROUP.
        DATA: current TYPE REF TO if_bol_bo_property_access.
        DATA: dref    TYPE REF TO data.
        if iterator is bound.
          current = iterator->get_current( ).
        else.
          current = collection_wrapper->get_current( ).
        endif.
      TRY.
        TRY.
            dref = current->get_property( 'BP_GROUP' ). "#EC NOTEXT
          CATCH cx_crm_cic_parameter_error.
        ENDTRY.
        CATCH cx_sy_ref_is_initial cx_sy_move_cast_error
              cx_crm_genil_model_error.
          RETURN.
      ENDTRY.
        IF dref IS NOT BOUND.
          value =''
          RETURN.
        ENDIF.
        TRY.
            value = if_bsp_model_util~convert_to_string( data_ref = dref
                                        attribute_path = attribute_path ).
          CATCH cx_bsp_conv_illegal_ref.
            FIELD-SYMBOLS: <l_data> type DATA.
            assign dref->* to <l_data>.
    *       please implement here some BO specific handler coding
    *       conversion of currency/quantity field failed caused by missing
    *       unit relation
    *       Coding sample:
    *       provide currency, decimals, and reference type
    *       value = cl_bsp_utility=>make_string(
    *                          value = <l_data>
    *                          reference_value = c_currency
    *                          num_decimals = decimals
    *                          reference_type = reference_type
            CONCATENATE <l_data> '-CURR/QUANT CONV FAILED-' INTO value
                        SEPARATED BY space.                 "#EC NOTEXT
          CATCH cx_root.
            value = '-CONVERSION FAILED-'.                  "#EC NOTEXT
        ENDTRY.
        if value is initial.
         value = 'Your default value'.
        endif.
    endmethod.
    Regards,
    Fabian

  • Help on calling a dynpage on click of a URL

    hi all,
    I have a iview of a jspdynpage and it contains a url link as below..
    http://amsdc2-s-917.europe.shell.com/irj/servlet/prt/portal/prtroot/com.shell.ep.siep.sapportals.service.c000326_login_management_client.default?id=0&targeturl=http://sww-jen.shell.com/
    And once i click this url link, i need to invoke a dynpage component and from the request object i need to read the "targetURL" parameter in the above url ...
    In my doInitization method of dynpage i have the below code
    IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
    this.targetURL = request.getParameter(targetURL);
    I want to know how to match the url link  with the request object of my dynpage...
    Plz help me as i am stuck in this point for a long time.
    Thanks and Regards,
    Siva

    Hi Siva,
    If you mean that you have parameters included into targetURL like this
    targetURL=http%3A%2F%2Fsww-jen.shell.com%3Fparam1%3Dvalue1%26param2%3Dvalue2
    and your question is how to get them, you will need to get targetURL parameter first, then to get the query string from the URL and tokenize it with String.split method (see JDK 1.4.2 documentation on how to use it)
    String targetURL = componentRequest.getParameter("targetURL");
    URL url = new URL(targetURL);
    String queryString = url.getQuery();
    //parse the query string
    Regards,
    Dmitry

  • How to have a popup in Jsp Dynpage

    Hi All,
    I am having a JSP dynpage project working fine.
    I now need a popup on click of a button in a iview (JSP).
    I created a complete new JSPDynpage component with Bean etc.
    I use the below code
    window.open('project.componentname') to have a popup.
    and in portal. xml I define the properties ComponentType & JSP.
    the window pops up but with error at all times even for a blank JSP,
    your help would be well apprictiated at this stage of my project situation.
    I need a popup window where that popup is not just a confirm message but a process with several events and DB access.
    Thanks in advice,
    blsaiue

    Hi
    Avaialable controls in JSP Dynpage technologies.
    http://help.sap.com/saphelp_nw04/helpdata/en/d0/55074155bcf26fe10000000a1550b0/frameset.htm
    Regards
    -SS

  • Sample code on how to populate data in DropDownListbox

    Hi all
    i am new to the webdynpro for java.
    i have one UI element called DropDownListBox and i want to populate some desired values to the dropdown list box.
    what are the different ways are there to populate data in DropDownList box.
    for example i have city as dropdownlist box and i want to populate some values in drop downlistbox like bangalore,hyderabad,chennai and delhi,
    can you pls send the sample code on the same?
    Regards
    Suresh Babu

    Hi,
    If you want to retrieve the city names then you can use the standard tables in R/3.
    We have countries list in T500T. Like this we have table for the cities also.
    Or
    You can manually populate a table and bind this table to the list box.
    Please check out this link -
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ded11778-0801-0010-258f-ac3b9408a194
    http://help.sap.com/saphelp_nw70/helpdata/EN/74/450e8af57065468e88e4b86de47e4b/frameset.htm
    Regards
    Lekha

  • DynPage - Runtime error in Portal

    Hi
    Have the following code in a DynPage application.
    public void doProcessBeforeOutput() throws PageException {
    ... other code here
    IPortalComponentRequest request =(IPortalComponentRequest) this.getRequest();
    com.sapportals.portal.security.usermanagement.IUser user =
         (com.sapportals.portal.security.usermanagement.IUser) request.getUser().getUser();
                   IResourceContext ctxt = new ResourceContext(user);
                   RID rid = RID.getRID("/documents");
    There are no compilation errors.
    Have created a Iview in Portal. On execution of Iview following error is shown
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : DynPageProject.M_Test
    Component Name : DynPageProject.M_Test
    com/sapportals/portal/security/usermanagement/IUser.
    Exception id: 11:14_04/03/08_0051_3930150
    See the details for the exception ID in the log file
    All imports are ok. What could be the error in the code ?
    Content of Portalapp.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
      <components>
        <component name="M_Test">
          <component-config>
            <property name="ClassName" value="com.mil.M_Test"/>
          </component-config>
          <component-profile/>
        </component>
      </components>
      <services/>
    </application>
    The error log says
    Caused by: java.lang.NoClassDefFoundError: com/sapportals/portal/security/usermanagement/IUser
    How to resolve this ? I am doing the development using NWDS.
    Regards,
    Sumant
    Edited by: Sumant Mujumdar on Mar 4, 2008 11:12 AM

    Hi,
          Declare service reference for the usermanagement and sharing reference for KM service in portalapp.xml
    <application-config>
    <property name="SharingReference" value="knowledgemanagement"/>
    <property name="ServicesReference" value="com.sap.portal.usermanagement/>
    </application-config>
    Also add all these jars into PORTAL-INF/lib folders and also as external jars in build path. That will solve NoClassDefFound problem.
    Regards,
    Harini S
    Reward points for helpful answers

  • 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

  • Problem with next month for DateNavigator in DynPage

    Hi
    I have a problem with using the DateNavigator in DynPage.
    I can not navigate to the previous/next month by using the event onNavigate();
    The following is my code
        public void doProcessBeforeOutput() throws PageException {
           IPageContext pagecontext = this.getPageContext();
           Form form = this.getForm();
           DateNavigator dn = new DateNavigator(pagecontext);
           dn.setId("myDateNavigator1");
           dn.setMonthsPerColumn(1);
           dn.setMonthsPerRow(1);
           dn.setCenteredMonth(3);
           dn.setOnNavigate("myOnNavigate");
           form.addComponent(dn);
         public void onMyOnNavigate(Event event){
              DateNavigatorNavigationEvent nvEvent = (DateNavigatorNavigationEvent) event;
              DateNavigator dn = (DateNavigator)this.getComponentByName(nvEvent.getComponentName());
              if ("next".equals(nvEvent.getDirection())){
                   dn.setCenteredMonth(4);
              if ("previous".equals(nvEvent.getDirection())){
                   dn.setCenteredMonth(2);
    Does anybody know what is the problem with it? Or konw how to control the navigation?
    Thank you for help.
    Best Regards
    Zhou

    Hi
    I have a problem with using the DateNavigator in DynPage.
    I can not navigate to the previous/next month by using the event onNavigate();
    The following is my code
        public void doProcessBeforeOutput() throws PageException {
           IPageContext pagecontext = this.getPageContext();
           Form form = this.getForm();
           DateNavigator dn = new DateNavigator(pagecontext);
           dn.setId("myDateNavigator1");
           dn.setMonthsPerColumn(1);
           dn.setMonthsPerRow(1);
           dn.setCenteredMonth(3);
           dn.setOnNavigate("myOnNavigate");
           form.addComponent(dn);
         public void onMyOnNavigate(Event event){
              DateNavigatorNavigationEvent nvEvent = (DateNavigatorNavigationEvent) event;
              DateNavigator dn = (DateNavigator)this.getComponentByName(nvEvent.getComponentName());
              if ("next".equals(nvEvent.getDirection())){
                   dn.setCenteredMonth(4);
              if ("previous".equals(nvEvent.getDirection())){
                   dn.setCenteredMonth(2);
    Does anybody know what is the problem with it? Or konw how to control the navigation?
    Thank you for help.
    Best Regards
    Zhou

  • How to put the trace messages in JSP DynPage

    Hi,
    How to put the trace messages in JSP DynPage components. What settings I need to do and where do I see the trace log.
    Can I also print the values of some variables in trace. If yes, how to achieve this?
    Thanks in advance,
    Regards,
    Madhu

    Hi Madhu,
    for NW04 see http://help.sap.com/saphelp_nw04/helpdata/en/e2/75a74046033913e10000000a155106/frameset.htm
    as well as
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/using logging and tracing on the sap web as java.pdf
    Hope it helps
    Detlev

Maybe you are looking for

  • How to help my friend install Microsoft Office for Mac 2008

    Hello, I have a friend in North Carolina whose mom recently got a MacBook Pro running OS X Mountian Lion (10.8), he will be coming on to join this discussion after I post it. He needs Microsoft Office for his mom and I just happened to have purchase

  • How do you configure hugepages in OEL 5 x64 (2.6.18-128.el5xen)?

    I'm in the process of setting up several machiens running OEL 5 64-bit (kernel 2.6.18-128.el5xen). I would like to configure hugepages for use with TimesTen but it seems this is done differently in OEL 5 compared to OEL 4 and I can't seem to find any

  • Trying to decide between Lr and Elements?

    Anyone have a preference on Adobe Lr and Adobe Elements 11? I'm trying to decide wich one is better suited for me..

  • /SAPMP/BAPI_MATERIAL_SAVEDATA return error

    Hi to All, I'm using the BAPI /SAPMP/BAPI_MATERIAL_SAVEDATA but return the following error: "Material number xxxxxxxxx" does not exist on the database Have you idea? Please, help me. Thanks & Regards, Umberto

  • Bapi updating issue for MD61

    Hello All, My code for MD61 upload data is as follows. the issue is if we have any record in the excel is having the wrong data, it is not updating the below records. SORT itab BY matnr werks.   DELETE ADJACENT DUPLICATES FROM itab COMPARING matnr we