You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by fero <fr...@gmail.com> on 2007/09/14 16:44:43 UTC
More extend points
Hi, is it possible to have more than one <wicket:extend> on one page. I want
to make an universal page with form. This form has some common features, but
I want to extend it. I want to extend the page as well (to put some panels
under the form) but not always. I don't want to code a Form as a Panel and
extend this form, because then I will have too many html files.
Thanks
Fero
--
View this message in context: http://www.nabble.com/More-extend-points-tf4442899.html#a12676475
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: More extend points
Posted by "Nino.Martinez" <ni...@jayway.dk>.
Hehe but the answer to the wicket:child was that you cannot have more than
one, this has been on the list before...
Nino.Martinez wrote:
>
> You could have a abstract class which had a listview which iterate over
> panels and added the form, you could then deliver the model for the
> listview in the implementation(or just in the constructor I guess), that
> way you could add more panels by doing so. Also forms do not need to have
> their own markup, you can if you want just provide the elements in the
> markup of the page using the form..
>
> regards Nino
>
>
> fero wrote:
>>
>> Hi, is it possible to have more than one <wicket:extend> on one page. I
>> want to make an universal page with form. This form has some common
>> features, but I want to extend it. I want to extend the page as well (to
>> put some panels under the form) but not always. I don't want to code a
>> Form as a Panel and extend this form, because then I will have too many
>> html files.
>>
>> Thanks
>>
>> Fero
>>
>
>
--
View this message in context: http://www.nabble.com/More-extend-points-tf4442899.html#a12679698
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: More extend points
Posted by "Nino.Martinez" <ni...@jayway.dk>.
You could have a abstract class which had a listview which iterate over
panels and added the form, you could then deliver the model for the listview
in the implementation(or just in the constructor I guess), that way you
could add more panels by doing so. Also forms do not need to have their own
markup, you can if you want just provide the elements in the markup of the
page using the form..
regards Nino
fero wrote:
>
> Hi, is it possible to have more than one <wicket:extend> on one page. I
> want to make an universal page with form. This form has some common
> features, but I want to extend it. I want to extend the page as well (to
> put some panels under the form) but not always. I don't want to code a
> Form as a Panel and extend this form, because then I will have too many
> html files.
>
> Thanks
>
> Fero
>
--
View this message in context: http://www.nabble.com/More-extend-points-tf4442899.html#a12679609
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: More extend points
Posted by fero <fr...@gmail.com>.
So I tried it and it works fine. My subpage does not even have a html file.
Only Panel with Form has.
Fero
fero wrote:
>
> Yes "sockets and plugs" is the idea I was thinking of, but I thought that
> i will have 2 html files SubWebPage.html and some Panel.html. Now I see
> that only one is needed for Panel, because the template for SubWebPage
> will be from SuperWebPage.
>
> I gonna try it. Thanks!
>
>
>
> n8han wrote:
>>
>> fero wrote:
>>> Hi, is it possible to have more than one <wicket:extend> on one page.
>>
>> I use a convention of adding components at the extension point from an
>> overridable method. The base class just returns an empty component;
>> subclasess return a Panel. I don't know if that's more templates than
>> you want, but keep in mind that the subclass doesn't need a template for
>> itself, just one for each Panel that it creates.
>>
>> More here:
>> http://technically.us/code/x/plugging-source-lists-into-sockets
>> (scroll down to "Sockets and plugs")
>>
>> Nathan
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/More-extend-points-tf4442899.html#a12692830
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: More extend points
Posted by fero <fr...@gmail.com>.
Yes "sockets and plugs" is the idea I was thinking of, but I thought that i
will have 2 html files SubWebPage.html and some Panel.html. Now I see that
only one is needed for Panel, because the template for SubWebPage will be
from SuperWebPage.
I gonna try it. Thanks!
n8han wrote:
>
> fero wrote:
>> Hi, is it possible to have more than one <wicket:extend> on one page.
>
> I use a convention of adding components at the extension point from an
> overridable method. The base class just returns an empty component;
> subclasess return a Panel. I don't know if that's more templates than
> you want, but keep in mind that the subclass doesn't need a template for
> itself, just one for each Panel that it creates.
>
> More here:
> http://technically.us/code/x/plugging-source-lists-into-sockets
> (scroll down to "Sockets and plugs")
>
> Nathan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/More-extend-points-tf4442899.html#a12688525
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: More extend points
Posted by Nathan Hamblen <na...@technically.us>.
fero wrote:
> Hi, is it possible to have more than one <wicket:extend> on one page.
I use a convention of adding components at the extension point from an
overridable method. The base class just returns an empty component;
subclasess return a Panel. I don't know if that's more templates than
you want, but keep in mind that the subclass doesn't need a template for
itself, just one for each Panel that it creates.
More here:
http://technically.us/code/x/plugging-source-lists-into-sockets
(scroll down to "Sockets and plugs")
Nathan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: More extend points
Posted by Carlos Pita <ca...@gmail.com>.
...also, if you need multiple markup extension points for the same
component, fragments will give you the ultimate flexibility, although
at the cost of some (little) added complexity. I'll use them only if
the other approaches are inappropriate.
Regards,
Carlos
On 9/14/07, Carlos Pita <ca...@gmail.com> wrote:
> You can use border/body in a similar way than child/extend. Also, if
> the form incarnations haven't a lot of common markup between them, you
> can use the form as the webmarkupcontainer it is and put its logic in
> one place but the markup everywhere the form is.
>
> Regards,
> Carlos
>
>
> On 9/14/07, fero <fr...@gmail.com> wrote:
> >
> > Hi, is it possible to have more than one <wicket:extend> on one page. I want
> > to make an universal page with form. This form has some common features, but
> > I want to extend it. I want to extend the page as well (to put some panels
> > under the form) but not always. I don't want to code a Form as a Panel and
> > extend this form, because then I will have too many html files.
> >
> > Thanks
> >
> > Fero
> > --
> > View this message in context: http://www.nabble.com/More-extend-points-tf4442899.html#a12676475
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: More extend points
Posted by Carlos Pita <ca...@gmail.com>.
You can use border/body in a similar way than child/extend. Also, if
the form incarnations haven't a lot of common markup between them, you
can use the form as the webmarkupcontainer it is and put its logic in
one place but the markup everywhere the form is.
Regards,
Carlos
On 9/14/07, fero <fr...@gmail.com> wrote:
>
> Hi, is it possible to have more than one <wicket:extend> on one page. I want
> to make an universal page with form. This form has some common features, but
> I want to extend it. I want to extend the page as well (to put some panels
> under the form) but not always. I don't want to code a Form as a Panel and
> extend this form, because then I will have too many html files.
>
> Thanks
>
> Fero
> --
> View this message in context: http://www.nabble.com/More-extend-points-tf4442899.html#a12676475
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org