Hi! Another suggestion for another velocity tool :-)
One of the strong limitation velocity has it's the inability to manage static fields. So, in order to get the input Struct action inside a VM page you are forced to use the following code:
## get source action
#set ( $mapping = $request.getAttribute("org.apache.struts.action.mapping.instance") )
instead of the more secure:
## get source action #set ( $mapping = $request.getAttribute(org.apache.struts.Globals.MAPPING_KEY) )
What about to add to the StrutsLinkTool these two methods (the 2nd could be optional)?
public ActionConfig getInputAction()
{
return (ActionConfig)request.getAttribute(Globals.MAPPING_KEY);
}public String getInputActionPath()
{
return (getInputAction() != null) ?
getInputAction().getPath() : null;
}Having the your VM code could be more strong:
## get source action #set ( $mapping = $link.inputAction )
Regard, Gianpiero
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
