Wednesday, November 21, 2012

Richfaces popupPanel and fileUpload issue

To display the Richfaces fileUpload component in a popupPanel.

the purpose is to hide the fileUpload component into the popupPanel, to make the page looks simpler. and only invoke the fileUpload component in the popupPanel when it is needed.

with the following codes

But there is a problem when using the popupPanel together with the fileUpload component.
Where the fileUploadListener is not being invoked, thus files are not uploaded.

the solution is pretty simple.
=> attach the popupPanel to "form" instead of "body"
the default domElementAttachment is body, thus, simply add the domElementAttachment="form"

Finally, test the fileUploadListener again.


No comments:

Post a Comment


Related Posts Plugin for WordPress, Blogger...