-
1. Re: Update s:decorate's 'invalid' form attr on AJAX update
jeremygood Apr 1, 2009 7:59 PM (in response to vk101)Interesting, this is exactly the reverse of what I am trying to figure out. I want to know why the #{invalid} context variable does not get set when ajax validation finds an error.
Using <a4j:support> and an <a4j:outputPanel>, I am able to get error messages to print out when a field loses focus, but I have an error.gif image that does not show up until the form is submitted. The error image has rendered="#{invalid}". Also, the name of the field should turn red, which it does on form submit, but not when the field loses focus. Again, this is triggered by the "#{invalid}" context variable.
So, it would appear that the "#{invalid}" context variable does NOT get set by the ajax field validator.
Any thoughts? -
2. Re: Update s:decorate's 'invalid' form attr on AJAX update
wvreeven Jul 13, 2009 4:11 PM (in response to vk101)Hi Kris (Veer?),
We are running into a similar issue as you. Did you ever resolve this? FYI I am trying to resolve this next situation:
We have a form that is populated with data from an entity instance. If our Save button is clicked some fields get validated. If they are invalid, they appear highlighted and a message is displayed stating what's wrong. If we then fill the form with data from another Entity (by selecting another node in a tree) only the invalid fields get rerendered. I'd like to know how to also reset the other fields. Perhaps your solution may be of help to me.
Thanks, Wouter
-
3. Re: Update s:decorate's 'invalid' form attr on AJAX update
wvreeven Jul 14, 2009 2:36 PM (in response to vk101)Took me a while but I found a solution. Posting it here so others may benefit from it as well. This MyFaces page
http://wiki.apache.org/myfaces/ClearInputComponents
gives info on how to clear forms and inputs. We are using the getChildren().clear() method now.
Thanks, Wouter