Solved

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

Posted on 2011-02-11
6
539 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

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
github account with ecipse 1 53
replace a word with other 1 45
ejb example issues 3 28
java imports not found 4 30
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
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.

828 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