Save Event Handler?

Hey scripters!  I mostly develop plugins with the C++ sdk, so forgive my ignorance.  I was just wondering if it is at all possible (in a script) to make event handler that "listens" for a save event?

I'm not sure how it works using Patch Panels, but if you want to register an event in a Flex panel using the Photoshop Panel SDK ( CSXSLib ) you register the event in the panel
CSXSInterface.instance.evalScript("PhotoshopRegisterEvent", charToInteger("save").toString());
ExternalInterface.addCallback("PhotoshopCallback", PhotoshopCallback);
The 'Per Layer Metadata' sample in the SDK has more info

Similar Messages

  • Event Handling: Save/Save as

    Hi everyone,
    is there any way to process Photoshop events before they are actually handled by photoshop? What I mean is, e.g. when the user saves a file I want to prevent the whole save process given certain circumstances. I have a working notifier for "eventSave" in my automation-plugin but I do not receive notification directly on this event (i.e. when the user has chosen save/save as from file menu) but only after photoshop has saved. What I'm trying to do here is check my global flag and if its on and the user wants to save, I want to pop up an info-box and cancel/prevent the whole save event.

    To the best of my knowledge, this is no documented way of doing it: the Photoshop event model is based on "do-and-notify" paradigm, so unless the powers that be suggest differently, the answer is "no".

  • How to find event handler for save button in salesorders

    Hi,
    I want perform event based on save button in salesorders.Can you tell me how to find the event handler for
    save button.
    Regards,
    Brahmaji

    Brahma,
    you can find the component, view details by doing an F2.
    open the component, the view will be mostly an overview page i.e., the name ends OP etc.,
    But your method name will be mostly EH_ONSAVE, you need to find exact view.
    F2 does not come up properly for overview pages, you have to look into UI config tool preview and make sure sometimes.
    Regards,
    Masood Imrani S.

  • How to get a form field valud in delete PL/SQL Button Event Handler

    Hi Friend,
    I have a form. when user clicks delete button. we want to remove system dodelete function
    and add a delete script
    Under delete-top category,
    how can I get value of form EVENT_NUMBER field in form at delete PL/SQL Button Event Handler?
    DELETE FROM PTEAPP.PTE_EVENTS WHERE eventnumber = EVENT_number
    But when I try to save this form and get message as
    1721/15 PLS-00201: identifier 'EVENT_NUMBER' must be declared
    Thanks for any help!
    newuser

    I did something similar but wasn't using a stored procedure. Couldn't you set a flag variable once you know you're not doing the insert and in the "before displaying the form" section put an IF to check if your flag was set, and if so do an HTP.Print('You are overpaid buddy!');
    Then just reset your flag.

  • Event handling in oops alv

    hi experts,
    event double click.
    when double click  on vbeln it should go to va03 transaction . how would i do that in oops alv.

    hai,
    you can go through code below .
    *& Report  Z_CLARIFY                                                   *
    REPORT  Z_CLARIFY                               .
    DATA: G_GRID TYPE REF TO CL_GUI_ALV_GRID.
    DATA: L_VALID TYPE C,
          V_FLAG,
          V_DATA_CHANGE,
          V_ROW TYPE LVC_S_ROW,
          V_COLUMN TYPE LVC_S_COL,
          V_ROW_NUM TYPE LVC_S_ROID.
    DATA: IT_ROW_NO TYPE LVC_T_ROID,
          X_ROW_NO TYPE LVC_S_ROID.
    DATA:BEGIN OF  ITAB OCCURS 0,
         VBELN LIKE LIKP-VBELN,
         POSNR LIKE LIPS-POSNR,
         CELLCOLOR TYPE LVC_T_SCOL, "required for color
         DROP(10),
         END OF ITAB.
    *The Below Definitions Must.....
    DATA:
    Reference to document
           DG_DYNDOC_ID       TYPE REF TO CL_DD_DOCUMENT,
    Reference to split container
           DG_SPLITTER          TYPE REF TO CL_GUI_SPLITTER_CONTAINER,
    Reference to grid container
           DG_PARENT_GRID     TYPE REF TO CL_GUI_CONTAINER,
    Reference to html container
           DG_HTML_CNTRL        TYPE REF TO CL_GUI_HTML_VIEWER,
    Reference to html container
           DG_PARENT_HTML     TYPE REF TO CL_GUI_CONTAINER.
    "up to here
          CLASS lcl_event_handler DEFINITION
    CLASS LCL_EVENT_HANDLER DEFINITION .
      PUBLIC SECTION .
        METHODS:
    **Hot spot Handler
        HANDLE_HOTSPOT_CLICK FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
                          IMPORTING E_ROW_ID E_COLUMN_ID ES_ROW_NO,
    **Double Click Handler
        HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
                                         IMPORTING E_ROW E_COLUMN ES_ROW_NO,
        TOP_OF_PAGE FOR EVENT TOP_OF_PAGE              "event handler
                             OF CL_GUI_ALV_GRID
                             IMPORTING E_DYNDOC_ID.
           END_OF_LIST FOR EVENT end_of_list              "event handler
                            OF CL_GUI_ALV_GRID
                            IMPORTING E_DYNDOC_ID.
    ENDCLASS.                    "lcl_event_handler DEFINITION
          CLASS lcl_event_handler IMPLEMENTATION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
    *Handle Hotspot Click
      METHOD HANDLE_HOTSPOT_CLICK .
        CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
        V_ROW  = E_ROW_ID.
        V_COLUMN = E_COLUMN_ID.
        V_ROW_NUM = ES_ROW_NO.
       MESSAGE I000 WITH V_ROW 'clicked'.
        CLEAR IT_ROW_NO[].
        X_ROW_NO-ROW_ID = V_ROW.
        APPEND X_ROW_NO TO IT_ROW_NO .
        CALL METHOD G_GRID->SET_SELECTED_ROWS
          EXPORTING
            IT_ROW_NO = IT_ROW_NO.
      ENDMETHOD.                    "lcl_event_handler
    *Handle Double Click
      METHOD  HANDLE_DOUBLE_CLICK.
        CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
        V_ROW  = E_ROW.
        V_COLUMN = E_COLUMN.
        V_ROW_NUM = ES_ROW_NO.
        IF E_COLUMN = 'VBELN'.
          SET PARAMETER ID 'VL' FIELD ITAB-VBELN.
          CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
        ENDIF.
        IF E_COLUMN = 'POSNR'.
          SET PARAMETER ID 'VL' FIELD ITAB-VBELN.
          CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN."
        ENDIF.
      ENDMETHOD.                    "handle_double_click
    METHOD END_OF_LIST.                   "implementation
    Top-of-page event
       PERFORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID.
    ENDMETHOD.                            "top_of_page
        METHOD TOP_OF_PAGE.                   "implementation
    Top-of-page event
        PERFORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID.
      ENDMETHOD.                            "top_of_page
    ENDCLASS.                    "LCL_EVENT_HANDLER IMPLEMENTATION
    *&             Global Definitions
    DATA:      G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
    "Container1
                G_HANDLER TYPE REF TO LCL_EVENT_HANDLER. "handler
    DATA: OK_CODE LIKE SY-UCOMM,
          SAVE_OK LIKE SY-UCOMM,
          G_CONTAINER1 TYPE SCRFNAME VALUE 'TEST',
          GS_LAYOUT TYPE LVC_S_LAYO.
    data: v_lines type i.
    data: v_line(3) type c.
    *- Fieldcatalog for First and second Report
    DATA: IT_FIELDCAT  TYPE  LVC_T_FCAT,
          X_FIELDCAT TYPE LVC_S_FCAT,
          LS_VARI  TYPE DISVARIANT.
                   START-OF_SELECTION
    START-OF-SELECTION.
      SELECT VBELN
             POSNR
             FROM LIPS
             UP TO 20 ROWS
             INTO CORRESPONDING FIELDS OF TABLE ITAB.
    describe table itab lines v_lines.
    END-OF-SELECTION.
      IF NOT ITAB[] IS INITIAL.
        CALL SCREEN 100.
      ELSE.
       MESSAGE I002 WITH 'NO DATA FOR THE SELECTION'(004).
      ENDIF.
    *&      Form  CREATE_AND_INIT_ALV
          text
    FORM CREATE_AND_INIT_ALV .
      DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
      "attention.....from here
      "split your container here...into two parts
      "create the container
      CREATE OBJECT G_CUSTOM_CONTAINER
               EXPORTING CONTAINER_NAME = 'SCR100_CUST'.
      "this is for top of page
    Create TOP-Document
      CREATE OBJECT DG_DYNDOC_ID
                       EXPORTING STYLE = 'ALV_GRID'.
    Create Splitter for custom_container
      CREATE OBJECT DG_SPLITTER
                 EXPORTING PARENT  = G_CUSTOM_CONTAINER
                           ROWS    = 2
                           COLUMNS = 1.
    Split the custom_container to two containers and move the reference
    to receiving containers g_parent_html and g_parent_grid
      "i am allocating the space for grid and top of page
      CALL METHOD DG_SPLITTER->GET_CONTAINER
        EXPORTING
          ROW       = 1
          COLUMN    = 1
        RECEIVING
          CONTAINER = DG_PARENT_HTML.
      CALL METHOD DG_SPLITTER->GET_CONTAINER
        EXPORTING
          ROW       = 2
          COLUMN    = 1
        RECEIVING
          CONTAINER = DG_PARENT_GRID.
    CALL METHOD DG_SPLITTER->GET_CONTAINER
       EXPORTING
         ROW       = 2
         COLUMN    = 1
       RECEIVING
         CONTAINER = DG_PARENT_HTML.
    CALL METHOD DG_SPLITTER->GET_CONTAINER
       EXPORTING
         ROW       = 1
         COLUMN    = 1
       RECEIVING
         CONTAINER = DG_PARENT_GRID.
      "you can set the height of it
    Set height for g_parent_html
      CALL METHOD DG_SPLITTER->SET_ROW_HEIGHT
        EXPORTING
          ID     = 1
          HEIGHT = 5.
      "from here as usual..you need to specify parent as splitter part
      "which we alloted for grid
      CREATE OBJECT G_GRID
             EXPORTING I_PARENT = DG_PARENT_GRID.
    Set a titlebar for the grid control
      CLEAR GS_LAYOUT.
      GS_LAYOUT-GRID_TITLE = TEXT-003.
      GS_LAYOUT-ZEBRA = SPACE.
      GS_LAYOUT-CWIDTH_OPT = 'X'.
      GS_LAYOUT-NO_ROWMARK = 'X'.
      GS_LAYOUT-CTAB_FNAME = 'CELLCOLOR'.
      CALL METHOD G_GRID->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
      CREATE OBJECT G_HANDLER.
      SET HANDLER G_HANDLER->HANDLE_DOUBLE_CLICK FOR G_GRID.
      SET HANDLER G_HANDLER->HANDLE_HOTSPOT_CLICK FOR G_GRID.
    SET HANDLER G_HANDLER->END_OF_LIST FOR G_GRID.
      SET HANDLER G_HANDLER->TOP_OF_PAGE FOR G_GRID.
      DATA: LS_CELLCOLOR TYPE LVC_S_SCOL. "required for color
      DATA: L_INDEX TYPE SY-TABIX.
      "Here i am changing the color of line 1,5,10...
      "so you can change the color of font conditionally
      LOOP AT ITAB.
        L_INDEX = SY-TABIX.
        IF L_INDEX = 1 OR L_INDEX = 5 OR L_INDEX = 10.
          LS_CELLCOLOR-FNAME = 'VBELN'.
          LS_CELLCOLOR-COLOR-COL = '6'.
          LS_CELLCOLOR-COLOR-INT = '0'.
          LS_CELLCOLOR-COLOR-INV = '1'.
          APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
          MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
          LS_CELLCOLOR-FNAME = 'POSNR'.
          LS_CELLCOLOR-COLOR-COL = '6'.
          LS_CELLCOLOR-COLOR-INT = '0'.
          LS_CELLCOLOR-COLOR-INV = '1'.
          APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
          MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
        ENDIF.
      ENDLOOP.
    setting focus for created grid control
      CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
        EXPORTING
          CONTROL = G_GRID.
    Build fieldcat and set editable for date and reason code
    edit enabled. Assign a handle for the dropdown listbox.
      PERFORM BUILD_FIELDCAT.
      PERFORM  SET_DRDN_TABLE.
    Optionally restrict generic functions to 'change only'.
      (The user shall not be able to add new lines).
      PERFORM EXCLUDE_TB_FUNCTIONS CHANGING LT_EXCLUDE.
    **Vaiant to save the layout
      LS_VARI-REPORT      = SY-REPID.
      LS_VARI-HANDLE      = SPACE.
      LS_VARI-LOG_GROUP   = SPACE.
      LS_VARI-USERNAME    = SPACE.
      LS_VARI-VARIANT     = SPACE.
      LS_VARI-TEXT        = SPACE.
      LS_VARI-DEPENDVARS  = SPACE.
    **Calling the Method for ALV output
      CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
          IS_VARIANT           = LS_VARI
          IS_LAYOUT            = GS_LAYOUT
          I_SAVE               = 'A'
        CHANGING
          IT_FIELDCATALOG      = IT_FIELDCAT
          IT_OUTTAB            = ITAB[].
      "do these..{
    Initializing document
      CALL METHOD DG_DYNDOC_ID->INITIALIZE_DOCUMENT.
    Processing events
      CALL METHOD G_GRID->LIST_PROCESSING_EVENTS
        EXPORTING
          I_EVENT_NAME = 'TOP_OF_PAGE'
          I_DYNDOC_ID  = DG_DYNDOC_ID.
      "end }
    Set editable cells to ready for input initially
      CALL METHOD G_GRID->SET_READY_FOR_INPUT
        EXPORTING
          I_READY_FOR_INPUT = 1.
    ENDFORM.                               "CREATE_AND_INIT_ALV
    *&      Form  EXCLUDE_TB_FUNCTIONS
          text
         -->PT_EXCLUDE text
    FORM EXCLUDE_TB_FUNCTIONS CHANGING PT_EXCLUDE TYPE UI_FUNCTIONS.
    Only allow to change data not to create new entries (exclude
    generic functions).
      DATA LS_EXCLUDE TYPE UI_FUNC.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_DELETE_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_APPEND_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_INSERT_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_MOVE_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_CUT.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE_NEW_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_UNDO.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
    ENDFORM.                               " EXCLUDE_TB_FUNCTIONS
    *&      Form  build_fieldcat
          Fieldcatalog
    FORM BUILD_FIELDCAT .
      DATA: L_POS TYPE I.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Delivery'(024).
      X_FIELDCAT-FIELDNAME = 'VBELN'.
      X_FIELDCAT-TABNAME = 'IT_FINAL'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-NO_ZERO    = 'X'.
      X_FIELDCAT-OUTPUTLEN = '10'.
      X_FIELDCAT-HOTSPOT = 'X'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Item'(025).
      X_FIELDCAT-FIELDNAME = 'POSNR'.
      X_FIELDCAT-TABNAME = 'IT_FINAL'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-OUTPUTLEN = '5'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Drop'(025).
      X_FIELDCAT-FIELDNAME = 'DROP'.
      X_FIELDCAT-TABNAME = 'IT_FINAL'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-OUTPUTLEN = '5'.
      X_FIELDCAT-EDIT = 'X'.
      X_FIELDCAT-DRDN_HNDL = '1'.
      X_FIELDCAT-DRDN_ALIAS = 'X'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
    ENDFORM.                    " build_fieldcat
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR 'MAIN100'.
      IF G_CUSTOM_CONTAINER IS INITIAL.
    **Initializing the grid and calling the fm to Display the O/P
        PERFORM CREATE_AND_INIT_ALV.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    there are many such examples
    goto->se38->type bcalv* and press f4, u can see many examples.
    Reward points if helpful.
    Thanks and regards
    Swetha Singh.

  • Event handling in Network UI element in Webdynpro

    Hi ,
       I am developing a hierarchial graph using Network UI element.I want to incorporate event handling so that the graph will respond to user actions like on double clicking a node an URL will be opened.I can notproceed with the event handling.
                         Can anyone tell me the procedure to do this from webdynpro java.
    Regards
    Nayeem

    Hi Nayeem,
    The Network UI element has lots of events defined for it which can be handled to get the desired functionality.
    Go to the View in which you have added the Network Element, select the Element and go to the
    properties tab.
    Under events , you can see a list of events defined for this UI element.
    Select the event you wish to handle and press the Create button which gets visible once
    an event say onNodeSelected is selected
    You can then give a name to the action say UserClicked and save it .
    In the properties tab of the UI element , the action will be registed against the event .
    Now select the event again and press the go button.
    It will redirect you to the java editor of the view where in you can place your event handling logic.
    Alternatively, if you have created the UI element dynamically then you can add the event to the UI element by using the following code
    IWDNetwork network = (IWDNetwork)view.createElement(IWDNetwork.class);
    network.setOnNodeSelected(/*Your Action handler already defined in the View*/);
    Regards,
    Ashish

  • Event handling in multi state application

    Hi
    I am developing a flex application. I have a problem with
    event handling. my application has a common header with 4 buttons
    like edit,save,new and cancel. I created a header component with
    these 4 buttons.I attached click events to these buttons but How
    can I handle the events.because if I am in form1 it should go to
    form1 event handler. I have more than 20 forms with this
    header.each form is inside view stack. please give me some
    solution. is there a way to dispatch the event depending on the
    child loaded . thanks

    You might look at the Mate framework. It offers an EventMap
    class that might be quite useful in this situation.
    Link:
    http://mate.asfusion.com/

  • Event Handler or CustomActionFilter

    This is my first attempt at making a plugin.
    Not sure where to start. I am running Visual Studio .NET 2003. And I have installed the AdobeInDesignCS2 402 Product SDK. So I have the sample projects to look at.
    Here is what I am wanting to do.
    I have some .vbs scripts already to go to do some custom fuctions like Open Dialog, Save, SaveAs and Close.
    What I would like to do is have a plugin access these scripts when ever a user chooses one of these events from the main menu or keyboard shortcut keys.
    Example.
    A user selects File>Open. Run my Open.vbs script.
    Do I need to do an Event Handler plugin or an Action Filter plugin?
    If some one has already created a project similar to this I would greatly appreciate if you could send me the project so I could look at the structure. And not have to re-invent the wheel.
    Mahalo
    David
    [email protected]

    You basically need to use 'IScriptRunner'. Here's a snippet of mine which runs a vbs file (which plays a jingle 'AdComplete.wav'!). There are some calls to my own code but sift through it and I'm sure you'll get the hang of whats going on.<br /><br />With this method, you will notice that I create the vbs file dynamically (more flexible!).<br /><br />Dave.<br /><br />     do <br />     {<br />          ClassID scriptManagerClass = kOLEAutomationMgrBoss;<br />          // The locale is fixed by the host application.<br />          PMLocaleId localeID = LocaleSetting::GetLocale();<br />          // Acquire the script manager.<br />          InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(scriptManagerClass));<br />          if (!scriptManager) <br />               break;<br /><br />          InterfacePtr<IScriptRunner>scriptRunner(scriptManager, UseDefaultIID());<br />          SysFileWrapper      MyScriptSysFile, MyWavSysFile;<br />          PMString LocalScriptPath, LocalWavPath;<br />          GetLocalFolder(LocalScriptPath);<br />          ReplaceOccurencesInString(LocalScriptPath, (PMString)"\\", (PMString)"\\\\");<br />          LocalWavPath = LocalScriptPath;<br />          LocalScriptPath.Append("AdComplete.vbs");<br />          LocalWavPath.Append("AdComplete.wav");          <br />          MyScriptSysFile = LocalScriptPath;     <br />          MyWavSysFile = LocalWavPath;<br /><br />          bool8  CanOpenWavFile = FileUtils::CanOpen(MyWavSysFile.Get());<br />          if(CanOpenWavFile==kTrue)<br />          {<br />               PMString TextFileContents;<br />               TextFileContents = "strSoundFile = \"";<br />               TextFileContents.Append(LocalWavPath);<br />               TextFileContents.Append("\"\n");<br />               TextFileContents.Append("Set objShell = CreateObject(\"Wscript.Shell\")\n");<br />               TextFileContents.Append("strCommand = \"sndrec32 /play /close \" & chr(34) & strSoundFile & chr(34)\n");<br />               TextFileContents.Append("objShell.Run strCommand, 0, False");<br />               WriteTextFile(MyScriptSysFile, TextFileContents);<br />               if (scriptRunner->CanHandleFile(MyScriptSysFile.Get()))<br />               {<br />                    ScriptData result;<br />                    PMString errorString;<br />                    ErrorCode err = scriptRunner->RunFile(MyScriptSysFile.Get(), result, errorString);<br />               }<br />          }<br /><br />     } while(false);

  • OIM 10g Event Handler : Integrated with User Groups.User Members

    I have created custom event handler and integrated it with User Groups.User Members data object.
    here is my code od event handler class:
    public class GroupEventHandler extends tcBaseEvent {
         public GroupEventHandler() {
              this.setEventName("Event Handler Sample");
         protected void implementation() throws Exception {
              System.out.println("============@@@@@@@@ IN EVENT HANDLER ");
              try
              String groupKey = this.getDataObject().getString("Groups.Key");
              writeToFile(groupKey);
              catch (Exception e)
                   e.printStackTrace();
    But I am getting this exception :
    ERROR [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' XELLERATE.SERVER - Class/Method: tcTableDataObj/getString encounter some problems: Column 'GROUPS.KEY' not found
    com.thortech.xl.dataaccess.tcDataSetException: Column 'GROUPS.KEY' not found
         at com.thortech.xl.dataaccess.tcDataSet.getColumnIndex(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataSet.getString(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.getString(Unknown Source)
         at oim.GroupEventHandler.implementation(GroupEventHandler.java:19)
         at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcUSG.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcGroupOperationsBean.addMemberUsers(Unknown Source)
         at com.thortech.xl.ejb.beans.tcGroupOperationsSession.addMemberUsers(Unknown Source)
         at com.thortech.xl.ejb.beans.tcGroupOperations_ejm77u_EOImpl.addMemberUsers(tcGroupOperations_ejm77u_EOImpl.java:1671)
         at Thor.API.Operations.tcGroupOperationsClient.addMemberUsers(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.security.Security.runAs(Security.java:41)
         at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy66.addMemberUsers(Unknown Source)
         at com.thortech.xl.webclient.actions.UserGroupMembersAction.assignMemberUsers(Unknown Source)
         at com.thortech.xl.webclient.actions.UserGroupMembersAction.assignGroupMembers(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)

    Anyone have idea about why "Groups.Key" not found exception thrown here..
    I have assigned this event handler at postinsert event of User Groups.User Members Data Object.

  • What is event handler in oopsand why we need it  and how to use it ?

    Hi  everyone ,
    I am new to sdn.I did not understand event handler  in oops .Please replay to this .
    Thanks & Regards,
    Sudeep Subudhi.
    Moderator Message: Welcome to SDN. Please read the [Forum Rules of Engagment|Welcome and Rules of Engagement; before posting your question.
    Edited by: Suhas Saha on Jan 9, 2012 2:51 PM

    EDIT: BAH! I posted too slow... but there is still some information about saving and clearing in there
    Its for making a playlist while your 'on the go'. So you click and hold the middle button the selected song (or album) should flash... Then you go into the playlist menu (music>playlists>on-the-go) and use it like any normal playlist...
    When there's songs on the playlist it gives you the option to save or clear at the end of the song list, you select either one and it'll ask for conformation.
    It works in both manually sync and auto sync mode. But if you have it on auto sync the play list will be created in iTunes...
    So I'm not sure why you don't see songs in it after yo assign them to it, try sending a whole album and then music>playlists>on-the-go the album songs should be listed.
    As for reasons to use it well maybe while out and about you realise that you want to hear from two artists at the same time, Radiohead and Bowie, in a shuffle mode. You could make it a on-the-go playlist. Or there's a few podcasts you want to hear in order... so you go down the list and assign them to on-the-go.
    Some people use the On the go to note songs that need to be looked at in iTunes later, maybe because its too quiet, badly imported or they don't understand how such a bad song found its way onto the iPod.
    Once you save it if you try and put more songs to it, 'on-the-go-1' will be created.
    -hope this helps

  • Using odc:tabbedPanel   : event handling ?

    Hi ,
    I am using <odc:tabbedPanel> for tabs , need some help on event handling when we click on any tab by using <odc:tabbedPanel>
    When tan is getting loaded want to do some server side coding , Any body has any idea on this ?
    Thanks,
    ....

    Hi BalusC,
    Little more details
    I am using <odc:tabbedPanel> it has two tabs(Select tools , Change order ) , The first tab contains list of check boxes(<h:selectBooleanCheckbox ) , the second tab contains list box(<h:selectOneListbox) , it has all checked values from the first tab.
    If I select/deselcet any checkbox from the first tab with out submitting , the same values needs to be shared to the second tab . based on this user can save/cancel his preferences..
    So I need to do some action when Iclick on second tab , I don't see any action/valuchanged event on <odc:bfPanel> .
    Can you please let me know how this can be achieved.
    Thanks in advance...

  • Event handling for Sharepoint datagrid

    I'm relatively new to SharePoint 2013.  For the past weeks I have been looking through on the web how to handle events in a sharepoint's datagrid view of a list. To be clear, I'm referring to that Excel style view that SharePoint allows you to edit quickly
    for a list of items.
    The question is: how and what should I use to handle an event that fires up when the user goes from one cell to the other.  I want to make some business logic validation or whatever.  Hence, please do not tell me to customise the column and use
    the default column validation, it works well but in my case I need much more than that...
    Hence, I would like you to focus on event-handling of that datagrid (SPgridView?) and to specifically be able to handle events such as: - on cell focus or leave - new row added - row before edit/save/deleted
    Also please do not tell me to use Visual Studio to create a web part with a GridControl and deploy it as a SP solution. I'm aware of that too and I don't want for now to go down that route :)
    What I think is that there should be some way (JavaScript? but how? what app? SP designer?) how I can handle those events that happen in that Excel-style datagrid.
    any ideas please?

    THe "excel-style" datagrid is actually an active x control provided by the office install.  So not sure if you would be able to handle any of those events in any way other than maybe doing something with the DOM -> jquery/javascript... 
    The next thing you could do would be to create your own custom list view:
    http://www.martinhatch.com/2013/08/jslink-and-display-templates-part-5-creating-custom-list-views.html
    Might be a lot of work to get it the way you want it, though...

  • Migrate Post to Pre-Processing Event Handler

    Hi All,
    I am moving logic from a post-processing event handler to a pre-processing one.The Post-Processing logic used the EntityManager to save the attribute, is this applicable for a Pre-Process?
    Thank You
    Ron

    In a pre-process handler add the value back into the orchestration, e.g. orchestration.addParameter(<attribute>, <value>);

  • JMenuBar Event Handling

    I am customizing my own menu bar, I would like to create some event handling, for the top most level, it is not a problem, but when I try to implement some event handling for the drop-down list/menu, nothing happens.
    The following is the whole class:
    package diagramillustrator;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class DIM extends JMenuBar implements MouseListener
         * Creates a new instance of DIM
        public DIM()
            configFileMenu();
            configOptionsMenu();
            configAllItems();
            configMenuBar();
        //Creation and Initialization of objects
        //<editor-fold>    
        //file and options menus to be added to the menubar
        JMenu fileMenu =  new JMenu("File");
        JMenu optionsMenu = new JMenu("Options");
        //file items
        JMenuItem newItem = new JMenuItem("New");
        JMenuItem openItem = new JMenuItem("Open");
        JMenuItem saveItem = new JMenuItem("Save");
        JMenuItem printItem = new JMenuItem("Print");
        JMenuItem exitItem = new JMenuItem("Exit");
        //options items
        JMenuItem createFileItem = new JMenuItem("Create properties file");
        JMenuItem propertiesItem = new JMenuItem("Properties");
        //</editor-fold>
        //adds mouse listener to every item
        private void configAllItems()
            this.addMouseListener(this);
            fileMenu.addMouseListener(this);
            optionsMenu.addMouseListener(this);
            newItem.addMouseListener(this);
            openItem.addMouseListener(this);
            saveItem.addMouseListener(this);
            printItem.addMouseListener(this);
            exitItem.addMouseListener(this);
            createFileItem.addMouseListener(this);
            propertiesItem.addMouseListener(this);
        //creats the file menu
        private void configFileMenu()
            fileMenu.add(newItem);
            fileMenu.addSeparator();
            fileMenu.add(saveItem);
            fileMenu.add(openItem);
            fileMenu.add(printItem);
            fileMenu.addSeparator();
            fileMenu.add(exitItem);
        //creats the options menu
        private void configOptionsMenu()
            optionsMenu.add(createFileItem);
            optionsMenu.add(propertiesItem);
        //configures the menubar, adds all items to it etc
        private void configMenuBar()
            this.setLayout(new FlowLayout(FlowLayout.LEFT));
            this.add(fileMenu);
            this.add(new JSeparator(SwingConstants.VERTICAL));
            this.add(new JSeparator(SwingConstants.VERTICAL));
            this.add(optionsMenu);
            this.setToolTipText("Menu Bar");
        //event handling
        //<editor-fold>
        public void mouseClicked(MouseEvent e)
            //works
            //if(e.getSource().equals(fileMenu))this.setBackground(Color.yellow);
            //else this.setBackground(Color.black);
            //dowsn't work
            if(e.getSource().equals(newItem))this.setBackground(Color.yellow);
        public void mousePressed(MouseEvent e)
        public void mouseReleased(MouseEvent e)
        public void mouseEntered(MouseEvent e)
        public void mouseExited(MouseEvent e)
        //</editor-fold>
        //main method to test class
        public static void main(String[] args)
            JFrame f= new JFrame("Testing menu");
            f.setSize(400,400);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setJMenuBar(new DIM());
            f.show();
    } This is the troubling part:
    public void mouseClicked(MouseEvent e)
            //works
            //if(e.getSource().equals(fileMenu))this.setBackground(Color.yellow);
            //else this.setBackground(Color.black);
            //dowsn't work
            if(e.getSource().equals(newItem))this.setBackground(Color.yellow);
        } The first two lines work perfectly fine as they apply to the top most level, the rest doesn't do anything at all.
    Can anyone help me to handle events for the drop-down please?
    AndXer

    Sorry posted the prvious by mistake.
    Oh, I usually used MouseListener for buttons...I tried using ActionListener and it worked great, the only flaw is that any mouse button clicked triggers an event, I want the event to be triggered only when BUTTON_1 is clicked (like in MouseListener).
    Can that be done as I found nothing in the API. If yes, a code sample would be greatly appreciated.
    The current code for handling it is:
        if(e.getSource().equals(newItem))
             this.setBackground(Color.green);
    }Thanks,
    AndXer

  • Event handling from class to another

    i get toolbarDemo.java which make event handling to JTextArea in the same class
    http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/index.html#ToolBarDemo
    but i have another class and i make object of toolBar class and i move toolBar icons only how can i move the event handling as open ,save,copy,paste to my another class
    i want to ignore actionPerformed of toolBar class and listen to my another's class actionPerformed
    thanks

    Rather than trying to use the ToolBarDemo class as-is you can use/modify the methods in it for your own class, like this:
    import java.awt.*;
    import java.awt.event.*;
    import java.net.URL;
    import javax.swing.*;
    import javax.swing.text.TextAction;
    public class ToolBarIconTest implements ActionListener
        static final private String OPEN  = "open";
        static final private String SAVE  = "save";
        static final private String COPY  = "copy";
        static final private String PASTE = "paste";
        public void actionPerformed(ActionEvent e)
            String cmd = e.getActionCommand();
            if (OPEN.equals(cmd))
                System.out.println("show a JFileChooser open dialog");
            if (SAVE.equals(cmd))
                System.out.println("show a JFileChooser save dialog");
        private JToolBar getToolBar()
            JToolBar toolBar = new JToolBar();
            addButtons(toolBar);
            return toolBar;
        protected void addButtons(JToolBar toolBar) {
            JButton button = null;
            //first button
            button = makeGeneralButton("Open24", OPEN,
                                       "To open a document",
                                       "Open", this);
            toolBar.add(button);
            //second button
            button = makeGeneralButton("Save24", SAVE,
                                       "To save a document",
                                       "Save", this);
            toolBar.add(button);
            //third button
            button = makeGeneralButton("Copy24", COPY,
                                       "Copy from focused text component",
                                       "Copy", copy);
            toolBar.add(button);
            //fourth button
            button = makeGeneralButton("Paste24", PASTE,
                                       "Paste to the focused text component",
                                       "Paste", paste);
            toolBar.add(button);
        protected JButton makeGeneralButton(String imageName,
                                            String actionCommand,
                                            String toolTipText,
                                            String altText,
                                            ActionListener l) {
            //Look for the image.
            String imgLocation = "toolbarButtonGraphics/general/"
                                 + imageName
                                 + ".gif";
            URL imageURL = ToolBarIconTest.class.getResource(imgLocation);
            //Create and initialize the button.
            JButton button = new JButton();
            button.setActionCommand(actionCommand);
            button.setToolTipText(toolTipText);
            button.addActionListener(l);
            if (imageURL != null) {                      //image found
                button.setIcon(new ImageIcon(imageURL, altText));
            } else {                                     //no image found
                button.setText(altText);
                System.err.println("Resource not found: "
                                   + imgLocation);
            return button;
        private Action copy = new TextAction(COPY)
            public void actionPerformed(ActionEvent e)
                JTextComponent tc = getFocusedComponent();
                int start = tc.getSelectionStart();
                int end = tc.getSelectionEnd();
                if(start == end)
                    tc.selectAll();
                tc.copy();
        private Action paste = new TextAction(PASTE)
            public void actionPerformed(ActionEvent e)
                getFocusedComponent().paste();
        private JPanel getTextFields()
            JPanel panel = new JPanel(new BorderLayout());
            panel.add(new JTextField(12), "North");
            panel.add(new JTextField(12), "South");
            return panel;
        public static void main(String[] args)
            ToolBarIconTest test = new ToolBarIconTest();
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(test.getToolBar(), "North");
            f.getContentPane().add(test.getTextFields());
            f.setSize(360,240);
            f.setLocation(200,200);
            f.setVisible(true);
    }Use the -cp option as shown in the ToolBarDemo class comments
    C:\jexp>java -cp .;path_to_jar_file/jlfgr-1_0.jar ToolBarIconTest

Maybe you are looking for

  • Disabled JMenuItem doesn show animated gif

    Hi there I would like to have a popup menu with actions that are enabled after they have finished with some background task taking some time. Basically this works fine for the enabling action on a shown popup. However, adding an animated gif as the i

  • Can I turn off auto tab loading, if no, question about uninstalling newest version of firefox

    I tend to wind up with far too many tabs open at one time to not bog firefox down. I came up with a very useful workaround - close and re-open firefox with it disconnected from the internet. Thru version 3.6.19 this works beautifully, because when it

  • SSIS package Upgrade from 2005 to 2012

    Hi, We have a Solution file with 8 projects for SSIS packages. All of them are in VSS. They all have been created in 2005. Now we installed VS 2012 and SSDT on our local machines. I got latest of solution and projects from VSS on new machine. I tried

  • Itunes ceases operation within the first 60secs with an Problem Event Name BEX

    Evening all, its evening here in Oz, my itunes continues to freeze in the first 60 seconds of the prgm starting. The Problem Event Nave is BEX Problem signature: Problem Event Name: BEX Application Name: iTunes.exe Application Version: 11.2.0.115 App

  • What printer will work with Tiger nicely?

    I am just like the untold thousands who are having non-stop printing problems between my hp printer and Mac OS X. I used 10.3.9 and had non-stop printer problems. Did all the usual: uninstall, get latest driver, fix permissions, yada yada. I just upg