Jeszcze raz problem. Teraz już zupełnie nie rozumiem. Po kliknięciu run, raz wyświetla dobrze formularze, a raz nie. I tak na przemian.
Z tym, że zawsze w pliku z którego startuje jest ok, a w pliku do którego prowadzi link jest raz dobrze, a raz źle. Nie rozumiem.
Kod pliku startowego:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<title>#{msg.title}</title>
</h:head>
<h:body>
<div align="center">
<h:form>
<table>
<tr>
<td>#{msg.regName}</td>
<td><h:inputText value="#{admin.name}" /></td>
</tr>
<tr>
<td>#{msg.regPassword}</td>
<td><h:inputSecret value="#{admin.password}" /></td>
</tr>
</table>
<p><h:commandButton value="#{msg.logButton}" action="#{admin.verifyUser}"/></p>
</h:form>
<p><a href="registration.xhtml">#{msg.regButton}</a></p>
</div>
</h:body>
</html>
i kod pliku do którego przenosi link
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<title>#{msg.title}</title>
</h:head>
<h:body>
<div align="center">
<h:form>
<table>
<tr>
<td>#{msg.regName}</td>
<td><h:inputText value="#{reg.name}" /></td>
</tr>
<tr>
<td>#{msg.regPassword}</td>
<td><h:inputSecret value="#{reg.password}" /></td>
</tr>
<tr>
<td>#{msg.regRepeatPassword}</td>
<td><h:inputSecret value="#{reg.repeatPassword}" /></td>
</tr>
<tr>
<td>#{msg.regMail}</td>
<td><h:inputText value="#{reg.mail}" /></td>
</tr>
<tr>
<td><h:commandButton value="#{msg.regButton}" action="#{reg.regValidate}" /></td>
</tr>
</table>
</h:form>
</div>
</h:body>
</html>
I to w pliku registration, raz wyświetlają się poprawnie formularze, a raz wyświetla:
#{msg.regName}
#{msg.regPassword}
#{msg.regRepeatPassword}
#{msg.regMail}
Nie pierwszy raz mi się tak dzieje, wcześniej po prostu zapomniałem dodać h: przed znacznikami body i head, ale teraz są a problem dalej występuje.
Jakieś pomysły?