RE: Create custom UrlCodingStrategy

2008-12-10 Thread Mathias P.W Nilsson
Maybe I should wait. I have solved it change the host file so that there will be different host to the same url. This way there is a new session every request to the host and I can read the header. -- View this message in context: http://www.nabble.com/Create-custom-UrlCodingStrategy-tp2066081

RE: Create custom UrlCodingStrategy

2008-12-10 Thread David Leangen
ilsson [mailto:[EMAIL PROTECTED] > Sent: 3 December 2008 22:20 > To: users@wicket.apache.org > Subject: Re: Create custom UrlCodingStrategy > > > > Is there no solution to this? > > this is my app ( http://localhost/myapp ). All I want is to be > able to have > a cus

Re: Create custom UrlCodingStrategy

2008-12-03 Thread Peter Ertl
maybe this would be the time to apply my patch? :-) https://issues.apache.org/jira/browse/WICKET-1666 Am 03.12.2008 um 16:18 schrieb Mathias P.W Nilsson: Yes, thanks! This is what I have been trying to do but with no luck. -- View this message in context: http://www.nabble.com/Create-custo

Re: Create custom UrlCodingStrategy

2008-12-03 Thread Mathias P.W Nilsson
Yes, thanks! This is what I have been trying to do but with no luck. -- View this message in context: http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20814900.html Sent from the Wicket - User mailing list archive at Nabble.com. ---

Re: Create custom UrlCodingStrategy

2008-12-03 Thread Martin Sachs
Yes, then you have two ways to do that * implement your own RequestCycleProcessor * implement IRequestCodingStrategy and IRequestTargetMountsInfo or subclass WebRequestCodingStrategy (you can look on UrlCompressingWebCodingStrategy for a sample) Thats the way... Martin Mathias P.W Nils

Re: Create custom UrlCodingStrategy

2008-12-03 Thread Mathias P.W Nilsson
Problem is this setResponsePage(new LoginPage(moreParam); will not generate an url like http://localhost/myapp/customer1/login. -- View this message in context: http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20814520.html Sent from the Wicket - User mailing list archive at N

Re: Create custom UrlCodingStrategy

2008-12-03 Thread Martin Sachs
ok simple DispatchingPage with Pageparameter DispatchingPage(Pageparameter params){ customerId = params.getIndexedParam(0); // not real syntax action = params.getIndexedParam(1); // not real syntax if(action.equals("login")){ PageParameter moreParam = new PageParameter();

Re: Create custom UrlCodingStrategy

2008-12-03 Thread Mathias P.W Nilsson
Also you must handle the second parameter /login maybe by switching different panels or redirect to another page ! How should this be done? I must keep the customer/customerId in every page. What happens when redirecting? -- View this message in context: http://www.nabble.com/Create-custom-Url

Re: Create custom UrlCodingStrategy

2008-12-03 Thread Martin Sachs
hi, i have only a simple idea. implement a UrlcodingStrategy like IndexedParamUrlCodingStrategy, where the words after first / are parameter. if you use this e.g. mount(new CustomerParamUrlCodingStrategie("/customers",...)); you would able to get the customerID as PageParameter like from the I

Re: Create custom UrlCodingStrategy

2008-12-03 Thread Mathias P.W Nilsson
Is there no solution to this? this is my app ( http://localhost/myapp ). All I want is to be able to have a customer name after myapp that follows in the application. -- View this message in context: http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20812776.html Sent from the Wi

Re: Create custom UrlCodingStrategy

2008-12-02 Thread Mathias P.W Nilsson
To clarify things. It's something like in this post that I'm after. Get the customer from db See Dmitry Kandalov post http://www.nabble.com/mounting-large-number-of-url-td13972929.html#a14010271 http://www.nabble.com/mounting-large-number-of-url-td13972929.html#a14010271 -- View this message i

Re: Create custom UrlCodingStrategy

2008-12-02 Thread Mathias P.W Nilsson
Thank you very much but I'm afraid I can't use apache as a front end due to the server setup. I need a way to do this in wicket. -- View this message in context: http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20801209.html Sent from the Wicket - User mailing list archive at N

Re: Create custom UrlCodingStrategy

2008-12-02 Thread Jeremy Thomerson
[I'm sending again slightly modified because the first response got spam-blocked - dunno why - hopefully you're not getting this twice] I did something similar to this a while back and came up with the following solution. It may not be the best way, but what I do is extend WicketFilter and catch

Re: Create custom UrlCodingStrategy

2008-12-02 Thread kan
Oh sorry, I thought you want use it with mount. In this case you have to deal with IRequestCodingStrategy, not with IRequestTargetUrlCodingStrategy. Seems you can make your implementation which proxies given rcu (usually it will be WebRequestCodingStrategy or crypted), it passes encode/decode t

Re: Create custom UrlCodingStrategy

2008-12-02 Thread Mathias P.W Nilsson
Nope! I'm lost here. How can I create my own IRequestTargetUrlCodingStrategy when I need to add a mount path. The mount path is not the same as the page requested. Let me explain this more in detail. I wan't to mount Base.class to /login. But I need to access the /login thru /Customer1/login a

Re: Create custom UrlCodingStrategy

2008-12-02 Thread Mathias P.W Nilsson
Thanks! I will look at this and maybe come back on the subject. One problem that I saw was that the request didn't get printed in the UrlCodingStrategy because it was not mounted in init. Maybe I'm wrong about this and need to look it over again. -- View this message in context: http://www.nabb

Re: Create custom UrlCodingStrategy

2008-12-02 Thread kan
RTFS :) If you look at any implementation, say BookmarkablePageRequestTargetUrlCodingStrategy.decode, you'll see how RequestParameters are turning in IRequestTarget, and encode does opposite - IRequestTarget is turning in url. You can set page a parameter (say "variation") from desired part of url

Re: Create custom UrlCodingStrategy

2008-12-02 Thread Mathias P.W Nilsson
Ok Is there any topic on UrlRewriteFilter and Wicket. I still need to set variation and locale even when I use UrlRewriteFilter. -- View this message in context: http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20793471.html Sent from the Wicket - User mailing list archive at N

Re: Create custom UrlCodingStrategy

2008-12-02 Thread kan
I only afraid, you cannot mount to "root". So, it will be "http://localhost/company/edgesoft/something";, "http://localhost/company/another/something"; Maybe easier and much more flexible for you will be UrlRewriteFilter. 2008/12/2 kan <[EMAIL PROTECTED]>: > Basically, just implement IRequ

Re: Create custom UrlCodingStrategy

2008-12-02 Thread kan
Basically, just implement IRequestTargetUrlCodingStrategy. :) What is precise question? 2008/11/24 Mathias P.W Nilsson <[EMAIL PROTECTED]>: > > Hi, > > I need some info in how to create my own UrlCodingStrategy > > This is the preconditions. > I have a database with 20 - 100 customers that needs t

Re: Create custom UrlCodingStrategy

2008-12-02 Thread Francis De Brabandere
sorry for the misunderstanding, I never made a url coding strategy so I won't be able to help you, anybody else? On Tue, Dec 2, 2008 at 2:31 PM, Mathias P.W Nilsson <[EMAIL PROTECTED]> wrote: > > Nope this is not what I mean! > > What if I want to mount "/events" to Event.class and 100 customers n

Re: Create custom UrlCodingStrategy

2008-12-02 Thread Mathias P.W Nilsson
Nope this is not what I mean! What if I want to mount "/events" to Event.class and 100 customers needs to use the same page with different variation? when the user attempts http://localhost/myapp/test/events/ ( test is the customer name ) then it should invoke /events. http://localhost/myapp/tes

Re: Create custom UrlCodingStrategy

2008-12-02 Thread Francis De Brabandere
> http://localhost/test/hello > http://localhost/test2/hello > > Can this be done with wicket? Yes, this is called mounting pages or resources see here: http://cwiki.apache.org/WICKET/url-coding-strategies.html http://www.javalobby.org/java/forums/t68753.html > > -- > View this message in conte

Re: Create custom UrlCodingStrategy

2008-12-02 Thread Mathias P.W Nilsson
Can url rewrite be used for this. I guess there are alot of people that want custom made css and so on based on a url http://localhost/test/hello http://localhost/test2/hello Can this be done with wicket? -- View this message in context: http://www.nabble.com/Create-custom-UrlCodingStrategy-