struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: Dynamic Attributes with Velocity
Date Thu, 29 Jan 2015 00:01:47 GMT
                                                                                          
         


> From: sean.powell@legalmatch.com
> To: user@struts.apache.org
> Subject: Dynamic Attributes with Velocity
> Date: Wed, 28 Jan 2015 22:07:13 +0000
> 
> I have a question about how to set dynamic Attributes of a Struts 2 tag in a Velocity
template.
> 
> I've been trying to do it this way, but Struts is treating my Map as a String.
> 
> #stextfield("label=TFLable" "name=TFName" "value=TFValue" "id=TFId" "dynamicAttributes=#{'data-ajax':'false'}")

MG>specify dynamicAttributes as {"K1":"V1", "K2":"V2"} e.g.
<#assign s=JspTaglibs["/WEB-INF/struts.tld"] /><@s.textfield name="TFName" dynamicAttributes={"data-ajax":"false","key":"value"}/>http://struts.apache.org/docs/freemarker-support.html

> 
> Thank you,
> 
> Sean Powell
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message