Solved

How to submit a page without submitting the values in JSF?

Posted on 2011-02-11
6
535 Views
Last Modified: 2013-11-24
I have a JSF application running on a Weblogic Server.

In a form, the user can enter some inputs and submits the page. He will be taken to a review screen, where the user can review the inputs he had entered in the previous page. In the review screen, there is an option to edit the inputs. On selecting the "Edit" button the user will be taken back to the input screen. If the user made some changes to the inputs but wishes to cancel the changes, he will be taken back to the review screen again.

In this case, I'm seeing the newly entered values being updated in the view object and the same is displayed on the review screen. How we can avoid updating the new value on canceling the changes in JSF?

Note: The edited values should be updated only on selecting the Submit button.


Any suggestions please...
0
Comment
Question by:Kadhiravan
  • 3
  • 3
6 Comments
 
LVL 20

Expert Comment

by:Sathish David Kumar N
Comment Utility
Take that values as request and put in ur  preview screen !!

eg ; I have enter the first name as sathish  and last name kumar the n you can submit the form and redirect to new page that page (review page)
<input type="text " name="firstName" value="${fName}"}
fName the values is u can set the value of the 1st page request !!
0
 

Assisted Solution

by:Kadhiravan
Kadhiravan earned 0 total points
Comment Utility
Can you please be more specific and explain me. I'm not getting your views on this.
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
Comment Utility
how your going to new page while submiting ?

JSp--->java class---->new JSP

JSP---->new Jsp
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Accepted Solution

by:
Kadhiravan earned 0 total points
Comment Utility
I have tried the following fix.

I have added immediate="true" to the Cancel button and it worked as expected for me.
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
Comment Utility
Gd work kadhiravan ..... vaazthukal
0
 

Author Closing Comment

by:Kadhiravan
Comment Utility
I myself have tried for various fixes and the mentioned simple code change helped me achieve the expected result.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now