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("ddMMyyyy")));
>>         params.put(MyHttpParams.RETURN_DATE, format(getArrivalDate(), new
>> SimpleDateFormat("ddMMyyyy")));
>>         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

Reply via email to