• Post Reply Bookmark Topic Watch Topic
  • New Topic

Show modal from rich:picklist onlistchanged?

 
carlos benincasa
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I'm having a lot of trouble with the following case:
I have a <rich:picklist> with some "preselected" items in the right list. When the user "removes" one of those items, I need to run a verification method on my backing bean (to verify if that item is removeable from a business view). If the verification fails (the item couldn't be removed) I need to show a modal panel with some details about that item.

My problems are:
Since the <rich:picklist> doesn't support "action" and "actionlistener", I'm not sure how can I run the verification.
(I think I can call the actions from the buttons using facets)

Using the jboss example:


Plus how can I show a modal panel right after running the pickBean.verifyRemoveable method?

Help please!

PS: sorry about my bad english.
PS2: please don't mind my "newbieness". I'm just starting to work with JSF.
 
Tim Holloway
Bartender
Posts: 18412
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suspect you're going to have to pair the pickList with a componentControl in order to bind an AJAX operation to the onlistchange or onlistchanged JavaScript event handler. Actually popping up a dialog is the easy part. In the AJAX oncomplete() method, just call the dialog show() javascript method like in their examples.

Of course, since you want this to be conditional, you'll also need the data= attribute to define how the AJAX method passes back the show/no-show status. That, unfortunately, is an area that needs to be documented better.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!