I'm trying to add content to one of the JIRA admin-only views -- specifically, adding an item to each of the Actions dropdown menus on the "User Browser" page (/jira/secure/admin/user/UserBrowser.jspa). This has proven to be difficult, because while most of the normal JIRA views are written in Velocity and provide convenient hooks to inject your own content (via the location/websection mechanism), the admin-only views...don't. They're WebWork actions, implemented in JSP and making heavy use of taglibs from AUI, WebWork, and Sitemesh, and they don't provide any kind of extension/injection points that I could find. It seems like they just weren't written with extensibility in mind. So in order to add my own content to this view, it looks like I have no choice but to override it, by rewriting the entire view myself and using the same alias to replace the bundled view with my own.
This comes with its own set of issues, because the documentation for WebWork actions says that I should use a Velocity template rather than a JSP, since "JSP views cannot be used from inside plugins; they can be used if they are installed into the JIRA webapp, but this complicates installation, upgrading, and troubleshooting. Use Velocity if you can." That's all well and good, but it means that I don't have access to the aforementioned taglibs from AUI/WW/Sitemesh. So I've had to rewrite THOSE as well, as Velocimacros. This is made more difficult by Velocity's inherent weaknesses when it comes to macros, such as the inability to specify named arguments and omit the ones I'm not interested in, the lack of decent null-handling, and the lack of proper scope awareness causing variable values to "bleed" into the surrounding scope. To get around those issues, I've been implementing the macros using a single arguments map, rather than individual arguments; it works, but it's clunky.
Now, having said all that...I wonder if I'm making this more difficult than it needs to be. I'm basically reinventing the wheel, duplicating the functionality of dozens of decorators and templates and taglibs...all to add a single item to a dropdown that already exists. It seems like it should not be this hard!
Which brings me to the actual point of this post. I have three questions for you:
Any assistance would be most appreciated.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.