Some other things you can use:

${myActionProperty.subProperty!}
Prints nothing if subProperty doesn't exist  or is null

${myActionProperty.subProperty?default("default value")
Prints "default value" if subProperty doesn't exist or is null

The first expression (ending with !) is most similar in behavior to the <@s.property /> tag.

On Sep 6, 2007, at 4:55 PM, Kenton wrote:


I'm a newbie trying learn how to use FreeMarker for Struts result pages.

This code works: <@s.property value="myActionProperty.subProperty" />
This code triggers a FreeMarker error (expression undefined):
${myActionProperty.subProperty}

Obviously, I'm missing something very simple. But what is it?

Is there any way to dump the tree of EL variables so that I can undertand
better?

Is there any good documentation on using FreeMarker in Struts? I can find great documentation on FreeMarker by itself and Struts by itself, but I can't find any docs or tutorials on using the two together. Any suggestions?
--
View this message in context: http://www.nabble.com/Simple-Question- about-FreeMarker-%2B-Struts-2-tf4394620.html#a12531237
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to