If you’re ever wondering what a path like ‘.’, ‘..’, ‘../..’ resolve to in WebWork, just add this handy little snippet to your template:
<webwork:property value="/webworkStack" escape="false"/>
That will print a HTML rendering of the WebWork stack and let you see exactly what going on. For example:
com.atlassian.jira.web.action.issue.ViewIssue@66db21 * [GenericEntity:Issue][created,2006-02-27 11:36:11.0]... o com.atlassian.jira.bean.SubTaskBeanImpl@bc5aea + com.atlassian.jira.bean.SubTask@3bd # [GenericEntity:Issue][created,2006-02-27 15:54:53.0].... * com.atlassian.jira.issue.fields.layout.field.FieldLayoutItemImpl@182eca8[orderableField=Task Type,fieldDescription=,hidden=false,required=false,rendererType=jira-text-renderer] o Task Type
It’s a Good Idea to know what the stack looks like, because if a path (‘..’) doesn’t resolve, WebWork passes in null. And nobody likes that.
Have any other nifty WebWork tricks? Add a comment! We’d love to hear about them.