Note that there are some explanatory texts on larger screens.

plurals
  1. POTwo different <rich:Panel> changing there position when kept in a single panelGrid
    primarykey
    data
    text
    <p>I have two rich:panel(id="pn2" and id="pn3" in given code) in a single h:panelGrid . I have positioned both panels one after another in a Single row . </p> <p>I have following two problems :</p> <ol> <li><p>As both of these panel are changing height depending on the situation, so when one panel changes height, second panel is moving up or down from its current position . </p></li> <li><p>Why I have to give columns="4" inside the h:PanelGrid for achieving the desired position(Both panels in a single row and one after another)? I have only two panels inside the panelGrid . So, this does not seem to be logical . </p> <p>Following is the code:</p> <pre><code> &lt; h:panelGrid columns="4"&gt; &lt;!--This is for setting up the Accounts for customers--&gt; &lt;rich:panel id="pn2" rendered="#{not empty adminBean.currentItem}" header="Add Account" style="margin-top: 10px; width: 545px; margin-left: -7px"&gt; &lt;h:panelGrid columns="2"&gt; &lt;a4j:commandButton value="Add New" action="#{adminBean.addAccountAction}" render="pn2" /&gt; &lt;a4j:commandButton value="Delete" style="margin-left: 10px; width: 70px"&gt;&lt;/a4j:commandButton&gt; &lt;/h:panelGrid&gt; &lt;rich:dataScroller for="setacct" style="margin-top: 17px"&gt;&lt;/rich:dataScroller&gt; &lt;rich:dataTable id="setacct" value="#{adminBean.accountList}" binding="#{adminBean.addAccountTable}" var="acct" rows="10" style="width: 430px; max-height: 10px;"&gt; &lt;rich:column id="c1"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="Account Type" style="font-size: smaller; font-weight: bolder; "/&gt; &lt;/f:facet&gt; &lt;h:inputText value="acct.acctType"&gt;&lt;/h:inputText&gt; &lt;/rich:column&gt; &lt;rich:column id="c2"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="Branch" style="font-size: smaller; font-weight: bolder;"/&gt; &lt;/f:facet&gt; &lt;h:inputText value="acct.branch"&gt;&lt;/h:inputText&gt; &lt;/rich:column&gt; &lt;rich:column id="c3"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="Account Start Date" style="font-size: smaller; font-weight: bolder;"/&gt; &lt;/f:facet&gt; &lt;rich:calendar id="calendar" value="acct.acctStartDate"/&gt; &lt;/rich:column&gt; &lt;rich:column id="c4"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="" style="font-size: smaller; font-weight: bolder;"/&gt; &lt;/f:facet&gt; &lt;a4j:commandLink value="select" render="pn3"/&gt; &lt;/rich:column&gt; &lt;/rich:dataTable&gt; &lt;/rich:panel&gt; &lt;!--This is for issuing credit cards for customers--&gt; &lt;rich:panel id="pn3" rendered="#{not empty adminBean.currentItem}" header="Add Cards" style="margin-top: 10px; width: 620px; margin-left: 30px"&gt; &lt;h:panelGrid columns="2"&gt; &lt;a4j:commandButton value="Add New" action="#{adminBean.addCardAction}" render="pn3" style="width: 70px"&gt;&lt;/a4j:commandButton&gt; &lt;a4j:commandButton value="Delete" style="margin-left: 10px; width: 70px"&gt;&lt;/a4j:commandButton&gt; &lt;/h:panelGrid&gt; &lt;rich:dataScroller for="setcard" style="margin-top: 17px"&gt;&lt;/rich:dataScroller&gt; &lt;rich:dataTable id="setcard" value="#{adminBean.cardsList}" binding="#{adminBean.addCardTable}" var="car" rows="10" style="width: 430px; max-height: 10px;"&gt; &lt;rich:column id="cl1"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="Card Type" style="font-size: smaller; font-weight: bolder; "/&gt; &lt;/f:facet&gt; &lt;h:inputText value="#{car.type}"&gt;&lt;/h:inputText&gt; &lt;/rich:column&gt; &lt;rich:column id="cl2"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="VALID FROM" style="font-size: smaller; font-weight: bolder;"/&gt; &lt;/f:facet&gt; &lt;rich:calendar value="#{car.validFrom}" id="cal2"/&gt; &lt;/rich:column&gt; &lt;rich:column id="cl3"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="EXPIRY ON" style="font-size: smaller; font-weight: bolder;"/&gt; &lt;/f:facet&gt; &lt;rich:calendar value="#{car.expiryOn}" id="cal3"/&gt; &lt;/rich:column&gt; &lt;rich:column id="cl4"&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="AUTO ALERT" style="font-size: smaller; font-weight: bolder;"/&gt; &lt;/f:facet&gt; &lt;h:inputText value="#{car.autoMsg}"&gt;&lt;/h:inputText&gt; &lt;/rich:column&gt; &lt;/rich:dataTable&gt; &lt;/rich:panel&gt; &lt;/h:panelGrid&gt; </code></pre></li> </ol> <p>Can anybody tell that what is the reason behind changing position of both panels ? Note : here Height of both the panels are dynamic. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload