You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Leszek Gawron <lg...@mobilebox.pl> on 2005/02/22 17:21:32 UTC
cocoon.session.property syntax
The wrappers are no more. You cannot write
if ( cocoon.session.user != null )
//user logged in
in flowscript
That is bearable in flowscript. It gave me shivers thoug when I had to
fix all my jxtg templates. ${cocoon.session.getAttribute('user').id}
looks awful.
Even more:
flowscript :
cocoon.session.setAttribute( "radeox", function( str, consumer ) {
//generates wiki SAX events
} );
then in jxtg I could do:
<jx:macro name="radeox-string">
<jx:parameter name="value"/>
<jx:set var="ignored" value="${cocoon.session.radeox( value,
cocoon.consumer )}"/>
</jx:macro>
Right now jexl yields NOT_FOUND function - the real problem is that
there is no syntax jexl would accept. This fails also (syntax error):
<jx:macro name="radeox-string">
<jx:parameter name="value"/>
<jx:set var="radeox"
value="${cocoon.session.getAttribute('radeox')}"/>
<jx:set var="ignored" value="${radeox( value,
cocoon.consumer )}"/>
</jx:macro>
Are we really going to make users fix all their flowscripts and template
files?
--
Leszek Gawron lgawron@mobilebox.pl
Project Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
Re: cocoon.session.property syntax
Posted by Reinhard Poetz <re...@apache.org>.
Leszek Gawron wrote:
> The wrappers are no more. You cannot write
>
> if ( cocoon.session.user != null )
> //user logged in
> in flowscript
>
> That is bearable in flowscript. It gave me shivers thoug when I had to
> fix all my jxtg templates. ${cocoon.session.getAttribute('user').id}
> looks awful.
>
> Even more:
> flowscript :
> cocoon.session.setAttribute( "radeox", function( str, consumer ) {
> //generates wiki SAX events
> } );
>
> then in jxtg I could do:
> <jx:macro name="radeox-string">
> <jx:parameter name="value"/>
> <jx:set var="ignored" value="${cocoon.session.radeox( value,
> cocoon.consumer )}"/>
> </jx:macro>
> Right now jexl yields NOT_FOUND function - the real problem is that
> there is no syntax jexl would accept. This fails also (syntax error):
>
> <jx:macro name="radeox-string">
> <jx:parameter name="value"/>
> <jx:set var="radeox"
> value="${cocoon.session.getAttribute('radeox')}"/>
> <jx:set var="ignored" value="${radeox( value,
> cocoon.consumer )}"/>
> </jx:macro>
>
> Are we really going to make users fix all their flowscripts and template
> files?
Please not. This change also causes all the Rhino usage warnings as we don't
wrap the objects correctoy, doesn't it?
--
Reinhard Pötz Independant Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------