HTMLB +  htmlb:button

Hello Friends,
I have a problem in using HTMLB, button in view of BSP page. Actually the problem is that I want to call the main contrller when user click on the button. But as in view there is not Event Handler, so while "onClick="event_1"/>, how I can handle this event!
here is a bit of code segment!
<htmlb:button  width="10" onClick="event_1"/>
Does it work ?? like this if I call controller direct ??
<htmlb:button  width="10" onClick="main.do"/>
With Regards,
Haider Syed.

So, after making a small mistake in my last post (corrected now), I will try to bring some light into this situation:
First, summarize all the options you have:
Each form has a "target" (<b><form action="target_controller.do"></b>) which the browser will submit the form data to.
Note that this is different from the actual target-attribute (<b><form target="_blank"></b>), which is used to specify the location where the server-response will be displayed - you can let it be shown in a new window here.
Then, for form elements, you have the option to set client-side javascripts, using the <b>onClientClick</b> attribute. It's best if you just call a javascript function here, and define this function somewhere else in your code (javascript-file-include for example).
<htmlb:button ...
   onClientClick="yourFunction();" />
You can access your HTML elements (also form elements) using javascript, so changing the target or action parameter from within your function is possible!
To finish this post, there is the server-side event, specified by the <b>onClick</b> attribute, which is usually checked for in DO_HANDLE_EVENT (in case of MVC) or in OnInputProcessing (for non-MVC BSP pages, like Craig mentioned). But remember, this is server-side event!
So, with this info, you should be able to specify in more detail what you call "for each button a new event" - whether you mean server-side or client-side event ... maybe thinking about this alone will almost solve your problem.
Regards,
Max

Similar Messages

  • Space between htmlb radio buttons

    Hello all,
    I'm working with a jsp as part of a par file, and I'm trying to put a little bit of space between two radio buttons in a radioButtonGroup hbj tag. I've not had any success in doing so. Here's my code:
    <hbj:radioButtonGroup
      id="rbgSuppressZeros"
      columnCount="2"
      selection="N">
      <% rbgSuppressZeros.setOnClick("suppressZeros"); %>
      <hbj:radioButton
        id="doNotSuppress"
        text="Dont Suppress Zero Quantities"
        key="N"
        />
      <hbj:radioButton
        id="doSuppress"
        text="Suppress Zero Quantities"
        key="Y"
        />
      <% rbgSuppressZeros.setSelection(SearchBean.getSuppressZeros());%>
    </hbj:radioButtonGroup>
    I've tried adding spaces in the text attribute without success. I've also tried including   in the text attribute, but the page just displayed ' ' instead of translating it into a space. I tried adding   several times between the hbj:radioButton tags without success.
    Does anyone know how to do this?
    Thanks!
    Stephen Spalding
    Web Developer
    Graybar

    Hi Stephen,
    Try this code:
    <hbj:radioButtonGroup
    id="rbgSuppressZeros"
    columnCount="2"
    selection="N">
    <% rbgSuppressZeros.setOnClick("suppressZeros"); %>
    <hbj:radioButton
    id="doNotSuppress"
    text="Dont Suppress Zero Quantities"
    key="N"
    />
    <br>
    <hbj:radioButton
    id="doSuppress"
    text="Suppress Zero Quantities"
    key="Y"
    />
    <% rbgSuppressZeros.setSelection(SearchBean.getSuppressZeros());%>
    </hbj:radioButtonGroup>
    by adding the <br> tag it gives a space between your radio buttons. You can add as many <br> tag according to your requirement.
    Hope this solves your problem. If any problem then let me know.
    Regards
    Pravesh
    PS: Please award points if helpful.

  • HTMLB- Button Event CASE Dyn Nav problem

    Hi,
    I am prototyping a solution in BSP which has a page with two buttons at the bottom, a BACK button and a SUBMIT button which both send the User to different pages, and I can't make the re-directs work.
    I am trying to stick to HTMLB and not get lazy and use HTML.
    I have a page call it page1.htm, at the bottom there is a submit button and back button with htmlb code as follows:
    <htmlb:button       text         = "Back"
                        onClick      = "event_1" />
    <htmlb:button       text         = "Submit Request"
                        onClick      = "event_2" />
    in the EVENT HANDLER for the OnInputProcessing Event I have the following CASE statement:
    CASE event_id.
      WHEN 'event_1':.
      navigation->goto_page( 'default.htm' ).
      WHEN 'event_2':.
      navigation->goto_page( 'submitresult.htm' ).
    ENDCASE.
    the idea is that when the BACK button is pressed the OnInputProcessing event handler will pick this up and using the value of the EVENT_ID which can be either event_1 or event_2 the CASE statement will re-direct the User to the correct page.
    Problem -> it doesn't work.
    Does anyone have any ideas where I am going wrong.
    Thanks for your time,
    Milan.

    Hallo Milan, (interesting name, English?)
    Somehow we are just overlooking something. I quickly built a very small cut-and-paste example.
    Create a new BSP application, and add into it three pages called page1.htm, page2.htm and page3.htm. The source is below. (Note all three has the same event handler:).
    <b><u>onInputProcessing for all three pages</u></b>
    DATA: event TYPE REF TO if_htmlb_data.
    event = cl_htmlb_manager=>get_event_ex( request ).
    IF event IS NOT INITIAL AND event->event_name = 'button'.
      navigation->goto_page( event->event_server_name ).
    ENDIF.
    <b><u>page1.htm</u></b>
    <%@page language="abap" otrTrim="true"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content design="design2003">
      <htmlb:page>
        <htmlb:form>
          <htmlb:button       text          = "Page 2"
                              design        = "NEXT"
                              onClick       = "page2.htm" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b><u>page2.htm</u></b>
    <%@page language="abap" otrTrim="true"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content design="design2003">
      <htmlb:page>
        <htmlb:form>
          <htmlb:button       text          = "Page 1"
                              design        = "PREVIOUS"
                              onClick       = "page1.htm" />
          <htmlb:button       text          = "Page 3"
                              design        = "NEXT"
                              onClick       = "page3.htm" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b><u>page3.htm</u></b>
    <%@page language="abap" otrTrim="true"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content design="design2003">
      <htmlb:page>
        <htmlb:form>
          <htmlb:button       text          = "Page 2"
                              design        = "PREVIOUS"
                              onClick       = "page2.htm" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    I highly recommend to run this in design2003. You will love that PREVIOUS/NEXT design on the buttons. If this example is not working for you, there are a few other things to be checked. But first try this.
    ++bcm

  • Unable to capture onClick event of htmlb:image in a controller

    Hi,
    I am trying to capture onClick event of an htmlb:image (which is present in my view) in DO_HANDLE_EVENT method of my controller.
    Surprisingly, when I click the image, page does refreshes. But the event in not captured in do_handle_event method. Control never reaches that method. Whereas if I put onClick event of a button, it is easily captured in do_handle_event method.
    Ex. code in my view is:
    <%@page language="abap"%>
    <%@extension name="bsp" prefix="bsp" %>
    <%@extension name="htmlb" prefix="htmlb"%>
        <htmlb:image id      = "searchimg"
                     src     = "consvalue.jpg"
                     onClick = "search"  />
        <htmlb:button id="searchbutton" onClick="search"
                                     text="Event Test"/>
    Now, the button event is captured, but not the image event.
    Any idea why this might be happening?
    Regards,
    Kaushal

    Hi Kaushal,
    are image and button enclosed by <htmlb:form> ?
    Please post your of do_handle_event, where you look for the event.
    Regards,
    Sebastian

  • Problem with repeating htmlb:tray onExpand event

    I have an htmlb:tray in my bsp application with an onExpand event.  I want a report generated and displayed when the tray is expanded, and this works the first time that I click on the tray icon.  However, if I am still on the same page, close the tray, and then re-open it, the tray expands with empty content.  If I set breakpoints in DO_HANDLE_EVENT, DO_INIT, and DO_REQUEST, nothing is caught.  It is as if no event is raised after the first time that the tray is opened.  If I leave the page and come back, then my process is working again.
    I cannot assume that my users will only open a tray once while on a page.  Is there a trick to get the onExpand event to trigger more than once?  (I have several trays with various reports on the page, and I don't want to pre-generate all of them.)
    Janice Ishee

    Hi,
    You need to use <b>onCollapse Event</b> also. I tested. Its working fine after adding the onCollapse Here is the sample code:
    <b>Layout:</b>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title=" " >
        <htmlb:form>
          <htmlb:tray id          = "TermReq"
                      title       = "Termination request"
                      width       = "225"
                      onExpand    = "getTermReq"
                      onCollapse  = "dummy"
                      isCollapsed = "<%= query->enab_trmreq %>" >
            <htmlb:trayBody>
              <htmlb:textView text   = "Hello World!"
                              design = "EMPHASIZED" />
              <htmlb:button text    = "Press Me"
                            onClick = "myClickHandler" />
            </htmlb:trayBody>
          </htmlb:tray>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Event handling:
    EVENT_ID1 TYPE REF TO IF_HTMLB_DATA.
    EVENT_ID1 = CL_HTMLB_MANAGER=>GET_EVENT_EX( REQUEST ).
    CASE EVENT_ID1->EVENT_SERVER_NAME.
      WHEN 'tray'.
      WHEN 'getTermReq'.
        QUERY->ENAB_TRMREQ = ''.
      WHEN 'dummy'.
        QUERY->ENAB_TRMREQ = 'true'.
    ENDCASE.
    Hope this will solve your problem.
    Raja T
    Message was edited by:
            Raja T

  • Input field validation using JSP in HTMLB

    Hi All,
    How can we validate an input field in a form in BSP page.
    Like: There are two input fields in my form.I want the user to enter value in any one and only one of the fields.If the value is entered in both fields or none of the fields the user should get a popup and form  must not be submited.
    Shall i use the onClientClick attribute of Button element or doValidate attribute of Inputfield element or  validationScript attribute of From element?
    Please help.
    Thanks a lot,
    Anubhav.

    Here you go:
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title=" " >
        <htmlb:form id="form1" >
          < script t-ype = "text/javascript" >     "Remove "-" between t & ype in type
          function checkInput()
           var field1 = document.form1.field1.value;
           var field2 = document.form1.field2.value;
    var error = "";
    if(field1 != "" && field2 != "")
              { error = "X";
                  javascript error message here          }
    if(field1 == "" && field2 ==  "")
              { error = "X";
                                javascript error message here
    if(error == "")
              htmlbSL(this,2,'mybutton:Submit');
          < / script >
              <htmlb:textView text      = "Hello World!"
                              textColor = "RED"
                              design    = "HEADER1"
                              align     = "CENTER" />
              <htmlb:inputField id        = "field1"
                                value     = "<%= var1 %>"
                                type      = "integer"
                                alignment = "CENTER" />
              <htmlb:inputField id        = "field2"
                                value     = "<%= var2 %>"
                                type      = "integer"
                                alignment = "CENTER" />
              <htmlb:button id            = "mybutton"
                            text          = "Press Me"
                            onClientClick = "javascript:checkInput();" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Raja T
    Message was edited by:
            Raja Thangamani

  • RestoreViewState  with HTMLB-TREES/TREENODES

    Hello,
    we want to achieve that our dynamic tree will
    be built up in the state it was before we jumped onto another page. When navigating backwards, the tree
    does not remember any more it treenodes properties.
    Just the root is displayed, not any more the information which node was open and which not.
    Also restoreViewState  = "TRUE" did not help.
    Any ideas ?
    Thanks.

    Here is a complete (yet simplistic) example that proves that the serialization idea works.
    Stateless Application
    Page One called tree.htm
    Page Attributes (Auto Flag is NOT set)
    h1_isopen     TYPE     STRING
    h2_isopen     TYPE     STRING
    view_state     TYPE     SHSVALTAB
    OnInitialization
    * event handler for data retrieval
    DATA: istream TYPE string,
             xslt_err TYPE REF TO cx_xslt_exception.
    **** Read Server cookie
    CALL METHOD cl_bsp_server_side_cookie=>get_server_cookie
       EXPORTING
         name                  = 'view_state'
         application_name      = runtime->application_name
         application_namespace = runtime->application_namespace
         username              = sy-uname
         session_id            = runtime->session_id
         data_name             = 'view_state'
       CHANGING
         data_value            = istream.
    **** deserialize the Class
    IF istream IS NOT INITIAL.
       TRY.
           CALL TRANSFORMATION id
           SOURCE XML istream
           RESULT view_state = view_state.
         CATCH cx_xslt_exception INTO xslt_err.
       ENDTRY.
    ENDIF.
    CHECK view_state IS NOT INITIAL.
    FIELD-SYMBOLS: <wa_state> LIKE LINE OF view_state.
    LOOP AT view_state ASSIGNING <wa_state>.
       IF <wa_state>-key CS 'Header1'.
         IF <wa_state>-value = 'O'.
           h1_isopen = 'TRUE'.
         ENDIF.
       ENDIF.
       IF <wa_state>-key CS 'Header2'.
         IF <wa_state>-value = 'O'.
           h2_isopen = 'TRUE'.
         ENDIF.
       ENDIF.
    ENDLOOP.
    OnInputProcessing
    * event handler for checking and processing user input and
    * for defining navigation
    DATA: fields TYPE tihttpnvp.
    request->get_form_fields( CHANGING fields = fields ).
    FIELD-SYMBOLS: <wa_field> LIKE LINE OF fields,
                   <wa_state> LIKE LINE OF view_state.
    LOOP AT fields ASSIGNING <wa_field>.
      IF <wa_field>-name CS 'test'. "My Tree ID
        APPEND INITIAL LINE TO view_state ASSIGNING <wa_state>.
        <wa_state>-key   = <wa_field>-name.
        <wa_state>-value = <wa_field>-value.
      ENDIF.
    ENDLOOP.
    DATA: ostream TYPE string,
            xslt_err TYPE REF TO cx_xslt_exception.
    ***** serialize model class
    TRY.
        CALL TRANSFORMATION id
        SOURCE view_state = view_state
        RESULT XML ostream.
    ****Write cookie it into the Server Cookie
        cl_bsp_server_side_cookie=>set_server_cookie( name = 'view_state'
          application_name = runtime->application_name
          application_namespace = runtime->application_namespace
          username = sy-uname
          session_id = runtime->session_id
          data_name = 'view_state'
          data_value = ostream
          expiry_time_rel = '1200' ).
      CATCH cx_xslt_exception INTO xslt_err.
    ENDTRY.
    navigation->goto_page( 'Navigate.htm' ).
    Layout of tree.htm
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title=" " >
        <htmlb:form>
          <htmlb:tree id               = "test"
                      restoreViewState = "TRUE" >
            <htmlb:treeNode id     = "Header1"
                            text   = "Header1"
                            isOpen = "<%= h1_isopen %>" >
              <htmlb:treeNode id     = "Header2"
                              text   = "Header2"
                              isOpen = "<%= h2_isopen %>" >
                <htmlb:treeNode id   = "Item1"
                                text = "Item1" />
                <htmlb:treeNode id   = "Item2"
                                text = "Item2" />
              </htmlb:treeNode>
              <htmlb:treeNode id   = "Item3"
                              text = "Item3" />
              <htmlb:button text    = "test"
                            onClick = "TEST" />
            </htmlb:treeNode>
          </htmlb:tree>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Second Page Navigate.htm (Just a dummy page to simulate Navigation)
    OnInputProcessing
    * event handler for checking and processing user input and
    * for defining navigation
    navigation->goto_page( 'tree.htm' ).
    Layout for Navigate.htm
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content design="design2003">
      <htmlb:page title = " ">
        <htmlb:form>
          <htmlb:textView     text          = "Hello World!"
                              design        = "EMPHASIZED" />
          <htmlb:button       text          = "Press Me"
                              onClick       = "myClickHandler" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>

  • HTMLB Link usage, question

    I am new to HTMLB, question
       Button myButton = new Button("submitButton");
       myButton.setOnClick("sendName");
       myButton.setText("Go to Yahoo");
       myButton.setTooltip("Click here to go to Yahoo.");
      the implementation of onSendName
      public void onSendName(Event myName) throws PageException {
               String url = "http://www.yahoo.com";
               Link lk = new Link("mylink", "yahoo");
               lk.setReference("http://www.yahoo.com");
               lk.setTarget("_blank");
                      ??????? now what???
                     //How do I get to the link?
                     Please help fill in, appreciate:
       If this is the not the right way, any other way to achieve this?
    thanks much.
    Dave Wang

    Yes, Eric, thanks for the answer. in this case. I can substitute the button with a link. But
    In another scenario, I have a tableview, then every cell clicked will lead to a url generated based on the content of the table cell,
      for example, cell(1,2)="userABC", onCellClick() funciton will generate a Link to: "http://xxx?userid=userABC". When user clicks cell(1,2), it should go to the generated URL.
    It would be great if I can generate the link then direct the browser to the URL at onCellClick().
    How do I handle this case?
    thanks for any suggestions.
    Dave Wang

  • Disable HTMLB dropdown with JavaScript

    Hi All,
    I ran into the following issue:
    I have a BSP page that used HTMLB dropdowns and some custom javascript that disabled those dropdowns interactively when a user clicked on a checkbox.
    Example: tempDropdown.disabled = true;
    Unfortunately, as soon as I changed the control rendering attribute to "SAP", the look&feel of dropdowns changed and they no longer appear to be based on "select-one" HTML object. Therefore, my custom JavaScript no longer works.
    Do you know how I could visually (interactively) disable the "SAP" rendered HTMLB dropdown with a custom javascript?
    Thanks!
    Roman

    here is the complete code of my sample.
    <b><u>page attribute</u></b>
    tab1     TYPE     TIHTTPNVP
    tab1_wa     TYPE     IHTTPNVP
    tab2     TYPE     TIHTTPNVP
    tab2_wa     TYPE     IHTTPNVP
    <b><u>layout</u></b>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003"  controlRendering="SAP" >
      <htmlb:page title=" " >
        <htmlb:form>
          <%
      clear tab1_wa .
      refresh tab1 .
      move: 'PRI' to tab1_wa-name ,
      'Printer' to tab1_wa-value .
      append tab1_wa to tab1 .
      move: 'FAX' to tab1_wa-name ,
      'Fax' to tab1_wa-value .
      append tab1_wa to tab1 .
      move: 'EMA' to tab1_wa-name ,
      'Email' to tab1_wa-value .
      append tab1_wa to tab1 .
          %>
          <%
      clear tab2_wa .
      refresh tab2 .
      move: '[email protected]' to tab2_wa-name ,
      'Some One' to tab2_wa-value .
      append tab2_wa to tab2 .
      move: '[email protected]' to tab2_wa-name ,
      'Mr X' to tab2_wa-value .
      append tab2_wa to tab2 .
      move: '[email protected]' to tab2_wa-name ,
      'Mr Y' to tab2_wa-value .
      append tab2_wa to tab2 .
          %>
    <script language="javascript">
      function SetDisabled(elem,disable)
      var ip = document.getElementById(elem);
      ip.disabled = disable ;
    </script>
          <htmlb:label for  = "DDLB1"
                       text = "Carrier" />
          <htmlb:dropdownListBox id                = "DDLB1"
                                 nameOfKeyColumn   = "NAME"
                                 nameOfValueColumn = "VALUE"
                                 table             = "<%= tab1 %>"
                                 onClientSelect    = "javascript:dd = document.forms[0].DDLB1; alert(dd.options[dd.selectedIndex].value);"
                                 width             = "150" />
          <htmlb:dropdownListBox id                = "DDLB2"
                                 nameOfKeyColumn   = "NAME"
                                 nameOfValueColumn = "VALUE"
                                 table             = "<%= tab2 %>"
                                 width             = "150" />
          <htmlb:button text          = "Press Me"
                        onClientClick = "javascript:SetDisabled('DDLB2', 'true');" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    try this in your system and let me know whether it works or not
    Regards
    Raja

  • Why is my CSS style not applied to my HTMLB page ?

    Hello !
    I'm using a css file to define the layout of my htmlb page... but the layout is not applied.
    When I specify the layout CSS in a common html page the layout is applied but not for an htmlb page.
    Could someone let me know where I'm wrong ?
    EG :
    My htmlb page :
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content>
      <htmlb:page title=" " >
          <html>
                <head>
                <link href="style.css" rel="stylesheet" type="text/css">
                </head>
                <body>
                text1
        <htmlb:form>
            text2
        </htmlb:form>
                </body>
          </html>
      </htmlb:page>
    </htmlb:content>
    My css file style.css :
    <%@page language="abap"%>
    body {
        background-color: #990000;
        font-family: Verdana;
        font-size: 32x;
        line-height: 32px;
        color: #666666;
    As a result, I have a blank page (and not red) with the text "text1" and "text2" written.

    This code you have is unfortunately completely bogus. It is just not going to work. Writing HTMLB tags are easy. It takes but minutes to make the magic appear in the browser. But, you have also have to understand a little about what is happening.
    At a very first, I would like to recommend this link: <a href="/people/brian.mckellar/blog/2004/06/11/bsp-trouble-shooting-getting-help">Getting Help</a>. You are specifically interested in the section that shows you how to get help about specific tags.
    As a next step, look at the help for the <htmlb:page> tag. It is the first important one. See how it is a collection of other <htmlb:document*> tags.
    Thereafter, look at SBSPEXT_HTMLB/document.BSP for an example on how to replace the <htmlb:page> sequence in your application.
    Once this is done, place you "<link ...>" sequence directly after the <htmlb:headInclude> tag that you have now on your page.
    Compile, test, assign 10 points.

  • How to insert check box fields in a htmlb: tableview

    Hi,
    Can anybody tell me how to insert check box fields in a htmlb: tableview in a sequence of rows in a table view. How to generate the sequence no for the checkbox inorder to know the row that is checked.
    Thanks in advance,
    Aruna.

    Here is the code which has the custom "Checkbox" in the tableview & Triggers the event. <b>You can identify the checkbox based on cell ID (p_cell_id)</b> in the method "IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START" & Based on the event name + Cell ID. Look at the code & let me know if you any issue.
    <b>Layout:</b>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content id               = "content"
                   design           = "design2002+design2003"
                   controlRendering = "SAP"
                   rtlAutoSwitch    = "true"
                   forceEncode      = "ENABLED" >
      <htmlb:page title="Test " >
        <htmlb:form>
          <%
      data TV_ITERATOR Type Ref To zcl_itr.
      data iterator type ref to IF_HTMLB_TABLEVIEW_ITERATOR.
      create object tv_iterator exporting appl_cons = application.
      iterator = tv_iterator.
          %>
          <htmlb:tableView id              = "fligts"
                           headerText      = "Flight"
                           width           = "100"
                           headerVisible   = "true"
                           design          = "alternating"
                           visibleRowCount = "10"
                           fillUpEmptyRows = "true"
                           showNoMatchText = "true"
                           filter          = "server"
                           sort            = "server"
                           onHeaderClick   = "MyEventHeaderClick"
                           table           = "<%= APPLICATION->itab %>"
                           iterator        = "<%= ITERATOR %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b>Event Handling:</b>
    DATA: EVENT_ID1 TYPE REF TO IF_HTMLB_DATA.
    EVENT_ID1 = CL_HTMLB_MANAGER=>GET_EVENT_EX( REQUEST ).
    CASE EVENT_ID1->EVENT_SERVER_NAME.
    IF NOT event_id1 IS INITIAL.
       if event_id1->server_event+0(9) = 'chkevent'.
      SPLIT event_id1->server_event AT '-' INTO v_event v_dummy v_row v_col.
      endif.
    endif.
    method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS.
         CLEAR p_column_definitions.
        CLEAR p_overwrites.
        DATA: tv_column  TYPE TABLEVIEWCONTROL.
        tv_column-COLUMNNAME  = 'FLDATE'.
        tv_column-edit        = 'X'.
        tv_column-sort        = 'X'.
        tv_column-TITLE               = 'Flight Date'.
        tv_column-WIDTH  = '100'.
        APPEND tv_column TO p_column_definitions.
        CLEAR tv_column.
        tv_column-edit        = 'X'.
        tv_column-COLUMNNAME          = 'CONNID'.
        tv_column-TITLE               = 'Conn.ID'.
        tv_column-WIDTH  = '70'.
        tv_column-HORIZONTALALIGNMENT = 'center'.
        APPEND tv_column TO p_column_definitions.
        CLEAR tv_column.
        tv_column-edit        = 'X'.
        tv_column-COLUMNNAME          = 'CHECKBOX1'.
        tv_column-TITLE               = 'Check Box'.
        tv_column-WIDTH  = '30'.
        tv_column-HORIZONTALALIGNMENT = 'center'.
        APPEND tv_column TO p_column_definitions.
    endmethod.
    METHOD IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
           DATA: L_EVENT TYPE STRING.
      CASE P_TABLEVIEW_ID.
        WHEN 'fligts'.
          CASE P_COLUMN_KEY.
            WHEN 'CHECKBOX1'.
    *          CONCATENATE 'chk_event' '123' '2323' INTO L_EVENT SEPARATED BY '-' .
    CONCATENATE 'chkevent' p_cell_id INTO l_event SEPARATED BY '-'.
              P_REPLACEMENT_BEE = CL_HTMLB_CHECKBOX=>FACTORY( ID = P_CELL_ID
            ONCLICK = L_EVENT CHECKED = 'false' ).
          ENDCASE.
      ENDCASE.
    ENDMETHOD.
    Hope this will solve your problem.
    <b><i>* Reward each helpful answer.</i></b>
    Raja T
    Message was edited by:
            Raja T

  • Syntax error while activating BSP with OTR in htmlb element

    Hallo,
    I get a syntax error if I try to activate the BSP below with the lines commented out: "Statement concluding with "...%_O2_UTL_000" ended unexpectedly".
    I don't know what's going wrong. Have I to to any basis settings or to activate any more services etc? Or is it a bug? WAS620 SP53.
    Can anybody help?
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content>
      <htmlb:document>
        <%-- does not work
        <htmlb:documentHead title="<%=otr(SOTR_VOCABULARY_BASIC/ALL_ITEMS)%>" />
        --%>
        <htmlb:documentHead title="OK" />
        <htmlb:documentBody>
         <%=otr(SOTR_VOCABULARY_BASIC/ALL_ITEMS)%> <-- OK
         <%-- does not work
         <htmlb:textView id="t1" text = "<%=otr(SOTR_VOCABULARY_BASIC/ALL_ITEMS)%>" />
         --%>
         <htmlb:textView id="t1" text = "OK" />
         </htmlb:documentBody>
      </htmlb:document>
    </htmlb:content>
    Thank you
    Andreas

    Thank you for this note.
    I haven't found any one. The keywords 'OTR' or 'HTMLB' are not mentioned in the note...
    I have triggered the installation of SP54 and give feedback if the problem is solved.
    Andreas

  • Errors in JSP file for htmlb code - CE 7.1

    Hi Experts,
    I am trying  created simple JSP dynpages application in NWDS 7.1 & CE 7.1.
    I am getting errors for HTMLB  code like:
    cannot find tag Library descriptor for tagLib
    In JSP page i wrote simple htmlb code like:
    <%@taglib uri="tagLib" prefix="htmlb"%>
    <htmlb:content id="myContext">
    <htmlb:page title="PageTitle">
    <htmlb:form id="myFormId">
    <htmlb:inputField id="inf1" type="String" width="125" visible="true"
    required="true" />
    </htmlb:form>
    </htmlb:page>
    </htmlb:content>
    {/code}
    For HTMLB libraries added 2 jar file in lib folder
    /PORTAL-INF/lib   com.sap.portal.htmlb.jar ; &   com.sapportals.htmlb.jar
    After adding set the Java build path for Library jar file also.
    In portalapp.xml -
    <?xml version="1.0"; encoding="UTF-8"?>
    <application>
      <application-config>
       <property name="startup" value="true"/>
        <property name="SharingReference" value="com.sap.portal.htmlb";/>
      </application-config>
      <components>
        <component name="Test_Jsp">
          <component-config>
            <property name="ClassName" value="com.Test_Jsp.Test_Jsp";/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/Output.jsp";/>
          </component-config>
          <component-profile>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld";/>
          </component-profile>
        </component>
      </components>
      <services/>
    </application>
    {/code}
    Please any one help to correct this errors............
    Regards,
    Satya

    Hi,
    You need not add com.sap.portal.htmlb.jar and com.sapportals.htmlb.jar to /PORTAL-INF/lib as the classes will be available at runtime through com.sap.portal.htmlb SharingReference. So remove the htmlb jars from /PORTAL-INF/lib.
    Correct the value of tagLib property to /SERVICE/com.sap.portal.htmlb/taglib/htmlb.tld
    Deploy and check if this helps.
    I see alot of unnecessary semicolons in your portalapp.xml, I think you just added them inorder to be able to post them here.
    Regards,
    Praveen Gudapati

  • Mailing in HTMLB using HTML a href syntax

    Hi
    my question is as follows.
    I am using a HTML syntax inside BSP page and trying to call onInputprocessing event. It gives me a Javascript error. The point is i need the mail ids at runtime and hence the ABAP scripting involved.. Is the code wrong-?
    <a href="mailto:
          <%
      loop at i_mail into wa_mail.
          %>
          <%=wa_mail%>",
          <%
      endloop.
          %>
    onClick="onInputProcessing()">Send Email to selected </a>

    Hi,
    You cannot trigger server event with pure HTML such as a href.
    Here is an example that should not be far from the truth:
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2002">
      <htmlb:document>
        <htmlb:documentBody>
          <htmlb:form id="form">
    <% DATA: recipients  TYPE TABLE OF string.
       DATA: w_recipient LIKE LINE OF recipients.
       w_recipient = '[email protected]'.
       APPEND w_recipient TO recipients.
       w_recipient = '[email protected]'.
       APPEND w_recipient TO recipients.
       LOOP AT recipients INTO w_recipient. %>
         <htmlb:link id            = "mail_<%= sy-tabix %>"
                     reference     = "mailto:<%= w_recipient %>"
                     onClick       = "mail"
                     text          = "<%= w_recipient %>" />
    <% ENDLOOP. %>
          </htmlb:form>
        </htmlb:documentBody>
      </htmlb:document>
    </htmlb:content>
    Best regards,
    Guillaume

  • How to include HTMLB in a HTML page

    Hello all,
    Is it possible to include for instance a HTMLB:tableview-element in a plain HTML page, with a minimum of HTMLB-elements?
    So i have:
    <HTML>
      <HEAD>
        <TITLE>
        <TITLE>
      </HEAD>
      <BODY>
      </BODY>
    </HTML>
    Where and what HTMLB-elements do i have to include to succeed?
    The reason for my question is, that i have to include some additional elements in a standard generated page and i prefer to us HTMLB for it.
    Thanx in advance.
    Kind regards,
    Martijn de Jong.

    Hi,
       add the following code where ever you require a tableview...
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content design="design2003">
      <htmlb:page title = "display page ">
      <htmlb:form>
          add tableview here....
      </tmlb:form>
    </htmlb:page>
    </htmlb:content>
    Regards,
    Azaz Ali Shaik.

Maybe you are looking for

  • Opening PDF in Preview

    Hi, In pages, when you open the print dialogue there is a PDF button. The top item on the list is: Open PDF in Preview. Clicking this used to do just that, open the document in preview. After updating to Snow Leopard, it now opens in Adobe Acrobat. I

  • Aperture, Photoshop, and Apple's possible direction for Image Editing

    All, After using Aperture now for several days, and reading many different forum topics, in particular this one which speaks of desired enhancements to Aperture: http://discussions.apple.com/thread.jspa?threadID=253594&tstart=0 there is one thing tha

  • JDBC TableModel problem with setValueAt

    Hello to everyone. I have problem when I change value at cell in Table. My model makes update in DB, but in GUI the change is not visible. The change gets visible only when I reopen the Table. public class CustomTableModel extends AbstractTableModel

  • Is there a mobo manual that shows the different cables and connections for the IQ772.UK?

    Does anybody have a Service Manual to show disassembly and reassembly including mobo replacement?  The screen has died and I have been told to replace mobo.  The output to an external monitor works but trying to do a factory reset, it freezes on 17%.

  • JComboBox cell editor *Listener problem

    Hi all, I've setup a TreeTable with a JComboBox as a CellEditor for the second column. Everything works just fine, except for event handling on a column with a JComboBox as cell editor. In my case, the second column of the TreeTable represents the st