You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Mikkel Lauritsen <re...@tala.dk> on 2010/05/07 16:21:18 UTC
Components with dynamically defined child components
Hi all,
I'm evaluating webapp frameworks in order to determine what to use
when rewriting a large-ish application. Wicket is a serious con-
testant, but there's one thing that I haven't been able to figure
out how to do properly: how do I create components that have a
dynamic list of child components, each child being an instance of
any subclass of Component (or WebMarkupContainer)?
Basically what I need is to obtain HTML like
<div>
markup from first child
markup from second child
...
</div>
Based on the documentation of the RepeatingView class I have tried
just adding the children to a RepeatingView with
<div wicket:id="children"></div> as markup, expecting that I would
get each child rendered inside a div element, but that doesn't
work - possibly because the markup doesn't contain elements that
refer to the id's of the child components. It works fine with labels,
but for example Buttons are not shown at all.
My problem seems to be the same as discussed in
http://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg18712.html
but I unfortunately haven't been able to get further from there.
Any comments and suggestions that you may have are much appreciated.
Best regards & thanks,
Mikkel Lauritsen
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Any solution for the context problem with the relative links of
BookmarkablePageLink?
Posted by Igor Vaynberg <ig...@gmail.com>.
you would use /*, wicket lets urls that it cannot map fallthrough and
be handled as usual.
additionally wicketfilter has some context params that lets you
specify ignore masks, see the source/javadocs.
-igor
On Sun, May 9, 2010 at 8:22 PM, Chris Colman
<ch...@stepaheadsoftware.com> wrote:
> Oh, of course! Sorry I was mistakenly assuming we'd use "/*" which would
> match everything but if we use the non wild card "/" then that will only
> do an exact match and other URLs with /content etc., will still be able
> to match their own separate patterns and redirect to their appropriate
> filters/sevlets.
>
>>-----Original Message-----
>>From: Jeremy Thomerson [mailto:jeremy@wickettraining.com]
>>Sent: Monday, 10 May 2010 12:23 PM
>>To: users@wicket.apache.org
>>Subject: Re: Any solution for the context problem with the relative
> links
>>of BookmarkablePageLink?
>>
>>Should still work. If you're using the filter, the idea is that it
> will
>>only respond to the URLs that it recognizes, and will pass other
> requests
>>down the chain.
>>
>>--
>>Jeremy Thomerson
>>http://www.wickettraining.com
>>
>>
>>
>>On Sun, May 9, 2010 at 8:48 PM, Chris Colman
>><ch...@stepaheadsoftware.com>wrote:
>>
>>> Using the word 'context' was probably misleading on my part. In
> servlet
>>> containers context=app. What I was talking about was the first 'path'
>>> element after the domain name,
>>>
>>> Eg., content in www.mysite.com/content
>>>
>>> In this case I'm talking about a single app but I set up multiple
>>> different URL patterns in the web.xml of that app to direct different
>>> patterns to different filters/sevlets.
>>>
>>> I have a virtual host and all the filters/servlets are under that
>>> virtual host and all desployed via a single .war
>>>
>>> >> >Is your servlet container listening directly to port 80?
>>> >>
>>> >> Yes. It's pure tomcat - not behind Apache Webserver.
>>> >>
>>> >> >If not, do the forwarding via a proxy on whatever you are using
>>> >> >as a frontend. In that frontend, have it rewrite the URLs (i.e.
>>> >> >mod_proxy and mod_rewrite).
>>> >> >
>>> >> >Otherwise, can you have your app mounted on "/"?
>>> >>
>>> >> I have quite a few non wicket servlets for things like commands
> and
>>> web
>>> >> services and each, including wicket, have their own unique context
> so
>>> >> that they can all operate peacefully together under.
>>> >>
>>> >> If I mount the wicket app on "/" will that then pick up request
> for
>>> all
>>> >> the other contexts or is there a way to mount wicket at "/" and
> still
>>> >> have other contexts mapping to different servlets?
>>> >
>>> >
>>> >If you're using the Filter, it should fall through for other
> requests -
>>> >allowing them to still be processed. You may have to configure this
>>> >behavior - it's been a while since I've personally done it. I know
>>> that
>>> >last week I configured a Wicket webapp on /foo when I already had
>>> another
>>> >app on / and they both worked just fine. Two wars - one deployed in
>>> >tomcat/webapps/ROOT, and the other in tomcat/webapps/foo. It just
>>> worked.
>>> >
>>> >--
>>> >Jeremy Thomerson
>>> >http://www.wickettraining.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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: Any solution for the context problem with the relative links of BookmarkablePageLink?
Posted by Chris Colman <ch...@stepaheadsoftware.com>.
Oh, of course! Sorry I was mistakenly assuming we'd use "/*" which would
match everything but if we use the non wild card "/" then that will only
do an exact match and other URLs with /content etc., will still be able
to match their own separate patterns and redirect to their appropriate
filters/sevlets.
>-----Original Message-----
>From: Jeremy Thomerson [mailto:jeremy@wickettraining.com]
>Sent: Monday, 10 May 2010 12:23 PM
>To: users@wicket.apache.org
>Subject: Re: Any solution for the context problem with the relative
links
>of BookmarkablePageLink?
>
>Should still work. If you're using the filter, the idea is that it
will
>only respond to the URLs that it recognizes, and will pass other
requests
>down the chain.
>
>--
>Jeremy Thomerson
>http://www.wickettraining.com
>
>
>
>On Sun, May 9, 2010 at 8:48 PM, Chris Colman
><ch...@stepaheadsoftware.com>wrote:
>
>> Using the word 'context' was probably misleading on my part. In
servlet
>> containers context=app. What I was talking about was the first 'path'
>> element after the domain name,
>>
>> Eg., content in www.mysite.com/content
>>
>> In this case I'm talking about a single app but I set up multiple
>> different URL patterns in the web.xml of that app to direct different
>> patterns to different filters/sevlets.
>>
>> I have a virtual host and all the filters/servlets are under that
>> virtual host and all desployed via a single .war
>>
>> >> >Is your servlet container listening directly to port 80?
>> >>
>> >> Yes. It's pure tomcat - not behind Apache Webserver.
>> >>
>> >> >If not, do the forwarding via a proxy on whatever you are using
>> >> >as a frontend. In that frontend, have it rewrite the URLs (i.e.
>> >> >mod_proxy and mod_rewrite).
>> >> >
>> >> >Otherwise, can you have your app mounted on "/"?
>> >>
>> >> I have quite a few non wicket servlets for things like commands
and
>> web
>> >> services and each, including wicket, have their own unique context
so
>> >> that they can all operate peacefully together under.
>> >>
>> >> If I mount the wicket app on "/" will that then pick up request
for
>> all
>> >> the other contexts or is there a way to mount wicket at "/" and
still
>> >> have other contexts mapping to different servlets?
>> >
>> >
>> >If you're using the Filter, it should fall through for other
requests -
>> >allowing them to still be processed. You may have to configure this
>> >behavior - it's been a while since I've personally done it. I know
>> that
>> >last week I configured a Wicket webapp on /foo when I already had
>> another
>> >app on / and they both worked just fine. Two wars - one deployed in
>> >tomcat/webapps/ROOT, and the other in tomcat/webapps/foo. It just
>> worked.
>> >
>> >--
>> >Jeremy Thomerson
>> >http://www.wickettraining.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: Any solution for the context problem with the relative links of
BookmarkablePageLink?
Posted by Jeremy Thomerson <je...@wickettraining.com>.
Should still work. If you're using the filter, the idea is that it will
only respond to the URLs that it recognizes, and will pass other requests
down the chain.
--
Jeremy Thomerson
http://www.wickettraining.com
On Sun, May 9, 2010 at 8:48 PM, Chris Colman
<ch...@stepaheadsoftware.com>wrote:
> Using the word 'context' was probably misleading on my part. In servlet
> containers context=app. What I was talking about was the first 'path'
> element after the domain name,
>
> Eg., content in www.mysite.com/content
>
> In this case I'm talking about a single app but I set up multiple
> different URL patterns in the web.xml of that app to direct different
> patterns to different filters/sevlets.
>
> I have a virtual host and all the filters/servlets are under that
> virtual host and all desployed via a single .war
>
> >> >Is your servlet container listening directly to port 80?
> >>
> >> Yes. It's pure tomcat - not behind Apache Webserver.
> >>
> >> >If not, do the forwarding via a proxy on whatever you are using
> >> >as a frontend. In that frontend, have it rewrite the URLs (i.e.
> >> >mod_proxy and mod_rewrite).
> >> >
> >> >Otherwise, can you have your app mounted on "/"?
> >>
> >> I have quite a few non wicket servlets for things like commands and
> web
> >> services and each, including wicket, have their own unique context so
> >> that they can all operate peacefully together under.
> >>
> >> If I mount the wicket app on "/" will that then pick up request for
> all
> >> the other contexts or is there a way to mount wicket at "/" and still
> >> have other contexts mapping to different servlets?
> >
> >
> >If you're using the Filter, it should fall through for other requests -
> >allowing them to still be processed. You may have to configure this
> >behavior - it's been a while since I've personally done it. I know
> that
> >last week I configured a Wicket webapp on /foo when I already had
> another
> >app on / and they both worked just fine. Two wars - one deployed in
> >tomcat/webapps/ROOT, and the other in tomcat/webapps/foo. It just
> worked.
> >
> >--
> >Jeremy Thomerson
> >http://www.wickettraining.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
RE: Any solution for the context problem with the relative links of BookmarkablePageLink?
Posted by Chris Colman <ch...@stepaheadsoftware.com>.
Using the word 'context' was probably misleading on my part. In servlet
containers context=app. What I was talking about was the first 'path'
element after the domain name,
Eg., content in www.mysite.com/content
In this case I'm talking about a single app but I set up multiple
different URL patterns in the web.xml of that app to direct different
patterns to different filters/sevlets.
I have a virtual host and all the filters/servlets are under that
virtual host and all desployed via a single .war
>> >Is your servlet container listening directly to port 80?
>>
>> Yes. It's pure tomcat - not behind Apache Webserver.
>>
>> >If not, do the forwarding via a proxy on whatever you are using
>> >as a frontend. In that frontend, have it rewrite the URLs (i.e.
>> >mod_proxy and mod_rewrite).
>> >
>> >Otherwise, can you have your app mounted on "/"?
>>
>> I have quite a few non wicket servlets for things like commands and
web
>> services and each, including wicket, have their own unique context so
>> that they can all operate peacefully together under.
>>
>> If I mount the wicket app on "/" will that then pick up request for
all
>> the other contexts or is there a way to mount wicket at "/" and still
>> have other contexts mapping to different servlets?
>
>
>If you're using the Filter, it should fall through for other requests -
>allowing them to still be processed. You may have to configure this
>behavior - it's been a while since I've personally done it. I know
that
>last week I configured a Wicket webapp on /foo when I already had
another
>app on / and they both worked just fine. Two wars - one deployed in
>tomcat/webapps/ROOT, and the other in tomcat/webapps/foo. It just
worked.
>
>--
>Jeremy Thomerson
>http://www.wickettraining.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Any solution for the context problem with the relative links of
BookmarkablePageLink?
Posted by Jeremy Thomerson <je...@wickettraining.com>.
On Sun, May 9, 2010 at 5:47 PM, Chris Colman
<ch...@stepaheadsoftware.com>wrote:
> >Is your servlet container listening directly to port 80?
>
> Yes. It's pure tomcat - not behind Apache Webserver.
>
> >If not, do the forwarding via a proxy on whatever you are using
> >as a frontend. In that frontend, have it rewrite the URLs (i.e.
> >mod_proxy and mod_rewrite).
> >
> >Otherwise, can you have your app mounted on "/"?
>
> I have quite a few non wicket servlets for things like commands and web
> services and each, including wicket, have their own unique context so
> that they can all operate peacefully together under.
>
> If I mount the wicket app on "/" will that then pick up request for all
> the other contexts or is there a way to mount wicket at "/" and still
> have other contexts mapping to different servlets?
If you're using the Filter, it should fall through for other requests -
allowing them to still be processed. You may have to configure this
behavior - it's been a while since I've personally done it. I know that
last week I configured a Wicket webapp on /foo when I already had another
app on / and they both worked just fine. Two wars - one deployed in
tomcat/webapps/ROOT, and the other in tomcat/webapps/foo. It just worked.
--
Jeremy Thomerson
http://www.wickettraining.com
Re: Any solution for the context problem with the relative links of
BookmarkablePageLink?
Posted by James Carman <jc...@carmanconsulting.com>.
I don't think ProxyPass will work (at least it didn't used to) if you
try to use the "/" path, so that might be the trouble you're seeing
(if you're seeing any).
On Sun, May 9, 2010 at 6:47 PM, Chris Colman
<ch...@stepaheadsoftware.com> wrote:
>>Is your servlet container listening directly to port 80?
>
> Yes. It's pure tomcat - not behind Apache Webserver.
>
>>If not, do the forwarding via a proxy on whatever you are using
>>as a frontend. In that frontend, have it rewrite the URLs (i.e.
>>mod_proxy and mod_rewrite).
>>
>>Otherwise, can you have your app mounted on "/"?
>
> I have quite a few non wicket servlets for things like commands and web
> services and each, including wicket, have their own unique context so
> that they can all operate peacefully together under.
>
> If I mount the wicket app on "/" will that then pick up request for all
> the other contexts or is there a way to mount wicket at "/" and still
> have other contexts mapping to different servlets?
>
>>
>>--
>>Jeremy Thomerson
>>http://www.wickettraining.com
>>
>>
>>
>>On Sat, May 8, 2010 at 12:40 AM, Chris Colman
>><ch...@stepaheadsoftware.com>wrote:
>>
>>> I'll explain the problem in detail. I think it's similar to the link
> I
>>> provided but maybe not:
>>>
>>> I have a site whose home page that is rendered via:
>>>
>>> www.mysite.com/content/home/pName/pValue
>>>
>>> but obviously the users will get their via:
>>>
>>> www.mysite.com
>>>
>>> I want the home page to be serviced via a forward to
>>> www.mysite.com/content/home/pName/pValue
>>>
>>> so that the search engines don't have to experience a 301 redirect.
>>> (where pName/pValue are required parameters that can be passed to any
>>> page)
>>>
>>> I forward via:
>>>
>>> RequestDispatcher rd = servletContext.
>>>
>>> getRequestDispatcher("www.mysite.com/content/home/pName/pValue");
>>> rd.forward(req, res);
>>>
>>> I don't mind if all subsequent pages a user visits use the full form
> of
>>> the URL and these full URLs appear in the browser address bar. Eg.,
>>>
>>> www.mysite.com/content/contactUs/pName/pValue
>>>
>>> www.mysite.com/content/products/pName/pValue
>>>
>>> www.mysite.com/content/home/pName/pValue
>>>
>>> The forward works fine but any links on that page don't work because
> the
>>> context of the wicket web app is 'content' - a separate servlet is
> used
>>> to 'catch' URL's of the form www.mysite.com and redirects to the
> wicket
>>> app.
>>>
>>> All my BookmarkablePageLinks are constructed assuming the 'content'
>>> context. I can change that so they work from www.mysite.com but then
>>> when the pages with www.mysite.com/content/blah... are visited those
>>> same links do not work.
>>>
>>> >-----Original Message-----
>>> >From: Jeremy Thomerson [mailto:jeremy@wickettraining.com]
>>> >Sent: Saturday, 8 May 2010 10:53 AM
>>> >To: users@wicket.apache.org
>>> >Subject: Re: Any solution for the context problem with the relative
>>> links
>>> >of BookmarkablePageLink?
>>> >
>>> >That wasn't a problem - it was someone configuring the proxy
>>> incorrectly.
>>> > What (specifically) are you encountering?
>>> >
>>> >--
>>> >Jeremy Thomerson
>>> >http://www.wickettraining.com
>>> >
>>> >
>>> >
>>> >On Fri, May 7, 2010 at 7:44 PM, Chris Colman
>>> ><ch...@stepaheadsoftware.com>wrote:
>>> >
>>> >> I was just wondering if there has been any developments on the
>>> problem
>>> >> outlined in this post because I'm having the same problem but
> wanted
>>> to
>>> >> avoid the Index link solution:
>>> >>
>>> >>
>>>
> http://apache-wicket.1842946.n4.nabble.com/BookmarkablePageLink-relative
>>> >> -path-Dilemma-td1933044.html
>>> >>
>>> >>
> ---------------------------------------------------------------------
>>> >> 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
>>>
>>>
>
> ---------------------------------------------------------------------
> 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: Any solution for the context problem with the relative links of BookmarkablePageLink?
Posted by Chris Colman <ch...@stepaheadsoftware.com>.
>Is your servlet container listening directly to port 80?
Yes. It's pure tomcat - not behind Apache Webserver.
>If not, do the forwarding via a proxy on whatever you are using
>as a frontend. In that frontend, have it rewrite the URLs (i.e.
>mod_proxy and mod_rewrite).
>
>Otherwise, can you have your app mounted on "/"?
I have quite a few non wicket servlets for things like commands and web
services and each, including wicket, have their own unique context so
that they can all operate peacefully together under.
If I mount the wicket app on "/" will that then pick up request for all
the other contexts or is there a way to mount wicket at "/" and still
have other contexts mapping to different servlets?
>
>--
>Jeremy Thomerson
>http://www.wickettraining.com
>
>
>
>On Sat, May 8, 2010 at 12:40 AM, Chris Colman
><ch...@stepaheadsoftware.com>wrote:
>
>> I'll explain the problem in detail. I think it's similar to the link
I
>> provided but maybe not:
>>
>> I have a site whose home page that is rendered via:
>>
>> www.mysite.com/content/home/pName/pValue
>>
>> but obviously the users will get their via:
>>
>> www.mysite.com
>>
>> I want the home page to be serviced via a forward to
>> www.mysite.com/content/home/pName/pValue
>>
>> so that the search engines don't have to experience a 301 redirect.
>> (where pName/pValue are required parameters that can be passed to any
>> page)
>>
>> I forward via:
>>
>> RequestDispatcher rd = servletContext.
>>
>> getRequestDispatcher("www.mysite.com/content/home/pName/pValue");
>> rd.forward(req, res);
>>
>> I don't mind if all subsequent pages a user visits use the full form
of
>> the URL and these full URLs appear in the browser address bar. Eg.,
>>
>> www.mysite.com/content/contactUs/pName/pValue
>>
>> www.mysite.com/content/products/pName/pValue
>>
>> www.mysite.com/content/home/pName/pValue
>>
>> The forward works fine but any links on that page don't work because
the
>> context of the wicket web app is 'content' - a separate servlet is
used
>> to 'catch' URL's of the form www.mysite.com and redirects to the
wicket
>> app.
>>
>> All my BookmarkablePageLinks are constructed assuming the 'content'
>> context. I can change that so they work from www.mysite.com but then
>> when the pages with www.mysite.com/content/blah... are visited those
>> same links do not work.
>>
>> >-----Original Message-----
>> >From: Jeremy Thomerson [mailto:jeremy@wickettraining.com]
>> >Sent: Saturday, 8 May 2010 10:53 AM
>> >To: users@wicket.apache.org
>> >Subject: Re: Any solution for the context problem with the relative
>> links
>> >of BookmarkablePageLink?
>> >
>> >That wasn't a problem - it was someone configuring the proxy
>> incorrectly.
>> > What (specifically) are you encountering?
>> >
>> >--
>> >Jeremy Thomerson
>> >http://www.wickettraining.com
>> >
>> >
>> >
>> >On Fri, May 7, 2010 at 7:44 PM, Chris Colman
>> ><ch...@stepaheadsoftware.com>wrote:
>> >
>> >> I was just wondering if there has been any developments on the
>> problem
>> >> outlined in this post because I'm having the same problem but
wanted
>> to
>> >> avoid the Index link solution:
>> >>
>> >>
>>
http://apache-wicket.1842946.n4.nabble.com/BookmarkablePageLink-relative
>> >> -path-Dilemma-td1933044.html
>> >>
>> >>
---------------------------------------------------------------------
>> >> 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
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Any solution for the context problem with the relative links of
BookmarkablePageLink?
Posted by Jeremy Thomerson <je...@wickettraining.com>.
Is your servlet container listening directly to port 80? If not, do the
forwarding via a proxy on whatever you are using as a frontend. In that
frontend, have it rewrite the URLs (i.e. mod_proxy and mod_rewrite).
Otherwise, can you have your app mounted on "/"?
--
Jeremy Thomerson
http://www.wickettraining.com
On Sat, May 8, 2010 at 12:40 AM, Chris Colman
<ch...@stepaheadsoftware.com>wrote:
> I'll explain the problem in detail. I think it's similar to the link I
> provided but maybe not:
>
> I have a site whose home page that is rendered via:
>
> www.mysite.com/content/home/pName/pValue
>
> but obviously the users will get their via:
>
> www.mysite.com
>
> I want the home page to be serviced via a forward to
> www.mysite.com/content/home/pName/pValue
>
> so that the search engines don't have to experience a 301 redirect.
> (where pName/pValue are required parameters that can be passed to any
> page)
>
> I forward via:
>
> RequestDispatcher rd = servletContext.
>
> getRequestDispatcher("www.mysite.com/content/home/pName/pValue");
> rd.forward(req, res);
>
> I don't mind if all subsequent pages a user visits use the full form of
> the URL and these full URLs appear in the browser address bar. Eg.,
>
> www.mysite.com/content/contactUs/pName/pValue
>
> www.mysite.com/content/products/pName/pValue
>
> www.mysite.com/content/home/pName/pValue
>
> The forward works fine but any links on that page don't work because the
> context of the wicket web app is 'content' - a separate servlet is used
> to 'catch' URL's of the form www.mysite.com and redirects to the wicket
> app.
>
> All my BookmarkablePageLinks are constructed assuming the 'content'
> context. I can change that so they work from www.mysite.com but then
> when the pages with www.mysite.com/content/blah... are visited those
> same links do not work.
>
> >-----Original Message-----
> >From: Jeremy Thomerson [mailto:jeremy@wickettraining.com]
> >Sent: Saturday, 8 May 2010 10:53 AM
> >To: users@wicket.apache.org
> >Subject: Re: Any solution for the context problem with the relative
> links
> >of BookmarkablePageLink?
> >
> >That wasn't a problem - it was someone configuring the proxy
> incorrectly.
> > What (specifically) are you encountering?
> >
> >--
> >Jeremy Thomerson
> >http://www.wickettraining.com
> >
> >
> >
> >On Fri, May 7, 2010 at 7:44 PM, Chris Colman
> ><ch...@stepaheadsoftware.com>wrote:
> >
> >> I was just wondering if there has been any developments on the
> problem
> >> outlined in this post because I'm having the same problem but wanted
> to
> >> avoid the Index link solution:
> >>
> >>
> http://apache-wicket.1842946.n4.nabble.com/BookmarkablePageLink-relative
> >> -path-Dilemma-td1933044.html
> >>
> >> ---------------------------------------------------------------------
> >> 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: Any solution for the context problem with the relative links of BookmarkablePageLink?
Posted by Chris Colman <ch...@stepaheadsoftware.com>.
I'll explain the problem in detail. I think it's similar to the link I
provided but maybe not:
I have a site whose home page that is rendered via:
www.mysite.com/content/home/pName/pValue
but obviously the users will get their via:
www.mysite.com
I want the home page to be serviced via a forward to
www.mysite.com/content/home/pName/pValue
so that the search engines don't have to experience a 301 redirect.
(where pName/pValue are required parameters that can be passed to any
page)
I forward via:
RequestDispatcher rd = servletContext.
getRequestDispatcher("www.mysite.com/content/home/pName/pValue");
rd.forward(req, res);
I don't mind if all subsequent pages a user visits use the full form of
the URL and these full URLs appear in the browser address bar. Eg.,
www.mysite.com/content/contactUs/pName/pValue
www.mysite.com/content/products/pName/pValue
www.mysite.com/content/home/pName/pValue
The forward works fine but any links on that page don't work because the
context of the wicket web app is 'content' - a separate servlet is used
to 'catch' URL's of the form www.mysite.com and redirects to the wicket
app.
All my BookmarkablePageLinks are constructed assuming the 'content'
context. I can change that so they work from www.mysite.com but then
when the pages with www.mysite.com/content/blah... are visited those
same links do not work.
>-----Original Message-----
>From: Jeremy Thomerson [mailto:jeremy@wickettraining.com]
>Sent: Saturday, 8 May 2010 10:53 AM
>To: users@wicket.apache.org
>Subject: Re: Any solution for the context problem with the relative
links
>of BookmarkablePageLink?
>
>That wasn't a problem - it was someone configuring the proxy
incorrectly.
> What (specifically) are you encountering?
>
>--
>Jeremy Thomerson
>http://www.wickettraining.com
>
>
>
>On Fri, May 7, 2010 at 7:44 PM, Chris Colman
><ch...@stepaheadsoftware.com>wrote:
>
>> I was just wondering if there has been any developments on the
problem
>> outlined in this post because I'm having the same problem but wanted
to
>> avoid the Index link solution:
>>
>>
http://apache-wicket.1842946.n4.nabble.com/BookmarkablePageLink-relative
>> -path-Dilemma-td1933044.html
>>
>> ---------------------------------------------------------------------
>> 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: Any solution for the context problem with the relative links of
BookmarkablePageLink?
Posted by Jeremy Thomerson <je...@wickettraining.com>.
That wasn't a problem - it was someone configuring the proxy incorrectly.
What (specifically) are you encountering?
--
Jeremy Thomerson
http://www.wickettraining.com
On Fri, May 7, 2010 at 7:44 PM, Chris Colman
<ch...@stepaheadsoftware.com>wrote:
> I was just wondering if there has been any developments on the problem
> outlined in this post because I'm having the same problem but wanted to
> avoid the Index link solution:
>
> http://apache-wicket.1842946.n4.nabble.com/BookmarkablePageLink-relative
> -path-Dilemma-td1933044.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Any solution for the context problem with the relative links of BookmarkablePageLink?
Posted by Chris Colman <ch...@stepaheadsoftware.com>.
I was just wondering if there has been any developments on the problem
outlined in this post because I'm having the same problem but wanted to
avoid the Index link solution:
http://apache-wicket.1842946.n4.nabble.com/BookmarkablePageLink-relative
-path-Dilemma-td1933044.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Components with dynamically defined child components
Posted by Mikkel Lauritsen <re...@tala.dk>.
Hi Cemal,
You wrote:
> You will find more information than you have explicitly asked for here
> [1][2] but there is interesting and instructive material to look at,
> especially if you are new to Wicket and evaluating it for your
> project.
Many thanks for your prompt response - judging from a quick glance
at the pages you refer to they look exactly like what I need, so
I'll get hacking right away :-)
Best regards,
Mikkel Lauritsen
> [1] http://jweekend.com/dev/ArticlesPage
> [2] see the Bean Editor movie on
> http://code.google.com/p/londonwicket/downloads
>
> On 7 May 2010 15:21, Mikkel Lauritsen <re...@tala.dk> wrote:
>>
>> Hi all,
>>
>> I'm evaluating webapp frameworks in order to determine what to use
>> when rewriting a large-ish application. Wicket is a serious con-
>> testant, but there's one thing that I haven't been able to figure
>> out how to do properly: how do I create components that have a
>> dynamic list of child components, each child being an instance of
>> any subclass of Component (or WebMarkupContainer)?
>>
>> Basically what I need is to obtain HTML like
>>
>> <div>
>> markup from first child
>> markup from second child
>> ...
>> </div>
>>
>> Based on the documentation of the RepeatingView class I have tried
>> just adding the children to a RepeatingView with
>> <div wicket:id="children"></div> as markup, expecting that I would
>> get each child rendered inside a div element, but that doesn't
>> work - possibly because the markup doesn't contain elements that
>> refer to the id's of the child components. It works fine with labels,
>> but for example Buttons are not shown at all.
>>
>> My problem seems to be the same as discussed in
>>
http://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg18712.html
>> but I unfortunately haven't been able to get further from there.
>>
>> Any comments and suggestions that you may have are much appreciated.
>>
>> Best regards & thanks,
>> Mikkel Lauritsen
>>
>> ---------------------------------------------------------------------
>> 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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Components with dynamically defined child components
Posted by Cemal Bayramoglu <jW...@cabouge.com>.
Mikkel,
You will find more information than you have explicitly asked for here
[1][2] but there is interesting and instructive material to look at,
especially if you are new to Wicket and evaluating it for your
project.
Regards - Cemal
jWeekend
OO & Java Technologies, Wicket
Consulting, Development, Training
http://jWeekend.com
[1] http://jweekend.com/dev/ArticlesPage
[2] see the Bean Editor movie on http://code.google.com/p/londonwicket/downloads
On 7 May 2010 15:21, Mikkel Lauritsen <re...@tala.dk> wrote:
>
> Hi all,
>
> I'm evaluating webapp frameworks in order to determine what to use
> when rewriting a large-ish application. Wicket is a serious con-
> testant, but there's one thing that I haven't been able to figure
> out how to do properly: how do I create components that have a
> dynamic list of child components, each child being an instance of
> any subclass of Component (or WebMarkupContainer)?
>
> Basically what I need is to obtain HTML like
>
> <div>
> markup from first child
> markup from second child
> ...
> </div>
>
> Based on the documentation of the RepeatingView class I have tried
> just adding the children to a RepeatingView with
> <div wicket:id="children"></div> as markup, expecting that I would
> get each child rendered inside a div element, but that doesn't
> work - possibly because the markup doesn't contain elements that
> refer to the id's of the child components. It works fine with labels,
> but for example Buttons are not shown at all.
>
> My problem seems to be the same as discussed in
> http://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg18712.html
> but I unfortunately haven't been able to get further from there.
>
> Any comments and suggestions that you may have are much appreciated.
>
> Best regards & thanks,
> Mikkel Lauritsen
>
> ---------------------------------------------------------------------
> 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: Components with dynamically defined child components
Posted by Chris Colman <ch...@stepaheadsoftware.com>.
A lot of our pages are dynamically defined like you require. We make
extensive use of the component resolver interface to define our own
component resolvers.
We have even added a 'parameterization' feature which allows us to add a
variety of components that use the same definition but display different
data based on a parameter. The parameter is actually embedded into the
component id in a rather sly and, most likely, worst practice way... but
it works (except we do have problems when embedding dynamically defined
children in enclosures in recent releases - still using 1.4.2 for this
reason)
<span wicket:id="menuPanel?menuId=footerMenuA" />
<span wicket:id="menuPanel?menuId=footerMenuB" />
<span wicket:id="menuPanel?menuId=footerMenuC" />
Our resolver strips off everything from the first '?' and so sees
'menuPanel' as the component name and the treats the remainder as
parameters so that the same panel can be used with different data - all
defined by the markup writer, not the programmer.
Regards,
Chris Colman
Step Ahead Software
>-----Original Message-----
>From: Mikkel Lauritsen [mailto:renard@tala.dk]
>Sent: Saturday, 8 May 2010 12:21 AM
>To: users@wicket.apache.org
>Subject: Components with dynamically defined child components
>
>
>Hi all,
>
>I'm evaluating webapp frameworks in order to determine what to use
>when rewriting a large-ish application. Wicket is a serious con-
>testant, but there's one thing that I haven't been able to figure
>out how to do properly: how do I create components that have a
>dynamic list of child components, each child being an instance of
>any subclass of Component (or WebMarkupContainer)?
>
>Basically what I need is to obtain HTML like
>
><div>
> markup from first child
> markup from second child
> ...
></div>
>
>Based on the documentation of the RepeatingView class I have tried
>just adding the children to a RepeatingView with
><div wicket:id="children"></div> as markup, expecting that I would
>get each child rendered inside a div element, but that doesn't
>work - possibly because the markup doesn't contain elements that
>refer to the id's of the child components. It works fine with labels,
>but for example Buttons are not shown at all.
>
>My problem seems to be the same as discussed in
>http://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg18712.
html
>but I unfortunately haven't been able to get further from there.
>
>Any comments and suggestions that you may have are much appreciated.
>
>Best regards & thanks,
> Mikkel Lauritsen
>
>---------------------------------------------------------------------
>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