<f:view>
<h:panelGrid column="3">
<h:outputText value="用户名"/>
<h:inputText value="" />
<h:message for="" />
<h:outputText value="密码"/>
<h:inputText value=""/>
<h:message for="" />
<h:commandButton value="" />
</h:panelGrid>
</f:view>
<h:panelGrid> 用于摆放组件,column的值确定每一行可以放多少个组件。