Is there a way to get "clientId" from an action method?

Actions and action listeners are similar, but there is an important difference. The listener does not return a view for navigation, but an action does not get the ActionEvent parameter, and hence does not have a trivial way to get at the client id that invoked it.
Sometimes its seems you need both.
If an action can fail and you cannot know for certain until the action is attempted (for example, a database operation), it is nice to be able to queue a message to the component that invoked the action and redisplay the view which now contains the error indication. On success however, an new view should be navigated to.
This requires that the action get at a client id, and often the logical client id is of the component the user used to invoke the action. Is there a built in way to get this id from an action method?
Ideally an action should have the signature Object action(ActionEvent) or am I missing something?

hanafey wrote:
Unfortunately this requires both action and actionListener be specified in the viewThere is a nasty workaround possible where you get the clientId of the invoked button from the RequestParameterMap so that you can only use the UICommand action method, but I wouldn't recommend that.
and if the listener is forgotten the message will get attached in the wrong place, or end up global.Isn't that just a developer fault?
Also, is'nt there a (tiny) concern about multi-threaded failure if a user happens to have two windows open on the same application?Not if your bean is request scoped. If your bean is session scoped, then the user have to be very fast, or your server have to be very slow. With very I really mean very+.
The other way I considered was via binding, but his also burdens the view with an extra attribute.What is your functional requirement after all? Sounds like to me that you rather need f:setPropertyActionListener or f:attribute. Also see http://balusc.blogspot.com/2006/06/communication-in-jsf.html for some examples and new insights.

Similar Messages

  • Is there another way of getting apps from the appstore without putting your credit card number in, ive heard about the itunes gift card thing can anybody just give me more info about that and how i can buy free things free things from the appstorepls help

    Is there another way of getting apps from the appstore without putting your credit card number in, ive heard about the itunes gift card thing can anybody just give me more info about that and how i can buy free things free things from the appstore...pls help as im only a teenager and have no credit credit and my parents dont trust me with theres and they dont care about the fact that you can set up a password/.... PLEASE SOMEONE HELP I WILL BE SO GRATEFUL... And i would really like to get the iphone 4 but if there is no way of etting apps without your credit number then i would have to get a samsung galaxy s3 maybe ...

    You can set up an Apple ID without a credit card.
    Create iTunes Store account without credit card - Support - Apple - http://support.apple.com/kb/ht2534

  • I purchased my macbook pro on the 18th of june 2011, do i still need to purchase the lion or is there a way of getting it from mac complimentry ?

    I purchased my macbook pro on the 18th of june 2011, do i still need to purchase the lion or is there a way of getting it from mac complimentry ?

    OS X Lion - Get up to date

  • HT201272 I have a purchased app that will not show up in the cloud and is no longer in the app store. Is there a way to get it from my iPhone to my iPad?

    I have a purchased app that will not show up in the cloud and is no longer in the app store. Is there a way to get it from my iPhone to my iPad?

    You should be able to copy it from your iPhone to your computer's iTunes via File > Devices > Transfer Purchases, and if it's compatible with your iPad you can then sync it to it

  • Is there a way to get photo from a blocked "Photoshop Album 3.0" with Ps?

    Is there a way to get photos from a blocked "Photoshop Album 3.0" with Ps?

    If you are on a Mac, you can use File Juicer to extract image files from just about anything.
    Next time you post, please give more specific details.
    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand, such as your platform (Mac or Win), exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge, machine specs, such as total installed RAM, scratch file HDs, video card specs, including total VRAM installed, what troubleshooting steps you have taken so far, what error message(s) you receive, if having issues opening raw files also the exact camera make and model that generated them, etc., someone may be able to help you (not necessarily this poster).
    A screen shot could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Is there a way to get music from my ipod to my itunes library

    Hello. I have a problem with my music library. My computer hardrive crashed and i had lost all of my music and other information in iTunes. All i have left is the music on my iPod... But is there a way to get the music from off my iPod and back on my new music library? Plz help. Ty

    Check out the instructions/suggestions here.
    Music from iPod to computer.
    There's also another method. I've successfully tested this across several different Windows PCs.
    Open iTunes and select edit/preferences/advanced/general. Put a check mark in the box marked "copy files to iTunes music folder when adding to library" and also "keep iTunes music folder organized", then click 'ok'.
    Connect the iPod whilst holding down the shift/ctrl keys to prevent any auto sync, and if you see the dialogue window asking if you want to sync to this itunes library, click 'no'.
    Then go to file/add folder, open 'my computer', select your iPod and click 'ok'.
    The music files should transfer to your iTunes.
    If this doesn't work (and it may not because officially it's not supposed to), there's Yamipod. This is a free program that transfers music and playlists etc from iPod back to the computer. However, it does not transfer playcounts/ratings etc.

  • Is there any way of getting back from a wrong clicked free trial to add my serial number correctly?

    Hi
    On purchasing a new imac I copied the apps across & on opening CS6 was requested to load serial numbers, through tiredness I added the seria; number from CS5.5 and therefore not recognised for the CS6, then when about to enter again through tiredness I must have clicked free trial and now have the CS6 in that format.
    Is there any way of getting back to that initial box to load the correct numbers & get out of trial as although it works I need it set up correctly?
    Any help appreciated

    Sorry, cant see this visible on menu or drop downs, did run through all menus before posting, could just be tired from 3 weeks straight.
    If this is not an option does that mean I am set up ?

  • Is there any way to get songs from your iPod nano into your iTunes library?

    My iTunes library has been totally cleared but my iPod nano is full. I'd really like the music back in my iTunes library, so is there a way to get the music from my iPod into iTunes?

    http://discussions.apple.com/message.jspa?messageID=2943841#2943841

  • I've connected my ipad to my TV via hdmi but cannot get sound. Is there a way to get sound from the TV?

    I'd like to get sound from the tv for my keynote presentations. Is there a way to do this via the hdmi connection? Or do I need to connect an 'audio-out? Thanks in advance for your help

    the hdmi should transfer both sound and picture
    http://store.apple.com/us/product/HFQL2VC/A/moshi-mini-displayport-to-hdmi-adapt er-4k?fnode=a8e08a2bb3c16bf3cd606aecff68b12c10fe327cd7b063c9bbc492e57158bbfa0778 d5b941eb2a8c1c5f2e25e51cf7b82e193c9a722651b3fc2694996f7b5281b8bf4338c46284247b76 ccce6907fa6caee062d974158ee4d0336fca558384426e7a6c6cbf3ee58c8f53f8db53c9ef91
    Supports multi-channel digital audio output on compatible devices
    make sure your ipad is not muted
    make sure you volume is not all the way down
    make sure audio play out of the ipad when not connected to the hdmi adapter
    if you did and it don't work then it's likely an issue with the connetor
    or the tv or it's settings

  • Is there a way to get pictures from another backup?

    I want to restore my iPod from a backup but at the same time I don't. I know in order to restore from backup you have to erase all content and settings. However, I have a lot of pictures on my ipod that I don't want to be erased; I have those pictures backed up I just want to know if there is a way to get the pictures from my earliest backup onto my ipod without going through all of that.

    Restoring a backup is all or nothing, and if it's an iCloud backup, it requires you to erase the device in order to restore it.  What you can do is back up your device to your computer using iTunes (connect it to your computer, open iTunes, click on the name of it in iTunes, then go to File>Devices>Transfer Purchases and File>Devices>Back Up).  Then you can restore the backup you want (see iCloud: Restore your iOS device from iCloud), then import the recovered photos to your computer (see iOS: Import personal photos and videos from iOS devices to your computer), then restore the iTunes backup you made earlier (File>Devices>Restore from Backup).  If you want the photos back on your device, put them in a folder and sync them to your device by selecting the folder on the Photos tab of your iTunes sync settings and syncing.

  • Is there a way to get music from your iPod onto the computer?

    I recieved most of the music that is currently on my iPod from my cousin, but if i want to add some of MY music to the iPod then i have to erase all of her music off of it! Is there a way to save the music that is already on there and then put it back on the iPod once it has been erased?

    First of all try this method which works on some Windows PCs.
    Open iTunes and select edit/preferences/advanced/general. Put a check mark in the box marked "copy files to iTunes music folder when adding to library" and also "keep iTunes music folder organized", then click 'ok'.
    Connect the iPod whilst holding down the shift/ctrl keys to prevent any auto sync, and if you see the dialogue window asking if you want to sync to this itunes library, click 'no'.
    Then go to file/add folder, open 'my computer', select your iPod and click 'ok'.
    The music files should transfer to your iTunes.
    If this doesn't work (and it may not because officially it's not supposed to), check out the instructions/suggestions here.
    Music from iPod to computer (using option 2). This a manual method using "hidden folders" and although it works, it can be messy.
    Much easier ways are to use one of the many 3rd party programs that copy music from the iPod to the computer.
    One of the most recommended is Yamipod. This is a free program that transfers music and playlists etc from iPod back to the computer. However, it does not transfer playcounts/ratings etc.
    There is also CopyPod. This does preserve ratings/playcounts etc if those are important to you but this program is not free.
    If you are using iTunes version 7 or later, then you can transfer purchased iTunes store music from the iPod to an authorized computer by using the "file/transfer purchases from iPod" menu. Note that the maximum of 5 authorized computers applies here.

  • Is there any way to get data from my drown i phone?

    MY frind iphone dip in water, she try to fix it or at least get the data from it( photo , aplications, contacts,...atc) but no body can do it ?
    I am shore that thaier is some way to get back the data , but i dont now how .

    Because an iPhone's hard drive is nonremovable, you need to be able to turn on the iPhone in order to access its data. However, iCloud automatically backs up your iPhone's photos, applications, contacts, etc..., so after you get a new iPhone, the first time setup menu will give you the option to restore it from your friend's old iPhone's backup.

  • HT201371 i have iphone 4s with damage screen, where i can get it repaired, and i am living in Qatar. Is there any way to get repair from iphone

    I have iphone 4s with damage screen, is there any possibility to get it repaired i am from Qatar. Here the main dealer of Apple is Iphone. and they are not accepting any Iphone device which purchased from outside vodafone. Please tell me the sulution.???

    iPhone warranty is valid only in country of original purchase. You must
    return the iPhone personally or via friend/relative to where it was sold
    to have it evaluated.

  • Is there any way to get sound from rear speakers and subwoofer when listening to MP3s

    I have Logitech 4. speakers connected to a SoundBlaster Li've 5. card. The front speakers work great, but even when I run tests, I get nothing from the other three. Any ideas?

    I am having the exact same problem when running through my Sony digital reciever. I have checked the CMSS box and the spdif passthrough mode and still only getting stereo

  • HT4236 iPhone was stolen. Is there a way to get Info from that iPhone to an iPad? I never synced iPhone with computer.

    iPhone was stolen. Is there a way to sync info to an iPad? iPhone was never synced to a computer. I lost all my photos, which have great sentimental value and not sure if it is possible to retrieve those photos. Thanks for any advice :)

    If you have failed to sync your device to your computer or cloud service, as the iphone is designed, then everything is gone.

Maybe you are looking for

  • Flex 3.1 and 3.0 SDK Download links are Broken

    Flex 3.0 and 3.1 SDKS are not available in ADOBE site for download ,  It displays all the SDK versions , But when we click on the link for 3.0 and 3.1  it will not Download it says URL not found ,  But where as you will be able to Download only the 3

  • Simple array

    Hi. I'm trying arrays as a beginner and keep running into the same problem. The error I keep getting is "class, interface or enum expected". I recently installed the new Java 1.6.0_06.... I started off with a array of arrays and since that didn't wor

  • How to set the default location of a new window in Preview?

    Opening a new document in Preview always results in a new window that is located at the upper left of the screen. I'd like to have all of my Preview documents open in a second monitor, but this doesn't appear possible. Does anyone have any insight to

  • Search external cnt using winhelp2000

    I am producing help in winhelp 2000 and have a main help file with multiple external help files. When I do a search for text in the main help, there are no results for the external help files. I have deleted old .gid files and .fts files. Can this ve

  • Bi server error

    hi all ihave installed bi server and it was working fine but suddenly strange errors occur whenever i try to enter into presentation services and also Administration services online mode is not active the error in the presentation services is State: