How to identify which UIComponent fired an event?

Dear kind sirs...
I am writing a JSF application using JDeveloper 10.1.3.4, I am using only JSF Core & JSF HTML...
What I am doing is defining say 2 or 3 buttons at runtime (HtmlCommandButtons), all having the same handler. It is working perfectly fine. However, I can't identify which one is firing the event.
the code that generates the two buttons is as follows:
HtmlCommandButton CB=(HtmlCommandButton) FacesContext.getCurrentInstance().getApplication().createComponent(HtmlCommandButton.COMPONENT_TYPE);
CB.setValue("T1");
CB.setId("T1");
*MethodBinding mbButton = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{backing_Admin_designpage.doit}",null);*
*CB.setAction(mbButton);*
*U.getChildren().add(CB);*
*CB.setRendered(true);*
*HtmlCommandButton CB2=(HtmlCommandButton) FacesContext.getCurrentInstance().getApplication().createComponent(HtmlCommandButton.COMPONENT_TYPE);*
*CB2.setValue("T2");*
*CB2.setId("T2");*
*MethodBinding mbButton = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{backing_Admin_designpage.doit}",null);*
*CB2.setAction(mbButton);*
*U.getChildren().add(CB2);*
*CB2.setRendered(true);*
finally the method is:
*public String doit(){*
*System.out.println("Hello");*
*return null;*
of course I can bind a separate method for each button, but I don't want to, I want this one event handler to do it for me.
and idea?
thanks in advance.

Hi,
define an actionListener either instead or addition to the action. The ActionEvent passed into this method has a getSource method that points to the UI component instance invoking it
Frank

Similar Messages

  • How to identify which UIcomponent called generic ValueChangeListener? HELP

    Using Jdev. 11.1.1.2.0
    In my jsff I've got an af:iterator that layout components. Each of these component uses the same generic ValueChangeListener.
    In the ValueChangeListener I want to check which component did the change - and for some components issue a PartialTrigger command.
    Problem is; How do I know which component called the listener? I'm not in control of the component Id - so I can't use this. I'm not able to dynamically bind to BackingBean UIcomponent. The ClientAttribute works for af:input but not for af:selectOneChoice...
    Any ideas?

    Hi,
    af:iterator stamps its children, which means that there are no individual component instances created. To PPR a component you refresh the base component (the one that gets stamped). In your case, go with John Stegeman's recommendation or use af:forEach if you need individual component instances to be created. Event then however, John's suggestion will work best
    Frank

  • How to identify which videos

    I took a dozen or so short clips of an event. I know which three I want to combine and edit. But I can't figure out how to identify which they are in imovie in order to put those clips in my project. It shows them all as consecutive clips or frames, without file numbers or names.

    I'll try to explain better.
    A dozen clips or videos, 1 min to 5 min in length. In one case all along a mountain road.
    I want to produce a 5 min project or video with the best parts of 3 of those 12.
    All 12 have thumbnails almost identical (the dashboard across the bottom, roof line at the top)
    I only want to start editing the 3, not put all 12 in.
    How do I identify those 3?

  • How to identify what are all the events are created in background jobs?

    Hi all,
    how to identify what are all the events are created for  background jobs. And what events gets triggered for a particular job.
    thanxs
    haritha

    Hi Haritha,
    JOB is a program which starts to a determined point of time and executes some standard programs in the system. JOBs can be planed to a determined point of time on the regular basis (every night, for example) or to some discret time moments. So, the JOB can be planed and then will be started automatically without the manual start.
    Realtime programs are understood in the most cases as actual program execution which is started by somebody to the actual moment of time.
    Typically per JOBs some special processes will be started that should be executed automatically and regularly: for example, IDOC application, some correction reports, statistic updates etc.
    Standard jobs are those background jobs that should be run regularly in a production SAP System These jobs are usually jobs that clean up parts of the system, such as by deleting old spool requests.
    Use
    As of Release 4.6C, the Job Definition transaction ( sm36 ) provides a list of important standard jobs, which you can schedule, monitor, and edit.
    Standard jobs are those background jobs that should be run regularly in a production SAP System. These jobs are usually jobs that clean up parts of the system, such as by deleting old spool requests.
    for more information you can go thru the following thread:
    http://help.sap.com/saphelp_nw70/helpdata/en/24/b884388b81ea55e10000009b38f842/frameset.htm
    About Events:
    Events have meaning only in the background processing system. You can use events only to start background jobs.
    Triggering an event notifies the background processing system that a named condition has been reached. The background processing system reacts by starting any jobs that were waiting for the event.
    Types of Events:
    There are two types of events:
    1.)System events are defined by SAP. These events are triggered automatically when such system changes as the activation of a new operation mode take place.
    2.)User events are events that you define yourself. You must trigger these events yourself from ABAP or from external programs. You could, for example, signal the arrival of external data to be read into the SAP system by using an external program to trigger a background processing event.The event scheduler processes an event if the event is defined in the system.
    For example, if a system (System 1) receives an event from another system (System 2), the event scheduler of System 1 processes the event only if it is defined in System 1. That event does not need to be defined in System 2 (the sending system).
    You define an event by assigning a name (EVENTID) to it. When defining an event, you do not define the event arguments.
    for more information you can go thru the following thread:
    http://help.sap.com/saphelp_nw04s/helpdata/en/fa/096e2a543b11d1898e0000e8322d00/frameset.htm
    When you schedule the process chain or infopackages the jobs associated with it run in the background mode. In case you want to create a job for a specific activity you can do so in SM36. You would be creating jobs that would get executed in any one of the options:
    1. Immediate
    2. Date & Time
    3. After event.
    4. After job.
    5. At Operation mode.
    In case you want to view the job logs go to sm37.
    Also Pls check DB02 for database performance and ST03 for workload .
    Analyse u will have an idea ,
    *pls assign points,if info is useful**
    Regards
    CSM reddy
    null

  • How to identify which is rootsite/webapplication url and which are site collection url ?

    How to identify which is rootsite/webapplication url and which are site collection url underneath of web application using powershell script in following code?
    # Get site objects
    $webapplication = Get-SPWebApplication $siteUrl
    # Walk through each site in the site collection
    foreach($site in $webapplication.Sites)
    foreach($subWeb in $site.AllWebs)
    $_ = AddLevel123($subWeb.Url)

    Hi,
    Hope you wanted to know which API is Site collection (SPSite) and Sub site(SPWeb) 
    $webapplication.Sites = Site Collection (SPSite)
    and $site.AllWebs = Subsite (SPWeb)
    and see these links - to get webApplication URL
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/e223b607-ab35-454a-a050-1db3005687e5/spwebapplication-url?forum=sharepointdevelopmentlegacy
    SPSite Url - SPSite.Url (http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spsite.url.aspx)
    SPweb URl - SPWeb.URL (http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spweb.url.aspx)
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/b4dfb645-69f4-4abd-947c-64ca42af3a26/script-to-get-list-of-sites-and-subsites
    Hope this helps!
    MCITP: SharePoint 2010 Administrator
    MCTS - MOSS 2007 Configuring, .NET 2.0
    | SharePoint Architect | Evangelist |
    http://www.sharepointdeveloper.in/
    http://ramakrishnaraja.blogspot.com/

  • How to identify Which function modules are used in the planning area?

    Hi all,
    there are couple of function module derviation is used to derive the calendar year, month, fiscal period etc.
    But how to identify which function module is used in which planning area?
    I cant find out from the where used list from function modules?
    Thanks
    pooja

    Hi Pooja,
    Go to characteristic relationship tab,click on detail icon on extreme left of the derivation,there you will get the name and the details of function module used for derivation.
    Regards,
    Indu

  • How to identify Which ports are using in RAC setup?

    Hi,
    how to identify Which ports are using in RAC setup?
    Thnaks,

    [Viewing Port Numbers and Access URLS|http://download.oracle.com/docs/cd/B19306_01/install.102/b14205/ports.htm#sthref1208]

  • How to identify which DC to modify?

    I need to change the iView u201CChange Own Datau201D in ESS.
    ESS -> Employee search -> Change Own Data
    How to identify which DCs to modify in development configuration?
    Greatly appreciated for any comment/suggestion!

    Hi,
           The purpose of each DC is modifying different Iviews (Ex:you need to modify Change Own data like that some other needs to change some other Iview may be this Iview will be present in another DC).
    based on our requirement we need to modify different different DCs.
    yes you need to modify in the DC as i mentioned..
    Regards,
    Anil.

  • How to identify which key figure will the numeric pointer for deltas?

    Hi All,
    I have created a numeric pointer for generic extraction ? but how to identify which key figure will the numeric pointer will use for deltas ?
    how to identify the key figures which is suitable for numeric pointer. And the generic extraction is based upon the copa table?
    Can anyone suggest me how the numeric pointer works and how to identify deltas are carried out at numeric pointer?
    Thanks
    Pooja

    Pooja,
    If you are using a generic extractor which is based on COPA table, then numeric pointer may not be the suggested delta extraction mechanism. 
    A time stamp would be the better one to use.  In a time stamp, you can give a lower limit value of 300 seconds.. so that it will try to fetch the missed records.
    Moreover, a delta would be based on a character, preferably a time char.
    In your requirement, try to figure out the character on whichdeltas will be based.
    Sasi

  • How to identify which record(s) the user hasbeen checked

    i have a internal table in which first field is represented as check box in the output .
    like bellow
      loop at g_it_final into g_wa_final.
            write : 5 sy-tabix ,
                   20 g_wa_final-g_v_check as checkbox,
                   25 g_wa_final-TRKORR,
                   40 g_wa_final-AS4TEXT.
      endloop.
    now the user will select some records from the output checking the check box
    NOW the QUESTION is
    how to identify which record(s) the user hasbeen checked(selected) ?
    so that i can disply only the selected records in the secondary list.

    Hi,
    You will have to use the 'READ LINE' command within a loop to retrieve the data back into your program.
    You may want to use the HIDE command to ease the retrieval of the checkbox value.
    Check out the online help for both of these.
    Darren

  • How to identify which Internal order type is relevant for Budget manager

    Hi,
        How to identify which Internal order type is relevant for Budgeting i.e Budget Manager.
    regards,
    Rajesh

    controlling-internal orders-budegeting and availability control -define tolerance limits for availabilty control
       in which it is defined whether mail be sent to budget manager against the budget profile(budget profile is assigned to order type).
    controlling-internal orders-budegeting and availability control -define tolerance limits for availabilty control-maintain budget manager
    here budget manager is assigned to  order type
    assign me points if it is useful

  • How to identify which applicarion is using the DVD burner?

    How to identify which applicarion is using the DVD burner? Ot is not allow me to burn the DVDs genetrated in the Final Cut 7

    I think you'll find that the application is Final Cut Pro...  the message is bug.  I get a similar message when disconnecting external drives after using them with FCP (even when the project is no longer loaded.)
    As I mentioned above, the accepted workflow is to export the sequence to one of your hard drives using the Export>QuickTime Movie path with Settings:Current Settings and Make Movie Self-Contained checked like this:
    This gets you a high quality "master copy" which you open in Compressor for transcoding. You should use the DVD: Best Quality setting for the duration of your movie.
    this gets you the high quality MPEG-2 and AC-3 files for DVD Studio Pro authoring.
    If you've never used DVD Studio Pro before, you can use iDVD instead. For iDVD, you just drag and drop your "master" on iDVD and it takes it from there. Both make a very professional product.
    hope this helps.

  • How to identify which root certificate is used?

    How to identify which root certificate(on terminal) is used when a terminal is connecting to a https website?
    SecurityInfo.getServerCertificate() only returns the certificate send from the https server.
    But how could know the which local root certificate is used to verify the certificate send from the https server?
    Is there a method or class in MIDP 2.1?
    Thanks

    UP�Cthis question is urgent. Hope anyone can answer me!

  • How to identify which ALV triggered event in split ALV

    Hi all,
    I'm using a split ALV like this:
    CREATE OBJECT ob_custom
      EXPORTING
        container_name = 'CONTAINER'.
    CREATE OBJECT ob_split1
      EXPORTING
        parent      = ob_custom
        orientation = cl_gui_easy_splitter_container=>orientation_vertical.
    CREATE OBJECT ob_grid1
      EXPORTING
        i_parent = ob_split1->top_left_container.
    CREATE OBJECT ob_grid2
      EXPORTING
        i_parent = ob_split1->bottom_right_container.
    I want to trigger double_click event:
    CREATE OBJECT ob_event.
      SET HANDLER ob_event->handle_double_click FOR ob_grid1.
      SET HANDLER ob_event->handle_double_click FOR ob_grid2.
    The problem is I don't know how to identify in which ALV the user double_clicked.
    Is there solution?
    Thanks in advance

    The trick is (just to help others):
    CLASS lcl_event_receiver1 DEFINITION.
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    CLASS lcl_event_receiver1 IMPLEMENTATION.
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_receiver2 DEFINITION.
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    CLASS lcl_event_receiver2 IMPLEMENTATION.
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
    and for data declaration:
    DATA: ob_event1  TYPE REF TO lcl_event_receiver1,
          ob_event2  TYPE REF TO lcl_event_receiver2.
    and then:
    CREATE OBJECT ob_event1.
    SET HANDLER ob_event1->handle_double_click FOR ob_grid1.
    CREATE OBJECT ob_event2.
    SET HANDLER ob_event1->handle_double_click FOR ob_grid2.
    Thanks a lot kiran kumar!
    Edited by: orgasmics on May 11, 2010 1:56 PM

  • How to Identify which Source Row is causing a slowdown in the Indexing?

    Every so often the Indexing seems to hit a wall and we gaet a huge backlog of text files that need to be indexed. We get about 2 to 3 million files per day. Most of the time the problem gets resolved when we increase the degree parallel. How can we identify which text file is causing the problem?
    Regards

    I wonder if the problem is becuse of some bug when the DR$PENDING gets to zero rows. Apparently this causes the query on CTX_USER_PENDING to take a long time. I use that view to determine the partitions to pass to SYNC_INDEX procedure.
    select
    pnd_partition_name
    ,count(*)
    from ctx_user_pending
    where pnd_index_name = '<index_name>'
    group by
    pnd_partition_name
    /This takes about 5 seconds for tow rows with 335 and 13 rows.
    Tables DR$INDEX, DR$INDEX_PARTITION and DR$PENDING have had Statistics gathered
    This query has taken over 45 minutes.

Maybe you are looking for

  • WCS map editor

    Hi, we use WCS 7.0.240, with Wism controller to manage our wireless network. We try to import map in the WCS to place AP and see the propagation of the signal, but no matter if I import cad file, jpeg or png file, I see the it in the maps tool but wh

  • Fed up trying to update itunes (missing bonjour.msi problem)

    With iOS5, is itunes even necessary? My phone updates by itself now. I'm guessing my iPad will too? Can I just delete itunes from my Win7 computer?

  • WRT160N, Laptop with XP, Can't Find Certificate

    My laptop (Panasonic Business Toughbook with XP) can no longer connect to the WRT160N.  Other computers in the house work fine on the wireless network, so I would not want to reset all of them if I reset the router.  As far as I recall, security is W

  • Two folders in the Photo Photostream. Why?

    I Have iPhone 3GS (iOS 5.0) After synchronization iTunes 10.5 with my phone: Two folders in the Photo Photostream. Why?

  • Help needed on JAXB 2.0

    Hi, I am trying to generate java classes from a simple catalog.xsd file. The output is below. Directory of E:\jaxbsamples\schema 11/13/2007 04:24 PM <DIR> . 11/13/2007 04:24 PM <DIR> .. 11/13/2007 04:12 PM 971 catalog.xsd 11/13/2007 04:30 PM <DIR> ge