You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Joseph Pachod <jp...@thomas-daily.de> on 2010/11/25 14:07:20 UTC
nested form in FormComponentPanel validation issue
Hi
I've an AddressEdit which is a FormComponentPanel
The addressEdit is composed of two parts: a structured address and a
displayed text.
The displayed text can be generated from the structured address
(provided the structured address is valid, meaning it has all its field
apart from the "Additional address line" which is optional); through a
button.
When submiting the form with the AddressEdit, it then tries to compose
itself based on :
- the structured address (with some validation rules, like either it's
null either it's valid, done through a FormValidator)
- the displayed text (always required)
Currently, due to the need of having to generate the displayed text from
the structured address, the structured address part is put in a (nested)
form.
As such, I run into this issue: convertInput of AddressEdit is called
before the nested form is validated and has converted its own input
I tried various workaround, but none was good enough to my taste.
What would you suggest ?
++
--
Joseph Pachod
IT
THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T + 49 761 3 85 59 506
F + 49 761 3 85 59 550
E joseph.pachod@thomas-daily.de
www.thomas-daily.de
Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947
Registrieren Sie sich unter https://www.thomas-daily.de/user/sign-in für die TD Morning News, eine kostenlose Auswahl aktueller Themen aus TD Premium, morgens ab 9:15 in Ihrer Mailbox.
Aktuelle Presseinformationen für die TD Morning News und TD Premium nimmt unsere Redaktion unter redaktion@thomas-daily.de entgegen.
Redaktionsschluss für die TD Morning News ist täglich um 8:45.
Register free of charge at https://www.thomas-daily.de/user/sign-in to have the TD Morning News, a selection of the latest topics from TD Premium, delivered to your mailbox from 9:15 every morning.
Our editorial department receives the latest press releases for the TD Morning News and TD Premium at redaktion@thomas-daily.de. The editorial deadline for the TD Morning News is 8.45am daily.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: nested form in FormComponentPanel validation issue
Posted by Joseph Pachod <jp...@thomas-daily.de>.
On 11/26/2010 05:41 PM, Igor Vaynberg wrote:
> quickstart, jira issue.
>
thanks, I wasn't sure about creating an issue
I will do then, but since I moved on (removing the nested form), so it
could take a little while (+ we are on 1.4.9, so maybe latest versions
are better there, no clue)
++
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: nested form in FormComponentPanel validation issue
Posted by Joseph Pachod <jp...@thomas-daily.de>.
On 12/05/2010 09:21 AM, Igor Vaynberg wrote:
> the problem is in DecoratedEdit classs, the tmp variable is not
> updated with converted input of the inner textfield, so
> composeConvertedInput() incorrectly returns null when it should return
> the converted input of the inner text component.
>
hi igor
thanks a lot
actually that was an error I made. Our original TextFieldEdit didn't
have this issue.
Yet, since it's proper again, I don't manage to reproduce the issue
anymore... So I'm digging in again...
thanks
best
joseph
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: nested form in FormComponentPanel validation issue
Posted by Igor Vaynberg <ig...@gmail.com>.
the problem is in DecoratedEdit classs, the tmp variable is not
updated with converted input of the inner textfield, so
composeConvertedInput() incorrectly returns null when it should return
the converted input of the inner text component.
-igor
On Thu, Dec 2, 2010 at 2:18 AM, Joseph Pachod <jp...@thomas-daily.de> wrote:
> On 11/26/2010 05:41 PM, Igor Vaynberg wrote:
>>
>> quickstart, jira issue.
>>
>> -igor
>
> hi igor
>
> I've created a quickstart for it (cf attachement)
>
> however, it may be linked to self made DecoratedEdit/TextFieldEdit classes
> (cf attachement again).
>
> As such, I'm not sure if it's a wicket bug or not, so I prefered not to
> create an issue for it. Let me know if I should.
>
> Anyway, when you run the quick start, you will have a form. If you input
> something in its structured part, you'll need to do 2 submits on the "ok"
> for the structured part content to be taken in account (there's a display of
> the backing bean on each submit, so it's easy to spot).
>
> thanks again
>
> best
> joseph
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: nested form in FormComponentPanel validation issue
Posted by Joseph Pachod <jp...@thomas-daily.de>.
On 11/26/2010 05:41 PM, Igor Vaynberg wrote:
> quickstart, jira issue.
>
> -igor
hi igor
I've created a quickstart for it (cf attachement)
however, it may be linked to self made DecoratedEdit/TextFieldEdit
classes (cf attachement again).
As such, I'm not sure if it's a wicket bug or not, so I prefered not to
create an issue for it. Let me know if I should.
Anyway, when you run the quick start, you will have a form. If you input
something in its structured part, you'll need to do 2 submits on the
"ok" for the structured part content to be taken in account (there's a
display of the backing bean on each submit, so it's easy to spot).
thanks again
best
joseph
Re: nested form in FormComponentPanel validation issue
Posted by Igor Vaynberg <ig...@gmail.com>.
quickstart, jira issue.
-igor
On Fri, Nov 26, 2010 at 2:52 AM, Joseph Pachod <jp...@thomas-daily.de> wrote:
> On 11/25/2010 08:26 PM, Igor Vaynberg wrote:
>>
>> addressedit should be composing itself in its convertinput() method
>> based on the converted input of the subcomponents.
>>
>
> thanks igor
>
> it did so but the nested form was validating after the FormComponentPanel,
> so the converted inputs of the nested form components were all null...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: nested form in FormComponentPanel validation issue
Posted by Joseph Pachod <jp...@thomas-daily.de>.
On 11/25/2010 08:26 PM, Igor Vaynberg wrote:
> addressedit should be composing itself in its convertinput() method
> based on the converted input of the subcomponents.
>
thanks igor
it did so but the nested form was validating after the
FormComponentPanel, so the converted inputs of the nested form
components were all null...
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: nested form in FormComponentPanel validation issue
Posted by Igor Vaynberg <ig...@gmail.com>.
addressedit should be composing itself in its convertinput() method
based on the converted input of the subcomponents.
-igor
On Thu, Nov 25, 2010 at 5:07 AM, Joseph Pachod <jp...@thomas-daily.de> wrote:
> Hi
>
> I've an AddressEdit which is a FormComponentPanel
>
> The addressEdit is composed of two parts: a structured address and a
> displayed text.
>
> The displayed text can be generated from the structured address (provided
> the structured address is valid, meaning it has all its field apart from the
> "Additional address line" which is optional); through a button.
>
> When submiting the form with the AddressEdit, it then tries to compose
> itself based on :
> - the structured address (with some validation rules, like either it's null
> either it's valid, done through a FormValidator)
> - the displayed text (always required)
>
> Currently, due to the need of having to generate the displayed text from the
> structured address, the structured address part is put in a (nested) form.
>
> As such, I run into this issue: convertInput of AddressEdit is called before
> the nested form is validated and has converted its own input
>
> I tried various workaround, but none was good enough to my taste.
>
> What would you suggest ?
>
> ++
>
> --
> Joseph Pachod
> IT
>
> THOMAS DAILY GmbH
> Adlerstraße 19
> 79098 Freiburg
> Deutschland
> T + 49 761 3 85 59 506
> F + 49 761 3 85 59 550
> E joseph.pachod@thomas-daily.de
> www.thomas-daily.de
>
> Geschäftsführer/Managing Directors:
> Wendy Thomas, Susanne Larbig
> Handelsregister Freiburg i.Br., HRB 3947
>
> Registrieren Sie sich unter https://www.thomas-daily.de/user/sign-in für die
> TD Morning News, eine kostenlose Auswahl aktueller Themen aus TD Premium,
> morgens ab 9:15 in Ihrer Mailbox.
>
> Aktuelle Presseinformationen für die TD Morning News und TD Premium nimmt
> unsere Redaktion unter redaktion@thomas-daily.de entgegen.
> Redaktionsschluss für die TD Morning News ist täglich um 8:45.
>
> Register free of charge at https://www.thomas-daily.de/user/sign-in to have
> the TD Morning News, a selection of the latest topics from TD Premium,
> delivered to your mailbox from 9:15 every morning.
>
> Our editorial department receives the latest press releases for the TD
> Morning News and TD Premium at redaktion@thomas-daily.de. The editorial
> deadline for the TD Morning News is 8.45am daily.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org