You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sonny Sukumar <ah...@hotmail.com> on 2003/09/10 03:20:10 UTC
bug?
How comes this doesn't work?:
<xsp:attribute name="error">
<xsp:logic>
if (somVar == null)
errorStatus = false;
else
errorStatus = true;
</xsp:logic>
<xsp:expr>errorStatus</xsp:expr>
</xsp:attribute>
What is strange to me that Cocoon doesn't complain in producing the Java
code, but that it puts the equivalent Java code for
"<xsp:expr>errorStatus</xsp:expr>" *before* the equivalent code fo the
<xsp:logic> block. So it then fails to compile, saying that variable
errorStatus may not have been initialized.
So why does Cocoon generate the Java code backwards?
Thanks,
Sonny
_________________________________________________________________
Get 10MB of e-mail storage! Sign up for Hotmail Extra Storage.
http://join.msn.com/?PAGE=features/es
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: bug?
Posted by Joerg Heinicke <jh...@virbus.de>.
It's not the only one:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15841. These bugs can
more or less easily be worked around e.g. by moving the xsp:logic
outside the xsp:attribute IIRC.
Joerg
Sonny Sukumar wrote:
>
> How comes this doesn't work?:
>
> <xsp:attribute name="error">
> <xsp:logic>
> if (somVar == null)
> errorStatus = false;
> else
> errorStatus = true;
> </xsp:logic>
> <xsp:expr>errorStatus</xsp:expr>
> </xsp:attribute>
>
> What is strange to me that Cocoon doesn't complain in producing the Java
> code, but that it puts the equivalent Java code for
> "<xsp:expr>errorStatus</xsp:expr>" *before* the equivalent code fo the
> <xsp:logic> block. So it then fails to compile, saying that variable
> errorStatus may not have been initialized.
>
> So why does Cocoon generate the Java code backwards?
>
> Thanks,
>
> Sonny
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org