I confess I didn't used it yet. I will use it and see if I can contribute
with some ideas.


On Mon, Oct 31, 2016 at 11:35 AM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> On Mon, Oct 31, 2016 at 2:27 PM, Marcel Barbosa Pinto <
> marcel.po...@gmail.com> wrote:
>
> > Hi,
> >
> > I mean by order the parent/child relation. Like for adding the child
> you've
> > to have a parent already added to the page right?
> >
> > I took this from the docs:
> >
> > queue(new Form("customer"));
> > queue(new TextField("first"));
> > queue(new TextField("last"));
> >
> > WebMarkupContainer child=new WebMarkupContainer("child");
> > queue(child);
> > child.queue(new TextField("first"));
> > child.queue(new TextField("last"));
> > child.queue(new TextField("dob"));
> >
> >
> > By a different approach we could do:
> >
> > queue(new TextField("customer.first"));
> > queue(new TextField("customer.last"));
> > queue(new Form("customer"));
> >
>
> This works now!
> Your assumption is not correct.
>
> The only requirement is that all those components are in the same markup
> container with associated markup (aka IMarkupRegion), i.e. in SomePage.html
> or in SomePanel.html.
>
>
> >
> > queue(new TextField("child.first"));
> > queue(new TextField("child.last"));
> > queue(new TextField("child.dob"));
> >
> > WebMarkupContainer child=new WebMarkupContainer("child");
> > queue(child);
> >
> > For this to work, I believe we had to have a "shadow hierarchy" between
> the
> > template and the java code that would orchestrate all the adds/queue etc
> > and them validate the final result.
> >
> > This would allow something like this:
> >
> > <div wicket:id="container">
> >     <input wicket:id="input"/>
> > </div>
> >
> > add(new TextField("container.input"));
> >
> > //the container would be added as a logic-less WebMarkupContainer
> > get("container").add(new AttributeModifier("class", "active"));
> > replace("container", new CustomComponent());
> >
> > get("container.input", TextField.class).setRequired(true);
> >
> > The standard wicket approach could be combined with this "path hierarchy"
> > or maybe do some like this, instead of using the component id as a path.
> >
> > add("container", new TextField("input"));
> >
> > LOL, this is just a brainstorm, just to try to give some ideas.
> >
> >
> > On Mon, Oct 31, 2016 at 10:30 AM, Martin Grigorov <mgrigo...@apache.org>
> > wrote:
> >
> > > I am not sure I follow you.
> > > What order do you mean ?
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Mon, Oct 31, 2016 at 1:10 PM, Marcel Barbosa Pinto <
> > > marcel.po...@gmail.com> wrote:
> > >
> > > > Yes I know, queue is great, but if you use queue you need to respect
> > the
> > > > correct order when invoking each queue.
> > > > I think this is not as simple, because you always have to "think" in
> > > order
> > > > to add the components.
> > > > For long trees the code gets clean, but if you change the order of
> some
> > > > thing the code can break.
> > > > In my opinion its not very practical as literally write the component
> > > path.
> > > > "container.container.1.secondMessage".
> > > > Simple empty logic-less containers could be added automatically by
> the
> > > > framework, and could be retrieved also by Its path.
> > > >
> > > > Cheers.
> > > >
> > > >
> > > >
> > > >
> > > > On Mon, Oct 31, 2016 at 9:52 AM, Martin Grigorov <
> mgrigo...@apache.org
> > >
> > > > wrote:
> > > >
> > > > > On Mon, Oct 31, 2016 at 12:47 PM, Marcel Barbosa Pinto <
> > > > > marcel.po...@gmail.com> wrote:
> > > > >
> > > > > > Would be possible to compute the hierarchy from the template it
> > self?
> > > > > >
> > > > >
> > > > > This is how the component queueing works in Wicket 7.
> > > > > The only difference is that you need to use MarkupContainer#queue()
> > > > instead
> > > > > of #add().
> > > > >
> > > > >
> > > > > >
> > > > > > html
> > > > > >
> > > > > > <div wicket:id="container">
> > > > > >      <input wicket:id="input"/>
> > > > > >      <div wicket:id="container">
> > > > > >           <div wicket:id="message"></div>
> > > > > >      </div>
> > > > > >      <div wicket:id="container">
> > > > > >           <div wicket:id="secondMessage"></div>
> > > > > >      </div>
> > > > > > </div>
> > > > > >
> > > > > > java
> > > > > >
> > > > > > {
> > > > > >
> > > > > > add(new WebMarkupContainer("container"));
> > > > > > add(new TextField("container.input"));
> > > > > > add(new Label("container.container.message",
> Model.of("Hello")));
> > > > > > add(new Label("container.container.1.secondMessage",
> > > Model.of("Second
> > > > > > hello")));
> > > > > >
> > > > > > }
> > > > > >
> > > > > > Maybe this could work with the existing hierarchy, just changing
> > the
> > > > > > notation.
> > > > > > This should the changed for compound models that uses the bean
> name
> > > as
> > > > > the
> > > > > > component name. Maybe LambdaModel could deal with it..
> > > > > >
> > > > > > Just my 2 cents..
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Mon, Oct 31, 2016 at 9:29 AM, Tobias Soloschenko <
> > > > > > tobiassolosche...@googlemail.com> wrote:
> > > > > >
> > > > > > > Hi Martin,
> > > > > > >
> > > > > > > yes that's true, but if someone dislike something there might
> be
> > > > > reasons
> > > > > > > which can be changed. :-)
> > > > > > >
> > > > > > > Example:
> > > > > > >
> > > > > > > It is hard to deal with a component hierarchy: Solution
> component
> > > > > > queuing.
> > > > > > > (yes I know - you think that it's a failure - but it is an
> > example)
> > > > > > >
> > > > > > > kind regards
> > > > > > >
> > > > > > > Tobias
> > > > > > >
> > > > > > > > Am 31.10.2016 um 11:12 schrieb Martin Grigorov <
> > > > mgrigo...@apache.org
> > > > > >:
> > > > > > > >
> > > > > > > > How exactly ?
> > > > > > > >
> > > > > > > > Bruno is JavaEE evangelist at Oracle and most of the people
> > > > following
> > > > > > him
> > > > > > > > are JavaEE fans. They prefer JSF and JSP...
> > > > > > > >
> > > > > > > > Martin Grigorov
> > > > > > > > Wicket Training and Consulting
> > > > > > > > https://twitter.com/mtgrigorov
> > > > > > > >
> > > > > > > > On Mon, Oct 31, 2016 at 8:44 AM, Tobias Soloschenko <
> > > > > > > > tobiassolosche...@googlemail.com> wrote:
> > > > > > > >
> > > > > > > >> Hi,
> > > > > > > >>
> > > > > > > >> as I saw here:
> > > > > > > >>
> > > > > > > >> https://mobile.twitter.com/brunoborges/status/
> > > 791327939899994116
> > > > > > > >>
> > > > > > > >> there are a lot of "dislikes" as a result of the vote. I
> think
> > > it
> > > > > > would
> > > > > > > be
> > > > > > > >> great to get some feedback what to improve and what you
> don't
> > > > like.
> > > > > > > >>
> > > > > > > >> kind regards
> > > > > > > >>
> > > > > > > >> Tobias
> > > > > > >
> > > > > > > ------------------------------------------------------------
> > > > ---------
> > > > > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > > > > > For additional commands, e-mail: users-h...@wicket.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > >
> > > > > > Marcel Barbosa Pinto
> > > > > > 55 11 98255 8288
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Marcel Barbosa Pinto
> > > > 55 11 98255 8288
> > > >
> > >
> >
> >
> >
> > --
> >
> > Marcel Barbosa Pinto
> > 55 11 98255 8288
> >
>



-- 

Marcel Barbosa Pinto
55 11 98255 8288

Reply via email to