I've checked an alternate format for rendering the WebWork2 ui tags from Velocity. My hope is to migrate to this new style and deprecate (then remove) the current $ui style for rendering.

Previously, the following JSP tags

<ui:textfield label="mylabel" name="myname" value="myvalue"/>

would be written as

$ui.TextField.set("mylabel", "myname", "myvalue").Show

in Velocity. Under the new format, you would write:

#tag( TextField "label=mylabel" "name=myname" "value=myvalue" )

or

#bodytag( TextField "label=mylabel" "name=myname" "value=myvalue" )
#param( "param1" "value1")
#param( "param2" "value2")
#end

if you need to pass in additional parameters. Any and all feedback would be most welcome. My feeling is that the first construct feels awkward and unintuitive.

One issue with this new style is that attributes are declared via "name=name1" rather than the JSP style of name="name1". This is because Velocity's parser pukes on the later for custom user Directives. If anyone knows a way around this, I'm all ears!

Enjoy!

ps - does anyone know of an IDEA plugin that can chromacode Velocity templates?

M




------------------------------------------------------- This SF.net email is sponsored by: eBay Get office equipment for less on eBay! http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to