atom feed216 messages in org.apache.wicket.usersRe: Free wicket from component hierar...
FromSent OnAttachments
3 earlier messages
Martin MakundiNov 4, 2010 3:08 pm 
Martin MakundiNov 4, 2010 3:13 pm 
Jeremy ThomersonNov 4, 2010 9:56 pm 
Martin MakundiNov 4, 2010 10:59 pm 
Martin MakundiNov 4, 2010 11:46 pm 
Michał LetyńskiNov 5, 2010 12:52 am 
Martin MakundiNov 5, 2010 1:07 am 
Martin GrigorovNov 5, 2010 1:12 am 
Martin MakundiNov 5, 2010 1:15 am 
Martin GrigorovNov 5, 2010 1:20 am 
Marc Nuri San FélixNov 5, 2010 1:22 am 
Martin MakundiNov 5, 2010 1:28 am 
Martin MakundiNov 5, 2010 1:31 am 
Martin GrigorovNov 5, 2010 1:34 am 
Martin GrigorovNov 5, 2010 1:36 am 
Martin MakundiNov 5, 2010 1:37 am 
Martin MakundiNov 5, 2010 1:38 am 
Martin MakundiNov 5, 2010 1:40 am 
Leszek GawronNov 5, 2010 5:36 am 
James CarmanNov 5, 2010 5:39 am 
Martin MakundiNov 5, 2010 5:47 am 
Igor VaynbergNov 5, 2010 9:55 am 
Jeremy ThomersonNov 5, 2010 10:00 am 
Martin MakundiNov 5, 2010 10:23 am 
Igor VaynbergNov 5, 2010 11:19 am 
Martin MakundiNov 5, 2010 11:39 am 
Eelco HilleniusNov 5, 2010 11:49 am 
Eelco HilleniusNov 5, 2010 11:56 am 
Martin MakundiNov 5, 2010 11:58 am 
Martin MakundiNov 5, 2010 12:00 pm 
Eelco HilleniusNov 5, 2010 12:15 pm 
Igor VaynbergNov 5, 2010 12:55 pm 
Brian ToppingNov 5, 2010 12:56 pm 
Martin MakundiNov 5, 2010 1:06 pm 
Martin MakundiNov 5, 2010 1:14 pm 
Igor VaynbergNov 5, 2010 1:21 pm 
Brian ToppingNov 5, 2010 1:32 pm 
Martin MakundiNov 5, 2010 10:05 pm 
Martin MakundiNov 5, 2010 10:07 pm 
Jeremy ThomersonNov 5, 2010 10:48 pm 
Martin MakundiNov 5, 2010 11:31 pm 
Igor VaynbergNov 5, 2010 11:53 pm 
Martin MakundiNov 5, 2010 11:57 pm 
James CarmanNov 6, 2010 5:12 am 
Martin MakundiNov 6, 2010 5:20 am 
Jeremy ThomersonNov 6, 2010 6:22 am 
Martin MakundiNov 6, 2010 6:43 am 
samketNov 6, 2010 6:54 am 
Igor VaynbergNov 6, 2010 4:44 pm 
SebastianNov 8, 2010 8:17 am 
Vitaly TsaplinNov 8, 2010 8:23 am 
Igor VaynbergNov 8, 2010 8:27 am 
Martin MakundiNov 8, 2010 8:29 am 
Igor VaynbergNov 8, 2010 8:35 am 
Vitaly TsaplinNov 8, 2010 8:35 am 
Martin MakundiNov 8, 2010 8:42 am 
SebastianNov 8, 2010 8:51 am 
Martin MakundiNov 8, 2010 8:58 am 
Igor VaynbergNov 8, 2010 8:58 am 
Igor VaynbergNov 8, 2010 9:03 am 
SebastianNov 8, 2010 9:07 am 
Martin MakundiNov 8, 2010 9:13 am 
Omid MilaniNov 8, 2010 9:31 am 
Igor VaynbergNov 8, 2010 9:32 am 
Rodolfo HansenNov 8, 2010 10:01 am 
Eelco HilleniusNov 8, 2010 10:22 pm 
Martin MakundiNov 8, 2010 10:39 pm 
Martin MakundiNov 8, 2010 10:40 pm 
Carl-Eric MenzelNov 9, 2010 12:15 am 
Martin MakundiNov 9, 2010 12:19 am 
Martin MakundiNov 9, 2010 12:23 am 
Carl-Eric MenzelNov 9, 2010 12:41 am 
Carl-Eric MenzelNov 9, 2010 12:44 am 
Martin MakundiNov 9, 2010 1:01 am 
Carl-Eric MenzelNov 9, 2010 4:12 am 
Martin MakundiNov 9, 2010 4:21 am 
Vitaly TsaplinNov 9, 2010 4:29 am 
Martin MakundiNov 9, 2010 4:34 am 
Matthias KellerNov 9, 2010 4:46 am 
manuelbarziNov 9, 2010 4:49 am 
James CarmanNov 9, 2010 4:49 am 
Martin MakundiNov 9, 2010 4:54 am 
James CarmanNov 9, 2010 4:57 am 
Martin MakundiNov 9, 2010 4:58 am 
manuelbarziNov 9, 2010 5:26 am 
Martin MakundiNov 9, 2010 5:48 am 
Frank SilbermannNov 9, 2010 6:46 am 
Martin GrigorovNov 9, 2010 6:58 am 
Carl-Eric MenzelNov 9, 2010 7:02 am 
James CarmanNov 9, 2010 7:05 am 
Carl-Eric MenzelNov 9, 2010 7:11 am 
Carl-Eric MenzelNov 9, 2010 7:14 am 
Frank SilbermannNov 9, 2010 7:19 am 
Martin MakundiNov 9, 2010 7:20 am 
Martin MakundiNov 9, 2010 7:22 am 
James CarmanNov 9, 2010 7:26 am 
Frank SilbermannNov 9, 2010 7:28 am 
Martin MakundiNov 9, 2010 7:32 am 
Wilhelmsen Tor IverNov 9, 2010 7:32 am 
Martin MakundiNov 9, 2010 7:33 am 
113 later messages
Subject:Re: Free wicket from component hierarchy hell
From:Sebastian (nosp@gmx.net)
Date:Nov 8, 2010 8:17:44 am
List:org.apache.wicket.users

I'm sorry to say, but the whole discussion makes little sense to me and these attempts to fix something that is not broken actually scares me a bit.

As far as I understand the philosophy of Wicket it is a Java centric and Java code drive web application framework. This makes it very unique to all other approaches I've seen so far.

The component hierarchy defined in the code means more than just to layout the components right for the markup. It for example also defines the visibility hierarchy which is important for security and usability, and defines the update hierarchy when doing component refreshs via AJAX. It simply is not right to allow the designer to move around components at will which are cascaded in the code with good functional reasons.

So what I want to say is, the hierarchy defined in the markup only represents one aspect of the hierarchy defined in the code and as such is NOT a good source to build the runtime component hierarchy on. Also I would not like to have a "traditional way" and another way to define hierarchies in Wicket as this will only cause confusion. I prefer the Python philosphy "there should be one — and only one — obvious way to do something".

Regards,

Seb

On 07.11.2010 00:45, Igor Vaynberg wrote:

here is a proper very rough initial implementation:

https://github.com/ivaynberg/wicket/commit/cbe861f4028120993f5d10d575f12c4ca291fdce

now someone has to mature it to the point where it can be properly evaluated.

-igor

On Sat, Nov 6, 2010 at 6:54 AM, samket<sam@gmx.com> wrote:

We need to wait until all components are added so that we can arrange

them into correct hireracy before rendering.

May I suggest that components are added with help of a builder object, for
example:

public MyPanel(String id) { super(id); Builder b = new Builder(this); // the Builder gets reference to this MyPanel b.add(new TextField("name")); // can be child of "form" which is added later b.add(new SomeForm("form")); b.build(); // after this line this MyPanel contains the components name and form }

If MyPanel's super class needs to access the same builder, it can provide a
constructor for it. In that case b.build() should be only invoked in MyPanel's
constructor.

If a developer uses more than one builder in a constructor, he can restrict
moving of components in markup to some extent:

public MyPanel(String id) { super(id); Builder b1 = new Builder(this); b1.add(new TextField("name")); // in markup, "name" can't be put under "form"
because it's in a different builder b1.build(); Builder b2 = new Builder(this); b2.add(new SomeForm("form"); b2.build(); }

Of course this doesn't solve the problem Igor mentioned. For that you'd need the
"old-fashioned way":

public MyPanel(String id) { super(id); SomeForm form = new SomeForm("form"); form.add(new TextField("name"); // in markup, "name" can't be moved out from
"form" add(form); }

Developers would need to mix different approaches for building hierarchies if
security is an issue. On second thought, I should use a broader term than
security because there is more than one reason to restrict those pesky designers
;)