Event handling in alv oops With buttons

Hi Experts
         I have some doubt in ALV OOPS using Events. Could any one please tell me the procedure to how to handle events in oops ( Like  interactive reports using events ).
                                 Thank you                                                                               
Satyendra.

Hello Satyendra
The following sample report shows you how to handle the event HOTSPOT_CLICK and BUTTON_CLICK.
DATA:  gd_okcode TYPE ui_func,
  gt_fcat TYPE lvc_t_fcat,
  go_docking TYPE REF TO cl_gui_docking_container,
  go_grid1 TYPE REF TO cl_gui_alv_grid.
DATA:   gt_knb1 TYPE STANDARD TABLE OF knb1.
PARAMETERS: p_bukrs TYPE bukrs  DEFAULT '2000'  OBLIGATORY.
CLASS lcl_eventhandler DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS:
      handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
        IMPORTING
          e_row_id
          e_column_id
          es_row_no
          sender,  " grid instance that raised the event
      handle_button_click FOR EVENT button_click OF cl_gui_alv_grid
        IMPORTING
          es_col_id
          es_row_no
          sender.
ENDCLASS.                    "lcl_eventhandler DEFINITION
CLASS lcl_eventhandler IMPLEMENTATION.
  METHOD handle_hotspot_click.
*   define local data
    DATA:
      ls_knb1     TYPE knb1,
      ls_col_id   TYPE lvc_s_col.
    READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row_id-index.
    CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
    CASE e_column_id-fieldname.
      WHEN 'KUNNR'.
        SET PARAMETER ID 'KUN' FIELD ls_knb1-kunnr.
        SET PARAMETER ID 'BUK' FIELD ls_knb1-bukrs.
        CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
      WHEN 'ERNAM'.*       
         SET PARAMETER ID 'USR' FIELD ls_knb1-ernam.
        CALL TRANSACTION 'SU01' AND SKIP FIRST SCREEN.
      WHEN OTHERS.
    ENDCASE.
*   Set active cell to field BUKRS otherwise the focus is still on
*   field KUNNR which will always raise event HOTSPOT_CLICK
    ls_col_id-fieldname = 'BUKRS'.
    CALL METHOD go_grid1->set_current_cell_via_id
      EXPORTING
        is_row_id    = e_row_id
        is_column_id = ls_col_id.
ENDMETHOD.                    "handle_hotspot_click
METHOD handle_button_click.
*   define local data
    DATA:
      ls_knb1     TYPE knb1.
    READ TABLE gt_knb1 INTO ls_knb1 INDEX es_row_no-row_id.
    CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
    SET PARAMETER ID 'KUN' FIELD ls_knb1-kunnr.
    SET PARAMETER ID 'BUK' FIELD ls_knb1-bukrs.
    CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
  ENDMETHOD.                    "handle_button_click
ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
  SELECT        * FROM  knb1 INTO TABLE gt_knb1
         WHERE  bukrs  = p_bukrs
* Create docking container
  CREATE OBJECT go_docking
    EXPORTING
      parent                      = cl_gui_container=>screen0
      ratio                       = 90
    EXCEPTIONS
      OTHERS                      = 6.
  IF sy-subrc <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
* Create ALV grid
  CREATE OBJECT go_grid1
    EXPORTING
      i_parent          = go_docking
    EXCEPTIONS
      OTHERS            = 5.
  IF sy-subrc <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
* Set event handler
  SET HANDLER:
    lcl_eventhandler=>handle_hotspot_click FOR go_grid1,
    lcl_eventhandler=>handle_button_click  FOR go_grid1.
* Build fieldcatalog and set hotspot for field KUNNR
  PERFORM build_fieldcatalog_knb1.
* Display data
  CALL METHOD go_grid1->set_table_for_first_display
    CHANGING
      it_outtab       = gt_knb1
      it_fieldcatalog = gt_fcat
    EXCEPTIONS
      OTHERS          = 4.
  IF sy-subrc <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
* Link the docking container to the target dynpro
  CALL METHOD go_docking->link
    EXPORTING
      repid                       = syst-repid
      dynnr                       = '0100'
*      CONTAINER                   =
    EXCEPTIONS
      OTHERS                      = 4.
  IF sy-subrc <> 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
* ok-code field = GD_OKCODE
  CALL SCREEN '0100'.
END-OF-SELECTION.
MODULE status_0100 OUTPUT.
  SET PF-STATUS 'STATUS_0100'.
*  SET TITLEBAR 'xxx'.
ENDMODULE.                 " STATUS_0100  OUTPUT
MODULE user_command_0100 INPUT.
  CASE gd_okcode.
    WHEN 'BACK' OR
         'END'  OR
         'CANC'.
      SET SCREEN 0. LEAVE SCREEN.
    WHEN OTHERS.
  ENDCASE.
  CLEAR: gd_okcode.
ENDMODULE.                 " USER_COMMAND_0100  INPUT
FORM build_fieldcatalog_knb1 .
* define local data
  DATA:
    ls_fcat        TYPE lvc_s_fcat.
  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
*     I_BUFFER_ACTIVE              =
      i_structure_name             = 'KNB1'
*     I_CLIENT_NEVER_DISPLAY       = 'X'
*     I_BYPASSING_BUFFER           =
*     I_INTERNAL_TABNAME           =
    CHANGING
      ct_fieldcat                  = gt_fcat
    EXCEPTIONS
      inconsistent_interface       = 1
      program_error                = 2
      OTHERS                       = 3.
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
LOOP AT gt_fcat INTO ls_fcat
          WHERE ( fieldname = 'KUNNR'  OR
                  fieldname = 'ERNAM'  OR
                  fieldname = 'BUKRS' ).
    IF ( ls_fcat-fieldname = 'BUKRS' ).
      ls_fcat-style = cl_gui_alv_grid=>mc_style_button.  " column appears as button
    ELSE.
      ls_fcat-hotspot = abap_true.
    ENDIF.
    MODIFY gt_fcat FROM ls_fcat.
  ENDLOOP.
ENDFORM.                    " BUILD_FIELDCATALOG_KNB1
Regards
  Uwe

Similar Messages

  • Back button in ALV oops with two screens

    hi,
    i have created the ALV report using oops concept. have kept the selection screen say 1000 and two more screens say 9001 and 9002.
    when i click on back from 9002 screen  it should go to 9001.

    Hello Sankumar
    I assume your 2nd screen (9002) displays detailed data based on a selection of the first screen (9001).
    Example: first ALV displays customers -> select single customer via double-clicking -> display sales orders on 2nd ALV
    Furthermore, I assume you trigger the second screen within your event handler method. If this is the case then I regard this as bad design which is bound to cause problems.
    Within the event handler method just store the required selection (e.g. customer number) and trigger PAI using:
    CALL METHOD cl_gui_cfw=>set_new_ok_code( ok_code = 'DISPLAY_DETAILS' ).
    This trigger PAI of your first screen with a defined ok-code (= 'DISPLAY_DETAILS' ).
    Now you may call a FORM routine DISPLAY_DETAILS where you make the call to your second screen.
    This allows you to use the normal PAI logic to switch back and forth between multiple screens.
    Regards
      Uwe

  • Event handling in ALV

    Hi All,
      I am using <b>CL_GUI_ALV_GRID</b> to create an ALV grid.This screen is called from a first screen.I am also using a custom defined button in  the ALV tool bar for inserting a row into the ALV.I am handling the button click in the event <b>USER_COMMAND</b> of <b>CL_GUI_ALV_GRID</b>.When the ALV screen is called for the first time and when i click on the INSERT button it is inserting a row into the ALV and is working fine.But the problem is after i insert a row in the ALV and when I go back to the first screen and call the ALV screen again and when I try to insert a row in the ALV it is inserting 2 rows.ie from 2 clicks i m getting 3 rows.I went into the debuggng mode and could see that the method <b>handle_button</b> (written locally) is called 2 times the second time,3 times the third time..Have anybody faced this problem before..or could give any suggestions on this..
    regards
    Sandeep

    hi
    good
    i think you have to check with that particular method handle_button and its function ,
    check out when the final result printing in the alv output for the second time as you mentioned why it is calling the same field data again and again,during runtime you can check that using /h at your command promt.
    thanks
    mrutyun^

  • UI: Event Handling of forms created with the Screen Painter

    Hi,
    I created a form with the Screen Painter and saved it as XML document. After that, I loaded this form with the following code:
    <i>Dim oXMLdoc As MSXML2.DOMDocument
    oXMLdoc = New MSXML2.DOMDocument
    oXMLdoc.load("C:\form1.xml")
    SBO_Application.LoadBatchActions(oXMLdoc.xml)</i>
    Then the loaded form appears in the SBO application with all added items.
    Now, I would like to know how I could handle an ITEM_PRESSED event for a button of this imported form.
    It would be great if someone could help me with this problem and post some example code.
    Regards,
    Dennis

    Dennis,
    you have to create a function that will handle all the event receive from B1
    <i>    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
            If (pVal.FormUid = "YourUIDForm") Then
                If ((pVal.itemUID = "YourItemUID") And _
                    (pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) And _
                    (pVal.Before_Action = False)) Then
                    ' Here write the coe you need....
                End If
            End If
        End Sub</i>
    Off course, you need your variable SBO_Appliation declared as follow :
    Private WithEvents SBO_Application As SAPbouiCOM.Application

  • Event Handler for Download to Excel Button

    Hi Experts,
    I have been trying to debug and find some clue about the Export to Spreadsheet Button present normally in a table view. My requirement is to modify the records before they are downloaded to an excel sheet.
    Any quick clues will be highly appreciated.
    Thanks
    Vishal

    Hi, Vishal.
    One more input regarding your question (may be it will be usefull) is that the service UIF_EXPORT_TAB (in tx. SICF) is responsible for this button. Its handler class CL_CHTMLB_CONFIG_TAB_EXCEL_EXP handles requests from this button. And also it works with template (method gDo) and actual data (method gDa) from the table. It calls mentioned GET_TABLE_COMPONENTS, GET_TEMPLATE_XML, GET_DATA_XML, GET_CSB methods from your table context node class.

  • Tutorial events handler in firefox differences with chrome and IE

    I have this code:
    var inp1 = document.createElement("input");
    inp1.type = "button";
    inp1.value = " Delete ";
    var bott = "boton" + i.toString();
    inp1.id = "prueba" + i;
    inp1.className = "boton";
    inp1.onclick = function() {deleteItem(event)};
    function deleteItem(event) {
    var tname = event.srcElement || event.target;
    var tname1 = tname.id;
    works for chrome but not firefox

    What kind of tutorial are you writing?
    Generally speaking, you should never recommend detecting browser capabilities by strings in the navigator properties. It is always better to use object/property/method detection if possible. Otherwise, you may miss crucial changes made in more recent versions of a browser, such as IE9 and later. Also, you should consider using the standardized approach to defining event handlers, which is addEventListener().
    Here is an alternative example:
    var inp1 = document.createElement("input");
    inp1.type = "button";
    inp1.value = " Delete ";
    inp1.id = "prueba" + i;
    // For best results, add element to the document before
    // setting event listeners
    if (inp1.addEventListener)
    inp1.addEventListener("click", deleteItem, false);
    else
    inp1.onclick = deleteItem;
    function deleteItem(evt){
    if (!evt) evt = window.event; // old IE
    var tgt = evt.target || evt.srcElement;
    alert(tgt.id); //for debug/test only
    return false; //for debug/test only
    ...

  • Problem with event handling

    Hello all,
    I have a problem with event handling. I have two buttons in my GUI application with the same name.They are instance variables of two different objects of the same class and are put together in the one GUI.And their actionlisteners are registered with the same GUI. How can I differentiate between these two buttons?
    To be more eloborate here is a basic definition of my classes
    class SystemPanel{
             SystemPanel(FTP ftp){ app = ftp};
             FTP app;
             private JButton b = new JButton("ChgDir");
            b.addActionListener(app);
    class FTP extends JFrame implements ActionListener{
               SystemPanel rem = new SystemPanel(this);
               SystemPanel loc = new SystemPanel(this);
               FTP(){
                       add(rem);
                       add(loc);
                       pack();
                       show();
           void actionPerformed(ActionEvent evt){
            /*HOW WILL I BE ABLE TO KNOW WHICH BUTTON WAS PRESSED AS THEY
               BOTH HAVE SAME ID AND getSouce() ?
               In this case..it if was from rem or loc ?
    }  It would be really helpful if anyone could help me in this regard..
    Thanks
    Hari Vigensh

    Hi levi,
    Thankx..
    I solved the problem ..using same concept but in a different way..
    One thing i wanted to make clear is that the two buttons are in the SAME CLASS and i am forming 2 different objects of the SAME class and then putting them in a GUI.THERE IS NO b and C. there is just two instances of b which belong to the SAME CLASS..
    So the code
    private JButton b = new JButton("ChgDir");
    b.setActionCommand ("1");
    wont work as both the instances would have the label "ChgDir" and have setActionCommand set to 1!!!!
    Actually I have an array of buttons..So I solved the prob by writting a function caled setActionCmdRemote that would just set the action commands of one object of the class differently ..here is the code
    public void setActionCommandsRemote()
         for(int i = 0 ; i <cmdButtons.length ; i++)
         cmdButtons.setActionCommand((cmdButtons[i].getText())+"Rem");
    This just adds "rem" to the existing Actioncommand and i check it as folows in my actionperformed method
         if(button.getActionCommand().equals("DeleteRem") )          
                        deleteFileRemote();
          else if(button.getActionCommand().equals("Delete") )
                     deleteFileLocal();Anyway thanx a milion for your help..this was my first posting and I was glad to get a prompt reply!!!

  • Migration from Serial polling to Serial queue with event handler

    Hi, I am trying to migrate from classical serial polling communications to serial queue with "event handler" for the buttons pressed by the user. I have placed four while loops, one for the event handler, a second one for serial reading, a third one for serial writing (depending on what button was pressed) and the last one for processing what was read from the serial reading while loop, via a queue.
    My attached device reads the signals from 8 sensor ( 4 temperature and another 4 temperature plus humidity in the same sensor ) and send them via serial to Lavbiew.
    First of all, only once just after running the LV program, I must turn on my attached device with an ON command plus a carriage return after that the device will respond with the number of sensors plugged to it, disabling the corresponding buttons in the front panel. Then labview must wait until I pressed Acquire Button (event handler) and send a CF command plus what sensors to acquire plus a carriage return, then the device will respond continuously to labview with the sensor readings until I press the stop button (event handler), there is also another button to exit the program, also with event handler.
    I am having problems using the event handler and the queues because I am new using these structures, I have looked at  the LV examples but there is nothing concrete on using serial with event handler and queue.
    Take a look at my VI and you will soon notice what kind of problems I am having, any suggestions will welcome.
    Thank's in advance.
    Regards.
    Attachments:
    serial queue.zip ‏76 KB

    Hi Luisete,
    Maybe the problem arise because you are En- and DeQueue in parallel. You do a lot of things in parallel, that is nice if you are sure that one loop doesn't have to wait for another loop. Make sure you don't dequeue before enqueue.
    Hope this helps
    I never knew that the standard error cluster output could be wired directly to the loop control of a while loop.
    First time I see this

  • Validation Event Handler Not working with GTC Recon???

    We have implemented a Validation Event Handler on user entity.
    In the code we have implemented both the execute methods i.e. Orchestration andf Bulk Orchestration. We have created a UDF for Manager field and our validation handler checks whether the user in Manager UDF field is an Active user in OIM or not. In case the user is not an Active user, code will throw a Validation Failed Exception.
    At the time of changing the Manager UDF value from the Console directly Validation Event Handler is getting triggered but with GTC Recon Validation Handler is not Working.
    Previously i faced the same issue with the post process event handler but the problem get resoved when i implemented execute method with Bulk Orchestration. As per my understanding Bulk Orchestration exceute method gets called with GTC Recon and execute method with Orchestration gets called when changing the attribute value directly from the console.
    In case of Validation Event Handler i have implemented both but still validation Event handler is not working with GTC.
    Thanks in Advance....

    Any Help????

  • 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.

  • Htp.p doesn't work from the custom button event handler ...

    Hi,
    I am trying to pop up an alert from the custom button event handler. I created a button and put the following code.
    htp.p('<script language='JavaScript1.3">
    alert ("Test Message");
    </script>;
    But alter doesn't show up after clicking the button.
    Thanks

    OK i've attached them and copy/pasted the relevent parts. The parent window is the SFLB file.
    -----------------------------------------here's the code in the parent window
    private function editServerPool():
    void
    serverPoolPUW = PopUpManager.createPopUp(
    this,popups.ServerPoolPopup,true);PopUpManager.centerPopUp(serverPoolPUW
    as IFlexDisplayObject); 
    if (newServerPool.SecondarySPAlgorithm != null){
    serverPoolPUW.enableSSCheckBox.selected =true;serverPoolPUW.DisplaySecondaryServerPool();
    serverPoolPUW.bigResize.play();// serverPoolPUW.height = 602; //yes...i know i need to move thisserverPoolPUW.switchoverPolicyCB.selectedItem = newServerPool.SwitchOverPolicy;
    serverPoolPUW.switchoverThresholdTI.text = newServerPool.SwitchOverThreshold;
    ----------------------here's the code in teh popup window (popups.ServerPoolPopup.mxml)
    <mx:Resize id = "bigResize" heightFrom="506" heightTo="602" target="{this}" /> 
    <mx:Resize id = "littleResize" heightFrom="602" heightTo="506" target="{this}"/>
     public function DisplaySecondaryServerPool():void{
    //make the screen large if the secondary server checkbox is selected; otherwise small.  
    if (enableSSCheckBox.selected){
    //display secondary server pool tab, expand the screen 
    //note that we cannot attach a data provider to the data grid until the grid creation is  
    //completed. This is done in an event handler.secondaryPanel.enabled =
    true; switchoverPolicyCB.visible =
    true;switchoverThresholdTI.visible =
    true;thresholdFI.visible =
    true;policyFI.visible =
    true;bigResize.play();
    else
     <mx:CheckBox label="Enable a Secondary Server Pool" width="264" fontWeight="bold" click="DisplaySecondaryServerPool()" id="
    enableSSCheckBox" fontSize="12" x="83" y="40"/>

  • Help with buttons and AS3

    I need urgent help for a college project, I've drawn a map and I have some photographs that appear on the map from the timeline one after another. I want the timeline to be activated when I press a Button On the map of where I've been on holiday but I have no Idea how to put it together.

    While I can offer a couple ideas, you'll need to spend some time figuring out how to use Flash... maybe get some formal training with it.
    For the photographs, create each set of them as a movieclip, and give each movieclip an instance name so that you can control its visibility using code.  Initially you will want to set the visible property of them all to false, likely done in the first frame of the timeline (ex: imageGrp1.visible = false; ).  Then you will use your buttons to make them visible.
    To code one of the buttons, you need to assign it an instance name as well.  Then you need to assign an event listener for that button to detect when it gets clicked, and an event handler function to go with the event listener... the listener calls the function into action when the event occurs.
    ex:
    // the event listener for a button with an instance name of imgGrp1Button...
    imgGrp1Button.addEventListener(MouseEvent.CLICK, showGrp1);
    // and the event handler function for the CLICK listener
    function showGrp1(evt:MouseEvent):void {
          imageGrp1.visible = true;
    If you want to hide any visible set when you select a new one, then you can create a function that sets them all visible = false and call that function both at the start in frame 1 and in each button event handler function (before you set the selected set to be visible).

  • Use event handler programmatically

    Hello, I use the Labview 8.2.1 and I would like to ask something about event handler.
    I have some buttons and I use an event handler to perform their tasks. The buttons are used only with the mouse and not programmatically.
    Now, I want to use a button programmatically without pressing it. I didn't find how to do this, so I created a boolean variable and I added to the event handler of a button a second "Event Specifier" of that boolean variable with the event "value change".
    I assumed that it would work, but it does not, that is, the event handler is not used when the value of the boolean variable changes.
    How can I solve it?
    Thank you in advance.
    Solved!
    Go to Solution.

    Write to the Value(Sgnl) property node of the variable you want to change.  This will set off an event programatically.
    - tbob
    Inventor of the WORM Global

  • Handling exceptions for a event handler method.

    Hi Mates,
                    I have two custom container in which i am displaying an alv grid usind objects. when a double click event is performed in one of the alv the other alv should be displayed. I now have to handle exceptions of the class  CX_SY_DYN_CALL_ILLEGAL_TYPE. This is raised for an invalid parameter type when calling a method dynamically. I cannot use the keyword "RAISING" in the definition of the event handler method. i checked with the syntax of the method definition in abap dictionary, there were no addition "RAISING" for an event handler method. please provide me with the solution (a sample code would do.)

    Hello,
    May be you should read about the TRY ... CATCH block which is used for handling exceptions.
    Basic construct of your code should look like this:
    TRY.
    " Your Dynamic Method call
      CATCH CX_SY_DYN_CALL_ILLEGAL_TYPE.
    ENDTRY.
    If you want to get the error message text:
    DATA:
    lcx_excp TYPE REF TO CX_SY_DYN_CALL_ILLEGAL_TYPE,
    v_err_msg TYPE string.
    TRY.
    " Your Dynamic Method call
      CATCH CX_SY_DYN_CALL_ILLEGAL_TYPE INTO lcx_excp.
      v_err_msg = lcx_excp->get_text( ).
    ENDTRY.

  • Override lifecycle event-handler in 11g

    Hello,
    I am trying to override lifecycle event-handling in 11g environment with the standard ADFPhaseListener.
    In faces-config.xml I registered:
    <lifecycle>
    <phase-listener>oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener</phase-listener>
    </lifecycle>
    I have a backing-bean that extends oracle.adf.controller.v2.lifecycle.PageController
    and override some methods like
    @Override
    public void prepareModel(LifecycleContext lifecycleContext) {
    int x = 1;     // Dummy Statement
    super.prepareModel(lifecycleContext);
    @Override
    public void prepareRender(LifecycleContext lifecycleContext) {
    int x = 1;     // Dummy Statement
    super.prepareRender(lifecycleContext);
    @Override
    public void processComponentEvents(LifecycleContext lifecycleContext) {
    int x = 1;     // Dummy Statement
    super.processComponentEvents(lifecycleContext);
    @Override
    public void processUpdateModel(LifecycleContext lifecycleContext) {
    int x = 1;     // Dummy Statement
    super.processUpdateModel(lifecycleContext);
    If I set breakpoints in all 4 methods however they are never matched, not when entering the page nor during roundtrips.
    Is there anything else I have to do to make it work. I couldn't find a detailed example for 11g.
    Bruno

    Hello,
    and thanks for your help.
    Meanwhile I created a Custom PagePhaseListener with PhaseListener Interface and registered it on the JSPX <f:phaseListener binding="..."/>
    This matches my requirements even better since I need a listener for only one JSPX.
    Since this is a JSF (not ADF) Interface I only get the Standard Lifecycle-Phases, which are fewer than in Frank's example, but they are sufficient for my purposes.
    Or do you see any other major drawbacks.
    Bruno

Maybe you are looking for

  • As Of Date in OBI EE

    I have been attempting to create reports that are similar to those in the old Daily Business Intelligence. I have created all the necessary data in the meta layer, or so I believe. My problem is when I try to create the reports in Answers. I would li

  • X240 Clickpad problems

    Hi, I think I might have a defective clickpad and wanted some opinions to see if people agree.  Just got the computer about 4 days ago.  The clickpad never registers a click if I use the area of the clickpad that's actually marked for that purpose.  

  • 6110 navigation question?

    I have got my navigation working with nokia maps on the free version with no voice activation.installed with the phone is route 66 nav software,should this also work the same where navigation works but with no sound??

  • HT1237 Firmware EFI firmware Update 1.7 will not load on to computer. Msg states not supported.

    Unable to load EFI firmware Update 1.7 states not supported.

  • LO Cockpit Data Extraction (2LIS_11_VASTH)

    Hi Experts, Could you please update me on how to proceed with regards LO Cockpit Data Extraction Datasource: 2LIS_11_VASTH I activated the Datasource in R/3 and Activated relevant BW Content. I performed INITILIZATION that fetched 0 Records to BW I p