This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF Page Navigation Problem

 
A Dev
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a problem in Page Navigation.

I have 4 pages... login page, forgotpassword page, reset password page and main page(After login,it should go to main page). All are JSP pages.

I am using rave commands:

In Login Page:

two buttons(Login and Forgot password)
one Text field(Username)
one password field(Password)
one Panel grid(to maintain Allignment)
one message(to generate error message)

In forgot password page:

Two Text fields(Username and Email id)
one button(Reset password button)
one Panel grid(to maintain Allignment)
one message(to generate error message)

In reset password page:

Two Text fields(newpassword and confirm password)
one button(submit password button)
one Panel grid(to maintain Allignment)
one message(to generate error message)

1) In forgot password page, After validating username and Email id I should be able to enter Reset password page.
2) In Login page, After clicking on forgot password button i should be able to enter forgotpassword page.

After clicking on forgot password button in login page i am able to enter forgot password page.
But, After clicking on reset password button in forgot password page, I am unable to enter reset password page.

Navigation rules are properly set...
Managed beans are properly set...

The code is :

Reset password Button:

public String buttonResetPassword_action() {
UserDetails userDetails = getXBean().getUserDetails();
UserInfo userInfo = XDataHelper.getInstance().getUserInfo(userDetails);
if(userInfo.getIsUserValid()) {
return "forgotSuccess";
}
error(message1,"Invalid User Id and Email Combination");
return "failure";
}

Navigation rules:

navigation-rule>
<from-view-id>/forgotPasswordPage.jsp</from-view-id>
<navigation-case>
<from-outcome>forgotSuccess</from-outcome>
<to-view-id>/resetPasswordPage.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>failure</from-outcome>
<to-view-id>/forgotPasswordPage.jsp</to-view-id>
</navigation-case>

Managed Bean

<managed-bean>
<managed-bean-name>forgotPasswordPage</managed-bean-name>
<managed-bean-class>com.Y.X.forgotPasswordPage</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>


Please help me as soon as possible...


 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aravind,

There's a "Code" button on your message editor. You can use it to wrap Java code, XML, and other formatted text and make it easier to read.


Navigation is done to view IDs, not files, so unless you have your URL mapping in web.xml done in an unconventional way, the IDs you're coding in the "to-view-id" elements are incorrect.

Beyond that, I'll just make my standard observation that a webapp that contains its own login code is a website that can be hacked.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic