Solved

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

Posted on 2011-02-11
6
538 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
wordcount challenge 11 123
servlet example 11 40
runtime exception 2 30
mysql jsp example issue 32 38
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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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.

831 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