[jboss-user] [JBoss Seam] - How to postpone validation?

toni do-not-reply at jboss.com
Thu Jan 25 07:57:09 EST 2007


I'm trying to set the values of an enity bean of which one value has to be chosen/set from a different page. The user gets to the page by clicking on a link whose link text displays the current value. The link is contained inside the same form, which contains the other input fields and the save button to persist the entiy.

The problem I ran into is that all the other values get validated, when the user clicks on the link. The result is that the current page is redisplayed with error messages showing on the invalid input fields.

Instead, I would like the user to be able to fill out the form of which some values are constrained (ie have to be valid). Then the user may click on the link to setup this special value, without his current input being validated and thereby lost, even if it's partly invalid.

After picking the special value from the other page he gets sent back to page from which he came and should see (as mentioned above) all the other values of which some may be invalid.

The page should only be redisplayed, if the user entered invalid input AND clicks on the Save button to persist the entity. Otherwise he should be forwarded to the page to set the special value an the current input should be displayed, after he is done.

I tried to set immediate="true" on the the link, which one has to click to setup this one special value. If I do so, then the user can proceed to the other page, but all the values which the user had entered previously are lost, when the original page is redisplayed.

I haven't figured out how to do this. Is it possible at all?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4006325#4006325

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4006325

More information about the jboss-user mailing list