I need a understanding. Why did i find my self still on the same page when submitting some inputs in JSF file , have a look :
<!--<b>codes below belong to <i>page1.xhtml</i></b>-->
<h:form>
<table>
<tr>
<td>Name:</td>
<td><h:inputText value="#{user.name}"/></td>
</tr>
</table>
</h:form>
<p><h:commandButton value="Login" action="page2"/></p>
After pressing "Login" , it showed value of #{user.name}
from page2.xhtml
, but the link itself is still faces/page1.xhtml
, why not faces/page2.xhtml
? Could someone explain it to me ? does it mean that in JSF we access everything just from one page?
I try to make something like this :
<h:form action="page2.xhtml">
but then i realize there is no such "action" on "<h:form>"
tag