6 Replies Latest reply on Nov 4, 2008 6:23 AM by Jens Mueller

    auto height on modalPanel

    Jens Mueller Novice

      Is there a way to let the content of a modal panel define its height? as i'm displaying different messages the height can vary and i don't want to set the maximum height per default.
      thanks -j

        • 1. Re: auto height on modalPanel
          Nick Belaevski Master


          Set autosized="true"

          • 2. Re: auto height on modalPanel
            Jens Mueller Novice

            If I set autosize="true" the panel gets way to high (according to firebug its 300x200 which would mean standart size). i already checked for self-defined styles regarding the content in the panel however couldn't find anything....

            • 3. Re: auto height on modalPanel
              Nick Belaevski Master

              What about the following code:

               <h:commandLink value="Show" onclick="#{rich:component('mp')}.show(); return false;" />
               <rich:modalPanel autosized="true" id="mp"><h:outputText value="text" /></rich:modalPanel>

              Also try to set minWidth/minHeight

              • 4. Re: auto height on modalPanel
                Jens Mueller Novice

                thanks for your response. i tried the min-attributes however the modalpanel still renders a table that seems to stretch it:

                <rich:modalPanel id="deletePersonMP"
                 moveable="false" resizeable="false" autosized="true" minWidth="300" minHeight="130">
                 <f:facet name="header">
                 <h:panelGroup style="text-align:left">
                 <h:outputText value="#{msg_org.personDelete_titel}"></h:outputText>
                 <h:outputText id="mp_delete_text"
                 value="#{PersonBean.deleteConfirmQuestion}" />
                 <rich:spacer height="30" />
                 <h:panelGrid columns="3" style="width: 100%" border="0"
                 <a4j:commandButton id="yes" type="submit" value="#{msg.yes}"
                 action="#{PersonBean.delete}" actionListener="#{PersonBean.resetPersonBean}"
                 styleClass="commitButtons" reRender="ajaxArea"
                 eventsQueue="ViewQueue" ignoreDupResponses="true"
                 <h:outputText value="" />
                 <a4j:commandButton id="no" type="submit" value="#{msg.no}"
                 styleClass="commitButtons" style="align:center">


                <table id="j_id_jsp_1762201694_20:deletePersonMPContentTable" cellspacing="0" cellpadding="0" border="0" style="width: 300px; height: 200px;">

                If i remove the width and height argument in the browser (using firebug), the modalpanel collapses to the right size (fitting to the content).

                • 5. Re: auto height on modalPanel
                  Nick Belaevski Master

                  Does that reproduce in 3.2.2? I've fixed the issue for 3.2.2, so older versions can have this bug... Try to set width/height to some small value - that can help.

                  • 6. Re: auto height on modalPanel
                    Jens Mueller Novice

                    in fact we're still using 3.2.1 due to some layout distortions we had with 3.2.2.
                    (i think the suggestion boxes appeared at random locations)
                    if i indicate a smaller height, let's say 80, the panel hides the overflow. gonna set some static size now. thanks anyway