Determine which component fired an action

I don't see anywhere where I can determine from an IWDCustomEvent which component fired the event.
I was hoping to setup a help system and wanted one single method to handle all the help events. It was my hope to determine which component fired the event that called the method and use that to determine which text to display.
Any help would be appreciated.

You can use event parameter mapping for this. Example: You have 2 buttons "Button1", "Button2" and assign the same action to their "onAction" event.
Now you can add a parameter "button" to the action, and use parameter mapping code (or declaratively, if available in your IDE).
wdDoModifyView(...)
  if (firstTime)
    IWDButton button1 = (IWDButton) view.getElement("Button1");
    button1.mappingOfOnAction().addParameter("button", button1.getId());
    IWDButton button2 = (IWDButton) view.getElement("Button2");
    button2.mappingOfOnAction().addParameter("button", button2.getId());
Then action handler parameter "button" will contain the ID of the button that triggered the action.
Armin

Similar Messages

  • Which component fired phase listener ?

    Hi,
    - I have a custome PagePhaseListener and I would like to know which component of a page fired the listener. Something like:
    public void beforePhase(PagePhaseEvent event) {
    // log the event.getSource().toString()
    - However the code event.getSource().toString() returns the controller object itself and not the object which fired the lifecycle.
    Thank you in advance.

    I could get which component fired an adf page lifecycle inspection the resquest. Here is the code:
    ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
    Map requestMap = externalContext.getRequestMap();
    Set set = requestMap.entrySet();
    Iterator i = set.iterator();
    while(i.hasNext()) {
    Map.Entry me = (Map.Entry)i.next();
    ILogger.log(this.getClass(), ILogger.TRACE, "request map entry: " + "key: " + me.getKey() + " value: " + me.getValue());
    Inserting this code on my custom phase listener I could verify that my master detail implementation was fireing two many requests and what component was responsible of that. Look for keys oracle.adfinternal.view.faces.event.rich.ClientEvents key and oracle.adfinternal.view.faces.renderkit.newStreamingRecords

  • Determine the outcome of an action in the jsp page?

    can i determine the outcome of an action in the jsp page?
    for example:
    i create a jsp file that contains two links, that play the role of tabs....
    the action is different for the two links say "action1" and "action2" but the result page is the same original page...
    can i determine what whas the action the user clicked?( so that i can display different things, according to action )

    you can use the <f:param> component with your commandLink and set a different value for each of your link. Then, in your jsp, you should be able to retrieve the value of the parameter in the request.

  • What's the best way to determine which row a user clicked on via a link?

    Hello. Probably simple question, but my googleing is failing me. I have a table, with a column that is a command link. How can I determine which row the user clicked on? I need to take that value, and pass it to a different page to bind it for a different query. I was thinking of setting the result in a session bean? Or is there a better way?
    Thanks!

    Hi,
    You have two options:
    1. (Complex) Have your ActionListener evaluate the event to get the source, then climb the component tree up to the table and get the current row data;
    2. (Simple) Add a setPropertyActionListener to the link with value="#{var}" target="#{destination}" where var is the table's var attribute value and destination is your managed bean that required the clicked row.
    Regards,
    ~ Simon

  • [ADF UIX] lovUpdate - how to tell which LOV fired

    I have a UIX page that allows the user to open 2 separate LOVs. On return to the main page, the lovUpdate event is called. Dependent on which LOV was called I need to do 2 separate pieces of work. However I can't work out how to determine which LOV caused the lovUpdate to fire.
    Does anybody know of a mechanism for determining this?
    Cheers!
    CM.

    Oops, case of RTFM. Each event has a source attribute mapping to the UIX component ID that caused the event.
    Simple really.
    CM.

  • Determination of component from SCR failed

    hi all gurus:
    When I execute Solution Manager Basic Setting Wizard: Initial Configuration Part II, it comes out an error:
    "Determination of component from SCR failed". The SLM version is SPs 17.
    any tips or advice would be great. thanks.
    [picture|http://www.mountain.org.tw/sap/090318_Run_SAP/Determination%20of%20component%20from%20SCR%20failed.png]

    Hi All,
    Please find solution below:
    This alert is triggert by the global systemloadmonitor. If you don't need this funktion please deaktivate the backgroundjob SAP_COLLECTOR_FOR_NONE_R3_STAT
    This job executes the Report RSN3_STAT_COLLECTOR which sends the displayed alert in the CCMS-Infrastructur
    Regards,
    Jochen

  • Determine the component/group for what I want to test

    Hello expert,
           in the following path, how can I determine the component for what I want to test ?
         test script>attributes>general tab-->component
          and also how to determin "group " in the "insert statement" function
    Many Thanks,
    Edited by: CETZHBO on Nov 24, 2011 7:00 PM

    what are universal buttons? and when you say they are the
    same on each layer, do you mean they look the same (which is
    irrelevant)? or do you mean something else?
    and each button loads a different video means you want an flv
    file to play when a button is pressed? if so, do you want to use
    the video class or flvplayback class to display your flv?

  • How to determine which configuration is being used within a page/view?.

    If I click on the little cog icon to take me into the AET for a given assignment block, how do I know which configuration is being used?. Usually one is highlighted, but the case of the Accounts main address assignment block these details are not shown. As there probably 30 of them I though there must be a quick way to determine which is being used from within the view/page.
    Anyone
    Jas

    Hi Jason, (great performance at the Transporter, but go easy on the steroids )
    There are 2 ways to know that:
    1. put your focus (not in the configuration mode) on one of the fields that are on the block. then press F2. Here you get a popup where there is the configuration searched for and the configuration found.
    2. Within the configuration, when there is no configuration with the configuration key linked to your business role present, the system takes the <DEFAULT> one. there should at least one be highlighted, otherwise you get a dump NO_CONFIG_FOUND.
    When you just press the copy button on the configurations tab, you get your configuration defaulted, this being, the configuration key linked to your business role + the search for component, usage, and subcomponent. here you see what was searched for.
    Hopefully this helps you out a bit.
    KR,
    Micha
    Edited by: Micha Van Nijen on Apr 20, 2010 3:03 PM
    Edited by: Micha Van Nijen on Apr 20, 2010 3:07 PM

  • How do I use a bean to determine which message bundle value to use?

    Is there a way to use a bean to determine which message from my message bundle I use? I want to be able to call my bean in JSF/JSP page, have the bean return a String, and use that String to pick a message from my message bundle properties file. Now I can do this:
    <h:outputText value="#{bundle.messageA}" />or this:
    <h:outputText value="#{bean.messageName}" />where I have a method on the bean like this:
    public String getMessageName(){
         if(someTest == true){
              return "messageA";
         } else {
              return "messageB";
    }I want to combine the two so my bean determines which message I pick. I want to do this because I want to keep all the text a user sees in the message bundle file. However, based on the state of the bean, I want to display different messages.
    Thanks in advance,

    Ah this way. So you want that much of nasty if statements in the bean instead? ;)
    Then make use of the fact that you also can access Map values using the brace notation. E.g.
    <h:outputText value="#{bundle[bean.messageKey]}"/>Where getMessageKey() returns the message key, e.g. 'messageA' or 'messageB' and so on.

  • I am trying to determine which generation of I pad I have. I no longer have the box.

    I am trying to determine which generation of I pad I have. I no longer have the box.

    - get the serial number - (settings / general / about), and put it in this web site - https://selfsolve.apple.com/agreementWarrantyDynamic.do.  This will show the make and model of the device.

  • How can I determine which computer a share is connected to in /Volumes from terminal or a script?

    I run a set of virtual machines via Fusion on an iMac that we run automated tests on for our website.  There is a folder on each VM called /Automation that is shared. 
    I have a python script that runs on the host, that will find an open VM, start it up and then mount the VM's /Automation folder.  So if there is only 1 VM powered on, the folder shows up in /Volumes as /Volumes/Automation.  The  problem is when there are 2 or more VM's powered on, because then the shares start being named /Volumes/Automation-1 and Automation-2 etc.  So my question is, how can I determine which computer each share belongs to from terminal or a script?
    In other words, I'm looking for something like:
    /Volumes/Automation = "FirstVirtualMachineName.local"
    /Volumes/Automation-1 = "SecondVirtualMachineName.local"
    Is there any way to determine which computer a mounted share is connected to?  In the past, I've just unmounted all /Automation folders, and then mounted them in a particular order, but that's unreliable and messy in my opinion.  If anyone knows a better way, please let me know.  Any help is appreciated.
    Thanks,

    Well I think I have a workable solution.  It's not perfect, but I think it will do the trick. I can put a spotlight comment on the folder similar to 'HostName=OSX-Automation-1.local' and can then retrieve that value from our server with the following python snippet:
    import subprocess
    out,err = subprocess.Popen(['osascript','-e','tell application \"Finder\" to get comment of \"Macintosh HD:Volumes:Automation-1\"'],stdout=subprocess.PIPE, stderr=subprocess.PIPE).communciate()
    So I could just loop through each 'Automation*' folder in /Volumes and grab the name from the spotlight attributes on the directories.  I don't think I really need to worry about the comments being overwritten, but I may have one of our launch daemons that run on the VM check that spotlight comment once a minute or something to ensure that the correct value is there.
    If it ends up not working well in practice, I'm going to give your suggestion about a config script a shot.  It would require a little more up front work, but seems as if it would be pretty solid after that. 
    Thanks again for helping me think it through

  • I have about 5,000 images in a Folder.  How can I determine which images are NOT in a Collection?

    I have about 5,000 images in a Folder.  How can I determine which images are NOT in a Collection?

    Create a smart collection with criteria "collection" and "does not contain"; and also with criterion Folder contains (or folder contains all)
    That works if you are thinking about a specific named collection.
    If you are interested in finding photos that are not in ANY collection, the usual trick is "collection" "does not contain" "a e i o u y"

  • How can I determine which programs/files are using disc space?

    A question for the professionals:
    What program on my MacBook Pro can I run to determine which programs and files are taking up the percentage of disc space?  I am running at 72 gb, which is great, but I need to know what is using up the rest of it.  Thank you in advance to any helpful solutions.
    Matthew

    activity monitor for RAM (its already in your utilities folder) http://support.apple.com/kb/HT1342.  OmniDiscSweeper for hard drive http://www.omnigroup.com/products/omnidisksweeper/  (needs to be downloaded)

  • How can I determine which jobs are running on NT?

    Hello,
    How do I determine which processes are in execution on an NT box from a JAVA
    application? I figure it must involve runtime exec'ing some run32dll
    program, but which one?
    TIA

    Search microsoft.com, or MSDN. That isn't anything to do with Java Programming.

  • How can i determine which devices are used at the moment?

    Hi all,
    I am designing an interface with LabVIEW for uing agilent devices. My work colleagues will use this interface.  I want to determine which devices are used at the moment and if I determine used device, i will add automatically device names to interface's main vi. So all my work colleagues can see on the program which devices are used by another colleague. This devices are connected with GPIB. İ want to learn is there any function on Instrument I/O palette.
    Thanks,
    Omer
    Solved!
    Go to Solution.

    Hi Omer,
    so those devices are connected to the PC with a GPIB connection. Will your collegues run several DAQ programs at the same time?
    GPIB-devices being controlled by PC don't have a "in use"-signal. They wait for commands, execute them and send an answer. When you start to control them using two programs they may respond to both programs, mixing up settings/measurement values and so on.
    That being said: In MAX you can see all devices connected to your GPIB port. You could scan the GPIB port using VISA commands in your program. You might even try to access a certain device by it's VISA alias. I really don't know if you will get a "device nopt available" error message when that VISA alias is in use by a different program - but you might do a quick test on your own…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

Maybe you are looking for

  • HP LaserJet Pro 200 m251nw - Printing Gray instead of Black

    HI, Hoping someone can help. I'm currently using a HP LaserJet Pro 200 m251nw printer, just over a year old, and it all of sudden started printing gray where it should be 100% black. From what I can see all the other colors seem to work fine.  I saw

  • Thunderbolt issue vga dvi

    On the new mac mini with Thunderbolt, problems with monitors like macbook. Thunderbolt - Minidisplay to VGA - screen not activate, diferent screens. HDMI > DVI - Eizo screen S2202W, switch from vga to dvi, screen 3 sec snow before right image. VGA an

  • Super-strange problem with display - EFI BIOS missing or corrupted?

    OK, so here's the breakdown. When I insert Windows CD/DVD - screen lights up, installation goes, no problems. When I insert OS X Install CD - no picture, no go. It "installs in the background without providing any picture to my LCD screen". Zapping,

  • I сan not install Adobe Flash Player 11.8.800.168

    Hello. I сan not install Adobe Flash Player 11.8.800.168 (Windows 7 64 bit, Firefox, MSIE is the same). Gives the following message: On this page there was a script error. Object does not support method or property "text". I didn't install the previo

  • Why sys does not refresh fast ?

    Hi everyone. The following test was made on a Windows XP Professional 2002 SP 2 box. I don't understand why sys user does not perform a fast refresh on a materialized view. With others users it works fine. May be I am missing something. This is my si