Hi Patrick,
sorry for the confusion.
>Does this objection have any consequences for my implementation?
Wicket validates all values *before* they are written into the models.
So validators always validate the converted input only.
You have the following options:
- IValidator, validates the
Hi Sven,
> Yes, the converted values haven't been written yet.
Does this objection have any consequences for my implementation?
For me, it semms it is working now... so I think, there is no need to me
to additionally override
> @Override
> public void validate() {
>//
Hi all,
I would like to implement some kind of modular form components.
So, a developer is able stick together a form to save e.g. person data
and adress data with different panels containing the particular needed
input fields (textfield, selectboxes etc).
Form f = new Form(...);
f.add(new
Hi,
> Is it a good idea to implement such a case extending
FormComponentPanel, or is FormComponentPanel for other purposes?
usuallly a FormComponentPanel is used when you want to combine the input
of several formComponents into a single model object, e.g.
MultiFileUploadField and
Hi Sven,
thanx for your code-snippet.
Sometimes it is so easy...
Works perfect!
kind regards
Patrick
Am 12.02.2016 um 12:08 schrieb Sven Meier:
Hi,
> Is it a good idea to implement such a case extending
FormComponentPanel, or is FormComponentPanel for other purposes?
usuallly a
Hi Sven,
On Fri, Feb 12, 2016 at 12:08 PM, Sven Meier wrote:
> Hi,
>
> > Is it a good idea to implement such a case extending FormComponentPanel,
> or is FormComponentPanel for other purposes?
>
> usuallly a FormComponentPanel is used when you want to combine the input
> of
Hi again,
now I see what you meant:
Yes, the converted values haven't been written yet.
I was writing my example off the top of my head :). Validators won't
help here, you'll have to do validation by hand instead:
PersonPanel extends FormComponentPanel {
@Override
protected void
Hi Martin,
>The modelObject should be the one before the form submit,
it should be the same one which all nested formComponents are changing.
I can't think of a case where this shouldn't hold.
>Because Form#updateModels() is called after the conversion and
validations.
>By calling the line
Hi,
I don't remember the last time I needed to write custom FCP so I don't
really understand how/why these code snippets would work the way you
explain.
I'll fire the debugger to see why they behave differently than the other
form components in the form submit processing.
Thanks!
On Feb 13, 2016
FWIW, for FormComponentPanels I often have an empty implementation
of updateModel() and either have a wrapper method to add validators
for those (abstract) sub-component, or redefine convertInput() to
construct a proper object from
nestedFormComponent.getConvertedInput() to make validators work on
10 matches
Mail list logo