Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

[jboss-user] [JBoss Seam] - Re: Seam complained about Identity

scott.stark@jboss.org

2007-05-03


I am using Seam 1.2.1GA with JBoss AS 4.0.5GA, JSF 1.2. The project was generated with seam-gen.

Here is a snippet of my login.xhtml page:
<div>
|  <label jsfc="h:outputLabel" for="loginID">#{res['login.loginId.label']}</label>
|  <input jsfc="h:inputText" type="text" name="loginID" id="loginID"
|        value="#{identity.username}" />
| </div>
| <br />
| <div>
|  <label jsfc="h:outputLabel" for="password">#{res['login.password.label']}</label>
|  <input jsfc="h:inputSecret" type="password" name="password"
|        id="password" value="#{identity.password}" />
| </div>
| <div id="logonBtn" class="button">
|  <b><a href="#" jsfc="h:commandLink" action="#{identity.login}" title="#{res['login.loginBtn.title']}">#{res['login.loginBtn.label']}</a></b>
| </div>

And here is a snippet of pages.xml:
<!-- Once logged in, if user wants to go to the login page, redirect to pending orders -->
| <page view-id="/login.xhtml" action="#{authenticator.checkIfLogedIn}">
|      <navigation from-action="#{authenticator.checkIfLogedIn}">
|         <rule if="#{identity.loggedIn}">
|           <redirect view-id="/pending_orders.xhtml"/>
|         </rule>
|      </navigation>
|      <navigation from-action="#{identity.login}">
|         <rule if="#{identity.loggedIn}">
|           <redirect view-id="/pending_orders.xhtml"/>
|         </rule>
|      </navigation>
| </page>
|  
| <!-- Upon successful login, redirect to pending orders page -->
| <page view-id="/login.xhtml">
|      <navigation from-action="#{identity.login}">
|         <rule if-outcome="success">
|           <redirect view-id="/pending_orders.xhtml"/>
|         </rule>
|      </navigation>
| </page>
|
| <!-- After logged out, redisplay the login page -->
| <page view-id="*">
|      <navigation from-action="#{identity.logout}">
|         <redirect view-id="/login.xhtml"/>
|      </navigation>
| </page>
|

I know it's very verbose. Sorry about that and thanks for your help.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042861#4042861

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042861
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.