OOALV - Single Click Event

Hi Experts,
I have an internal table and i display it using ALV. User will select some rows using checkboxes in the alv. Then i want to get a total based on selected rows. the totals will be display separate area. (Below the ALV)
Please help me to resolve above issue.
Regards,
Kosa.

Hi Kosa,
Perhaps delayed_changed_sel_callback event should be helpful for u...
But u have to register it explicitly...
Check the below example..
*       CLASS event_responder DEFINITION
CLASS lcl_event_responder DEFINITION.
  PUBLIC SECTION.
    METHODS : on_rows_selection FOR EVENT delayed_changed_sel_callback OF cl_gui_alv_grid.
ENDCLASS.                    "event_responder DEFINITION
TYPES : BEGIN OF ty_disp,
        field1 TYPE i,
        field2 TYPE i,
        field3 TYPE i,
        field4 TYPE i,
        field5 TYPE i,
        END   OF ty_disp.
DATA : container TYPE REF TO cl_gui_custom_container,
       popup     TYPE REF TO cl_gui_dialogbox_container,
       alv_grid  TYPE REF TO cl_gui_alv_grid,
       handler   TYPE REF TO lcl_event_responder,
       ls_layo   TYPE lvc_s_layo,
       lt_rows   TYPE TABLE OF lvc_s_row  WITH HEADER LINE,
       lt_disp   TYPE TABLE OF ty_disp    WITH HEADER LINE,
       lt_fldcat TYPE TABLE OF lvc_s_fcat WITH HEADER LINE,
       lt_event  TYPE cntl_simple_events  WITH HEADER LINE.
START-OF-SELECTION.
  CALL SCREEN 100.
*       MODULE PBO OUTPUT                                             *
MODULE pbo OUTPUT.
  SET PF-STATUS 'BASIC'.
  CHECK container IS NOT BOUND.
  CREATE OBJECT container
    EXPORTING
      container_name = 'CUSTOM'.
  CREATE OBJECT alv_grid
    EXPORTING
      i_parent = container.
  PERFORM field_catalog.
  PERFORM fill_outtab.
  ls_layo-sel_mode = 'A'.
  alv_grid->set_table_for_first_display( EXPORTING is_layout       = ls_layo
                                          CHANGING it_outtab       = lt_disp[]
                                                   it_fieldcatalog = lt_fldcat[] ).
  alv_grid->register_delayed_event( i_event_id = cl_gui_alv_grid=>mc_evt_delayed_change_select ).
  CREATE OBJECT handler.
  SET HANDLER : handler->on_rows_selection FOR alv_grid.
ENDMODULE.                    "pbo OUTPUT
*       MODULE PAI INPUT                                              *
MODULE pai INPUT.
  LEAVE PROGRAM.
ENDMODULE.                    "pai INPUT
FORM field_catalog.
  lt_fldcat-fieldname = 'FIELD1'.
  lt_fldcat-reptext   = 'One'.
  APPEND lt_fldcat .
  lt_fldcat-fieldname = 'FIELD2'.
  lt_fldcat-reptext   = 'Two'.
  APPEND lt_fldcat .
  lt_fldcat-fieldname = 'FIELD3'.
  lt_fldcat-reptext   = 'Three'.
  APPEND lt_fldcat .
  lt_fldcat-fieldname = 'FIELD4'.
  lt_fldcat-reptext   = 'Four'.
  APPEND lt_fldcat .
  lt_fldcat-fieldname = 'FIELD5'.
  lt_fldcat-reptext   = 'Five'.
  APPEND lt_fldcat .
ENDFORM.                    "field_catalog
FORM fill_outtab.
  FREE lt_disp.
  DO 20 TIMES.
    lt_disp-field1 = sy-index * 1.
    lt_disp-field2 = sy-index * 2.
    lt_disp-field3 = sy-index * 3.
    lt_disp-field4 = sy-index * 4.
    lt_disp-field5 = sy-index * 5.
    APPEND lt_disp.
  ENDDO.
ENDFORM.                    "fill_outtab
FORM do_sum.
  alv_grid->get_selected_rows( IMPORTING et_index_rows = lt_rows[] ).
  BREAK-POINT.   " lt_rows[] has the indices of selected rows..
ENDFORM.                    "do_sum
*       CLASS event_responder IMPLEMENTATION                          *
CLASS lcl_event_responder IMPLEMENTATION.
  METHOD on_rows_selection.
    PERFORM do_sum.
  ENDMETHOD.                    "on_rows_selection
ENDCLASS.                    "event_responder IMPLEMENTATION
Cheers,
Jose.

Similar Messages

  • Handle single click event in ALV OOPS

    Hi,
    I have to display 2 ALV grid...one above the other.
    Top ALV will contain Header info and bottom ALV witll display line item.
    I am use ALV OOPS.
    Now when user will click on the top ALV ...bottom ALV should show corresponding data.
    I don't have to use HOTSPOT or Double click event.
    How can I handle single click event.
    Please guide me..thanks in advance
    Regards,
    Prasoon

    hi,
                    for this in ALV OOPS take <b>2 custom containers( cl_gui_custom_container)</b>in the same screen and on the 1st container display the header data<b>(use set_tale_for_first_display method of class cl_gui_alv_grid)</b>.
                   On the 2nd screen item data for  this  use<b> EVENT</b> handling(you want <b>single click</b>). use<b> hotspot_click</b> or <b>button_click </b>events. 
    for this you have to register the events.   the code for that.
    <b>CLASS lcl_event_handler DEFINITION .</b>
    PUBLIC SECTION .
    METHODS:
    *--Hotspot click control
    handle_hotspot_click
    FOR EVENT hotspot_click OF cl_gui_alv_grid
    IMPORTING e_row_id e_column_id es_row_no ,
    *--To control button clicks
    handle_button_click
    FOR EVENT button_click OF cl_gui_alv_grid
    IMPORTING e_oject e_ucomm .
    PRIVATE SECTION.
    ENDCLASS.
    <b>CLASS lcl_event_handlerIMPLEMENTATION .</b>
    *--Handle Hotspot Click
    METHOD handle_hotspot_click .
    PERFORM handle_hotspot_click USING e_row_id e_column_id es_row_no .
    ENDMETHOD .
    METHOD handle_button_click .
    PERFORM handle_button_click USING e_object e_ucomm .
    ENDMETHOD .
    ENDCLASS .
    DATA gr_event_handler TYPE REF TO lcl_event_handler .
    <b>*--Creating an instance for the event handler</b>
    CREATE OBJECT gr_event_handler.
    <b>*--Registering handler methods to handle ALV Grid events</b>
    SET HANDLER gr_event_handler->handle_hotspot_click FOR gr_alvgrid .
    SET HANDLER gr_event_handler->handle_button_click FOR gr_alvgrid .
    do n't forget to use<b> refresh_table_display
    </b> other wise only the record which you first you clicked will display in the 2nd container.
    <b>Reward points for useful Answers</b>

  • Print all slides in single click event

    I have 10 quiz slides in captivate 5.5. Now my client wnats to print all the slides at the single click event. I have already used the Captivate inbuild Print widget, but its print the current slide only. Please help me on this.....
    Thanks
    Karthik

    There is no current way to do this with standard Captivate functionality.
    If this is really important to your client, you'll need to create a PDF document with screenshots of the 10 quiz slides, and link this document to a button within the course module.  Participants can then click the button to open and print the document.
    If anyone has a better idea, I'm open to it.

  • How to trigger single click event in ALV

    Hi Experts,
          I am trying to raise an event in a module pool program whereby an event will be triggered on  a single click of a particular row in the ALV.
       My requirement is that in the table display , which is being handled OO method, once the user clicks on a particular row - the details of the row should be displayed in another part of the screen.
       I have used hotspots and done this - but I do not want all my entries underlined.

    Hi Atish,
    Is there any other way to trigger the single click event in the ALV grid display for a particular row ? I have come across an event CLICK_ROW_COL, which I think may solve the problem, however this is a protected event and whenever I try to access it , I get the error that a protected event cannot be accessed.
    Edited by: Aditya  Niyogi on May 14, 2008 6:33 AM

  • Double click and single click Event

    Hi
      I want to add a Single Clcik event and Double click event  both on the same movie clip in as3 , its working but call both the event same time so how to fix it , please help us if u have any solution ..(

    did you double click enable your object AND add a doubleclick listener?  if so, what's the problem?

  • SharePoint JS grid paging, capturing values using single click event

    Hi 
    I need some help with getting the following work using the SharePoint JS grid, the reference articles available are not sufficient to continue work. 
    1) Setting up Paging
    2) Capturing individual field values on single click or any other relevant event.
    Sample code or references would be of great help.
    References
    http://msdn.microsoft.com/en-us/library/office/ee535898(v=office.14).aspx
    http://answers.flyppdevportal.com/categories/sharepoint2010/sharepoint2010programming.aspx?ID=d6e32632-d0e4-4337-95c3-c2d06fc3ef86
    http://answers.flyppdevportal.com/categories/sharepoint2010/sharepoint2010programming.aspx?ID=5c952c6d-b2be-4563-b805-b00e7c8136ff
    http://msdn.microsoft.com/en-us/library/ff681039.aspx
    http://social.msdn.microsoft.com/Forums/en-US/a439fcc2-42de-45ca-9f74-935498e0d246/js-grid-oncelleditcompleted-event-infinitely-fired?forum=project2010custprog  
    Thanks,
    Sharat
    Sharat Menon (Sharepoint Developer)

    Hi,
    Please try to use PagingFilter class to achieve paging in JS Grid.
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.jsgrid.pagingfilter.aspx
    Here is a similar thread for you to take a look at:
    https://go4answers.webhost4life.com/Example/sharepoint-jsgrid-2692.aspx
    If you want to implement more complex functionalities for a list, I suggest you use SPGridView to achieve it.
    Best regards
    Dennis Guo
    TechNet Community Support

  • Single click event in alv grid.

    Hi Experts,
    i have done will my code..everything is working perfectly, but having an issue..pls help me...
    in my output screen i have 2 check-boxes,when i select both of them i shuld get a message saying select only one..this is done when am using double click. Is single click possible in alv-grid...
    please help me.
    thanks.
    anusha

    Hi Anusha,
    Did you Try by using get_selected_rows(Method)?
    If the selected rows are 2 display a message such that 'Select only One record'.
    data t_roid type lvc_t_roid.
    CALL METHOD r_grid->get_selected_rows
            IMPORTING
              et_row_no = t_roid.
    READ TABLE t_roid INDEX 1 TRANSPORTING NO FIELDS."to know how many No.Of records selected
    if sy-tfill > 1.
    Message 'Please Select only one record' type 'I'.
    Exit.
    endif.

  • Why does my event structure run a single click when I double-click?

    I would like to treat single-clicks differently than double-clicks but it appears that when I double-click an item on a Front Panel control it runs the single-click event once before running the double-click event.  I would like the single-click event not to trigger if the user double-clicks.
    I am discarding the "Mouse Down?" filter event then using the "Mouse Up" notify event to try to catch the difference between a single-click and double-click.
    Should I be doing something different with the timeout event (right now it does nothing)?
    Should I stop displaying the event type?
    Should I eliminate the 5 msec Wait in the Producer Loop?
    Should I use the "Mouse Down" notify event instead of the "Mouse Up" notify event?

    JeffOverton wrote:
    If you edit the event cases, is the "Lock front panel until the case for this event completes" box checked?
    I think this is a key configuration to understand.
    The current configuration means that the 'mouse up' event for the first click is triggered. Then immideatly the front panel is locked. The second click needs to wait until the event has finished. So I think unchecking that box might improve the code.
    Yes you should remove the 5 ms. wait, it has little purpose. It might even cause this: Click 1(& lock), wait 5 ms, event 1 (&unlock), click2 (no double click anymore).
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Single click in abap objects

    hi,
        can any1 pls explain me the single click event LINK_CLICK in abap object.
    does this single click event mean that if i click anywhere on my alv report it will trigger the event.
       pls explain me about this LINK_CLICK event in details pls

    answered the similar question last week. You can see here Event
    Link_click or ALV_Object Model HYPERLINK.
    This example demonstrates how to use a Hiperlink field in ALV. These example was based on 'SALV_DEMO_TABLE_COLUMNS' that contains Hiperlink, icon, Hotspot...
    The Code is:
    REPORT zsalv_mar NO STANDARD PAGE HEADING.
          CLASS lcl_handle_events DEFINITION
    CLASS lcl_handle_events DEFINITION.
      PUBLIC SECTION.
        METHODS:
          on_link_click FOR EVENT link_click OF cl_salv_events_table
            IMPORTING row column.
    ENDCLASS.                    "lcl_handle_events DEFINITION
          CLASS lcl_handle_events IMPLEMENTATION
    CLASS lcl_handle_events IMPLEMENTATION.
      METHOD on_link_click.
        DATA: l_row_string TYPE string,
              l_col_string TYPE string,
              l_row        TYPE char128.
        WRITE row TO l_row LEFT-JUSTIFIED.
        CONCATENATE text-i02 l_row INTO l_row_string SEPARATED BY space.
        CONCATENATE text-i03 column INTO l_col_string SEPARATED BY space.
        MESSAGE i000(0k) WITH 'Single Click' l_row_string l_col_string.
      ENDMETHOD.                    "on_single_click
    ENDCLASS.                    "lcl_handle_events IMPLEMENTATION
    DATA: gr_events TYPE REF TO lcl_handle_events.
    TYPES: BEGIN OF g_type_s_outtab.
    INCLUDE TYPE alv_tab.
    TYPES:   t_hyperlink TYPE salv_t_int4_column,
           END   OF g_type_s_outtab.
    DATA: gt_outtab TYPE STANDARD TABLE OF g_type_s_outtab.
    DATA: gr_table   TYPE REF TO cl_salv_table.
    TYPES: BEGIN OF g_type_s_hyperlink,
             handle    TYPE salv_de_hyperlink_handle,
             hyperlink TYPE service_rl,
             carrid    TYPE s_carrid,
           END   OF g_type_s_hyperlink.
    DATA: gt_hyperlink TYPE STANDARD TABLE OF g_type_s_hyperlink.
    SELECTION-SCREEN BEGIN OF BLOCK gen WITH FRAME.
    PARAMETERS: p_amount TYPE i DEFAULT 30.
    SELECTION-SCREEN END OF BLOCK gen.
    START-OF-SELECTION.
      PERFORM select_data.
      PERFORM display.
    *&      Form  select_data
          text
    -->  p1        text
    <--  p2        text
    FORM select_data .
      DATA: line_outtab  TYPE g_type_s_outtab,
            ls_hype      TYPE g_type_s_hyperlink,
            lt_hyperlink TYPE salv_t_int4_column,
            ls_hyperlink TYPE salv_s_int4_column,
            v_tabix      TYPE sytabix.
      SELECT *
        FROM alv_tab
        INTO CORRESPONDING FIELDS OF TABLE gt_outtab
            UP TO p_amount ROWS.
      LOOP AT gt_outtab INTO line_outtab.
        v_tabix = sy-tabix.
        ls_hype-handle    = sy-tabix.
        ls_hype-hyperlink = line_outtab-url.
        ls_hype-carrid    = line_outtab-carrid.
        INSERT ls_hype INTO TABLE gt_hyperlink.
        ls_hyperlink-columnname = 'URL'.
        ls_hyperlink-value      = sy-tabix.
        APPEND ls_hyperlink TO lt_hyperlink.
        line_outtab-t_hyperlink = lt_hyperlink.
        MODIFY gt_outtab FROM line_outtab INDEX v_tabix.
        CLEAR line_outtab.
        CLEAR lt_hyperlink.
        CLEAR ls_hyperlink.
      ENDLOOP.
    ENDFORM.                    " select_data
    *&      Form  display
          text
    -->  p1        text
    <--  p2        text
    FORM display .
      TRY.
          cl_salv_table=>factory(
            IMPORTING
              r_salv_table = gr_table
            CHANGING
              t_table      = gt_outtab ).
        CATCH cx_salv_msg.                                  "#EC NO_HANDLER
      ENDTRY.
      DATA: lr_functions TYPE REF TO cl_salv_functions_list.
      lr_functions = gr_table->get_functions( ).
      lr_functions->set_default( abap_true ).
    *... set the columns technical
      DATA: lr_columns TYPE REF TO cl_salv_columns_table,
            lr_column  TYPE REF TO cl_salv_column_table.
      lr_columns = gr_table->get_columns( ).
      lr_columns->set_optimize( abap_true ).
    *... §4.7 set hyperlink column
      DATA: lr_hyperlinks TYPE REF TO cl_salv_hyperlinks,
            ls_hyperlink  TYPE g_type_s_hyperlink.
      DATA: lr_functional_settings TYPE REF TO cl_salv_functional_settings.
      TRY.
          lr_columns->set_hyperlink_entry_column( 'T_HYPERLINK' ).
        CATCH cx_salv_data_error.                           "#EC NO_HANDLER
      ENDTRY.
      TRY.
          lr_column ?= lr_columns->get_column( 'URL' ).
          lr_column->set_cell_type( if_salv_c_cell_type=>link ).
          lr_column->set_long_text( 'URL' ).
        CATCH cx_salv_not_found.                            "#EC NO_HANDLER
      ENDTRY.
      lr_functional_settings = gr_table->get_functional_settings( ).
      lr_hyperlinks = lr_functional_settings->get_hyperlinks( ).
      LOOP AT gt_hyperlink INTO ls_hyperlink.
        TRY.
            lr_hyperlinks->add_hyperlink(
              handle    = ls_hyperlink-handle
              hyperlink = ls_hyperlink-hyperlink ).
          CATCH cx_salv_existing.                           "#EC NO_HANDLER
        ENDTRY.
      ENDLOOP.
      DATA: lr_events TYPE REF TO cl_salv_events_table.
      lr_events = gr_table->get_event( ).
      CREATE OBJECT gr_events.
      SET HANDLER gr_events->on_link_click FOR lr_events.
      gr_table->display( ).
    ENDFORM.                    " display

  • Where is the Double-click Event in Adobe LiveCycle Designer

    Hi Experts:
    I was trying to put code into a Double Click event in Adobe LiveCycle Designer, but couldn't find the Event. There is a "Click" event, but that won't do.
    Am I missing something here?
    Thanks,
    Jen

    Hi Jen,
    I was surprised the double click was missing but I use the following code in the click event, just replace the "[my double click code ]" and "[ my single click code ]" with your single and double click code.  This code delays the single click event for 400ms to see if a second click is coming, you might want to play around with the 400ms as you have to balance the responsiveness of a single click with the double click.
    if (new Date() - this.date < 400)
        app.clearTimeOut(this.timeout);
        this.date = undefined;
        [my double click code ]
    else
        if (xfa.event.fullText !== "singleClick")
            this.timeout = app.setTimeOut("xfa.event.fullText='singleClick';xfa.resolveNode('"+this.somExpression+"' ).execEvent('click');",500);
        else
            [ my single click code ];
    this.date = new Date();

  • How do I convert the single x and y coordinates returned by a CWGraph Click event to the Cursor X and Y Positions?

    I am trying a work around for another problem.
    cwCSnapNearestPoint does not give me a CursorDown event (TrackMode = cwGTrackDragCursor). I need to know when the user has clicked on a Cursor. I need to figure out when the user has clicked on a cursor.
    The click event gives you coordinates as "Single" which are an OLE_XPOS_PIXELS. How do I convert to the Cursor coordinates (or vis a vis)?
    Or better yet is there another way to figure that a cursor has been clicked on (while using cwCSnapNearestPoint and TrackMode = cwGTrackDragCursor )

    Here are a couple potential fixes for the problem. If you are dealing with cursors on the graph, I would look into CursorChangeEvent, CursorMouseDown, CursorMouseUp, and CursorMouseMove. The ChangeEvent is triggered upon repositioning of the cursor. MouseDown triggers on the depression of a mouse button on a cursor, while MouseUp triggers on the button's release. MouseMove is triggered when the mouse is moved over a cursor. These each give X and Y positions in the arguments. If you used these and then made a Sanp to nearest point, you should have the coordinates before you sanpped to the point.

  • Uncontrollable mouse button events (single clicks are doubled?)

    Hello, folks--
    I am having a mouse problem that is driving me up the wall. The mouse in question is an optical IM/PS2 mouse--it is a cheap no-name product, but has worked fine for 2 or 3 years. The trouble started maybe six weeks ago when I did a full upgrade. The most important change that I know of in that upgrade was the introduction of HAL, so I strongly suspect that the cause of the problem is related to my HAL configuration, or perhaps a conflict between that and my X config. But anyway, the symptoms I've been seeing include (but are not limited to):
      * Firefox: a single click selects an entire paragraph
      * Thunderbird: a single click in the message list opens the message in a new window
      * Xfwm: a single click on the "windowshade" button collapses the window, then expands it again
        (or vice versa, depending on the initial state)
      * Xfwm: when dragging a window quickly, the mouse "loses its grip"--i.e. the window stops moving even
        though I am still moving the mouse
    None of these things happens every time, but they all happen often. The problems seem most severe in Firefox, but given that similar things happen elsewhere, I would imagine that's due to Firefox's complex event handling exposing a pervasive problem, rather than any kind of application-specific issue.
    With the possible exception of the window-dragging issue, all the above symptoms are consistent with a problem I have seen reported elsewhere, that single clicks are being read as double clicks. However, the only clearly applicable solution I've seen for that issue is to remove all mouse configuration from Xorg.conf, leaving it up to HAL. I tried that and it didn't seem to change anything. However, at the same time I purged the mouse from Xorg.conf, I created an FDI file for the mouse in /etc/hal/fdi/policy. I wonder now if that was necessary--there was no FDI for the mouse before, but perhaps there doesn't really need to be one if you aren't applying any special settings? Dunno, I don't understand much about HAL yet.
    I have tried a couple of other things: first, I set the double click speed to the minimum using the Xfce Mouse Settings applet (BTW, I suppose this applet is a front-end to some shell command or config file, but what?). That seems to help, but only a little. Second, if I use the mouse in an unnaturally precise manner (e.g., when single-clicking, I click as quickly as possible and lift my finger all the way off the button), the problems mostly, but not entirely, disappear.
    Any suggestions?

    mgushee wrote:
    bernarcher wrote:Sounds like faulty hardware.
    Did you try another mouse by chance?
    Well, no, and I suppose to be thorough I should try that. But I am quite sure that the problem appeared suddenly, and exactly at the time of the upgrade I mentioned.
    Well, it could be that your fdi modification tries to catch the mouse events twice in a row. Perhaps you should post the file.
    Besides: There is are no mouse specific fdi settings in my system. I currently have no idea where the mouse behaviour was defined besides my still old xorg.conf. (I did only activate Option "AutoAddDevices".)

  • How to detect only single click and not double-click mouse events in Swing?

    Hi,
    In my application, I want to implement a functionality only for single click. But problem is on double click, first i can see a single click and then double click.
    i.e e.getCount() return 1 and then 2 for double click. I want to avoid this situation.
    Shouldn't it be just one event with a clickCount of 2? or any alternative solution?
    Please let me know how can i stop this.
    Thanks in advance..
    Cheers
    Somasekhar
    Edited by: SomasekharPatil on Mar 13, 2009 3:36 PM

    Maybe something like the below example:
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.SwingUtilities;
    import javax.swing.Timer;
    public class SingleClickOnly {
        public static void main(String[] args) {
         SwingUtilities.invokeLater(new Runnable() {
             @Override
             public void run() {
              new SingleClickOnly().createGUI();
        public void createGUI() {
         JFrame frame = new JFrame();
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         JLabel label = new JLabel("Only acts on a single click");
         label.addMouseListener(createListener());
         frame.add(label);
         frame.pack();
         frame.setLocationRelativeTo(null);
         frame.setVisible(true);
        public MouseListener createListener() {
         return new MouseAdapter() {
             private int clickCount = 0;
             private final Timer timer = new Timer(1000, new ActionListener() {
              @Override
              public void actionPerformed(ActionEvent e) {
                  if (clickCount == 1) {
                   System.out
                        .println("Executing action on click count 1 only");
              timer.setRepeats(false);
             @Override
             public void mouseClicked(MouseEvent event) {
              clickCount = event.getClickCount();
              System.out.println("Clicked: " + clickCount);
              if (clickCount == 1) {
                  if (timer.isRunning()) {
                   timer.stop();
                  timer.start();
    }Piet

  • How to raise on click event for Single Markable cell in WD Table

    Hi All,
        I want to raise an event when a cell is clicked on Single Markable Cell and get the row and column of that cell.
    I have tried all the events of the table and also On Enter event of input Field.
    But I am not able to trigger on click event .
    Please help me out. Points will be rewarded.
    Thanks,
    Anil

    Hi Anil,
            If the cell editor is a link to action then it triggers the ON CLICK event , Write the following code into
           the ON CLICK event handler to get the selected Row and Column ID.
          Event Properties is a node with two attributes Name and Value of type string.
    data: lr_node type ref to if_wd_context_node,
    lt_event_properties type wd_this->elements_event_properties,
    ls_event_properties type wd_this->element_event_properties.
    field-symbols: <l_value> type any.
    * fill internal table
    ls_event_properties-name = 'COLUMN_ID'.
    ls_event_properties-value = r_param->column.
    append ls_event_properties to lt_event_properties.
    ls_event_properties-name = 'INDEX'.
    ls_event_properties-value = r_param->index.
    append ls_event_properties to lt_event_properties.
    ls_event_properties-name = 'ATTRIBUTE'.
    ls_event_properties-value = r_param->attribute.
    append ls_event_properties to lt_event_properties.
    assign r_param->value->* to <l_value>.
    ls_event_properties-name = 'VALUE'.
    ls_event_properties-value = <l_value>.
    append ls_event_properties to lt_event_properties.

  • How to differentiate between Single click and double click event in List

    I am facing a problem while using list in awt.
    I want to execute some code on single click and other on double click but when double click event occurs it also executes the single click code.
    because i have added both actionlistener and itemlistener on the list.
    How to sort out this problem.
    please help me out.
    Thanks buddies.

    Hello Meeraj_Kanaparthi
    Thanks for helping i m giving u the code i have tried.
    Plz help me on this...
    Thanks........
    import java.awt.*;
    import java.awt.event.*;
    class CheckList extends Frame implements MouseListener
         List l1;
         int x;
         int y;
         CheckList()
         setSize(500,500);
         setLayout(new FlowLayout());
         l1=new List(10);
         add(l1);
         l1.add("Item 1");l1.add("Item 2");l1.add("Item 3");l1.add("Item 4");l1.add("Item 5");
         x=6;
         y=0;
         l1.addMouseListener(this);
    //     l1.addItemListener(this);
         show();
         public void execute(int y)
         if(y==1)
         {System.out.println("3");
              l1.remove(l1.getSelectedIndex());
         if(y==2)
         {System.out.println("4");
              l1.add("item " + x);
              x++;
         public void mousePressed(MouseEvent e)
              System.out.println("Pressed");
         public void mouseReleased(MouseEvent e)
              System.out.println("Released");
         public void mouseEntered(MouseEvent e) {}
         public void mouseExited(MouseEvent e) {}
         public void mouseClicked(MouseEvent e)
         if (e.getClickCount()==1)
              System.out.println("1");
              y=1;
         if (e.getClickCount() == 2)
         {System.out.println("2");
              y=2;
              execute(y);
         public void actionPerformed(ActionEvent ae)
         public void itemStateChanged(ItemEvent it)
         public static void main(String ag[])
         new CheckList();
    }

Maybe you are looking for