Hello,

I'm currently using Struts and Velocity, where the vm
file gets the Struts ActionForm to populate the form
fields.

I have a macro as below:-

#macro( datetime $var )
        <input type="text" name="${var}Date"
value="$form.bean.${var}Date" /> 
#end

I made a call in my HTML as below:-

#datetime(visit)

The associated form bean for this page contains a
String field called "visitDate".

When the macro resolves, I'm seeing this:-

<input type="text" name="visitDate"
value="[EMAIL PROTECTED]" />

It doesn't resolve the value part.

So, I tried hardcoding it this way to test:-

<input type="text" name="visitDate"
value="$form.bean.visitDate" /> 

... and it retrieves the date from the bean and
display properly in the value property.

How do I fix my macro to achieve my desired result?

Thanks.

Mike

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to