Re: Wicket and custom URL handling
Hi, Check chapter 8.6 in https://code.google.com/p/wicket-guide/ On Thu, May 30, 2013 at 9:59 PM, Francois Meillet < francois.meil...@gmail.com> wrote: > have a look to > http://wicketinaction.com/2011/07/wicket-1-5-mounting-pages/ and > https://cwiki.apache.org/confluence/display/WICKET/Request+mapping > > > François Meillet > Formation Wicket - Développement Wicket > > > > > > Le 30 mai 2013 à 20:48, Martin Sachs a écrit : > > > Hi, > > > > I am search for customizing the URL-Handling in wicket. There are not so > > many articles about that. > > I would like to handle all URLs starting with /east or /west with one > page. > > Other possible URLs: > > - /east/services/help > > - /east/services/ > > or > > - /east/services/help?param=value > > > > Also there should be some pages, which are mounted normally /error -> > > ErrorPage.class > > > > Also I dont want parameters like ?0 ?1 ... on the custom URLs and I > > would like to submit WicketForms to /east/services/ > > > > Which is the best approach to implement this? > > > > Martin > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > >
Re: Wicket and custom URL handling
have a look to http://wicketinaction.com/2011/07/wicket-1-5-mounting-pages/ and https://cwiki.apache.org/confluence/display/WICKET/Request+mapping François Meillet Formation Wicket - Développement Wicket Le 30 mai 2013 à 20:48, Martin Sachs a écrit : > Hi, > > I am search for customizing the URL-Handling in wicket. There are not so > many articles about that. > I would like to handle all URLs starting with /east or /west with one page. > Other possible URLs: > - /east/services/help > - /east/services/ > or > - /east/services/help?param=value > > Also there should be some pages, which are mounted normally /error -> > ErrorPage.class > > Also I dont want parameters like ?0 ?1 ... on the custom URLs and I > would like to submit WicketForms to /east/services/ > > Which is the best approach to implement this? > > Martin > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org >
Wicket and custom URL handling
Hi, I am search for customizing the URL-Handling in wicket. There are not so many articles about that. I would like to handle all URLs starting with /east or /west with one page. Other possible URLs: - /east/services/help - /east/services/ or - /east/services/help?param=value Also there should be some pages, which are mounted normally /error -> ErrorPage.class Also I dont want parameters like ?0 ?1 ... on the custom URLs and I would like to submit WicketForms to /east/services/ Which is the best approach to implement this? Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Custom URL Handling
> > What version are you using? > > > I'm using 1.4. Ok, then I can't really help you much. > URL control is actually very important here because > organization identity is vital in the domain that the app will serve. Agreed. IIUC, it may be easier in 1.4: http://www.nabble.com/-PROPOSAL--Use-path-in-URL-when-target-is-instance-o f-BookmarkablePageRequestTarget-td18188845.html Good luck! Please let me know how this works out. Cheers, =David - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Custom URL Handling
Oh, yeah - okay, so there was a little difference. It depends on your setup - mainly - will you ever need links from two organizations on the same page? Basically, what I was doing was creating branded sites. So, here's the gist of what I had: Apache frontend, based on site, would proxy to Tomcat with an additional path element ahead of the proxy like this: Your request URL: www.site-one.com/foo Apache proxied to Tomcat: www.site-one.com/org-one/foo My filter modified that so that it was again /foo and stuck the org into the session So, the Wicket-generated links of /foo or /bar worked fine - because the org didn't actually appear in the URL *path* - it was based on URL *domain* Does that make sense? I guess it would only work if you could use domain or subdomain based orgs rather than URL path based. -- Jeremy Thomerson http://www.wickettraining.com On Mon, Apr 20, 2009 at 4:32 PM, Matt Welch wrote: > > > Jeremy Thomerson-5 wrote: > > > > In the past, I've accomplished something similar in a hack-ish sort of > way > > that may work for you. Basically, I extended the WicketFilter and > > stripped > > the first argument off, storing it in the request before Wicket used the > > URL > > to determine the requested page. Maybe you can go down a similar route? > > > Thanks. That's something to consider. How did you get wicket to write out > the correct URL's for links though? > > -- > View this message in context: > http://www.nabble.com/Custom-URL-Handling-tp23130367p23145343.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Custom URL Handling
Jeremy Thomerson-5 wrote: > > In the past, I've accomplished something similar in a hack-ish sort of way > that may work for you. Basically, I extended the WicketFilter and > stripped > the first argument off, storing it in the request before Wicket used the > URL > to determine the requested page. Maybe you can go down a similar route? > Thanks. That's something to consider. How did you get wicket to write out the correct URL's for links though? -- View this message in context: http://www.nabble.com/Custom-URL-Handling-tp23130367p23145343.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Custom URL Handling
In the past, I've accomplished something similar in a hack-ish sort of way that may work for you. Basically, I extended the WicketFilter and stripped the first argument off, storing it in the request before Wicket used the URL to determine the requested page. Maybe you can go down a similar route? -- Jeremy Thomerson http://www.wickettraining.com On Mon, Apr 20, 2009 at 3:03 PM, Matt Welch wrote: > > > David Leangen-8 wrote: > > > > What version are you using? > > > I'm using 1.4. > > It wouldn't have occurred to me that it would be so difficult. I know it > may > seem odd, but URL control is actually very important here because > organization identity is vital in the domain that the app will serve. > > Hmmm > > Matt > > -- > View this message in context: > http://www.nabble.com/Custom-URL-Handling-tp23130367p23143850.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Custom URL Handling
David Leangen-8 wrote: > > What version are you using? > I'm using 1.4. It wouldn't have occurred to me that it would be so difficult. I know it may seem odd, but URL control is actually very important here because organization identity is vital in the domain that the app will serve. Hmmm Matt -- View this message in context: http://www.nabble.com/Custom-URL-Handling-tp23130367p23143850.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Custom URL Handling
Hi Matthew, Without some serious hacking in the Wicket internals this is not possible. (I did it, but the code is too specific to share.) Wicket 1.5 will improve URL handling, then this case will hopefully be easily. Regards, Erik. Matthew Welch wrote: I have been happily using HybridUrlCodingStrategy for the common pages of my current app, however I am now beginning to implement a section which has slightly different requirements for the URL and while I have some idea about where I can start to implement this custom URL handling, I would like the advice of those more experienced that I to make sure I'm not heading down a rathole. My application will serve many different organizations. All users will see the same set of pages, but the organization that they are choosing to view (users can view the data from any organization) will affect the data on those pages. I would like the urls to be something like this: http://myapp.com/organization1/calendar http://myapp.com/organization1/events http://myapp.com/organization2/calendar http://myapp.com/organization2/events I would need to know the organization part of the URL before retrieving the data for the page, so in reality it's nothing more that page parameter. In all other respects, I would like to keep the functionality provided by HybridUrlCodingStrategy, so would my best bet be to extend that strategy? Is there somewhere else I should be inserting custom code to intercept the URL before it gets to the coding strategy instead? Matt -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Custom URL Handling
Matt, I have done something similar, but depending on the version of Wicket you use, I wouldn't necessary recommend it. Things can get a little messy. I did this in 1.3.x. IIRC, I was told this was made easier in 1.4. What version are you using? =dml On Apr 20, 2009, at 1:54 PM, Matthew Welch wrote: I have been happily using HybridUrlCodingStrategy for the common pages of my current app, however I am now beginning to implement a section which has slightly different requirements for the URL and while I have some idea about where I can start to implement this custom URL handling, I would like the advice of those more experienced that I to make sure I'm not heading down a rathole. My application will serve many different organizations. All users will see the same set of pages, but the organization that they are choosing to view (users can view the data from any organization) will affect the data on those pages. I would like the urls to be something like this: http://myapp.com/organization1/calendar http://myapp.com/organization1/events http://myapp.com/organization2/calendar http://myapp.com/organization2/events I would need to know the organization part of the URL before retrieving the data for the page, so in reality it's nothing more that page parameter. In all other respects, I would like to keep the functionality provided by HybridUrlCodingStrategy, so would my best bet be to extend that strategy? Is there somewhere else I should be inserting custom code to intercept the URL before it gets to the coding strategy instead? Matt - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Custom URL Handling
I have been happily using HybridUrlCodingStrategy for the common pages of my current app, however I am now beginning to implement a section which has slightly different requirements for the URL and while I have some idea about where I can start to implement this custom URL handling, I would like the advice of those more experienced that I to make sure I'm not heading down a rathole. My application will serve many different organizations. All users will see the same set of pages, but the organization that they are choosing to view (users can view the data from any organization) will affect the data on those pages. I would like the urls to be something like this: http://myapp.com/organization1/calendar http://myapp.com/organization1/events http://myapp.com/organization2/calendar http://myapp.com/organization2/events I would need to know the organization part of the URL before retrieving the data for the page, so in reality it's nothing more that page parameter. In all other respects, I would like to keep the functionality provided by HybridUrlCodingStrategy, so would my best bet be to extend that strategy? Is there somewhere else I should be inserting custom code to intercept the URL before it gets to the coding strategy instead? Matt