Hi there ...
Finally gotten around to try and make this work.

For me it is important that in cycle.getPage(pageName)
the "pageName" is actually a parameter to the component. I've been trying this (below) but that doesn't work.
I do not quite understand why, and would like somebodies view on this:

I have a superclass that defines all kinds of various interesting stuff, amongst others it does:

   @Bean(initializer="value=pages/login/Loginpage")
   public abstract StringHolder getLoginPageName();

The StringHolder class, is actually just that that a class that holds a string, and has a "value" property.
Now in my component I'm trying to pick up this bean like so:

@Parameter(name="loginPage", defaultValue="ognl:beans.loginPageName.value")
   public abstract String getLoginpage();

When I enter the above ognl expression in my page, it indeed displays the initialized value, but when
I try this in my component, the application throws an exception:

Exception invoking listener method doLogin of component pages/ResearchCardListpage/loginLogoff: Unable to read OGNL expression '<parsed OGNL expression>' of [EMAIL PROTECTED]/ResearchCardListpage/loginLogoff]: org.apache.tapestry.bean.BeanProvider.loginPageName

The question is, what am I missing?


How do I make this work?
-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]





--
Cumquat Information Technology
De Dreef 19
3706 BR Zeist
T +31 (0)30 - 6940490
F +31 (0)30 - 6940499
W http://www.cumquat.nl

E [EMAIL PROTECTED]
M +31 6 51 169 556
B http://www.cumquat.nl/technology_atom10.xml



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to