You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Byrne, Steven" <SB...@dorado.com> on 2004/01/08 22:45:20 UTC

Please help the brain dead

I want to have a fixed border component that all my pages will share. 

In this border component, I would like to have some conditional content
that appears if the .page file defines a particular property.

When I try 

     <span jwcid="@Conditional" condition='page.getProperty("foo")' >
         some text
     </span>

I get exceptions of the form:
-------------------------------------
org.apache.tapestry.BindingException
Unable to resolve expression 'getProperty("foo")' for
com.dorado.sbb.ExpClass$Enhance_529@1055dab[Home].
binding: 	ExpressionBinding[Home getProperty("foo")]
location: 	context:/WEB-INF/Border.html, line 7
 
ognl.MethodFailedException
Method "getProperty" failed for object
com.dorado.sbb.ExpClass$Enhance_529@1055dab[Home]
 
org.apache.tapestry.ApplicationRuntimeException
Unable to read expression '<parsed expression>' of
com.dorado.sbb.ExpClass$Enhance_529@1055dab[Home].
 
ognl.NoSuchPropertyException
foo
target: 	com.dorado.sbb.ExpClass$Enhance_529@1055dab[Home]
-------------------------------------

Is the "getProperty" method special somehow and not resolving to
Ipage.getProperty(String)?

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Please help the brain dead

Posted by John Meredith <ps...@t-online.de>.
Oops .. should have looked at the error messages more carefully.

Try:

<span jwcid="@Conditional"
condition='ognl:page.specification.getProperty("foo")'>
> 

  - John

On Thu, 2004-01-08 at 22:47, John Meredith wrote:
> Hi,
> 
> You need to prefix your condition with "ognl:" ie.
> 
> <span jwcid="@Conditional" condition='ognl:page.getProperty("foo")'>
> 
> Hope this helps,
> 
>   John
> 
> On Thu, 2004-01-08 at 22:45, Byrne, Steven wrote:
> > I want to have a fixed border component that all my pages will share. 
> > 
> > In this border component, I would like to have some conditional content
> > that appears if the .page file defines a particular property.
> > 
> > When I try 
> > 
> >      <span jwcid="@Conditional" condition='page.getProperty("foo")' >
> >          some text
> >      </span>
> > 
> > I get exceptions of the form:
> > -------------------------------------
> > org.apache.tapestry.BindingException
> > Unable to resolve expression 'getProperty("foo")' for
> > com.dorado.sbb.ExpClass$Enhance_529@1055dab[Home].
> > binding: 	ExpressionBinding[Home getProperty("foo")]
> > location: 	context:/WEB-INF/Border.html, line 7
> >  
> > ognl.MethodFailedException
> > Method "getProperty" failed for object
> > com.dorado.sbb.ExpClass$Enhance_529@1055dab[Home]
> >  
> > org.apache.tapestry.ApplicationRuntimeException
> > Unable to read expression '<parsed expression>' of
> > com.dorado.sbb.ExpClass$Enhance_529@1055dab[Home].
> >  
> > ognl.NoSuchPropertyException
> > foo
> > target: 	com.dorado.sbb.ExpClass$Enhance_529@1055dab[Home]
> > -------------------------------------
> > 
> > Is the "getProperty" method special somehow and not resolving to
> > Ipage.getProperty(String)?
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
-- 
John Meredith <ps...@t-online.de>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Please help the brain dead

Posted by John Meredith <ps...@t-online.de>.
Hi,

You need to prefix your condition with "ognl:" ie.

<span jwcid="@Conditional" condition='ognl:page.getProperty("foo")'>

Hope this helps,

  John

On Thu, 2004-01-08 at 22:45, Byrne, Steven wrote:
> I want to have a fixed border component that all my pages will share. 
> 
> In this border component, I would like to have some conditional content
> that appears if the .page file defines a particular property.
> 
> When I try 
> 
>      <span jwcid="@Conditional" condition='page.getProperty("foo")' >
>          some text
>      </span>
> 
> I get exceptions of the form:
> -------------------------------------
> org.apache.tapestry.BindingException
> Unable to resolve expression 'getProperty("foo")' for
> com.dorado.sbb.ExpClass$Enhance_529@1055dab[Home].
> binding: 	ExpressionBinding[Home getProperty("foo")]
> location: 	context:/WEB-INF/Border.html, line 7
>  
> ognl.MethodFailedException
> Method "getProperty" failed for object
> com.dorado.sbb.ExpClass$Enhance_529@1055dab[Home]
>  
> org.apache.tapestry.ApplicationRuntimeException
> Unable to read expression '<parsed expression>' of
> com.dorado.sbb.ExpClass$Enhance_529@1055dab[Home].
>  
> ognl.NoSuchPropertyException
> foo
> target: 	com.dorado.sbb.ExpClass$Enhance_529@1055dab[Home]
> -------------------------------------
> 
> Is the "getProperty" method special somehow and not resolving to
> Ipage.getProperty(String)?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
-- 
John Meredith <ps...@t-online.de>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org