简体   繁体   中英

Creating <rich:modalPanel> dynamically

How to create a rich:modalPanel dynamically? I need to click one button and generate a floating panel. The catch is, if I click the button, there should be created a second panel, and the first one should remain on its place. I've tried using ui:repeat and reRender, but this overwrites the first panel when I generate a second one.

try using

<c:forEach />

For an explanation on why you should use the 'c' tag instead of 'ui' read here .

Alternatively, bind the parent component and create the modal panel programmatically using java. See an example here .

If you have a modal panel opened, you won't be able to click any buttons (unless the button is on the modal panel). RichFaces 4 has a pop-up panel which can be modal or non-modal. Using the non-modal version, you can open multiple pop-ups.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM