Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can i set specified width for embedded h:panelGroup
    text
    copied!<p>The page has a h:panelGrid which contains two h:panelGroup expected to be displayed in the same line.</p> <p>And additional requirement is that the left panelGroup should be 30% of the total width,the other 70%.</p> <p>I have tried a couple of ways to make this happen but failed...</p> <pre><code>&lt;h:form id="form"&gt; &lt;h:panelGrid id="pricePanel" columns="2" style="width:100%;" columnClasses="columnClazz" rowClasses="rowClazz"&gt; &lt;h:panelGroup&gt; &lt;p:dataTable scrollHeight="250" id="priceData" var="item" value="#{accumByCustomerViewModel.quoteInfo}" scrollable="true" rowIndexVar="rowInfo" rowKey="#{item.brand_code}" selection="#{accumByCustomerViewModel.selectedBrand}" selectionMode="single"&gt; &lt;p:ajax event="rowSelect" listener="#{accumByCustomerViewModel.onRowSelect}" update=":form:custGrid"/&gt; &lt;p:columnGroup id="columnGroup" type="header"&gt; &lt;p:row&gt; &lt;p:column id="goldHeader" rendered="true" headerText="积存金" colspan="4"/&gt; &lt;/p:row&gt; &lt;p:row&gt; &lt;p:column id="brandHeader" rendered="true" headerText="品牌"/&gt; &lt;p:column id="quoteDateHeader" rendered="true" headerText="报价日期"/&gt; &lt;p:column id="salePriceHeader" rendered="true" headerText="卖出价"/&gt; &lt;p:column id="redeemPriceHeader" rendered="true" headerText="赎回价"/&gt; &lt;/p:row&gt; &lt;/p:columnGroup&gt; &lt;p:column id="brand_code" rendered="true"&gt; #{item.brand_name} &lt;/p:column&gt; &lt;p:column id="quote_date" rendered="true"&gt; #{item.quote_date} &lt;/p:column&gt; &lt;p:column id="salePrice" rendered="true"&gt; #{item.entity_sale_price} &lt;/p:column&gt;. &lt;p:column id="redeemPrice" rendered="true"&gt; #{item.entity_redeem_price} &lt;/p:column&gt; &lt;/p:dataTable&gt; &lt;/h:panelGroup&gt; &lt;h:panelGroup id="custGrid"&gt; &lt;p:fieldset legend="客户信息" id="custFieldset"&gt; &lt;h:panelGrid columns="2"&gt; &lt;h:outputText value="银行账号:"/&gt; &lt;p:inputText value="#{accumByCustomerViewModel.custInfo.bank_acc}" style="color:red;font-weight:bold;"/&gt; &lt;h:outputText value="证件类型: "/&gt; &lt;h:outputText value="#{accumByCustomerViewModel.custInfo.cert_type}" style="color:red;font-weight:bold;"/&gt; &lt;h:outputText value="证件号码: "/&gt; &lt;h:outputText value="#{accumByCustomerViewModel.custInfo.cert_no}" style="color:red;font-weight:bold;"/&gt; &lt;/h:panelGrid&gt; &lt;/p:fieldset&gt; &lt;p:fieldset legend="品牌" id="brandFieldset"&gt; &lt;h:panelGrid columns="2"&gt; &lt;h:outputText value="品牌名称:"/&gt; &lt;h:outputText value="#{accumByCustomerViewModel.selectedBrand.brand_name}" style="color:red;font-weight:bold;"/&gt; &lt;h:outputText value="金额: "/&gt; &lt;p:inputText value="#{accumByCustomerViewModel.selectedBrand.entity_sale_price}" style="color:red;font-weight:bold;"/&gt; &lt;/h:panelGrid&gt; &lt;/p:fieldset&gt; &lt;/h:panelGroup&gt; &lt;/h:panelGrid&gt; &lt;/h:form&gt; </code></pre>
 

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