EVENT USER_COMMAND for CL_GUI_ALV_GRID

Hello All,
We have a program that uses the CL_GUI_ALV_GRID and the events user_command and context_menu_request.  The program functions by selecting an option for the context menu on an ALV grid which will then take you to another screen with another ALV grid. 
The issue is on the second screen where the user clicks the back button to return to the first ALV Grid.  For some reason, the functionality of Method user_command is triggered twice preventing the user from returning to the initial screen.  Once when the menu option is selected and again when the Back button on the second screen is selected.  If the user clicks the Back button again it will return to the initial ALV grid.  We need to have the program go to the initial ALV grid after the Back button is clicked the first time not the second. 
Does anyone have any suggestions on how to correct this?  Thanks in advance for your help.
John

Hi John,
maybe this will help you. I had a similar situation.
1.) When you initialize the grid-controls try to set a
unique identifier within the display-variant.
lf_variant TYPE disvariant.
lf_variant-report = ls_report (NOT SY_REPID!)
lf_variant-handle = 'HUGO'....
2.) After leaving the 2. screen clear all handles using
the method hndle->free, free, clear ...
In PAI you can easaly check <if hndle is initial> 
or <if not ( hndle is initial )> ....
Hope this will help you
BR
Michael

Similar Messages

  • How can I trigger a USER_COMMAND for alv grid "toolbar" ???

    Hi,
    i have the standard ALV Grid "toolbar" and if i click to the Button "&LOCAL&COPY_ROW" than i want try to make a Refresh to my ALV Table in the Event "afteruser_command"_!!!!
    Here is the implementation of my Event *"afteruser_command":*_
    METHOD on_after_user_command.
    ........DATA: ls_stable TYPE lvc_s_stbl.
    .....CASE e_ucomm.
    .....WHEN '&LOCAL&COPY_ROW'.
    ........MESSAGE 'LOCAL_COPY_ROW' TYPE 'S' DISPLAY LIKE 'E'.
    ........ls_stable-row = 'X'.
    ........ls_stable-col = 'X'.
    ........CALL METHOD gr_grid_d0100->refresh_table_display
    ..............EXPORTING
    .......................is_stable      = ls_stable
    ..............EXCEPTIONS
    .......................finished       = 1
    .......................OTHERS         = 2.
    ......ENDCASE.
      ENDMETHOD.   
    But it doesnt work.
    Is there another function code for the Copy Button????
    Thanks
    Ersin

    Hello Ersin,
    the events "after_user_command", "before_user_command" and "user_command" will not be fired when selecting this command!
    In my opinion, there is no solution, to fire these events, using this alv-function!
    But there is a trick:
    1. Register on the event "toolbar" with an own method:
          toolbar_own          for event toolbar of cl_gui_alv_grid
                                       importing e_object
                                              e_interactive,
    In this method change the function code of "&LOCAL&COPY_ROW", but don´t change the row of the entry, because the button should appear on the same place in the toolbar:
        field-symbols: <ls_toolbar>  type stb_button.
        read table e_object->mt_toolbar with key function = '&LOCAL&COPY_ROW'
                                        assigning <ls_toolbar>.
        if sy-subrc = 0.
          <ls_toolbar>-function = 'COPYROW_OWN'.
        endif.
    2. Register on the event "user_command" ( I think, that´s clear ):
          user_cmd_own           for event user_command
                                              of cl_gui_alv_grid
                                              importing e_ucomm,
    ( don´t forget the set handler-commands for both events:
      set handler po_alv_own->user_cmd_own              for po_alv_own.
      set handler po_alv_own->toolbar_own               for po_alv_own.     )
    3. Now you can react in the method "user_command" on your own function code:
        case e_ucomm.
          when 'COPYROW_OWN'.
            perform copy_row using    me
                             changing gt_bis_cf_out.
    Sample code for copying the current line:
    FORM COPY_ROW  using    po_alv_own          type ref to gcl_alv_own
                   changing pt_table_alv      type gt_table_alv_t.
      data: l_index         type i,
            ls_table_alv   type gs_table_alvt_t.
      call method po_alv_own->get_current_cell
         importing
           e_row     = l_index.
    *      e_value   =
    *      e_col     =
    *      es_row_id =
    *      es_col_id =
    *      es_row_no =
      "read the current line:
      read table pt_table_alv index l_index
                               into ls_table_alv_out.
      "some changes for the new row:
      clear: ls_table_alv-style,
             ls_table_alv-tabix.
      "insert the new line:
      add 1 to l_index.
      insert ls_table_alv into pt_table_alv index l_index.
      po_alv_own->refresh( ).
    ENDFORM.                    " COPY_ROW
    In this manner the events "after_user_command", "before_user_command" are fired, too!
    For information: My problem was, that the ALV-function copied the style-information too, so in the new line, some fields are not editable. At least his field must be cleared!
    Best regard
    Thomas Scheuermann

  • USER_COMMAND in CL_GUI_ALV_GRID

    Hi
    Can anyone tell me when the USER_COMMAND event in the ALV Grid (OO) gets triggered? I tried creating handlers for both double_click and user_command events. My double_click seems to fire the way i wanted, but at no case the user_command event is getting fired.
    I feel i am making a minor mistake somewhere, which i am not able to figure out.
    Any help is greatly appreciated.
    Thanks
    Balaji

    Hi,
    Try this code
    DATA gr_event_handler TYPE REF TO lcl_event_handler . .. ..
    *--Creating an instance for the event handler
    CREATE OBJECT gr_event_handler .
    *--Registering handler methods to handle ALV Grid events
    SET HANDLER gr_event_handler->handle_double_click FOR gr_alvgrid .
    CLASS lcl_event_handler IMPLEMENTATION .
    *Handle Double Click
    METHOD handle_double_click .
    PERFORM handle_double_click USING e_row e_column es_row_no .
    ENDMETHOD .
    CLASS lcl_event_handler DEFINITION
    *Double-click control
    Methods:
    handle_double_click
          FOR EVENT double_click OF cl_gui_alv_grid
            IMPORTING e_row e_column
               i_fieldrows      TYPE lvc_t_row.
               w_fieldrows LIKE LINE OF i_fieldrows,
      CALL METHOD o_alvgrid->get_selected_rows
                 IMPORTING
                 et_index_rows = i_fieldrows.
      LOOP AT i_fieldrows INTO w_fieldrows.
        READ TABLE i_batch INTO w_block INDEX w_fieldrows-index.
    if sy-subrc = 0.
          CLASS LCL_EVENT_RECEIVER DEFINITION
    CLASS LCL_EVENT_RECEIVER DEFINITION.
    Event receiver definitions for ALV actions
      PUBLIC SECTION.
        CLASS-METHODS:
    Row Double click for dirll down.
           HANDLE_DOUBLE_CLICK
             FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
                IMPORTING E_ROW
                          E_COLUMN
                          ES_ROW_NO.
    ENDCLASS.
    Implementation
    Every event handler that is specified below should also be set after
    the object has been created.  This is done in the PBO processing.
    with the following command
    SET HANDLER oEventreceiver->handle_toolbar FOR o_Alvgrid.
    CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
    *&      Method handle_double_click
    This method is called when the user double clicks on a line to drill
    down.
    The following are exported from the ALV
    LVC_S_ROW
    LVC_S_COL
    LVC_S_ROID
      METHOD HANDLE_DOUBLE_CLICK.
    The double click drill down processing should be
    coded in the form below.
       PERFORM F9007_HANDLE_DOUBLE_CLICK USING E_ROW
                                               E_COLUMN
                                               ES_ROW_NO.
      ENDMETHOD.
    ENDCLASS.
    *&      Form  F9007_HANDLE_DOUBLE_CLICK
    This form is called when the user double clicks on a line to drill
    down.
         -->P_E_ROW_ID    - Row ID  text
         -->P_E_COLUMN_ID - Column ID
         -->P_ES_ROW_NO   - Row number
    FORM f9007_handle_double_click USING p_row
                                         p_column
                                         p_row_no.
      DATA: lw_output LIKE LINE OF i_output.
    Need to check that a subtotal or grand total line has not been
    double-clicked, otherwise the report will produce a short dump!
      check p_row+0(1) is initial.
    RG:16/11/2004 - End of Changes
      READ TABLE i_output INDEX p_row INTO lw_output.
      CASE p_column.
        WHEN 'KNUMA'.
          IF NOT lw_output-knuma IS INITIAL.
            SET PARAMETER ID 'VBO' FIELD lw_output-knuma.
            CALL TRANSACTION 'VBO3' AND SKIP FIRST SCREEN.
          ENDIF.
        WHEN 'VBAK_VBELN'.
         IF NOT lw_output-vbak_vbeln IS INITIAL.
          SET PARAMETER ID 'AUN' FIELD lw_output-vbak_vbeln.
            CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
          ENDIF.
        WHEN 'VBRK_VBELN'.
          IF NOT lw_output-vbrk_vbeln IS INITIAL.
            SET PARAMETER ID 'VF' FIELD lw_output-vbrk_vbeln.
            CALL TRANSACTION 'VF03' AND SKIP FIRST SCREEN.
          ENDIF.
      ENDCASE.
    ENDFORM.                    " F9007_HANDLE_DOUBLE_CLICK
      DATA:    lv_bukrs    LIKE bkpf-bukrs,
               lv_belnr    LIKE bkpf-belnr,
               lv_gjahr    LIKE bkpf-gjahr.
    LOOP AT i_fieldrows INTO w_fieldrows.
        READ TABLE i_output INTO w_output INDEX w_fieldrows-index.
    ENDLOOP.
          lv_bukrs = w_output-bukrs.
          lv_belnr = w_output-belnr.
          lv_gjahr = w_output-gjahr.
          SET PARAMETER ID 'BUK' FIELD lv_bukrs.
          SET PARAMETER ID 'BLN' FIELD lv_belnr.
          SET PARAMETER ID 'GJR' FIELD lv_gjahr.
          CALL TRANSACTION c_transaction_call_fb03 AND SKIP FIRST SCREEN .
    Also do a search in this forum.
    Thanks & Regards,
    Judith.

  • Get table for cl_gui_alv_grid

    Dear all
    I have several cl_gui_alv_grid controls and I like to add 1 double-click handler to all those Grids.
    Now when doubleclicking, I need to now which table (they have all the same type) is displayed by this grid.
    How can I get this information?
    thank you
    Herbert

    I guess, everyone has missed the fact that we can get the access of the Event Sender as the parameter SENDER. So, you can achieve it by doing like this:
    * definition
        methods: handle_double_click
                 for event double_click of cl_gui_alv_grid
                 importing e_row
                           e_column
                           es_row_no
                           sender.
    Set event handler for all the objects
        SET HANDLER g_event_receiver->handle_double_click
                                      FOR all instances.
    For the method implementation
    method handle_double_click.
       case sender.
          when o_Grid1.
    *        grid1 processing
           when o_grid2.      
       endcase.
    endmethod.
    More information on Sender: [Method - For Event|http://help.sap.com/abapdocu_702/en/abapmethods_event_handler.htm#!ABAP_ADDITION_1@1@]
    Regards,
    Naimesh Patel

  • Unable to get automatic event handling for OK button.

    Hello,
    I have created a form using creatobject. This form contains an edit control and Search, Cancel buttons. I have set the Search buttons UID to "1" so it can handle the Enter key hit event. Instead its caption changes to Update when i start typing in the edit control and it does not respond to the Enter key hit. Cancel happens when Esc is hit.
    My code looks like this -
    Dim oCreationParams As SAPbouiCOM.FormCreationParams
            oCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
            oCreationParams.UniqueID = "MySearchForm"
            oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Sizable
                    Dim oForm As SAPbouiCOM.Form = SBO_Application.Forms.AddEx(oCreationParams)
    oForm.Visible = True
    '// set the form properties
            oForm.Title = "Search Form"
            oForm.Left = 300
            oForm.ClientWidth = 500
            oForm.Top = 100
            oForm.ClientHeight = 240
            '// Adding Items to the form
            '// and setting their properties
            '// Adding an Ok button
            '// We get automatic event handling for
            '// the Ok and Cancel Buttons by setting
            '// their UIDs to 1 and 2 respectively
            oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 5
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
            oButton = oItem.Specific
            oButton.Caption = "Search"
            '// Adding a Cancel button
            oItem = oForm.Items.Add("2", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 75
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
            oButton = oItem.Specific
            oButton.Caption = "Cancel"
    oItem = oForm.Items.Add("NUM", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            oItem.Left = 105
            oItem.Width = 140
            oItem.Top = 20
            oItem.Height = 16
            Dim oEditText As SAPbouiCOM.EditText = oItem.Specific
    What changes do i have to make to get the enter key to work?
    Thanks for your help.
    Regards,
    Sheetal

    Hello Felipe,
    Thanks for pointing me to the correct direction.
    So on refering to the documentation i tried out a few things. But I am still missing something here.
    I made the following changes to my code -
    oForm.AutoManaged = True
    oForm.SupportedModes = 1 ' afm_Ok
    oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 5
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
    oItem.SetAutoManagedAttribute(SAPbouiCOM.BoAutoManagedAttr.ama_Visible, 1, SAPbouiCOM.BoModeVisualBehavior.mvb_Default)
            oButton = oItem.Specific
            oButton.Caption = "OK"
    AND
    oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE
    oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 5
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
    oItem.AffectsFormMode = False
    I get the same behaviour OK button changes to update and enter key does not work.
    Could you please tell me find what is it that i am doing wrong?
    Regards,
    Sheetal

  • How can I create events dynamic for a Group/List?

    Hey,
    atm I'm programming a little application where i want to add elements to my center-pane.
    Simpyfied I got:
    - Center Pane : here shall the elements appear on right click in bottom-pane. This pane shall be used as anything like a playground where you can drag/drop and connect items from the bottom-pane
    - Bottom Pane: here I got about 180 elements which are quite equal. This is sth like a menu of items which you can use. I realised them in java classes extended from a parent class with differend calulations.
    What I want:
    I want to create an event handler for EACH of the "menu" elements dynamically. Just sth like:
        for (int i = 0; i < basic_menu_list.size(); i++)
          final Element el = hbox_bottom.getChildren().get(i);
          hbox_bottom.getChildren().get(i).setOnMouseClicked(new EventHandler<MouseEvent>()
            public void handle(MouseEvent event)
              if (event.isSecondaryButtonDown())
                playground.add(el);
                redrawPlayground();
        }But as i expected this doesnt work...
    Now my question:
    How can I solve this problem? Is there any option to listen to all elements of a group without hard-coding every single listener?
    Thanks for your help,
    Martin

    Hello User,
    Why did you expect that it wouldn't work?
    You have an example with "transition" apply on a bunch of circles in the Getting Started with JavaFx (http://download.oracle.com/javafx/2.0/get_started/jfxpub-get_started.htm)
    Here a basic example class...
    import javafx.application.Application;
    import javafx.event.EventHandler;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.TextBox;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.Pane;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    public class HelloWorld extends Application {
        //~ ----------------------------------------------------------------------------------------------------------------
        //~ Methods
        //~ ----------------------------------------------------------------------------------------------------------------
        public static void main(String[] args) {
            // Entry point
            Application.launch(args);
        @Override
        public void start(Stage mainStage) throws Exception {
            Pane pane = new Pane();
            Scene scene = new Scene(pane, 200, 200);
            VBox vBox = new VBox();
            TextBox input1 = new TextBox();
            TextBox input2 = new TextBox();
            vBox.getChildren().addAll(input1, input2);
            for (Node input : vBox.getChildren()) {
                input.setOnMouseClicked(new EventHandler<MouseEvent>() {
                        public void handle(MouseEvent event) {
                            System.out.println("test click");
            pane.getChildren().add(vBox);
            mainStage.setScene(scene);
            mainStage.setVisible(true);
    }Niculaiu

  • How can I use the same event case for different controls dynamically

    OS: Linux 2.6.24-1-686 #1 SMP Sat Apr 19 00:37:55 UTC 2008 i686 GNU/Linux
    LabVIEW: Version 8.2
    I have a lot of (about 50) controls (numeric, boolean) on my front panel. If a "Value Change" event will be fired by any of them the same event case shall be executed. As I do not want to add all 50 controls to the same event case manually I am looking for a way to do it at run time. Additionally the VI is still under contruction, i.e. controls will be added and removed.
    Thanks for any help here.
    Regards,
    Johannes
    Solved!
    Go to Solution.

    Hi Johannes,
    collect all your control references (you can use the FP property for it) and create a user event. Connect this user event to your event structure. Now you have one event case for all your controls. See the attached picture.
    Mike
    Attachments:
    Unbenannt1.PNG ‏11 KB

  • How do I create a new event entry for a specific calendar?

    In my iMac Calendar app, I have created a few calendars for different functions.    But every time I try to create a new event entry for a specific calendar, the app seems to prefer a different calendar instead by default.   I cannot enter events in other calendars.   Is there a way to do this?   In previous versions, I would highlight the particular calendar I wanted to work with and the entry would go into that calendar.   Thanks!

    You don't.  Moments in Photos are the new Events, i.e. groupings of photos sorted by date taken.
    When the iPhoto Library was first migrated to Photos there was a folder created in the sidebar titled iPhoto Events and all migrated iPhoto Events (which are now Moments) are represented by an album in that folder. To open the sidebar if it's not already open use the Option+Command+S key combination.
    There's a way to simulate events in Photos.
    When new photos are imported into the Photos library go to the Last Import smart album, select all the photos and use the File ➙ New Album menu option or use the key combination Command+N.  Name it as desired.  It will appear just above the iPhoto Events folder where you can drag it into the iPhoto Events folder
    When you click on the iPhoto Events folder you'll get a simulated iPhoto Events window.
    The downside to the simulation is that the Albums/Events can only be sorted automatically by Title. But they can also be sorted manually, either in the sidebar or in the folder's window at the right.
    Ask Apple for more sorting options in Photos via https://www.apple.com/feedback/photos.html.

  • [EJB:010112] - error with WLI8.1 Event Generator for foreign JMS/MQ provider

    I'm getting following error in weblogic server log when starting a JMS Event generator
    to a foreign JMS(MQ5.3) Queue.
    <May 4, 2004 4:44:35 PM PDT> <Warning> <EJB> <BEA-010096> <The Message-Driven
    EJ
    B: mqQueueEventGen is unable to connect to the JMS destination: WAL1021852D_Test
    JMSQueue. Connection failed after 2 attempts. The MDB will attempt to reconnect
    every 10 seconds. This log message will repeat every 600 seconds until the condi
    tion clears.>
    <May 4, 2004 4:44:35 PM PDT> <Warning> <EJB> <BEA-010061> <The Message-Driven
    EJ
    B: mqQueueEventGen is unable to connect to the JMS destination: WAL1021852D_Test
    JMSQueue. The Error was:
    [EJB:010112]The Message Driven Bean 'mqQueueEventGen' is transacted, but the pro
    vider defined in the EJB is not transacted. Provider should be transacted if onM
    essage method in MDB is transacted.>
    My WLI8.1.2 is patched with CR131686_812.zip to support event generator for foreign
    JMS destinations. The foreign JMS/MQ provider is configured properly. QueueSend/Receive
    were tested fine with JMS java code using local JNDI names of foreign JMS objects.
    So we know that foreign Queue is active and accessiable from webLogic.
    Anyone run into this? Solution?
    Thanks,
    Scott

    Hi Scott,
    I need a transaction from the MDB since I am not using an EJb to pursue the action.
    Hence I need to retain the <trans-attribute>Required</trans-attribute> at the
    MDB.
    Have any answers?
    Pradip
    "Scott Yen" <[email protected]> wrote:
    >
    It's resolved.
    The MDB automatically created by JMS Event Generator defaults to be deployed
    with
    “transacted”. That requires the foreign JMS provider to be “XA”.
    The deployment descriptor is created as <domain-directory>/WLIJmsEG_<event_gen_name>.jar
    e.g. C:\bea812\user_projects\domains\jmsInterop\WLIJmsEG_mqQueueEventGen.jar
    Since MQ in the localhost and remote SLUDV18 are not XA-enabled, we had
    to manually
    change the <container-transaction> section in ejb-jar.xml:
    From :
    <trans-attribute>Required</trans-attribute>
    To:
    <trans-attribute>NotSupported</trans-attribute>
    "Scott Yen" <[email protected]> wrote:
    I'm getting following error in weblogic server log when starting a JMS
    Event generator
    to a foreign JMS(MQ5.3) Queue.
    <May 4, 2004 4:44:35 PM PDT> <Warning> <EJB> <BEA-010096> <The Message-Driven
    EJ
    B: mqQueueEventGen is unable to connect to the JMS destination: WAL1021852D_Test
    JMSQueue. Connection failed after 2 attempts. The MDB will attempt to
    reconnect
    every 10 seconds. This log message will repeat every 600 seconds until
    the condi
    tion clears.>
    <May 4, 2004 4:44:35 PM PDT> <Warning> <EJB> <BEA-010061> <The Message-Driven
    EJ
    B: mqQueueEventGen is unable to connect to the JMS destination: WAL1021852D_Test
    JMSQueue. The Error was:
    [EJB:010112]The Message Driven Bean 'mqQueueEventGen' is transacted,
    but the pro
    vider defined in the EJB is not transacted. Provider should be transacted
    if onM
    essage method in MDB is transacted.>
    My WLI8.1.2 is patched with CR131686_812.zip to support event generator
    for foreign
    JMS destinations. The foreign JMS/MQ provider is configured properly.
    QueueSend/Receive
    were tested fine with JMS java code using local JNDI names of foreign
    JMS objects.
    So we know that foreign Queue is active and accessiable from webLogic.
    Anyone run into this? Solution?
    Thanks,
    Scott

  • EmailRecieved Event handler for incoming email in Sharepoint 2013

    Hi,
    I am developing custom event handler to enable incoming email for custom document library.  i have couple of questions.
    1. Once i attached the event handler, i could see incoming email settings for the custom document library, but it displays only 2 options as below :
                  1.   Allow this document library to recieve email
                                 Yes       No
                    2. E-mail address
    All other properties are not displaying. Is this normal behaviour on custom event handler for custom document library or any issue anywhere?
    2. So i have given other properties using powershell as below:
    $list = $web.lists["invoice Documents"]
    $list.EmailAlias ="TestDocument"
    $list.EnableAssignToEmail = $true
    $list.rootFolder.Properties["vti_emailusesecurity"] = 1
    $list.rootFolder.Properties["vti_emailsaveattachments"] = 1
    $list.rootFolder.Properties["vti_emailattachmentfolders"] = "root"
    $list.rootFolder.Properties["vti_emailoverwrite"] = 0
    $list.rootFolder.Properties["vti_emailsavemeetings"] = 0
    $list.rootFolder.Properties["vti_emailsaveoriginal"] = 0
    $List.RootFolder.Update();
    $list.Update();
    here i have given vti_emailusesecurity as 1, so it should allow incoming email for the user who has permission for the list.
    But any user from the domain is sending mail to this list, the Emailrecieved event handler is triggered. I am expecting that this event handler should not be triggered and expecting access denied error in the ULS Log. But that is not happening, and emailrecived
    is triggered and email is delivering to this address successfully.
    Can you please anyone help if experience on this?
    Thanks
    Sathya

    http://www.coretekservices.com/2012/01/26/sharepoint-content-organizer-%25e2%2580%2593-emailing-your-drop-off-library-and-getting-it-to-work
    Central Administration > Monitoring > Review Job Definitions (under Timer Jobs) > Content Organizer Processing
    Also check below:
    http://tutorial.programming4.us/windows_server/SharePoint-2010---Content-Organizer-as-a-Document-Routing-Tool.aspx
    If this helped you resolve your issue, please mark it Answered

  • Global event handler for preinitialize

    Is there anyway to add a global event handler on the
    components preinitialize event?
    What I need to do is to be able to enable / disable, and show
    / hide component dynamically based on a access list. My plan was to
    have a global event handler that listens to the preinitialize
    event, at that time, checks if the user has access to the component
    or not. If not, I'll disable / hide the component.
    What I did so far is:
    in my main app.mxml file, I have:
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    preinitialize="preinit(event)"
    so the preinit() function is invoked on the app's
    preinitialize event.
    Then I have the preinit() function (see attached code below).
    However, it does work as there is no trace message printed.
    I changed to use KeyBoardEvent.KEY_DOWN and that seems
    working when I press any key.
    I also tried to use the app.stage.addEventListener() but the
    stage object is null in the preinitialize event.
    Thanks in advance for your help.

    Thank you for follow up on my question.
    I do know these two properties. But that does not solve the
    problem. Let me explain it with an example.
    That's say, when the user logs in, I loads the access list.
    Then the app displays a panel with some form entries. If I am able
    to register a global event listener for the component
    initialization events, I can check the permission and optionally
    hide some components. Otherwise, I would need to programmatically
    travels my component tree to evaluate each component individually
    to set there visible/includeInLayout properties, which is error
    prone.
    The problem is that the component is visible to one user but
    would be hidden to another, so it can not be set at the design
    time.
    The approach I am using right now is to extend the default
    components to add an event listener. But I'd like to know if it is
    possible to register a global event listener to be notified when
    any component is created. As my first post says, I tried to use the
    systemManager and listen to the PREINITIALIZE event, but that
    didn't get always get invoked.

  • Event handler for selecting 3d views

    Hi,
    Is there any event handlers for when a user selects a view?
    I would like to be able to base actions after a view is selected but can't figure away to do it other then creating my own list of views.
    Thanks!

    ...Yes indeed! :-) It's called the CameraEventHandler. It gets triggered whenever a user changes a view. You can use the returned "event" object to get info about the camera (or modify it), to just use the eventHandler to trigger other activity as you mentioned.
    Here's a simple example which outputs all the camera properties to the console window at view change.
    //===============================================
    myCEH = new CameraEventHandler();
    myCEH.onEvent = function(CameraEvent)
    console.println("CameraEvent.binding = " + CameraEvent.binding );
    console.println("CameraEvent.far = " + CameraEvent.far );
    console.println("CameraEvent.fov = " + CameraEvent.fov );
    console.println("CameraEvent.currentTool = " + CameraEvent.currentTool );
    console.println("CameraEvent.canvas = " + CameraEvent.canvas );
    console.println("CameraEvent.isNewCanvas = " + CameraEvent.isNewCanvas );
    console.println("CameraEvent.near = " + CameraEvent.near );
    console.println("CameraEvent.projectionType = " + CameraEvent.projectionType);
    console.println("CameraEvent.targetDistance = " + CameraEvent.targetDistance);
    console.println("CameraEvent.transform = " + CameraEvent.transform );
    console.println("CameraEvent.viewPlaneSize = " + CameraEvent.viewPlaneSize );
    runtime.addEventHandler(myCEH);
    //===============================================

  • Event Receiver for all Page Libraries in a Site Collection

    We have a single site collection with many different page libraries.  I'd like to create a single event receiver for ALL page libraries in the site collection (850- Page Library).  Can you do this?
    The event receiver will essentially remove/expire something we have stored in the System.Web.HttpRuntime.Cache.  We are caching the content in the Page Library and would only like to expire the cache when a new page or change is performed on some
    content in the page library.

    Hi,
    We can create a new feature and add an event receiver to the feature for all Page Libraries.
    For more information, you can see the link below:
    http://msdn.microsoft.com/en-us/library/ee231604.aspx
    Here are two similar threads for you to take a look at:
    http://sharepoint.stackexchange.com/questions/37555/how-to-add-event-receivers-to-all-the-lists-in-a-site-collection
    http://social.technet.microsoft.com/Forums/en-US/f1297543-9035-49d6-9299-d82f546eeddd/event-receiver-for-specific-list-fires-for-all-lists-on-site-collection?forum=sharepointcustomizationprevious
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • How to add event handling for a menu?

    hi,
    I have created a menu and few mneu items.
    for eachmenu itme , i did event handling and it is workign fine.
    it was like this
    menuItem = new JMenuItem("Exit",KeyEvent.VK_X);
    menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, ActionEvent.ALT_MASK));
    menuItem.addActionListener(this);
    menu.add(menuItem);
         public void actionPerformed(ActionEvent e)
    JMenuItem source = (JMenuItem)(e.getSource());
    String s = "Action event detected. Event source: " + source.getText();
    System.out.println(s);     
    public void itemStateChanged(ItemEvent e)
    JMenuItem source = (JMenuItem)(e.getSource());
    String s = "Item event detected. Event source: " + source.getText();
    System.out.println(s);
    now int he second menu i don't have any menu item and i want to do the event handling for the menu itself. any ideas how to do it. following is the code for the menu
    //Build the second menu.
    menu2 = new JMenu("Options");
    menu2.setMnemonic(KeyEvent.VK_O);
    menuBar.add(menu2);
    menu2.addActionListener(this);     //this does nto work

    You were on the right track. However, selecting a menu is different from selecting a menu item. MenuItem chucks an ActionEvent and Menu will send an ItemEvent.
    If you pile all action output to one actionPerformed method then be careful of your assumptions on what the source type will be. If by any chance the Menu has sent an ActinoEvent then your code will have caused a ClassCastException.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class MenuTest implements ActionListener, ItemListener {
        JMenuItem menuItem;
        JMenu menu1, menu2;
        JMenuBar menubar;
        JFrame frame;
        public MenuTest() {
            frame = new JFrame("MenuTest");
            frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);
            menubar = new JMenuBar();
            frame.setJMenuBar(menubar);
            menu1 = new JMenu("File");
            menu1.setMnemonic(KeyEvent.VK_F);
            menuItem = new JMenuItem("Exit",KeyEvent.VK_X);
            menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, ActionEvent.ALT_MASK));
            menuItem.addActionListener(this);
            menu1.addItemListener(this);
            menu1.add(menuItem);
            menubar.add(menu1);
            //Build the second menu.
            menu2 = new JMenu("Options");
            menu2.setMnemonic(KeyEvent.VK_O);
            menu2.addActionListener(this); //this does not work
            menu2.addItemListener(this); // use this instead
            menubar.add(menu2);
            JPanel panel = new JPanel();
            panel.setPreferredSize(new Dimension(100,100));
            frame.getContentPane().add(panel);
            frame.pack();
            frame.show();
        public void actionPerformed(ActionEvent e)
            String s = "Action event detected. Event source: " + e.getSource();
            System.out.println(s);
        public void itemStateChanged(ItemEvent e)
            String s = "Item event detected. Event source: " + e.getSource();
            System.out.println(s);
        public static void main(String[] args) {
            new MenuTest();
    }

  • Event handler for STDIN input?

    Hi,
    This question will probably require a bit of context - I'm attempting to re-implement in java an application that's currently written in perl. The application is a server helper app that rewriters urls; it receives a request ID and a URL on stdin, does the necessary munging (which can require an external SOAP query), then returns the resulting rewritten URL.
    Since the results can be asynchronous due to the need for external queries to build the result, this is currently a multithreaded perl app implemented using perl's POE framework to register an event handler for stdin. That handler fires each time a line of input is received, then feeds the query to a thread pool manager (POE::Component::Pool::Thread, which is conceptually similar to the Executor frameworks). The thread returns the result as a callback registered to another function in the main thread, which then populates the query/result to a cache then outputs the result (with the original query ID) on stdout. Since stdin input and the result callbacks are event-driven, there's no while(true) main loop or other blocking mechanism in the main thread. Unfortunately, it's perl-ness is causing problems due to perl's threading implementation (three words: "copy on init"), so we need to reimplement in a language with a more robust threading implementation (preferably one with copy-on-write for shared objects). So, Java it is.
    So far everything's been good - Executor, Callables, and Futures work as I hoped they would for proper thread management, and the internal worker thread logic (XML processing, SOAP, regular expressions, etc) is proving rather simple to adapt. However, the main roadblock I'm hitting is that so far, I have not found a way to register any sort of event handler for STDIN input (or more specifically, InputStreamReader/BufferedStreamReader events). This could be due to search engine pollution - everything I see when I search for documentation on event listeners appears to be GUI-specific (buttons, menus, text areas/forms, etc). I'm just looking for a way to handle a line of STDIN, not a text area on a form.
    Any pointers in the right direction will be much appreciated!

    rekoil wrote:
    Maybe I need to rethink the design here...
    The main reason I used a callback in the original perl is that there's a large cache structure that gets checked before the thread dispatch, and only cache misses get pushed to a thread for processing. Callbacks from the threads will then add its results to the cache. Thanks to perl's thread model, when I attempted to make the cache a shared structure - in perl, you have to explicitly mark as "shared" variables that you want visible to all threads - the structure wound up getting copied to every thread, and this gave the app an unacceptable memory footprint. So the solution was to use a callback in the main thread to update the cache.
    I'm now thinking that if Java's thread model is a bit saner (i.e. a shared object doesn't get copied into every thread), then I could just have each thread update the cache, print its output to STDOUT directly, and avoid the need for the callback. I can then make my input loop simply a while() loop, waiting for the next input to dispatch. Sound sane?Yes I think so.
    There is some of this I still don't entirely understand. Your loop sounds better now but it sounds to me like the process is this.
    1) read from in
    2) call some stuff on the basis of what came in
    3) do work
    4) workers produce things
    5) things written back out
    6) read back in??
    If you're just going in/out then great. If you are going in/out/in then maybe some sort of PipedInput/Output Streams? It may well be that I got lost in your explanation in which case never mind.

Maybe you are looking for

  • Power Mac G5 is freezing....HD not mounting......

    Okay, so for the last few days my Power Mac G5 Dual 2.0 has been a bit sluggish to say the least. When switching quickly from iTunes to Safari it will pause for a second or two and then spin that lovely little beach ball for about 5 seconds. Last nig

  • Resource Not Allowed

              Hi,           I am using the following to forward it to a servlet           <jsp:forward page="http://localhost:7001/SreeniWebApp/dbHandler">           I get the following error in the browser           HTTP 405 - Resource not allowed      

  • InDesign CS4 to PDF - Missing characters

    I created a brochure (2-sided with lots of copy) using InDesign CS4; I exported it to PDF [Compatibility: Acrobat 5 (PDF 1.4)]. When opened in Acrobat 9 Professional on my computer, the file contents were perfect. The file was sent as an email attach

  • How do I get this app to stop coming on?

    I don't use this software and it's a real bummer, when I mis-strike a key and it opens up. Apparently the hot key is Command-Escape, and I just want to disable it, but once in the software I can not get to any preference pane. Any suggestions appreci

  • Will stacks show in pic's when burning a dvd?

    Hi all, just wanted to know if the stacks in my pic's will show when burning a dvd. When I fix red-eye or auto smart fix it shows the stacks on my pic's. I don't want the stacks to show when burning the pic's on a dvd. Thanks, alot