开发者

How to center a ice:confirmationPanel within a modal ice:panelPopup (ICEfaces)?

开发者 https://www.devze.com 2023-02-12 23:55 出处:网络
If a (modal) ice:confirmationPanel within a modal ice:panelPopup is used, the confirmationPanel will not be centered; instead it seems to be centered relative to the panelPopups upper left edge.

If a (modal) ice:confirmationPanel within a modal ice:panelPopup is used, the confirmationPanel will not be centered; instead it seems to be centered relative to the panelPopups upper left edge.

This seems to be caused by the inline style of the panelPopup. It says position: absolute. Because it is rendered as inline styl开发者_高级运维e, I don't know how to change it to position: fixed which seems to solve the problem.

Additional information: In my case it would be no solution to put the confirmation panel outside the panelPopup, because the confirmationPanel is part of a Facelets-Component (ui:composition). Whenever this component is used inside a panelPopup, this problem arises.

Any solution proposals?


Just place the panelConfirmation outside the panelPopup. This way the confirmation panel will be centered, and it will be over the popup panel.

<ice:panelPopup autoCentre="true" modal="true" draggable="true">
    <f:facet name="header">
        <ice:panelGroup>
            <ice:outputText value="Edit" />
        </ice:panelGroup>
    </f:facet>
    <f:facet name="body">
        <ice:panelGroup>
            <ice:commandLink value="Edit" panelConfirmation="editConfirm" actionListener="#{editor.edit}"/>
        </ice:panelGroup>
    </f:facet>
</ice:panelPopup>
<ice:panelConfirmation id="editConfirm" />


I ended up creating my own popup component, which uses position: fixed divs instead of iframes - works perfect!

0

精彩评论

暂无评论...
验证码 换一张
取 消