Support for Struts2 Velocity tags in vm


is it possible to include support for Struts2 velocity macros?

When a Struts2 velocity macro is used in a vm file, IDEA propose to define a macro:

#* @vtlmacrolibrary path="" *#

but it looks like it's not possible to link this to Struts2 define macros. Proposed path include only /WEB-INF.

For instance, if you use the #sform tag:

#sform ("action=updatePerson")     #stextfield ("label=First name" "name=firstName")     #ssubmit ("value=Update") #end

each #sxx will raise an error 'Cannot resolve macro 'sxx' '
and worst, the last #end directive will be raised as error 'Invalid token #end'


Comment actions Permalink


Both errors are shown due to known issue - user directives aren't supported at the moment.
There is a feature request about user directives support. I suppose we will load user directives either from file or from Struts taglib.

Best regards.

Comment actions Permalink

thanks Alexey

Is there an open case for this feature request that I could follow?

Comment actions Permalink

Here is jira issue I created as result of forum discussion.


Please sign in to leave a comment.