Re: [Wicket-user] Cyclic parent/child relationship

2007-06-11 Thread Timo Rantalaiho
On Mon, 11 Jun 2007, James McLaughlin wrote:
> class MyBrainDamagedModel implements IModel
...
>   public Object getObject() {
>  return this;
>   }
> }
> 
> Turns out this an excellent way to exercise your cpu. I don't know if
> there is anything   wicket can do to prevent the hapless user the
> shame and frustration of falling into such a sandtrap. Maybe a note in

Yep, generic models, once that feature of the old 2.0 will be
resurrected in some more fortunate version.

- Timo

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Cyclic parent/child relationship

2007-06-11 Thread James McLaughlin
Speaking of sanity, awhile back, I was guilty of this fine piece of
brain damage:

class MyBrainDamagedModel implements IModel
{
   // some interesting members

  // some interesting methods

  public Object getObject() {
 return this;
  }
}

Turns out this an excellent way to exercise your cpu. I don't know if
there is anything   wicket can do to prevent the hapless user the
shame and frustration of falling into such a sandtrap. Maybe a note in
the javadoc. Maybe this message will be enough. Maybe such users
should not be allowed near wicket in the first place :).

best,
jim

On 6/11/07, Nart Seine <[EMAIL PROTECTED]> wrote:
> Yeah agreed. I was just wondering if a sanity check is needed at that point
> in the code.
> Thanks.
>
>
> On 6/11/07, Alex Objelean < [EMAIL PROTECTED]> wrote:
> >
> > You just have to respect the hierarchy you have defined in the markup.
> >
> >
> > Nart Seine wrote:
> > >
> > > Hello,
> > >
> > > I made an innocent programming error that day by adding a Form as a
> child
> > > component of a TextField thats already the child of the Form. In that
> > > case,
> > > execution gets stuck in an infinite loop in Component.findParent(final
> > > Class
> > > c). I still am only scratching the surface of wicket, but are there any
> > > cases when two component can be parents of each other, as in, is this
> the
> > > case with some component types? Could a check be added in the code to
> > > prevent adding a component, if the component being added is already the
> > > parent of 'this' component? Or should I just ensure I have enough
> caffeine
> > > in my system before I start putting together component hierarchies ? :)
> > >
> > > Thanks
> > >
> > >
> -
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > ___
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> > >
> >
> > --
> > View this message in context:
> http://www.nabble.com/Cyclic-parent-child-relationship-tf3900804.html#a11058487
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> >
> -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Cyclic parent/child relationship

2007-06-11 Thread Eelco Hillenius
On 6/11/07, Nart Seine <[EMAIL PROTECTED]> wrote:
> Yeah agreed. I was just wondering if a sanity check is needed at that point
> in the code.
> Thanks.

It would be possible to build this in, but it would come at the price
of increased processing overhead. Tbh, I'm not sure if the problem is
common enough to justify this.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Cyclic parent/child relationship

2007-06-11 Thread Nart Seine

Yeah agreed. I was just wondering if a sanity check is needed at that point
in the code.
Thanks.

On 6/11/07, Alex Objelean <[EMAIL PROTECTED]> wrote:



You just have to respect the hierarchy you have defined in the markup.


Nart Seine wrote:
>
> Hello,
>
> I made an innocent programming error that day by adding a Form as a
child
> component of a TextField thats already the child of the Form. In that
> case,
> execution gets stuck in an infinite loop in Component.findParent(final
> Class
> c). I still am only scratching the surface of wicket, but are there any
> cases when two component can be parents of each other, as in, is this
the
> case with some component types? Could a check be added in the code to
> prevent adding a component, if the component being added is already the
> parent of 'this' component? Or should I just ensure I have enough
caffeine
> in my system before I start putting together component hierarchies ? :)
>
> Thanks
>
>
-
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

--
View this message in context:
http://www.nabble.com/Cyclic-parent-child-relationship-tf3900804.html#a11058487
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Cyclic parent/child relationship

2007-06-11 Thread Alex Objelean

You just have to respect the hierarchy you have defined in the markup.


Nart Seine wrote:
> 
> Hello,
> 
> I made an innocent programming error that day by adding a Form as a child
> component of a TextField thats already the child of the Form. In that
> case,
> execution gets stuck in an infinite loop in Component.findParent(final
> Class
> c). I still am only scratching the surface of wicket, but are there any
> cases when two component can be parents of each other, as in, is this the
> case with some component types? Could a check be added in the code to
> prevent adding a component, if the component being added is already the
> parent of 'this' component? Or should I just ensure I have enough caffeine
> in my system before I start putting together component hierarchies ? :)
> 
> Thanks
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Cyclic-parent-child-relationship-tf3900804.html#a11058487
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user