velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc <wdkm...@wilson.dk>
Subject Re: How do I pre-populat text, not fields, in a form?(Making forms dynamic)
Date Fri, 08 Jul 2005 05:56:37 GMT
It's because if I put the bean in the request from the action and then 
validate the form on the template with they validator framework, the 
data from the request is being lost. And I end up with blank fields.

//MARC



Simon Christian wrote:
> Hi Marc,
> 
> A bit more explanation if you don't mind: why can't you set it within  a 
> Struts Action? Are you trying to set an attribute on the request or  the 
> session?
> 
> It doesn't look to me like the kind of thing that really belongs in a  
> template, though you may have a different approach. If you're using a  
> VelocityStruts setup, the request is automatically exposed within the  
> template context, as $request
> 
> - simon
> 
> 
> On 7 Jul 2005, at 17:16, marc wrote:
> 
>> If I have this in a jsp:
>>
>> <%
>> request.setAttribute("infoafd",new GetAdmin().getAdmin().afdEJBAll());
>> %>
>>
>> How do I do this in velocity?
>>
>> If I can't use: request.setAttribute() or request.getSession 
>> ().setAttribute()
>>
>> From the actionservlet(using struts) calling the velocity temlate.
>>
>>
>> I need it do make the form dynamic and still be able to validat the  
>> data with the validater framework.
>>
>>
>> Regards
>>
>> //MARC
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message