• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Show modal from rich:picklist onlistchanged?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic