Could it be that the modalwindow detaches your models when it closes? 
 
Den 3. des. 2010 kl. 15.22 skrev Poko Booth:

> Hmmm.. Turns out it's not the modal window the one causing the problem.
> The modal was activated by an ajaxsubmitlink and the page form had required
> components thus errors took place.
> I changed those links to ajaxlinks and the problem now appears only after
> the user submits the page form with "required" errors.
> Is this the normal behavior?
> 
> On Fri, Dec 3, 2010 at 4:12 PM, Poko Booth <poko.bo...@gmail.com> wrote:
> 
>> Nope...Just tried that, same result. I can't understand why
>> "components".modalChanged() fixes this problematic behavior... Why is the
>> modal window messing with the parent page's components model???
>> 
>> Thanx for the answer though, you were too fast, thought it would be it :)
>> 
>> 
>> On Fri, Dec 3, 2010 at 3:58 PM, Martin Makundi <
>> martin.maku...@koodaripalvelut.com> wrote:
>> 
>>> Maybe this:
>>> http://www.mail-archive.com/users@wicket.apache.org/msg35946.html
>>> 
>>> **
>>> Martin
>>> 
>>> 2010/12/3 Poko Booth <poko.bo...@gmail.com>:
>>>> Hi all, here's the case:
>>>> 
>>>> I have an object, let's say a, which has a member b which has two
>>> members:
>>>> owner and driver of same type.
>>>> In a page I have a checkbox which when being pressed, sets driver =
>>> owner
>>>> and the opposite and I have the components bellow:
>>>> 
>>>> TextField<String> ownerName with PropertyModel(a,"b.owner.firstname");
>>>> TextField<String> driverName with PropertyModel(a,"b.driver.firstname");
>>>> 
>>>> When the checkbox is pressed [true] the "driverName" component is
>>> disabled.
>>>> The checkbox has an ajax event behavior to do the job/rerendering of the
>>>> appropriate components.
>>>> So far so good.
>>>> 
>>>> I have a modal window in the page at another point and after I
>>> open/close it
>>>> [without messing with the "b" object at all] the checkbox's behiavior
>>>> becomes weird.
>>>> When the driverName is rerendered, it has no value. The driverName was
>>> one
>>>> of 20 components that need to be rerendered. Before openening the modal
>>>> window everything works fine, after I close it the inputs are being
>>> drawn
>>>> with empty strings instead of the real values.
>>>> *If I call "driverName.modelChanged()" in the checkbox's ajax event
>>> behavior
>>>> then everything goes as expected.
>>>> Why is that?*
>>>> 
>>>> 
>>>> Any ideas?
>>>> Thanx,
>>>> Poko
>>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> 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

Reply via email to