Meaningless Drivel is fun!
The moose likes JSF and the fly likes How to reuse the (jsf) richfaces Modal panel dialog box? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to reuse the (jsf) richfaces Modal panel dialog box?" Watch "How to reuse the (jsf) richfaces Modal panel dialog box?" New topic

How to reuse the (jsf) richfaces Modal panel dialog box?

Gavaskar Rathnam

Joined: Apr 26, 2009
Posts: 4
In my application i have implemented the employee search functionality using richfaces 3.3 modal panel using facelets. i am trying to make this reusable across to my application, so i have added the following code under facelet-taglib_1_0.xml

xhtml page contains below components 1. search input field 2. search button 3. result richfaces datatable and also i have mapped the backing bean.

my question is,
1. i am not able to get the value from the **search input field**
2. Above approach is correct or any other better approach for this

please suggest
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17423

You have named it correctly. It's a modal panel and not a modal dialog and that means that the panel variables aren't setup and used when the panel is displayed. they're set up when the page containing (or including) the panel is displayed.

That's probably the root of your problem. I'm not quite sure of the exact issue you're having, since you haven't provided enough details. But, going the other direction, a panel is (must be) in a form, and the form is in its containing view (which is why the panel definition has to be outside of any background forms, since forms can't be nested). To update the backing bean, that form has to be submitted, and the only way to submit without re-rendering the dialog's containing page is to do an AJAX submit of the panel's from.

A bit trickier than "real" dialog boxes, alas.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: How to reuse the (jsf) richfaces Modal panel dialog box?
It's not a secret anymore!