嗨根據我的要求有一個h:inputtext來查找用戶。如果找到用戶,則在相應的h:inputtext中填寫名字,姓氏和郵件。但是如果沒有發現inputtext應該被啓用並且可以填充新的細節。h:輸入文字啓用/禁用類
<h:inputText value="#{countryBean.usersDetailsDTO.eid}" id="eid" required="true" requiredMessage="Enter EID">
<f:ajax></f:ajax>
</h:inputText><h:message styleClass="msgStyle4" id="msgEid" for="eid"/>
</div>
<h:commandButton styleClass="search_btn" immediate="true">
<f:ajax listener="#{countryBean.getUserDetail}" render="empFName empLName empEmail" event="click" execute="@this" />
</h:commandButton>
<div class="clear"> </div>
<div class="form-field" style="margin-left:222px;">
first Name <h:inputText value="#{countryBean.usersDetailsDTO.firstName}" id="empFName" required="true" requiredMessage="Enter First Name">
<f:validator validatorId="nameValidation" />
</h:inputText><h:message styleClass="msgStyle4" id="msgfn" for="empFName"/>
</div>
<div class="clear"></div>
<div class="form-field" style="margin-left:10px;">
last name <h:inputText value="#{countryBean.usersDetailsDTO.lastName}" id="empLName" required="true" requiredMessage="Enter Last Name">
<f:validator validatorId="nameValidation" />
</h:inputText><h:message styleClass="msgStyle4" id="msgln" for="empLName"/>
</div><div class="clear"></div>
<div class="form-field" style="margin-left:10px;">
email<h:inputText value="#{countryBean.usersDetailsDTO.email}" id="empEmail" required="true" requiredMessage="Enter Email Address">
<f:validator validatorId="emailValidation" />
</h:inputText><h:message styleClass="msgStyle4" id="msgEmail" for="empEmail"/>
</div>
非常感謝你的工作正常,你救了我的命。再次非常感謝 –