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

Access to action atributes in a velocity form

Kevin Robayna April 20, 2015

Hi, I am developing a JIRA plugin, and I need a form to set some values.

The trouble is when I try to show the previous value in the form it won't happen.

.....

<div class="field-group">
  <label>User</label>
  <input class="text" name="usr-id" type="text" style="cursor: auto; 
background-attachment: scroll; background-position: 100% 50%;">
  <span>Last User: $action.getUSER()</span>
</div>

.....
public class ConfiguracionGitIntegrationAction extends JiraWebActionSupport {

.....

  public String getUSER () {
     return (info.getUser_id().equals(null))? "" : info.getUser_id();
  }

.....

}

You know a way to do this?

Thank you in advance for any help you can provide

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Kevin Robayna April 21, 2015

sorry that was a typo when I was writing this question here.

I did copy and paste to write the name from de .java to .vm. So that isn't the problem. Also i tried another version that i saw in internet like "$(action.get_USER)" but those version doesn't work to me.

thank you.

0 votes
Dmitrii Apanasevich
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 21, 2015

Hi!

There is no such method getUser, there is a getUSER, as i think. Use same letter case in Java file and Velocity template. 

 

TAGS
AUG Leaders

Atlassian Community Events