Not sure what do you want and why is it about wicket?
Why not just make a "redirector service", like:
interface IRedirector
{
void redirect(PageParams pp);
}
class TournamentRedirector implements IRedirector
{
void redirect(PageParams pp)
{
setResponsePage(EditTournament.class, pp);
}
}
class SpecialTournamentRedirector implements IRedirector
{
void redirect(PageParams pp)
{
setResponsePage(SpecialEditTournament.class, pp);
}
}
and inject one of these objects?
2008/12/4 Steve Flasby <[EMAIL PROTECTED]>:
> Hi,
>
> I am looking to add a little more configurability to my Wicket app.
> At the moment all forward requests are coded something like:
>
> setResponsePage( EditTournament.class, pp );
>
> but I would like to be able to configure this more flexibly. For
> example, for certain installations I may want to forward to a
> subclass of EditTournament to handle a specialized version of this
> page with some additional input fields.
>
> I was hoping to use Guice for this (I dont like String based config),
> but it seems to be hard to selectively inject classes:
>
> @Inject(optional=true)
> Class<? extends Page> mEditTournament = EditTournament.class;
> ...
> setResponsePage( mEditTournament, pp );
>
> as this approach requires a coding standard of always injecting Pages
> as well as there being currently no simple way to selectively inject
> constants using Guice.
>
> I would override setResponse(..) but these are final methods so that
> route is also closed.
>
> I hope what Im trying to do is clear, can anyone offer a solution?
>
>
> Cheers - Steve
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
WBR, kan.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]