Reputation:
I have this code, I want to gain advantage of the left space (Not filed value)...
[![<h:panelGrid columns="2" cellpadding="5" >
<p:outputLabel value="Field1:" for="itField1" />
<p:inputText id="itField1" style="width:200px" required="true"
value="#{bean.field1}">
</p:inputText>
<p:outputLabel value="Field2:" for="itField2" />
<h:panelGrid columns="2" style="width:200px" cellpadding="0" cellspacing="0" >
<p:inputText id="itField2" required="true"
value="#{="#{bean.field2}"
/>
<p:commandButton icon="fa fa-search"
/>
</h:panelGrid>
<p:outputLabel value="Field3:" for="itField3" />
<p:inputText id="itField3" style="width:200px" required="true"
value="#{bean.field3}">
</p:inputText>
</h:panelGrid>]
How to do it?
Upvotes: 0
Views: 372
Reputation: 184
This can be achieved by adding CSS style width:100%
to <p:inputText id="itField2" ..... />
and <p:commandButton .... />
as follows:
<p:inputText id="itField2" value="#{bean.field2}" required="true" style="width:100%" />
<p:commandButton icon="fa fa-search" style="width:100%" />
Upvotes: 0