velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
Subject Re: JSP to VTL
Date Thu, 04 Oct 2001 01:39:52 GMT
On 10/3/01 6:12 AM, "Soriano, Jaume" <JSoriano@es.wanadoo.com> wrote:

> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello again: 
> one 'big' doubt...
> I know how to transform a JSP code like
> 
> <%
>     repId = yapper.getParticipantId();
> %>
> 
> to Velocity, but, what about the following?
> 
> <%
> yapper.performSomeAction(); //it returns 'void'
> other_var = yapper.afterActionPerformed();
> %>
> 
> ...i mean, is possible to invoke a method from VTL
> that is returning nothing but is needed for subsequent
> code?

Of course.  Do it this way :

$!yapper.performSomeAction()
$other_var = $yapper.afterActionPerformed()

The $! means "Don't output the reference if it returns nothing..."

Geir
 
> Thanks in advance, regards:
> 
> Jaume
> 
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
> 
> iQA/AwUBO7rlUGA01fRj7GEkEQLKFwCcDZcDuxBFCpHDfEXmbBqVOgsLCikAnjhd
> lenR1m7dSa8C2sq4DVcl+ZH8
> =n/vq
> -----END PGP SIGNATURE-----

-- 
Geir Magnusson Jr.     geirm@optonline.net
System and Software Consulting
"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety." - Benjamin Franklin



Mime
View raw message