如题.....现有一个问题:
<h:panelGrid columns="3">
<h:outputLabel for="name" value="User ID:" ></h:outputLabel>
<h:inputText id="name" value="#{UMDelegater.user.name}" required="true" />
<h:message for="name" />
<h:outputLabel for="password" value="Password:" ></h:outputLabel>
<h:inputSecret id="password" value="#{UMDelegater.user.password}" required="true" />
<h:message for="password" />
</h:panelGrid>为什么outputLabel 的内容不显示,而且也不占控件..就是2行1列..请教大侠, 并请各位推荐好的JSF教程....

解决方案 »

  1.   

    刚才从Browser看了一下源代码,变成的html如下:
    <table>
    <tbody>
    <tr>
    <td><label for="_id0:name">
    </label></td>
    <td><input id="_id0:name" type="text" name="_id0:name" /></td>
    <td></td>
    </tr>
    <tr>
    <td><label for="_id0:password">
    </label></td>
    <td><input id="_id0:password" type="password" name="_id0:password" value="" /></td>
    <td></td></tr>
    </tbody>
    </table>怎么table的Value不见了呢.....
      

  2.   

    <body>
    <f:view>
      <h:form id="formlogin">
        <h:panelGrid columns="3">        <h:outputLabel for="admin_name" value="User Name:"/>
            <h:inputText id="admin_name" required="true"/>
            <h:message for="admin_name" errorStyle="color:red"/>
            <h:outputLabel for="admin_pwd" value="Password:"/>
            <h:inputSecret id="admin_pwd" required="true"/>
            <h:message for="admin_pwd" errorStyle="color:red"/>        <h:outputLabel for="rand" value="验证码:"/>
            <h:inputText id="rand" size="10"/>
            <h:graphicImage id="radnimage" url="checkma.jsp" alt="验证码!"/>
            <h:commandButton value="Login"  action="validate"/>
            <h:commandButton type="reset" value="Reset"/>    </h:panelGrid>
      </h:form>
    </f:view>
    </body>
    这是我的body就是三列显示的啊,楼主的怎么会不显示呢?
    《[2006年新书和2本2005年经典书].JavaServer.Faces.JSF.in.Action_Manning.pdf
    很不错的,楼主看看学习学习,刚开始学jsf吧