Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can i put context to be used when rendering the freemarker template in the Build Configuration Tab

javier Dominguez July 2, 2012

I mean, how can i put context to Miscelaneous Configuration Tab to use it with freemarker template. For example in the AbstractTaskConfigurator class we can do this:

public void populateContextForCreate(@NotNull final Map<String, Object> context) {

Map<String, String> repositoryMap = Maps.newLinkedHashMap();

repositoryMap.put("new", "new");

repositoryMap.put("new2", "new2");

context.put("repositories", repositoryMap);

}

and then in the freemarker template:

@ww.select">[@ww.select name="be.sofico.bamboo.plugins.svndiff.repo" labelKey="be.sofico.bamboo.plugins.svndiff.repo" list='repositories' emptyOption="false" /]

but in the BaseBuildConfigurationAwarePlugin we only have the methods populateContextForEdit() and populateContextForView() we dont have the method public void populateContextForCreate(), so HOW CAN I DO THIS!!! THANKS A LOT

1 answer

0 votes
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 2, 2012

You only need to use the populateContextForEdit, it's used for everything.

javier Dominguez July 3, 2012

Can you give me an example please?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events