Here are some code snippets.
When clicking on a tree node I validate the form..
If no errors I update the form component models.
The class MyMutableTreeNode extends DefaultMutableTreeNode.
Each node references an own panel component.
getNodeEntryDetail() returns the panel referenced by the node.
at which point are you pretending to call validate, what logic fires
it? see no code
if defaultFormProcessing is true (default) on submitting components,
then all validation and form updating is executed automatically.
On Tue, Oct 18, 2011 at 8:52 AM, rawe ralph.wey...@dachser.com wrote:
Here
Yes, I'm using the form default setting (DefaultFormProcessing = true).
But for form processing you have to use a submit button or a SubmitLink or
you can call the form validate() method programmatic.
See also Wicket API Doc of Form: (
See also Wicket API Doc of Form: (
http://wicket.apache.org/apidocs/1.4/org/apache/wicket/markup/html/form/Form.html
Wicket API Doc )
/If you want you can call validate() to execute form validation, hasError()
to find out whether validate() resulted in validation errors, and
Got it !
Thank you!
Ralph
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Validating-in-form-returns-always-error-but-textfield-has-a-value-tp3912361p3914841.html
Sent from the Users forum mailing list archive at Nabble.com.
I'm using a LinkTree and to each node a panel is referenced.
Both is embedded in a form component.
The panels have textfields.
When using a submit button or a SubmitLink the input of the
textfields is valid and then also validation is valid.
But:
My intension is also to validate the form each
is the form submitted each time a node is changed? if not, then it
could be normal you read nulls, as the values are still on browser,
but havent flown to server.
On Mon, Oct 17, 2011 at 5:11 PM, rawe ralph.wey...@dachser.com wrote:
I'm using a LinkTree and to each node a panel is referenced.
Yes, each time I change the node the form is submitted.
The textfields in the panel are initialized via PropertyModel and are set to
required.
When I want to change the node I call validate() but the rawInput of
textfields is null.
-- form.hasError() is always true, but there are values in the
may you provide a code shot for review?
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org