Win a copy of Spark in Action this week in the Open Source Projects forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JSF Page Navigation Problem

 
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...


 
Saloon Keeper
Posts: 22243
151
Android Eclipse IDE Tomcat Server Redhat Java 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic