cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject cocoon.session.property syntax
Date Tue, 22 Feb 2005 16:21:32 GMT
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

Mime
View raw message