在选择<h:selectonemenu>时,它应该呈现<h:panelgroup>

时间:2016-11-17 12:48:23

标签: html jsf-2.2

<p:messages for="buyerDetail" closable="true"
    style="text-align: center;"></p:messages>

<section class="container b-welcome-box"> <h:panelGroup
    layout="block" class="row">
</h:panelGroup> <h:panelGroup layout="block" class="l-inner-page-container">
    <h:panelGroup layout="block" class="container">
        <h:panelGroup layout="block" class="row">
            <h:panelGroup layout="block" class="col-md-3">
                <h:panelGroup layout="block" class="row">
                    <h:panelGroup layout="block" class="col-md-12">
                        <h:panelGroup layout="block" class="b-find-box">
                            <h:panelGroup layout="block"
                                class="b-find_title f-find_title f-primary-b">Post</h:panelGroup>
                            <h:panelGroup layout="block" class="b-find_form f-find_form">
                                <h:form id="myForm1">
                                    <h:panelGrid>
                                        <h:panelGroup layout="block" class="b-form-row">
                                            <h:panelGroup layout="block" class="b-form-row" id="jhjg">
                                                <label class="b-form-vertical__label"
                                                    for="create_account_phone"><span
                                                    class="f-tooltip j-tooltip" data-toggle="tooltip"
                                                    data-placement="top" title="Mandatory">*</span> Property
                                                    Category : </label>
                                                <h:panelGroup layout="block" class="b-form-vertical__input">
                                                    <h:selectOneMenu id="propertyCatagory"
                                                        valueChangeListener="#{leadBean.buyerLeadTO.getBuyerLeadPropertyType}"
                                                        class="form-control" required="true" onchange="submit()"
                                                        value="#{leadBean.buyerLeadTO.buyerLeadPropertyType}"
                                                        requiredMessage="Property Catagory is Mandatory">
                                                        <f:selectItem itemLabel="--Select Property Type--" />
                                                        <f:selectItem
                                                            itemLabel="Residential :- Flats, Apartments"
                                                            itemValue="Res:-Flat"></f:selectItem>
                                                        <f:selectItem
                                                            itemLabel="Residential :- Individual House/Home"
                                                            itemValue="Res:-IndHome"></f:selectItem>
                                                        <f:selectItem itemLabel="Residential :- Society Housing"
                                                            itemValue="Res:-SociHosg"></f:selectItem>
                                                        <f:selectItem itemLabel="Residential :- Builder Floor"
                                                            itemValue="Res:-BuldrFlr"></f:selectItem>
                                                        <f:selectItem itemLabel="Residential :- Farm House"
                                                            itemValue="Res:-FrmHous"></f:selectItem>
                                                        <f:selectItem
                                                            itemLabel="Residential :- Serviced Apartments"
                                                            itemValue="Res:-SerAprt"></f:selectItem>
                                                        <f:selectItem
                                                            itemLabel="Residential :- Residential Land/Plot"
                                                            itemValue="Res:-LndPot"></f:selectItem>
                                                        <f:selectItem itemLabel="Residential :- Bungalows/Villas"
                                                            itemValue="Res:-Villas"></f:selectItem>
                                                        <f:selectItem itemLabel="Residential :- Penthouses"
                                                            itemValue="Res:-Penthos"></f:selectItem>

                                                        <f:ajax event="change" render="text"></f:ajax>
                                                    </h:selectOneMenu>
                                                    <h:message class="hmsg" id="text" for="propertyCatagory" />
                                                </h:panelGroup>
                                            </h:panelGroup>
                                            <h:panelGroup layout="block" class="b-form-row" id="ddder"
                                                rendered="#{leadBean.buyerLeadTO.buyerLeadPropertyType eq 'Res:-Flat'}">
                                                <label class="b-form-vertical__label"
                                                    for="create_account_phone"><span
                                                    class="f-tooltip j-tooltip" data-toggle="tooltip"
                                                    data-placement="top" title="Mandatory">*</span> Bedrooms :
                                                </label>
                                                <h:panelGroup layout="block" class="b-form-vertical__input">
                                                    <h:selectOneMenu id="bedrooms" class="form-control"
                                                        value="#{leadBean.buyerLeadTO.buyerLeadBedRooms}"
                                                        required="true" requiredMessage="Bedrooms is Mandatory">
                                                        <f:selectItem itemLabel="Select One" />
                                                        <f:selectItem itemLabel="1" itemValue="1"></f:selectItem>
                                                        <f:selectItem itemLabel="2" itemValue="2"></f:selectItem>
                                                        <f:selectItem itemLabel="3" itemValue="3"></f:selectItem>
                                                        <f:selectItem itemLabel="4" itemValue="4"></f:selectItem>
                                                        <f:selectItem itemLabel="5" itemValue="5"></f:selectItem>
                                                        <f:selectItem itemLabel="6 or more" itemValue="6"></f:selectItem>
                                                    </h:selectOneMenu>
                                                    <h:message class="hmsg" for="bedrooms" />
                                                </h:panelGroup>
                                            </h:panelGroup>
                                            <h:panelGroup layout="block"
                                                class="b-form-horizontal__input">
                                                <p:commandButton style="padding: 12px 15px 0px;"
                                                    class="b-btn f-btn b-btn-md b-btn-default f-primary-b b-btn__w100"
                                                    value="Send Requirement" ajax="false"
                                                    actionListener="#{leadBean.sendBuyerDetails}"
                                                    update="@form"></p:commandButton>
                                            </h:panelGroup>
                                        </h:panelGroup>
                                    </h:panelGrid>
                                </h:form>
                            </h:panelGroup>
                        </h:panelGroup>
                    </h:panelGroup>
                </h:panelGroup>
            </h:panelGroup>
        </h:panelGroup>
    </h:panelGroup>
</h:panelGroup> </section>
<hr />
</h:body>

我搜索了很多但这些东西不起作用。 问题: - 如果我选择属性类别 - 任何3个项目 然后它应该渲染卧室<h:panelgroup>。最初卧室不应该在UI中显示,当我选择类别时,它应该自动渲染房间字段。所以请帮助我......

0 个答案:

没有答案