[
https://issues.jboss.org/browse/RF-13216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12807033#comment-12807033
]
Brian Leathem commented on RF-13216:
------------------------------------
Quoting from the Richfaces 4 docs:
http://docs.jboss.org/richfaces/latest_4_X/Component_Reference/en-US/html_single/#sect-Component_Reference-richpopupPanel-Showing_and_hiding_the_pop-up
{quote}
Placement
The <rich:popupPanel> component is usually rendered in front of any other
objects on the page. This is achieved by attaching the component to the <body>
element of the page, and setting a very high "z-index" (the stack order of the
object). This approach is taken because relatively-positioned elements could
still overlap the pop-up panel if they exist at higher levels of the DOM
hierarchy, even if their z-index is less than the <rich:popupPanel> component.
If the <rich:popupPanel> is to participate in submitting child
components/behaviors, then a form element must be nested within the
<rich:popupPanel>. Alternatively, if no overlapping elements exist, the
<rich:popupPanel> component can be reattached to its original DOM element by
setting domElementAttachment to either parent or form.
{quote}
This clearly states that using _domElementAttachment="body"_ is for use cases
where the popup does not "participate in submitting child components/behaviors"
ie. AJAX.
for the described use case:
# set _domElementAttachment="form"_ and have both the popup and the calling
page in the same form.
# If separate forms are preferable, try setting _domElementAttachment="body"_
and using a nested form in the popupPanel. When the popup is closed refresh
the page with a full JSF page load, rather than an AJAX update.
> PoupPanel doesn't disappear when rendered="false" and rerender it.
> ------------------------------------------------------------------
>
> Key: RF-13216
> URL: https://issues.jboss.org/browse/RF-13216
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-output
> Affects Versions: 4.3.3
> Reporter: Takayuki Konishi
> Attachments: rf3_3_4-modalpanel.zip, rf4_3_3-popuppanel.zip
>
>
> If you use the richfaces popupPanel in the default
> domElementAttachment="body" mode it will not disappear under specific
> conditions.
> {code:xml}
> <h:body title="page 1">
> <a4j:outputPanel id="myPanel">
> <rich:popupPanel domElementAttachment="body" show="true"
> rendered="#{test.showPopup}">
> <h:form>
> <a4j:commandButton action="#{test.switchPopup()}"
> value="switch off" render="myPanel"/>
> </h:form>
> </rich:popupPanel>
> <h:form>
> <a4j:commandButton action="#{test.switchPopup()}"
> value="switch on" render="myPanel"/>
> </h:form>
> </a4j:outputPanel>
> </h:body>
> {code}
> In Richfaces 3.3.x, on the other hand, there was a component cleanup system
> ({{memory.js _cleanComponentNodes}}) which was responsible to remove
> components after ajax calls if the component was removed from the current
> view.
> Therefore the above example (revert {{popupPanel}} to {{modalPanel}}) works
> in RF3.3.4.Final.
> Note:
> In case {{domElementAttachment="parent"}}, it will show [the other JSF2
> bug|https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-790] where the
> view state was lost, therefore you must click the action button twice to
> really call the function.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues