Quantcast

Component#setDefaultModel() doesn't call modelChanging()

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Component#setDefaultModel() doesn't call modelChanging()

Martin Grigorov-4
Hi,

Is there a reason why org.apache.wicket.Component#setDefaultModel()
doesn't call modelChanging() at the top of its body ?
It calls modelChanged() at the bottom.

org.apache.wicket.Component#setDefaultModelObject() calls them both,
as I'd expect.

I'm asking this because org.apache.wicket.Component#modelChanging()
the important one, it makes the page dirty.

--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Component#setDefaultModel() doesn't call modelChanging()

Igor Vaynberg-2
im not sure why it doesnt call onmodelchanging(). it should, looks
like a bug. but it does make the page dirty by calling
addStateChange().

-igor

On Wed, Mar 28, 2012 at 4:04 AM, Martin Grigorov <[hidden email]> wrote:

> Hi,
>
> Is there a reason why org.apache.wicket.Component#setDefaultModel()
> doesn't call modelChanging() at the top of its body ?
> It calls modelChanged() at the bottom.
>
> org.apache.wicket.Component#setDefaultModelObject() calls them both,
> as I'd expect.
>
> I'm asking this because org.apache.wicket.Component#modelChanging()
> the important one, it makes the page dirty.
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Component#setDefaultModel() doesn't call modelChanging()

Martin Grigorov-4
On Wed, Mar 28, 2012 at 5:41 PM, Igor Vaynberg <[hidden email]> wrote:
> im not sure why it doesnt call onmodelchanging(). it should, looks
> like a bug. but it does make the page dirty by calling
> addStateChange().

Correct. I guess this is the reason to work so far without modelChanging().

>
> -igor
>
> On Wed, Mar 28, 2012 at 4:04 AM, Martin Grigorov <[hidden email]> wrote:
>> Hi,
>>
>> Is there a reason why org.apache.wicket.Component#setDefaultModel()
>> doesn't call modelChanging() at the top of its body ?
>> It calls modelChanged() at the bottom.
>>
>> org.apache.wicket.Component#setDefaultModelObject() calls them both,
>> as I'd expect.
>>
>> I'm asking this because org.apache.wicket.Component#modelChanging()
>> the important one, it makes the page dirty.
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com



--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
Loading...