How to you convert the string "false" to an instance of whatever
PageDelegate is?  Tapestry doesn't know either.

On Wed, Nov 26, 2008 at 3:41 AM, Maximilian Weißböck
<[EMAIL PROTECTED]> wrote:
> I have a component that has a delegate as parameter binding like this:
>
>
>
>   @Parameter("false")
>
>   @Property
>
>   private PageDelegate pageDelegate;
>
>
>
> Inside the page I'm testing if the delegate is set (only then an ActionLink 
> will be shown)
>
>
>
>   <t:if test="pageDelegate">
>
>
>
>
>
> PageDelegate is an Interface, and I'm getting this error on startup:
>
>
>
> [ERROR] ipeople.Index Render queue error in 
> BeginRender[ipeople/Index:iphonelistlayout.if_0]: Failure reading parameter 
> 'test' of component ipeople/Index:iphonelistlayout.if_0: Failure reading 
> parameter 'pageDelegate' of component ipeople/Index:iphonelistlayout: Could 
> not find a coercion from type java.lang.Boolean to type 
> at.sphinx.sxfinder.util.PageDelegate.  Available coercions: Double --> Float, 
> Float --> Double, Long --> Boolean, Long --> Byte, Long --> Double, Long --> 
> Integer, Long --> Short, Number --> Long, Object --> Object[], Object --> 
> String,  ... [deleted]
>
>
>
> Everything works fine if I change pageDelegate to type Object, as there is a 
> default coercion for Object.
>
> Now what I would like is the exact same behaviour for an Interface as it is 
> for Object (test returns true if not null, false if null)
>
>
>
> Is there e generic way to do this, or even better could that be standard 
> behaviour in T5?
>
> Anything that is against this possible standard behaviour?
>
>
>
>
>
> And a second question:
>
>
>
> What I'm doing with this PageDelegate is to give the Component access to the 
> Page it is contained in.
>
> Is there a better/standard way to do this?
>
>
>
> Thanks, Max
>
>
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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

Reply via email to