Re: PageParameters and setResponsePage()
I can only suggest you to use Wicket 1.5. In current trunk MountedMapper supports all of this - named, indexed and optional parameters. See http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/request/mapper/MountedMapperTest.java?view=markup for examples On Thu, May 5, 2011 at 7:44 AM, Peter Miklosko peter.b...@gmail.com wrote: Isn't my question clear or just nobody wants to get into mud of long explanation? Peter On 4 May 2011 16:04, Peter Miklosko peter.b...@gmail.com wrote: We are using MixedParamUrlCodingStrategy to create user/SEO friendly URLs for booking website. The booking can have two different types as fixed or flexible that do share some parameters, but not stuff like time periods. From what I read in API it is my understanding that if some of the parameters are not specified these will get empty string as value. However when we tried this we can see that setResponsePage gets correct set PageParameters, however on the page side the values are associated with keys that should have been empty strings. Example MixedParamUrlCodingStrategy search = new MixedParamUrlCodingStrategy( MyHttpParams.SEARCH, SearchDestinationPage.class, new String[]{ MyHttpParams.SEARCH_TYPE, /** * Search params */ MyHttpParams.DEPARTURE_AIRPORT, MyHttpParams.RETURN_AIRPORT, /** * Fix dates search params */ MyHttpParams.DEPARTURE_DATE, MyHttpParams.RETURN_DATE, MyHttpParams.BUDGET, /** * Flex dates search params */ MyHttpParams.FROM_DAY, MyHttpParams.TO_DAY, MyHttpParams.WEEKS, MyHttpParams.MONTHS, /** * Secondary params */ MyHttpParams.ADULTS, MyHttpParams.CHILDREN, MyHttpParams.INFANT, MyHttpParams.DEPARTURE_TIME, MyHttpParams.RETURN_TIME, MyHttpParams.CLASS_TYPE, MyHttpParams.DESTINATION_ID } ); mount(search); Model to PageParameters public PageParameters toPageParameters() { PageParameters params = new PageParameters(); params.put(MyHttpParams.DEPARTURE_AIRPORT, getDepartureAirportIATA()); params.put(MyHttpParams.RETURN_AIRPORT, getArrivalAirportIATA()); params.put(MyHttpParams.DEPARTURE_DATE, format(getDepartureDate(), new SimpleDateFormat(ddMM))); params.put(MyHttpParams.RETURN_DATE, format(getArrivalDate(), new SimpleDateFormat(ddMM))); params.put(MyHttpParams.BUDGET, getBudget()); params.put(MyHttpParams.ADULTS, getAdults()); params.put(MyHttpParams.CHILDREN, getChildren()); params.put(MyHttpParams.INFANT, getInfants()); params.put(MyHttpParams.DEPARTURE_TIME, getDepartureTime()); params.put(MyHttpParams.RETURN_TIME, getArrivalTime()); params.put(MyHttpParams.CLASS_TYPE, getFlightClass()); return params; } IN OUT from=PRG search_type=PRG to=BTS from=BTS from_date=05052011 to=05052011 to_date=12052011 from_date=12052011 budget=500.0 to_date=500.0 adults=1 budget=1 children=0 from_day=0 infant=0 to_day=0 departure_time=00:00-23:59 weeks=00:00-23:59 return_time=00:00-23:59 months=00:00-23:59 class_type=ECONOMY adults=ECONOMY destination_id=44281 children=44281 I hope that my question makes sense. Peter -- 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
Re: PageParameters and setResponsePage()
Thank you for the tip Martin. Sorry to ask silly question, but where can I find API for 1.5-M3? I found this http://www.jarvana.com/jarvana/view/org/apache/wicket/wicket/1.5-M3/wicket-1.5-M3-javadoc.jar!/index.html but it is missing some classes like for example PageParameters. Or it is best to download source and build it from it? Peter On 5 May 2011 07:03, Martin Grigorov mgrigo...@apache.org wrote: I can only suggest you to use Wicket 1.5. In current trunk MountedMapper supports all of this - named, indexed and optional parameters. See http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/request/mapper/MountedMapperTest.java?view=markup for examples -- 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
Re: PageParameters and setResponsePage()
Download the jar from Maven repos. Latest version is RC3, not M3. On Thu, May 5, 2011 at 11:17 AM, Peter Miklosko peter.b...@gmail.com wrote: Thank you for the tip Martin. Sorry to ask silly question, but where can I find API for 1.5-M3? I found this http://www.jarvana.com/jarvana/view/org/apache/wicket/wicket/1.5-M3/wicket-1.5-M3-javadoc.jar!/index.html but it is missing some classes like for example PageParameters. Or it is best to download source and build it from it? Peter On 5 May 2011 07:03, Martin Grigorov mgrigo...@apache.org wrote: I can only suggest you to use Wicket 1.5. In current trunk MountedMapper supports all of this - named, indexed and optional parameters. See http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/request/mapper/MountedMapperTest.java?view=markup for examples -- 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 -- 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
Re: PageParameters and setResponsePage()
I downloaded RC3, but even after building API from source (mvn javadoc:javadoc) when I open documentation in wicket-core/target/site/apidoc there is no package parameters inside org.apache.wicket.request.mapper and because of that no PageParameters class documentation. Any suggestions? Peter On 5 May 2011 10:37, Martin Grigorov mgrigo...@apache.org wrote: Download the jar from Maven repos. Latest version is RC3, not M3. On Thu, May 5, 2011 at 11:17 AM, Peter Miklosko peter.b...@gmail.com wrote: Thank you for the tip Martin. Sorry to ask silly question, but where can I find API for 1.5-M3? I found this http://www.jarvana.com/jarvana/view/org/apache/wicket/wicket/1.5-M3/wicket-1.5-M3-javadoc.jar!/index.html but it is missing some classes like for example PageParameters. Or it is best to download source and build it from it? Peter On 5 May 2011 07:03, Martin Grigorov mgrigo...@apache.org wrote: I can only suggest you to use Wicket 1.5. In current trunk MountedMapper supports all of this - named, indexed and optional parameters. See http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/request/mapper/MountedMapperTest.java?view=markup for examples -- 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 -- 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
Re: PageParameters and setResponsePage()
it is in wicket-request.jar On Thu, May 5, 2011 at 1:47 PM, Peter Miklosko peter.b...@gmail.com wrote: I downloaded RC3, but even after building API from source (mvn javadoc:javadoc) when I open documentation in wicket-core/target/site/apidoc there is no package parameters inside org.apache.wicket.request.mapper and because of that no PageParameters class documentation. Any suggestions? Peter On 5 May 2011 10:37, Martin Grigorov mgrigo...@apache.org wrote: Download the jar from Maven repos. Latest version is RC3, not M3. On Thu, May 5, 2011 at 11:17 AM, Peter Miklosko peter.b...@gmail.com wrote: Thank you for the tip Martin. Sorry to ask silly question, but where can I find API for 1.5-M3? I found this http://www.jarvana.com/jarvana/view/org/apache/wicket/wicket/1.5-M3/wicket-1.5-M3-javadoc.jar!/index.html but it is missing some classes like for example PageParameters. Or it is best to download source and build it from it? Peter On 5 May 2011 07:03, Martin Grigorov mgrigo...@apache.org wrote: I can only suggest you to use Wicket 1.5. In current trunk MountedMapper supports all of this - named, indexed and optional parameters. See http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/request/mapper/MountedMapperTest.java?view=markup for examples -- 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 -- 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 -- 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
Re: PageParameters and setResponsePage()
God damn it so complicated... ;) Thank you for all your help Martin! Peter On 5 May 2011 12:51, Martin Grigorov mgrigo...@apache.org wrote: it is in wicket-request.jar On Thu, May 5, 2011 at 1:47 PM, Peter Miklosko peter.b...@gmail.com wrote: I downloaded RC3, but even after building API from source (mvn javadoc:javadoc) when I open documentation in wicket-core/target/site/apidoc there is no package parameters inside org.apache.wicket.request.mapper and because of that no PageParameters class documentation. Any suggestions? Peter On 5 May 2011 10:37, Martin Grigorov mgrigo...@apache.org wrote: Download the jar from Maven repos. Latest version is RC3, not M3. On Thu, May 5, 2011 at 11:17 AM, Peter Miklosko peter.b...@gmail.com wrote: Thank you for the tip Martin. Sorry to ask silly question, but where can I find API for 1.5-M3? I found this http://www.jarvana.com/jarvana/view/org/apache/wicket/wicket/1.5-M3/wicket-1.5-M3-javadoc.jar!/index.html but it is missing some classes like for example PageParameters. Or it is best to download source and build it from it? Peter On 5 May 2011 07:03, Martin Grigorov mgrigo...@apache.org wrote: I can only suggest you to use Wicket 1.5. In current trunk MountedMapper supports all of this - named, indexed and optional parameters. See http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/request/mapper/MountedMapperTest.java?view=markup for examples -- 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 -- 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 -- 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
Re: PageParameters and setResponsePage()
Using Maven/Ivy/Gradle/Buildr/... helps a lot these days ;-) On Thu, May 5, 2011 at 1:54 PM, Peter Miklosko peter.b...@gmail.com wrote: God damn it so complicated... ;) Thank you for all your help Martin! Peter On 5 May 2011 12:51, Martin Grigorov mgrigo...@apache.org wrote: it is in wicket-request.jar On Thu, May 5, 2011 at 1:47 PM, Peter Miklosko peter.b...@gmail.com wrote: I downloaded RC3, but even after building API from source (mvn javadoc:javadoc) when I open documentation in wicket-core/target/site/apidoc there is no package parameters inside org.apache.wicket.request.mapper and because of that no PageParameters class documentation. Any suggestions? Peter On 5 May 2011 10:37, Martin Grigorov mgrigo...@apache.org wrote: Download the jar from Maven repos. Latest version is RC3, not M3. On Thu, May 5, 2011 at 11:17 AM, Peter Miklosko peter.b...@gmail.com wrote: Thank you for the tip Martin. Sorry to ask silly question, but where can I find API for 1.5-M3? I found this http://www.jarvana.com/jarvana/view/org/apache/wicket/wicket/1.5-M3/wicket-1.5-M3-javadoc.jar!/index.html but it is missing some classes like for example PageParameters. Or it is best to download source and build it from it? Peter On 5 May 2011 07:03, Martin Grigorov mgrigo...@apache.org wrote: I can only suggest you to use Wicket 1.5. In current trunk MountedMapper supports all of this - named, indexed and optional parameters. See http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/request/mapper/MountedMapperTest.java?view=markup for examples -- 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 -- 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 -- 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 -- 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
PageParameters and setResponsePage()
We are using MixedParamUrlCodingStrategy to create user/SEO friendly URLs for booking website. The booking can have two different types as fixed or flexible that do share some parameters, but not stuff like time periods. From what I read in API it is my understanding that if some of the parameters are not specified these will get empty string as value. However when we tried this we can see that setResponsePage gets correct set PageParameters, however on the page side the values are associated with keys that should have been empty strings. Example MixedParamUrlCodingStrategy search = new MixedParamUrlCodingStrategy( MyHttpParams.SEARCH, SearchDestinationPage.class, new String[]{ MyHttpParams.SEARCH_TYPE, /** * Search params */ MyHttpParams.DEPARTURE_AIRPORT, MyHttpParams.RETURN_AIRPORT, /** * Fix dates search params */ MyHttpParams.DEPARTURE_DATE, MyHttpParams.RETURN_DATE, MyHttpParams.BUDGET, /** * Flex dates search params */ MyHttpParams.FROM_DAY, MyHttpParams.TO_DAY, MyHttpParams.WEEKS, MyHttpParams.MONTHS, /** * Secondary params */ MyHttpParams.ADULTS, MyHttpParams.CHILDREN, MyHttpParams.INFANT, MyHttpParams.DEPARTURE_TIME, MyHttpParams.RETURN_TIME, MyHttpParams.CLASS_TYPE, MyHttpParams.DESTINATION_ID } ); mount(search); Model to PageParameters public PageParameters toPageParameters() { PageParameters params = new PageParameters(); params.put(MyHttpParams.DEPARTURE_AIRPORT, getDepartureAirportIATA()); params.put(MyHttpParams.RETURN_AIRPORT, getArrivalAirportIATA()); params.put(MyHttpParams.DEPARTURE_DATE, format(getDepartureDate(), new SimpleDateFormat(ddMM))); params.put(MyHttpParams.RETURN_DATE, format(getArrivalDate(), new SimpleDateFormat(ddMM))); params.put(MyHttpParams.BUDGET, getBudget()); params.put(MyHttpParams.ADULTS, getAdults()); params.put(MyHttpParams.CHILDREN, getChildren()); params.put(MyHttpParams.INFANT, getInfants()); params.put(MyHttpParams.DEPARTURE_TIME, getDepartureTime()); params.put(MyHttpParams.RETURN_TIME, getArrivalTime()); params.put(MyHttpParams.CLASS_TYPE, getFlightClass()); return params; } IN OUT from=PRGsearch_type=PRG to=BTSfrom=BTS from_date=05052011to=05052011 to_date=12052011from_date=12052011 budget=500.0to_date=500.0 adults=1budget=1 children=0from_day=0 infant=0to_day=0 departure_time=00:00-23:59weeks=00:00-23:59 return_time=00:00-23:59months=00:00-23:59 class_type=ECONOMYadults=ECONOMY destination_id=44281children=44281 I hope that my question makes sense. Peter
Re: PageParameters and setResponsePage()
Isn't my question clear or just nobody wants to get into mud of long explanation? Peter On 4 May 2011 16:04, Peter Miklosko peter.b...@gmail.com wrote: We are using MixedParamUrlCodingStrategy to create user/SEO friendly URLs for booking website. The booking can have two different types as fixed or flexible that do share some parameters, but not stuff like time periods. From what I read in API it is my understanding that if some of the parameters are not specified these will get empty string as value. However when we tried this we can see that setResponsePage gets correct set PageParameters, however on the page side the values are associated with keys that should have been empty strings. Example MixedParamUrlCodingStrategy search = new MixedParamUrlCodingStrategy( MyHttpParams.SEARCH, SearchDestinationPage.class, new String[]{ MyHttpParams.SEARCH_TYPE, /** * Search params */ MyHttpParams.DEPARTURE_AIRPORT, MyHttpParams.RETURN_AIRPORT, /** * Fix dates search params */ MyHttpParams.DEPARTURE_DATE, MyHttpParams.RETURN_DATE, MyHttpParams.BUDGET, /** * Flex dates search params */ MyHttpParams.FROM_DAY, MyHttpParams.TO_DAY, MyHttpParams.WEEKS, MyHttpParams.MONTHS, /** * Secondary params */ MyHttpParams.ADULTS, MyHttpParams.CHILDREN, MyHttpParams.INFANT, MyHttpParams.DEPARTURE_TIME, MyHttpParams.RETURN_TIME, MyHttpParams.CLASS_TYPE, MyHttpParams.DESTINATION_ID } ); mount(search); Model to PageParameters public PageParameters toPageParameters() { PageParameters params = new PageParameters(); params.put(MyHttpParams.DEPARTURE_AIRPORT, getDepartureAirportIATA()); params.put(MyHttpParams.RETURN_AIRPORT, getArrivalAirportIATA()); params.put(MyHttpParams.DEPARTURE_DATE, format(getDepartureDate(), new SimpleDateFormat(ddMM))); params.put(MyHttpParams.RETURN_DATE, format(getArrivalDate(), new SimpleDateFormat(ddMM))); params.put(MyHttpParams.BUDGET, getBudget()); params.put(MyHttpParams.ADULTS, getAdults()); params.put(MyHttpParams.CHILDREN, getChildren()); params.put(MyHttpParams.INFANT, getInfants()); params.put(MyHttpParams.DEPARTURE_TIME, getDepartureTime()); params.put(MyHttpParams.RETURN_TIME, getArrivalTime()); params.put(MyHttpParams.CLASS_TYPE, getFlightClass()); return params; } IN OUT from=PRGsearch_type=PRG to=BTSfrom=BTS from_date=05052011to=05052011 to_date=12052011from_date=12052011 budget=500.0to_date=500.0 adults=1budget=1 children=0from_day=0 infant=0to_day=0 departure_time=00:00-23:59weeks=00:00-23:59 return_time=00:00-23:59months=00:00-23:59 class_type=ECONOMYadults=ECONOMY destination_id=44281children=44281 I hope that my question makes sense. Peter