I think you're going down the wrong path with page injection. Try using
@Parameter to declare/inject a parameter to pass the page. You can
either make your parameter a String and use cycle.getPage(pageName) like
Andreas suggested or make it an IPage or ILoginPage to pass the page
directly. If you're just passing a String, you may need to @Inject some
other bit of infrastructure to resolve it into a page.
-Steve
Jan Vissers wrote:
Ok - but one way or another I want to 'parameterize' my component with
the
actual page, implementing the ILoginpage interface. So I'm guessing I
still need
some kind of @Parameter annotation, right?
-J.
Andreas Andreou wrote:
Well, instead of injecting the page,
you can do a cycle.getPage(pageName)
On 5/30/07, Jan Vissers <[EMAIL PROTECTED]> wrote:
anyone?
> I have a component that 'should' operate on a page it gets injected.
>
> Currently I have:
>
> ....
> import com.cumquatit.refapp.view.tapestry.pages.Loginpage;
> ....
>
> public abstract class LoginLogoff extends BaseComponent {
> ...
> @InjectPage("pages/login/Loginpage")
> public abstract Loginpage getLoginpage();
> ...
> }
>
>
> This however ties my component to a specific class: Loginpage. I'd
rather
> have something like this:
>
>
> public abstract class LoginLogoff extends BaseComponent {
> ...
> // @InjectPage(????) or @Parameter(????)
> public abstract ILoginpage getLoginpage();
> ...
> }
>
> Where the getLoginPage now references an interface ILoginpage, for
which
a
> concrete implementation is injected via the appropriate annotation.
>
> Does this make sense, and is this possible?
> If so - how?
>
> Thanks,
> -J.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]