You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by mu...@fantasymail.de on 2007/06/13 17:18:25 UTC

Order in which ognl expressions are evaluated

Hi there!

Something really weird is going on....

I have created a static method that returns false ( getFalseCondition())...
inside of the condition is a component.

<condition jwcid="@If" condition="ognl:falseCondition">
	<span jwcid="@SomeComponent"/> 			
</condition>

If the component is rendered, an error occurs - if I leave the component out, the error does not occur.

In that case the error should not occur as the condition is always false.

Or does Tapestry evaluate ALL ognl expressions before rendering, independent of whether they are needed or not???


							

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


RE: Order in which ognl expressions are evaluated

Posted by Ben Dotte <bd...@widen.com>.
Does SomeComponent implement PageBeginRenderListener by any chance? I
know we've run across that exact situation where the component couldn't
possibly render within the conditional but since pageBeginRender() gets
called before the page renders, it gets called on all components on the
page regardless of whether or not they are actually rendered.

I'm not sure the exact details about how it figures out what all the
components are on the page, but the pageBeginRender() behavior leads me
to believe there must be something getting evaluated ahead of time.

-----Original Message-----
From: munich@fantasymail.de [mailto:munich@fantasymail.de] 
Sent: Thursday, June 14, 2007 12:14 AM
To: Tapestry users
Subject: Re: Order in which ognl expressions are evaluated

Thanks!



Independent on what exactly the error is, it is weird that is makes a
difference whether I write:

<condition jwcid="@If" condition="ognl:falseCondition">
         <span jwcid="@SomeComponent"/>
</condition>

or

<condition jwcid="@If" condition="ognl:falseCondition">
</condition>

as the line inside should never be called....unless the ognl expressions
are evaluated prior to rendering....




-------- Original-Nachricht --------
Datum: Wed, 13 Jun 2007 21:37:49 -0400
Von: "Jesse Kuhnert" <jk...@gmail.com>
An: "Tapestry users" <us...@tapestry.apache.org>
Betreff: Re: Order in which ognl expressions are evaluated

> The @If component should prevent any further evaluation of things
within
> it.
> 
> It's impossible to guess at your problem as I have no idea what "an
error
> occurs" means.
> 
> On 6/13/07, munich@fantasymail.de <mu...@fantasymail.de> wrote:
> >
> > Hi there!
> >
> > Something really weird is going on....
> >
> > I have created a static method that returns false (
> > getFalseCondition())...
> > inside of the condition is a component.
> >
> > <condition jwcid="@If" condition="ognl:falseCondition">
> >         <span jwcid="@SomeComponent"/>
> > </condition>
> >
> > If the component is rendered, an error occurs - if I leave the
component
> > out, the error does not occur.
> >
> > In that case the error should not occur as the condition is always
> false.
> >
> > Or does Tapestry evaluate ALL ognl expressions before rendering,
> > independent of whether they are needed or not???
> >
> >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> 
> 
> -- 
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
> 
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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


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


Re: Order in which ognl expressions are evaluated

Posted by mu...@fantasymail.de.
Thanks!



Independent on what exactly the error is, it is weird that is makes a difference whether I write:

<condition jwcid="@If" condition="ognl:falseCondition">
         <span jwcid="@SomeComponent"/>
</condition>

or

<condition jwcid="@If" condition="ognl:falseCondition">
</condition>

as the line inside should never be called....unless the ognl expressions are evaluated prior to rendering....




-------- Original-Nachricht --------
Datum: Wed, 13 Jun 2007 21:37:49 -0400
Von: "Jesse Kuhnert" <jk...@gmail.com>
An: "Tapestry users" <us...@tapestry.apache.org>
Betreff: Re: Order in which ognl expressions are evaluated

> The @If component should prevent any further evaluation of things within
> it.
> 
> It's impossible to guess at your problem as I have no idea what "an error
> occurs" means.
> 
> On 6/13/07, munich@fantasymail.de <mu...@fantasymail.de> wrote:
> >
> > Hi there!
> >
> > Something really weird is going on....
> >
> > I have created a static method that returns false (
> > getFalseCondition())...
> > inside of the condition is a component.
> >
> > <condition jwcid="@If" condition="ognl:falseCondition">
> >         <span jwcid="@SomeComponent"/>
> > </condition>
> >
> > If the component is rendered, an error occurs - if I leave the component
> > out, the error does not occur.
> >
> > In that case the error should not occur as the condition is always
> false.
> >
> > Or does Tapestry evaluate ALL ognl expressions before rendering,
> > independent of whether they are needed or not???
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> 
> 
> -- 
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
> 
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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


Re: Order in which ognl expressions are evaluated

Posted by Jesse Kuhnert <jk...@gmail.com>.
The @If component should prevent any further evaluation of things within
it.

It's impossible to guess at your problem as I have no idea what "an error
occurs" means.

On 6/13/07, munich@fantasymail.de <mu...@fantasymail.de> wrote:
>
> Hi there!
>
> Something really weird is going on....
>
> I have created a static method that returns false (
> getFalseCondition())...
> inside of the condition is a component.
>
> <condition jwcid="@If" condition="ognl:falseCondition">
>         <span jwcid="@SomeComponent"/>
> </condition>
>
> If the component is rendered, an error occurs - if I leave the component
> out, the error does not occur.
>
> In that case the error should not occur as the condition is always false.
>
> Or does Tapestry evaluate ALL ognl expressions before rendering,
> independent of whether they are needed or not???
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com