Solved

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

Posted on 2011-02-11
6
537 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
ID: 34878677
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
ID: 34914703
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
ID: 34914737
how your going to new page while submiting ?

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

JSP---->new Jsp
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Accepted Solution

by:
Kadhiravan earned 0 total points
ID: 34973196
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
ID: 34973216
Gd work kadhiravan ..... vaazthukal
0
 

Author Closing Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
nested class vs inner class 5 57
noX challenge 17 91
wordlen challenge 3 60
servlet requestdispatcher include and forward differences 1 22
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 second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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.

932 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

10 Experts available now in Live!

Get 1:1 Help Now