> Am 23.01.2015 um 21:24 schrieb Entropy <blmulholl...@gmail.com>: > > We have a page where the client has made some odd demands for behavior and I > need to know if they are possible and if so, how one would do them. > > The basic gist is that the user is filling out alot of data and may not know > it all right away. So they can enter the record in a sort of "scratch" way, > leaving fields blank initially. But, if they enter something, we will apply > full validation. > > However, we want to tell the user that the field is required...but save it > anyway. So imagine the user fills out 50% of the fields, sees errors on > blur for format failures, then hits save. The form puts yellow warning > messages on the component feedback panel instead of red error messages > saying "Field required" or whatever. > > But, on the server, as long as all the red validations (the formats) are > satisfied, we still want to save the record so that the user can come back > and fill the rest later. > > There are several things I don't know how to do here: > 1) How do I add a different css class to a warning message as opposed to a n > error. Just one way would be that you could use behaviors and add them to your form components and output a message in the style you want. http://wicket.apache.org/guide/guide/advanced.html > 2) How do I get control if only warnings are issued so I can save. There is a validate method you can override for your requirements (see custom validations) http://wicket.apache.org/guide/guide/forms2.html > 3) I still want to show a message up top in the message panel that alerts > them to look at their controls for warnings/error. > Use the FeebackPanel for this you can add it to the Form: org.apache.wicket.markup.html.panel.FeedbackPanel > > Help? > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Wierd-Validation-tp4669105.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org
Hope this helps you out. kind regards Tobias