-
1. Re: How to postpone validation?
gavin.king Jan 25, 2007 12:52 PM (in response to toni)Use s:validate on particular fields, instead of s:validateAll.
-
2. Re: How to postpone validation?
toni Jan 25, 2007 4:22 PM (in response to toni)I tried it, but it does not make to seem a difference. And why would it?
The fields which do not have any validation annotations aren't validated anyway.
And the once which do should be validated, but only after the user clicked on the "Save" button.
However, validation occurs always when he clicks the link. Do avoid this the only option is to use immediate="true", but then I loose the user's input.
No matter if it's valid or invalid.
Any other suggestions? -
3. Re: How to postpone validation?
norman.richards Jan 25, 2007 5:05 PM (in response to toni)If you can design your interaction so that you only use one view, then JSF will preserve your unvalidated/unconverted form data. I believe it only discards the data when you write to another view. If you think about it, it kind of makes sense. Where is it supposed to store that unconverted/unvalidated string data? Unless your model only uses raw string values, there's no place for the data there. If you also discard your view, that data is lost.
-
4. Re: How to postpone validation?
gavin.king Jan 25, 2007 5:38 PM (in response to toni)Oh, I misunderstood. Norman is right.
-
5. Re: How to postpone validation?
toni Jan 26, 2007 4:16 AM (in response to toni)Ok, thats a solution.
The thing is that I use the page several times and I don't want copy and paste the code. That's why I made a second page.
But you actually got me on something. Maybe I could just inherit from that class, which sets the special value?