What we do is to wrap the checkbox in an AnySubmit. And then when checked a submit happens and the field is then displayed with whatever mark-up is required. If the user attempts to leave the screen standard edits tell them they need to provide a value. If they uncheck the box, the field goes away. Basically, it is done via a Conditional or Choose Component.
hth, Mark -----Original Message----- From: Ryan Cuprak [mailto:[EMAIL PROTECTED] Sent: Fri 6/2/2006 12:38 PM To: [email protected] Subject: Custom component validation - two fields Hello, We are trying to implement a rather simple custom form component for a search page and perform validation on it. The custom component has a checkbox and a text field. If the checkbox is checked then a value must be provided in the text field. If not, the field must be decorated and a message displayed at the top of the form (tie in with the delegate etc). What is the recommended approach for implementing such component validation? Must we extend AbstractFormComponent and implement the renderFormComponent or is there a simpler approach? Is there a hybrid AbstractFormComponent/BaseComponent we have missed somehow? Thanks! Ryan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
