Korbinian Bachl
2018-06-11 09:38:17 UTC
Hi,
situation: I need to add some "special" URL handling for certain URLs to have product pages and catalog pages on root. As we also use brix we already have at least one compoundRequestMapper already in use.
Now, wicket seems to have 2 places for that. A new RootRequestMapper e.g.:
YourApplication#init():
old = application.getRootRequestMapper()
application.setRootRequestMapper(new CustomRequestMapper(old))
or a CompoundRequestMapper e.g.:
application.getRootRequestMapperAsCompound().add(new CustomRequestMapper(old));
But what are the pros or cons of using either RootRequestMapper vs CompoundRequestMapper?
From my point of view the only difference is that CompoundRequestMapper gets exectued based on score, where max score gets used first and lower scores later as long as the
public IRequestHandler mapRequest(Request request)
doesnt return null anymore; Did I miss something?
Best,
KB
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@wicket.apache.org
For additional commands, e-mail: users-***@wicket.apache.org
situation: I need to add some "special" URL handling for certain URLs to have product pages and catalog pages on root. As we also use brix we already have at least one compoundRequestMapper already in use.
Now, wicket seems to have 2 places for that. A new RootRequestMapper e.g.:
YourApplication#init():
old = application.getRootRequestMapper()
application.setRootRequestMapper(new CustomRequestMapper(old))
or a CompoundRequestMapper e.g.:
application.getRootRequestMapperAsCompound().add(new CustomRequestMapper(old));
But what are the pros or cons of using either RootRequestMapper vs CompoundRequestMapper?
From my point of view the only difference is that CompoundRequestMapper gets exectued based on score, where max score gets used first and lower scores later as long as the
public IRequestHandler mapRequest(Request request)
doesnt return null anymore; Did I miss something?
Best,
KB
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@wicket.apache.org
For additional commands, e-mail: users-***@wicket.apache.org