HTML Checkbox can raise a OnInputProcessing event???

Hello all,
i have a little problem with an application with flow logic page. I have to incorporate a group of html checkbox that raise an event in the OnInputProcessing like an button do. this can be done?? and how can be do it??? . Please help. Thanx in advance

Hi Mariana,
If you want to call the OnInputProcessing Event then you need to use htmlb checkbox.
Here is the sample code....
In Page with flow logic....
In Layout section...
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content design="design2003" >
  <htmlb:page title="Tab Strip" >
    <htmlb:form>
      <htmlb:checkboxGroup id="chkboxgrp" >
        <htmlb:checkbox id      = "cb1"
                        text    = "Red"
                        onClick = "myEvent1" />
        <htmlb:checkbox id      = "cb2"
                        text    = "Green"
                        onClick = "myEvent2" />
        <htmlb:checkbox id      = "cb3"
                        text    = "Blue"
                        onClick = "myEvent3" />
      </htmlb:checkboxGroup>
       <br>
      <%= red %>
      <br>
      <%= green %>
      <br>
      <%= blue %>
    </htmlb:form>
  </htmlb:page>
</htmlb:content>
In Page Attributes Section...
blue     TYPE     STRING
green     TYPE     STRING
red     TYPE     STRING
In OnInputProcessing section...
data: chkbox1 type ref to cl_htmlb_checkbox,
      chkbox2 type ref to cl_htmlb_checkbox,
      chkbox3 type ref to cl_htmlb_checkbox.
chkbox1 ?= CL_HTMLB_MANAGER=>GET_DATA(
request = runtime->server->request
name = 'checkbox'
id = 'cb1' ).
chkbox2 ?= CL_HTMLB_MANAGER=>GET_DATA(
request =  runtime->server->request
name = 'checkbox'
id = 'cb2' ).
chkbox3 ?= CL_HTMLB_MANAGER=>GET_DATA(
request =  runtime->server->request
name = 'checkbox'
id = 'cb3' ).
DATA: event TYPE REF TO CL_HTMLB_EVENT.
event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
IF event->name = 'checkbox' AND event->event_type = 'click'.
  case event->id.
    when 'cb1'.
      red = chkbox1->checked.
      if red eq ' '.
        red = 'Not Selected'.
      else.
        red = 'Red Selected'.
      endif.
    when 'cb2'.
      chkbox2 ?= CL_HTMLB_MANAGER=>GET_DATA(
      request =  runtime->server->request
      name = 'checkbox'
      id = 'cb2' ).
      green = chkbox2->checked.
      if green eq ' '.
        green = 'Not Selected'.
      else.
        green = 'Green Selected'.
      endif.
    when 'cb3'.
      chkbox3 ?= CL_HTMLB_MANAGER=>GET_DATA(
      request =  runtime->server->request
      name = 'checkbox'
      id = 'cb3' ).
      blue = chkbox3->checked.
      if blue eq ' '.
        blue = 'Not Selected'.
      else.
        blue = 'Blue Selected'.
      endif.
  endcase.
ENDIF.
Hope it solves your problem.
Regards,
Maheswaran.B

Similar Messages

  • Can a SAP Gui iView raise a portal event?

    Hi Folks,
    Can anyone tell me if a SAP Gui iView can raise a Portal Event via the EPCF (or equivalent)? I seem to remember reading a blog on this way back but my sleep deprived mind could be deceiving me?
    Thanks a lot,
    Dan

    I don't think so. I think there was a hack a while ago about making it a target by wrapping webgui inside another frame, but not as an event raiser.

  • Raising a Portal Event

    I am trying to raise a portal event via the signal out. It seems when raising an event, the Flash runtime actually puts all the parameters in an XML-like string and then passes them on to EPCM.  The EPCM, however, is expecting this data as an object, not as a string. Has anyone been able to actually raise an event (specifically the navigate event) that can be handled by the standard portal framework?
    What I am really trying to do is navigate from one iView to another within the same browser window. Has anyone done this?  I know that there is HTML view but I don't want to use this because of I want the user to navigate away from the current application.
    Thanks for your help

    HI,
        U can EPCM inside script tags and raise or subscribe the events.
    In one of the JSP (inside portal project), u can write
    <SCRIPT language ="JavaScript">
    EPCM.raiseEvent( "urn:com.sap:MyEvent", "EventName", "Hello" );
    <SCRIPT>
    In the iView to be subscribed, u can write
    <script language ="JavaScript">
    function onMyEvent ( eventObj ) {
    alert( "Got message:" + eventObj.dataObject );
    EPCM.subscribeEvent( "urn:com.sap:MyEvent", "MyEvent", onMyEvent );
    <script>
    This will raise event from first iView and the data will be available in the second iView.
    Regards,
    Vijai

  • Mime Objects in 'OnInputProcessing' event

    Hi All,
                 I want to know whether we can use the mime objects in the oninputporcessing event.I tried writing
    <img src="picture.gif"> in layout it works fine, but the same code in this event doenst work.I tried writing some html codes in the oninputprocessing event.It works.Only these mime objects are not working.Kindly give some suggestions.

    data : LV_OUTPUT type string
    CONCATENATE LV_OUTPUT
    '<HTML><HEAD></HEAD>'
    '<BODY  rightmargin="0" leftmargin="0" bgcolor=white>'
    '<div class=Section1>'
    '<table align="center" width="100%" bgcolor=white ID="Table2">'
    '<tr>'
    ' <td><img align = "left" src="picture.gif"><td>'
    '                    </td>'
    '                    </tr>'
    '               </table>'
    into LV_OUTPUT.
    This variable 'LV_OUTPUT' i am using to download into a word template.Remaining layout comes properly ,except this picture.

  • How can i create an event from a cell of JTable ?

    Hi , I am having a JTable which has two types of render : checkboxCellRender and DefaultTableCellRenderer
    i want to generate an event by clicking the checkbox which will do color changes for other cells . How can i do that ? Can i pass the events ?
    code snippet :
    class checkboxCellRenderExt extends checkboxCellRender
              public checkboxCellRenderExt(){}
              public Component getTableCellRendererComponent(JTable table, Object value,
                        boolean isSelected, boolean hasFocus,
                        int row, int column)
    JCheckBox c=(JCheckBox)super.getTableCellRendererComponent( table,value,isSelected,hasFocus,row, column);
    JTableModel md = (JTableModel)m_TablePan.getTable().getModel();
    Vector currentRow = md.getRow(row);
    if(isSelected)
    boolean m_bavail = ((Boolean)currentRow.get(COLUMN_TCM_STATUS)).booleanValue();
    if(!m_bavail)
         c.setForeground(Color.BLACK);
         c.setBackground(Color.WHITE);
    else
         c.setForeground(table.getSelectionForeground());
         c.setBackground(table.getSelectionBackground());
    else
    setForeground(table.getForeground());
    setBackground(table.getBackground());
    return this;
    class CustomcellRenderer extends DefaultTableCellRenderer
         public CustomcellRenderer()
         public Component getTableCellRendererComponent(JTable table, Object value,
                                  boolean isSelected, boolean hasFocus,
                                  int row, int column)
              checkboxCellRender chkbox =null;
              JLabel lb;
              Component c = super.getTableCellRendererComponent(table,value,isSelected,hasFocus,row, column);
              if (value == null)
         return c;
              if (value instanceof String)
                   String s = (String) value;
                   lb = (JLabel)c;
                   lb.setBorder (noFocusBorder);
                   lb.setText(s);
         JTableModel md = (JTableModel)m_TablePan.getTable().getModel();
         Vector currentRow = md.getRow(row);
              this.setHorizontalAlignment(JCheckBox.CENTER);
    if(isSelected)
                   boolean m_bavail = ((Boolean)currentRow.get(COLUMN_TCM_STATUS)).booleanValue();
                   if(!m_bavail)
                        c.setForeground(Color.BLACK);
                        c.setBackground(Color.WHITE);
                   else
                   c.setForeground(table.getSelectionForeground());
                   c.setBackground(table.getSelectionBackground());
    else
                   setForeground(table.getForeground());
                   setBackground(table.getBackground());
    return this;
    }

    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.
    Add a TableModelListener to the TableModel. An event is fired when the contents of the cell are changed.

  • Can't get mouseDown event to work

    I have created some menus with rollover and click events and
    these work fine when previewed from Fireworks in a browser. However
    when I import them into Director the rollover works, but the
    onClick does not. When I look at the Lingo there is no reference to
    the onClick function. I have amended the code myself and it sort of
    works, though I am not sure how to get the correct member into the
    property.
    The code is below and the lines in bold are the one's i have
    added, any help with this would be appreciated.
    -- DESCRIPTION --
    on getBehaviorDescription me
    return \
    "ROLLOVER MEMBER CHANGE" & RETURN & RETURN & \
    "Change the sprite's cast member when the mouse rolls over
    the sprite." & RETURN & RETURN & \
    "PARAMETERS:" & RETURN & \
    "* Rollover cast member"
    end getBehaviorDescription
    on getBehaviorTooltip me
    return \
    "Use with graphic members." & RETURN & RETURN &
    "Swaps a sprite's cast member on rollover."
    end getBehaviorTooltip
    -- HISTORY --
    -- 22 October 1998, written for the D7 Behaviors Palette by
    James Newton
    -- Modified 7 January, 2000 by T. Higgins to include the
    isOKToAttach
    -- event handler along with removing some redundant error
    checking.
    -- 5 March 2000: Modified to match Fireworks button order
    -- and be D7 and D8 compatible for Fireworks Importer
    <jba>
    property spriteNum
    property mySprite
    property myStandardMember
    property myRollovermember
    property myClickMember
    on beginSprite me
    mySprite = sprite (me.spriteNum)
    myStandardMember = mySprite.member
    if myRollovermember = 0 then myRollovermember =
    member(mySprite.member.number+1)
    if myClickMember = 0 then myClickMember =
    member(mySprite.member.number+1)
    end
    on mouseEnter me
    mySprite.member = myRolloverMember
    end mouseEnter
    on mouseDown me
    mySprite.member = myClickMember
    end mouseDown
    on mouseLeave me
    mySprite.member = myStandardMember
    end mouseLeave
    on isOKToAttach (me, aSpriteType, aSpriteNum)
    case aSpriteType of
    #graphic:
    return TRUE
    #script:
    return FALSE
    end case
    end isOKToAttach
    on getPropertyDescriptionList
    if the currentSpriteNum = 0 then exit
    theMember = sprite(the currentSpriteNum).member
    theMemberNumber = theMember.number
    return \
    #myRolloverMember: \
    #comment: "Display which member on rollover?", \
    #format: #graphic, \
    #default: member (theMemberNumber + 1) \
    end getPropertyDescriptionList

    Your browser is responding to events generated by the HTML
    page. Director responds to events generated by Director. onClick is
    not a Director event, which is why you can find no documentation on
    it.
    I have never tried creating menus in Fireworks and then
    importing them into Director, so I don't know exactly what you are
    working with. If your "menus" are just a series of buttons, then
    you could try using the Mouse States behavior that you can find at
    http://nonlinear.openspark.com/tips/scripts/button/index.htm.
    This provides for rollover and mouseDown states, and also changes
    the cursor.
    You will need to add a separate behavior with an "on mouseUp"
    handler that will actually do something when the button is clicked.
    As far as modifying the Rollover Member Change behavior is
    concerned, try replacing the current getPropertyDescriptionList()
    handler with the following:

  • Doubt  in using html:checkbox in struts

    Hi all,
    In my jsp page i have 2 checkboxes name mandatory and active.
    <html:checkbox property="mandatory" value="true"/>
    <html:checkbox property="active" value="true"/>
    Insertion of data works fine,and now my doubt is about the edit mode.
    In edit mode,depending on th value of thethese fields wheteher 0 or 1,checkbox should be checked.how can it be done?
    In th corresponding for,the properties I declared as boolean values.Also reset method is provided .
    Anyone pls help.
    thanks

    It's rather nasty, but you could wrap all your strings in <html></html>. Even so you still have to use entities, but the
    following displays what you want:JLabel lbl = new JLabel("<html>&lt;html>&lt;/html></html>");

  • Html:checkbox - which box is selected and on in what tr

    I have a jsp in which I iterate over a LinkedList of people. Each person gets there own row in a table on the jsp page. In each row is the name of a person in the first <td> and then a checkbox in each of the next three <td>'s.
    A user may order one of three reports on any or each of the names coming from my LinkedList by clicking on a checkbox.
    Right now I am able to determine which report to order by which checkbox is selected in a row, but am unable to determine which row/person to order the report for.
    I've seached this forum and went through the first couple pages of results with no luck. And spent a bit of time on google but can't seem to get the exact keywords to retrieve the results I need.
    Here is a small sample of how I am setting up the table. Just a snippet, names have been changed, you won't be able to compile this.
    <logic:iterate id="person" name="someLogical" property="personsList" type="someDataObjectType">
         <tr>
              <td valign="top" nowrap>
                   <bean:write name="person" property="name"/> �
              </td>
              <td align="center" valign="top">
                   //someForm is my actionForm, and orderReportOne is a boolean being set in the form
                   <html:checkbox name="someForm" property="orderReportOne"/>
              </td>
              <td align="center" valign="top">
                   <html:checkbox name="someForm" property="orderReportTwo"/>
              </td>
              <td align="center" valign="top">
                   <html:checkbox name="someForm" property="orderReportThree"/>
              </td>
         </tr>
    </logic:iterate>The booleans in my form are being set correctly but don't relate to a specific person. They would just order reportOne for each person in the list.
    Edit: I will be leaving soon for the rest of the day and may or may not be able to reply again until monday, but appreciate any responses. Thanks
    Message was edited by:
    Hentay

    It depends on how you're utilising your XML, but ComboBox has selectedIndex property so that you can trace the index number of the item selected.

  • Read/set HTML checkbox in JSP

    Hello,
    I need to directly read and set the state of an HTML checkbox from a JSP page that contains it. It is not sufficient to submit the form and then get the value from the next page; I need to be able to set the value when the page loads, and then on cue, store the (possibly changed) state of the checkbox within the same page.
    How can this be done? Thanks in advance.

    you write the checkbox tag dynamically...
    <input type="checkbox" ... <%= checked ? "checked" : "" %>>
    or use a tag library that does it for you.
    But you can't do it within the page without Javascript. Once it loads in the browser, the Java part of the page is done and gone. So either you use Javascript to alter things in the browser before submitting the form, or you submit the page and recreate it based on what's submitted so far.

  • Can SOA consume business events using non-apps datasource ?

    Hi Gurus & Experts,
    We have a scenario where EBS raises custom business event to be consumed by SOA.
    Everything works fine using APPS login, however we need to non-apps datasource in some environements (custom schema user)
    Can SOA consume business events using non-apps datasource ?
    Please let me know.
    Thanks,
    Rev

    Hi Srini,
    Even i have a similar requirement . Could you please send me the link for OracleEBSAdapterUserGuide(b_28351). ?
    Did you come to know how to check whether WF_Listener is running ?
    Thanks in advance
    Nutan

  • ALV Grid editable - How to raise the data_changed event from outside object

    Hi,
    i'd like to like to raise the data_changed event from outside the ALV-Grid object in order to display errors to the user.
    For example a new row was inserted within the program. The user has only to complete the missing informations. Before saving the transactions the program has to execute some semantic checks. The errors of this check process should be shown to the user by creating an instance of the cl_alv_changed_data_portocol object.
    Thanks.
    Regards

    You don't need to raise the data_changed event to perform the edits or to issue messages using cl_alv_changed_data_protocol.
    The following assumes you have an ALV grid object g_alv based on the CL_GUI_ALV_GRID class.
    You can mark the inserted records upon insertion as selected using the set_selected_rows method, and then retrieve these rows later using get_selected_rows and perform necessary edits.
    Save the row number of each inserted row into a table of the appropriate type (see the method definition for this):
    DATA: t_index_rows    TYPE  lvc_t_row.
    DATA: s_row_no        TYPE  lvc_s_roid.
    DATA: t_row_no        TYPE  lvc_t_roid.
    Load entries into t_row_no after each insert.  Capture the row number and save in the table t_row_no.
    e.g.
    PERFORM insert_row USING s_row_no-row_id.
    APPEND s_row_no TO t_row_no.
    FORM insert_row would have whatever code you are using to insert the row.  Save the row id into s_row_no-row_id (which is an INT4).
    When done with all inserts do the following
      IF t_row_no[] IS NOT INITIAL.
        CALL METHOD g_alv->set_selected_rows
          EXPORTING
            it_index_rows            = t_index_rows
            it_row_no                = t_row_no
            is_keep_other_selections = 'X'.
      ENDIF.
    Then, if SAVE is pressed without the data_changed event having been raised (such as if the user just pressed SAVE without changing anything), use method get_selected_rows to retrieve the rows that were inserted and perform the necessary edits.
      DATA: l_t_rows    TYPE lvc_t_row.              " ALV control: Table rows
      CALL METHOD g_alv->get_selected_rows
        IMPORTING
          et_index_rows = l_t_rows.
    Loop through l_t_rows and use the row as an index into the grid, perform the necessary edits, just as you would if the data_changed event had been raised.
    If any edits fail, then send messages to the user, abort the save, and re-display the grid.
    Remember to refresh the t_row_no and t_index_rows tables if you load a new data set.
    You can also use a similar technique with the data_changed event to mark each changed row as selected by saving the row ids, and then you only have to update the changed rows on SAVE, which can minimize database I/O.
    Good luck.
    Brian

  • How to raise a Terminating Event for a Standard Task?

    Hi Experts,
    I have a standard task where I have defined the Terminating event to stop the workflow.
    This Task/Workflow will be triggered by a batch program.
    Also in a class method I am using function module SWE_EVENT_CREATE to raise a event which should complete the workflow.  But somehow the work items are still in In Process status.
    May be I am passing wrong parameters OR using wrong FM to raise a terminating event.
    Request you to help me on this.  Thanks in Advance.
    Regards,
    Sudhakar.

    Hi Sudhakar,
    Since there are entries in SWE3 which show link each time event is triggered. So I would suggest you will have to check the standard task you are using is working. So create a parallel branch with activity on one end and wait for event step on other. See if the the wait for event step works, when you create the event using create event. If it works then most likely your task binding has a problem. If not then event that is triggered does not getting picked by workflow. So based on the finding we can find a solution.
    I notice that you are calling the event from an ABAP class, so in that case the code for calling event seems to be different. Check out the below SAP help documentation.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/a1/172437130e0d09e10000009b38f839/frameset.htm
    Regards,
    Kartik N.
    Edited by: KARTIK Nayak on Dec 12, 2008 8:25 PM

  • How to raise a component event via script

    Hi all i have a DateField in wich a set the text with the text property, and i would like to raise the CalendarLayoutChangeEvent event programmatically via the scripts code.
    How can i do that?
    Thanks.

    Ok, i did it, but this is my code:
    dispatchEvent(new Event(CalendarLayoutChangeEvent.CHANGE));
    i tried also with:
    data.dispatchEvent(new Event(CalendarLayoutChangeEvent.CHANGE));
    where data is my DateField component, but it did not work.
    Can you help me to find the right code?.
    Thanks.
    Skylander.

  • I can no longer search events on iPhoto

    Why has phono changed so you no longer can search through events and only photos? I now have to scroll through 100's of photos to find the one I want. How can I get the event search back? This is not good!!!!!

    First make sure this checkbox is checked in iPhoto's General preference pane:
    What number is next to the Events icon in the left hand window? 
    When you click on the Events icon in the left hand pane what do you see in the right hand window?

  • How to raise Remote System Event

    Hi,
    I need to load data from a remote DB system (Not SAP system) when data is created or modified.  I setup DB Connect to load the remote data with an event triggered InfoPackage.  How can remote system trigger the local event?
    Thanks,
    Frank

    Frank, there should be a command on the server that your R/3 or BW system resides on called <b>sapevt</b>.  This command sits outside the SAP system and its sole purpose is to allow you to raise an SAP event from outside the SAP system.
    check out the following link:
    http://help.sap.com/saphelp_erp2004/helpdata/en/fa/096e6b543b11d1898e0000e8322d00/frameset.htm
    Regards,
    George

Maybe you are looking for