Re: Frozen error form object

2009-01-28 Thread Anton Veretennikov
It works! Thank you.

On Wed, Jan 28, 2009 at 2:38 PM, Igor Vaynberg  wrote:
> you need to wire your events. listpanel can have an abstract onclicked();
> editpanel can have a method called inputchanged() which calls 
> form.clearinput()
> your listpanel can then look like this:
>
> add(new listpanel() { onclicked() { editpanel.inputchanged(); }}):
>
> that way everything is still nicely encapsulated, but accessible.
>
> -igor
>
> On Tue, Jan 27, 2009 at 11:35 PM, Anton Veretennikov
>  wrote:
>> Thank you very much, Igor
>>
>> This really works.
>> I think that it will be nice not to keep reference to a form by the way.
>> So I tried to make override of onBeforeRender() but...
>>
>> Seems that getModelObject() every time returns just clicked object not
>> the one "editing-continued".
>> Is there any method to know it? The problem will be solved clearly.
>>
>> Tony
>>
>>
>>
>> On Wed, Jan 28, 2009 at 1:27 PM, Igor Vaynberg  
>> wrote:
>>> if the form is in invalid state and you want to reuse the same
>>> instance of it you have to call Form#clearInput()
>>>
>>> -igor
>>>
>>> On Tue, Jan 27, 2009 at 8:06 PM, Anton Veretennikov
>>>  wrote:
 I'm still with this problem... and created Test App for this.

 When required field is empty and error message is shown, pressing on
 other links does not change the form.

 Please, help me, I'm stuck here.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org

>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Frozen error form object

2009-01-27 Thread Igor Vaynberg
you need to wire your events. listpanel can have an abstract onclicked();
editpanel can have a method called inputchanged() which calls form.clearinput()
your listpanel can then look like this:

add(new listpanel() { onclicked() { editpanel.inputchanged(); }}):

that way everything is still nicely encapsulated, but accessible.

-igor

On Tue, Jan 27, 2009 at 11:35 PM, Anton Veretennikov
 wrote:
> Thank you very much, Igor
>
> This really works.
> I think that it will be nice not to keep reference to a form by the way.
> So I tried to make override of onBeforeRender() but...
>
> Seems that getModelObject() every time returns just clicked object not
> the one "editing-continued".
> Is there any method to know it? The problem will be solved clearly.
>
> Tony
>
>
>
> On Wed, Jan 28, 2009 at 1:27 PM, Igor Vaynberg  
> wrote:
>> if the form is in invalid state and you want to reuse the same
>> instance of it you have to call Form#clearInput()
>>
>> -igor
>>
>> On Tue, Jan 27, 2009 at 8:06 PM, Anton Veretennikov
>>  wrote:
>>> I'm still with this problem... and created Test App for this.
>>>
>>> When required field is empty and error message is shown, pressing on
>>> other links does not change the form.
>>>
>>> Please, help me, I'm stuck here.
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Frozen error form object

2009-01-27 Thread Anton Veretennikov
Thank you very much, Igor

This really works.
I think that it will be nice not to keep reference to a form by the way.
So I tried to make override of onBeforeRender() but...

Seems that getModelObject() every time returns just clicked object not
the one "editing-continued".
Is there any method to know it? The problem will be solved clearly.

Tony



On Wed, Jan 28, 2009 at 1:27 PM, Igor Vaynberg  wrote:
> if the form is in invalid state and you want to reuse the same
> instance of it you have to call Form#clearInput()
>
> -igor
>
> On Tue, Jan 27, 2009 at 8:06 PM, Anton Veretennikov
>  wrote:
>> I'm still with this problem... and created Test App for this.
>>
>> When required field is empty and error message is shown, pressing on
>> other links does not change the form.
>>
>> Please, help me, I'm stuck here.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Frozen error form object

2009-01-27 Thread Igor Vaynberg
if the form is in invalid state and you want to reuse the same
instance of it you have to call Form#clearInput()

-igor

On Tue, Jan 27, 2009 at 8:06 PM, Anton Veretennikov
 wrote:
> I'm still with this problem... and created Test App for this.
>
> When required field is empty and error message is shown, pressing on
> other links does not change the form.
>
> Please, help me, I'm stuck here.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Frozen error form object

2009-01-26 Thread Anton Veretennikov
Hello, all wicket users and developers!

Wicket is 1-4-SNAPSHOT (not revision 737998, it is not compiling for
test failures).

I have a simple form for GoodPrice object edit.
List of objects have a link that sets PanelModel.goodPrice to
currently editing object.

This is how I create my form with compound model:

Form form = new Form("edit", new CompoundPropertyModel(
  new PropertyModel(panelModel, "goodPrice")));

Everything works okey until I have form submit error. If I leave my
error form (don't want to continue editing) then model
is "frozen" with that error object. New selections from list of
objects update model but form continues to work with error object.

What it can be?

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org