How to render AUI elements in a Velocity template?


I have got a problem with velocity template rendering. AUI select is not rendered correctly.

My web resource:

<web-resource key="ca-sync-web-resources" name="CA Sync Web Resources">
    <title>Add new synchronization scheme</title>
    <meta name="decorator" content="atl.admin">

in pom.xml:


Hi Vaclav,

have you tried WebResourceManager?

See Atlassian documentation for more details:


Hi! Thanks, I have solved it myself. I will now post and share how did I do it as sadly there are almost no examples on “how to” and I spent some time то find out. You need to use pageBuilderService and add this in java:

private static final Logger log = LoggerFactory.getLogger(SynchronizationSchemeEdit.class);
    private static final String VM_TEMPLATE_NAME = "synchronization-scheme-edit";

    private PageBuilderService pageBuilderService;

    public String execute() throws Exception {
        pageBuilderService.assembler().resources().requireWebResource(PLUGIN_KEY_NAME+":"+ PLUGIN_WEB_RESOURCE_COMPONENTS);
        return VM_TEMPLATE_NAME;