Meaningless Drivel is fun!
The moose likes JSF and the fly likes rich modal window submission Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "rich modal window submission" Watch "rich modal window submission" New topic

rich modal window submission

Zack Marrapese

Joined: Jul 02, 2008
Posts: 27
I am working on a project in which I would like to pop up a window which will do some basic form submission. After this I would like to return to the previous view.

I chose the rich:modalPanel component for this. I have no trouble showing and hiding the window. However, when I try to call any actionListener from a command object within the modal panel, it does not reach the actionListener. Here is the relevant portion of my code:


modalPanel defined:

Backing bean:

However, the actionListener is never even reached (confirmed in debug). Any suggestions?
Zack Marrapese

Joined: Jul 02, 2008
Posts: 27
I found out my problem. According to the manual, there are some limitations on submitting from a modal pane:
1.) A form must be declared within the modal panel (and therefore, the modal panel must be defined outside any existing form to avoid nested forms).
2.) The modal panel can't be included onto the page. It must be in the base of the page.

Hope this helps others that have this problem.
Venkat Sadasivam
Ranch Hand

Joined: May 10, 2008
Posts: 139
To keep in more simpler you can even think of having an iframe inside you modal dialog.

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ”<br>
-Martin Fowler
It is sorta covered in the JavaRanch Style Guide.
subject: rich modal window submission
It's not a secret anymore!