You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Paul Stanton <pa...@gunnsoft.com.au> on 2005/03/07 05:12:36 UTC

body of conditional still executed if condition is false

I'd like to be able to do the following where ValuePage implements 
public String getValue():

<span type="@Conditional" condition="ognl:page instanceof 
package.ValuePage">
    <span jwcid="@Insert" value="ognl:page.value">Open</span>
</span>

however if the page is not an instance of ValuePage (or atleast doesn't 
implement getValue()) i get a NoSuchPropertyException.

Is there a way to stop execution of the conditional's body or suppress 
exceptions?

If not, does anyone have suggestions for a tidy way to do something 
similar? (keep in mind there are a few different page types and many 
different conditional values.)

Thanks.

-- 
Paul Stanton
Gunn Software
PH: (02) 9918 3666 (ext 8000)


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


Re: body of conditional still executed if condition is false

Posted by Paul Stanton <pa...@gunnsoft.com.au>.
ignore my question. typo. ;)

Paul Stanton wrote:

> I'd like to be able to do the following where ValuePage implements 
> public String getValue():
>
> <span type="@Conditional" condition="ognl:page instanceof 
> package.ValuePage">
>    <span jwcid="@Insert" value="ognl:page.value">Open</span>
> </span>
>
> however if the page is not an instance of ValuePage (or atleast 
> doesn't implement getValue()) i get a NoSuchPropertyException.
>
> Is there a way to stop execution of the conditional's body or suppress 
> exceptions?
>
> If not, does anyone have suggestions for a tidy way to do something 
> similar? (keep in mind there are a few different page types and many 
> different conditional values.)
>
> Thanks.
>

-- 
Paul Stanton
Gunn Software
PH: (02) 9918 3666 (ext 8000)


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