RE: How to use wicket:fragment?
Hi Balaji, I am not sure if this helps but I have used fragments in wicket 1.5.7 and from what I see in your code, it should work. Here is a simple snippet that shows how I used it: In my page class, here is what I have to different and show a scrolling fragment or ordered list of items fragment: Fragment filterViewFragment; if (isScrollingFragment(catList)) { filterViewFragment = new Fragment(filterViewFragment, scrollingFragment, this); // some other components or fields } else { filterViewFragment = new Fragment(filterViewFragment, regularFragment, this); // some other components or fields } In my page html, here is what I have: wicket:panel wicket:container wicket:id=filterViewFragment / div class=clear/div wicket:fragment wicket:id=scrollingFragment div style=height: 355px; overflow: hidden; padding: 0px; width: 199px; id=pane2 class=scroll-pane jspScrollable tabindex=0 // somethig here /div /wicket:fragment wicket:fragment wicket:id=regularFragment div ul wicket:id=catListContainer // something here /ul /div /wicket:fragment /wicket:panel Thanks Rama -Original Message- From: bala ji [mailto:balaji@gmail.com] Sent: Wednesday, August 22, 2012 5:46 AM To: users@wicket.apache.org Subject: How to use wicket:fragment? I've added a scenario where i need to use wicket:fragments. Following is my parent html. html body wicket:child/ /body /html Now i'm giving child html which will replace wicket:child/ of my parent html html body wicket:extend ... span wicket:id=myPanelExample input (will be removed)/span ... wicket:fragment wicket:id=frag1panel 1/wicket:fragment wicket:fragment wicket:id=frag2panel 2/wicket:fragment /wicket:extend /body /html The above situation is working fine in case of wicket 1.4, but now in wicket 1.5.3 its giving me an error of No Markup found. -- Balaji.N - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Request mapping question
We have been used Wicket for developing our web applications so far and currently we are trying to tackle one issue where an optional language parameters comes in the url for all applications. We are trying to see how can we customize our applications to have a common page mapper or common processor which interprets the request first to identify if there is any language parameter that is being passed and if not just resolve the page usually however wicket does it. Let me detail it further with an example. For example, if we have two web application say FirstApp and SecondApp that are running in our environment associated to their own contexts. Now for FirstApp, lets say we have following mountPage option in that particular webapplication: mountPage(/firstpage/${someinput}, FirstPage.class); And for SecondApp, lets say we have following mountPage option in that particular webapplication: mountPage(/secondpage/${someinput}, SecondPage.class); Now say, http://www.abcd.com/firstpage/xyz - goes to First application and it resolves to that FirstPage and does whatever it is supposed to do http://www.abcd.com/secondpage/xyz - goes to Second application and it resolves to that SecondPage and does whatever it is supposed to do Now if we have a optional language parameter in the request path, how can we handle request mapping for that case without altering those applications mount options. http://www.abcd.com/fr/firstpage/xyz http://www.abcd.com/es/firstpage/xyz Now, I know that we can change mount options as follows and tackle that each application will expect an optional language param. mountPage(/#{language}/firstpage/${someinput}, FirstPage.class); mountPage(/#{language}/secondpage/${someinput}, SecondPage.class); But is it possible to handle it before even the request comes to WicketFilter? If yes, can anyone share any thoughts or views on that. I am not looking to edit all webapplications and all page paths to edit and add that optional language param, instead if I can handle the request url before even wicketFilter tries to resolve that page.. it would help. Also, I am stressing if that can be a common level because we might have multiple applications coming up and we want to tackle that issue in a common place.. Any pointers will be of great help.. Appreciate you help in advance. Thanks Rama
Re: Request mapping question
Thanks Martin, I will take a look and let you know. Martin Grigorov mgrigo...@apache.org wrote: Hi, Take a look at https://github.com/apache/wicket/tree/master/wicket-examples/src/main/java/org/apache/wicket/examples/requestmapper and more specifically the usage of LocaleFirstMapper. On Thu, Aug 16, 2012 at 10:19 PM, Rama Kesara rkes...@art.com wrote: We have been used Wicket for developing our web applications so far and currently we are trying to tackle one issue where an optional language parameters comes in the url for all applications. We are trying to see how can we customize our applications to have a common page mapper or common processor which interprets the request first to identify if there is any language parameter that is being passed and if not just resolve the page usually however wicket does it. Let me detail it further with an example. For example, if we have two web application say FirstApp and SecondApp that are running in our environment associated to their own contexts. Now for FirstApp, lets say we have following mountPage option in that particular webapplication: mountPage(/firstpage/${someinput}, FirstPage.class); And for SecondApp, lets say we have following mountPage option in that particular webapplication: mountPage(/secondpage/${someinput}, SecondPage.class); Now say, http://www.abcd.com/firstpage/xyz - goes to First application and it resolves to that FirstPage and does whatever it is supposed to do http://www.abcd.com/secondpage/xyz - goes to Second application and it resolves to that SecondPage and does whatever it is supposed to do Now if we have a optional language parameter in the request path, how can we handle request mapping for that case without altering those applications mount options. http://www.abcd.com/fr/firstpage/xyz http://www.abcd.com/es/firstpage/xyz Now, I know that we can change mount options as follows and tackle that each application will expect an optional language param. mountPage(/#{language}/firstpage/${someinput}, FirstPage.class); mountPage(/#{language}/secondpage/${someinput}, SecondPage.class); But is it possible to handle it before even the request comes to WicketFilter? If yes, can anyone share any thoughts or views on that. I am not looking to edit all webapplications and all page paths to edit and add that optional language param, instead if I can handle the request url before even wicketFilter tries to resolve that page.. it would help. Also, I am stressing if that can be a common level because we might have multiple applications coming up and we want to tackle that issue in a common place.. Any pointers will be of great help.. Appreciate you help in advance. Thanks Rama -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org