How to dynamically add web-items to agile board?

I have a section on agile board and want to dynamicaly add a web-items to it.

<web-section location="" key="custom-board-tool-section" weight="10">
        <label key="My Section"/>

I have tried to use a web-item-provider

<web-item-provider key="items-factory" name="Web Items Factory"

with following code

package com.sample.impl;

import com.atlassian.plugin.servlet.PluginHttpRequestWrapper;
import com.atlassian.plugin.web.api.WebItem;
import com.atlassian.plugin.web.api.model.WebFragmentBuilder;
import com.atlassian.plugin.web.api.provider.WebItemProvider;
import com.sample.Utils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class LinkFactory implements WebItemProvider {

    public Iterable<WebItem> getItems(Map<String, Object> map) {

        Map<String, String> names = Utils.getNames();
        final List<WebItem> links = new ArrayList<WebItem>();
        for (Map.Entry<String, String> entry : names.entrySet()) {
            String entryKey = entry.getKey();

            int weight = 10;
            links.add(new WebFragmentBuilder(weight += 10)

//                    .webItem("")
                    .url(((PluginHttpRequestWrapper) map.get("request")).getContextPath() + "/secure/nnn")
        return links;


and this code does not add any web-item to my section.

Maybe somebody faced with similar problem and can help to solve it?

additional info : Jira version 7.1.1

Thanks in advance!

0 answers

Suggest an answer

Log in or Join to answer
Community showcase
Maarten Cautreels
Posted yesterday in Off-topic

Friday Fun: What's your favourite beer/drink

As a Belgian, beer-lover and home brewer, beer is one of my great passions. I love the fact that with just a few ingredients (usually just water, hop and malt) you can create so many different tastes...

243 views 35 9
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot