Thierry Boileau <thboileau <at> gmail.com> writes:
> 
> Ooops,
> 
> I forget : you also need to set the "equals" mode when routing to 
> fooListFinder, otherwise this route will catch the "garbage" URLs.
> Best regards,
> Thierry Boileau

Thanks, that worked for me.  I did need the "?{fooQuery}" part, although I
forgot to add the Variable part and it still worked as I expected.  What does
the new Variable do?

Stokes.

[...]
> >        route = 
> > component.getDefaultHost().attach("/foos/{fooid}?{fooQuery}", , 
> > <FooFinder>);
> >        route.getTemplate().setMatchingMode(Template.MODE_EQUALS);
> >        //In this case, the variable "fooQuery" is redefined : it's a 
> > query variable, and it is not required  (in order to allow such URIs : 
> > /foos/123?).
> >        Variable variable = new Variable(Variable.TYPE_URI_QUERY, "", 
> > false, false);
> >        route.getTemplate().getVariables().put("fooQuery", variable);


Reply via email to