Я пытаюсь войти в систему с помощью jsf.
Я хочу скрыть панель входа, когда пользователь зарегистрирован.
Я сделал это с JSF AJAX.
Когда я пытаюсь сделать это с простыми лицами. Я потерпел неудачу.
Я трий в jsf ajax вот так.
<h:form id="register">
<table style="width: 49%; margin-right: auto; margin-left: auto;">
<tr>
<td colspan="3">
All fields are required.</td>
</tr>
<tr>
<td class="style2" style="height: 51px">Username</td>
<td style="width: 17px; height: 51px;">:</td>
<td class="style3" style="height: 51px"><h:inputText
id="regusername" style="width:155px;height:24px;"
value="#{userRegister.regUser.username}">
</h:inputText></td>
</tr>
<tr>
<td class="style2" style="height: 51px">Name</td>
<td style="width: 17px; height: 51px;">:</td>
<td class="style3" style="height: 51px"><h:inputText
id="regname" style="width:155px;height:24px;"
value="#{userRegister.regUser.name}">
</h:inputText></td>
</tr>
<tr>
<td class="style2" style="height: 51px">Mail</td>
<td style="width: 17px; height: 51px;">:</td>
<td class="style3" style="height: 51px"><h:inputText
id="regmail" style="width:155px;height:24px;"
value="#{userRegister.regUser.mail}">
</h:inputText></td>
</tr>
<tr>
<td class="style2" style="height: 51px">Password</td>
<td style="width: 17px; height: 51px;">:</td>
<td class="style3" style="height: 51px">
<h:inputSecret
id="regpassword" style="width:155px;height:24px;"
value="#{userRegister.regUser.password}">
</h:inputSecret></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td class="style3"><h:commandButton
style="width:76px;height:26px" value="Clear" type="reset">
</h:commandButton> <h:commandButton style="width:75px;height:26px"
value="Register" action="#{userRegister.register()}"
method="post">
<f:ajax execute="regname regusername regpassword regmail"
render="registermessage" />
</h:commandButton></td>
</tr>
<tr>
<td colspan="3"><h:outputText id="registermessage"
value="#{userRegister.message}"></h:outputText></td>
</tr>
</table>
</h:form>
</h:panelGroup>
<h:panelGroup rendered="#{userLogin.isLoggedin()== true}"
layout="block">
You are already loggedin !!
</h:panelGroup>
Когда я попробую это в таких простых лицах, как это:
<p:panel id ="registerPanel" header="User Registration" align="center"
style="text-align:center;">
<table style="width: auto; margin: auto;">
<tr>
<td style="text-align: right;"><h:outputLabel for="regname"
value="Name Surname : * " /></td>
<td style="text-align: left"><p:inputText id="regname"
value="#{userRegister.regUser.name}" size="40" required="true"
label="Name and Surname">
<f:validateLength minimum="2" />
</p:inputText> <p:watermark for="regname" value="Name Surname" /></td>
</tr>
<tr>
<td style="text-align: right" colspan="2"><p:message
for="regname" /></td>
</tr>
<tr>
<td style="text-align: right;"><h:outputLabel
for="regusername" value="Username : * " /></td>
<td style="text-align: left"><p:inputText id="regusername"
value="#{userRegister.regUser.username}" size="40"
required="true" label="Username">
<f:validateLength minimum="3" />
</p:inputText> <p:watermark for="regusername" value="Username" /></td>
</tr>
<tr>
<td style="text-align: riht" colspan="2"><p:message
for="regusername" /></td>
</tr>
<tr>
<td style="text-align: right;"><h:outputLabel for="regmail"
value="E-Mail : * " /></td>
<td style="text-align: left"><p:inputText id="regmail"
value="#{userRegister.regUser.mail}" size="40" required="true"
label="Mail">
<f:validateLength minimum="2" />
</p:inputText> <p:watermark for="regmail" value="mail@example.com" /></td>
</tr>
<tr>
<td style="text-align: right" colspan="2"><p:message
for="regmail" /></td>
</tr>
<tr>
<td style="text-align: right;"><h:outputLabel for="paswword"
value="Password : * " /></td>
<td style="text-align: left"><p:password id="regpassword"
value="#{userRegister.regUser.password}" size="40"
required="true" label="Password">
<f:validateLength minimum="5" />
</p:password> <p:watermark for="regpassword" value="Password" /></td>
</tr>
<tr>
<td style="text-align: left" colspan="2"><p:message
for="regpassword" /></td>
</tr>
<tr>
<td style="text-align: right" colspan="2">
</td>
</tr>
<tr>
<td style="text-align: right" colspan="2">
<p:commandButton value="Clear" image="ui-icon ui-icon-arrowrefresh-1-w"
type="reset"/>
<p:commandButton value="Register" image="ui-icon ui-icon-disk"
action="#{userRegister.register()}" method="post">
<f:ajax
render="registerpaneli" />
</p:commandButton>
</td>
</tr>
</table>
->
</h:panelGroup>
Я не могу скрыть панель регистрации.
В чем проблема?