从速度获取我的Java类中的值(Jira Plugin WebWork Module)
题
我正在创建一个JIRA插件,它提供了一个版本选项卡面板。在此版本选项卡面板的速度下,我提供了一个选择列表。选择列表代码如下所示
<form name="input" action="AddParent" method="post">
<select name="parentVersion">
<option value="-1">--select Parent--</option>
#foreach($version in $versions )
<option value="$version" selected="true">$version</option>
<input type="submit" value="Add Parent"/>
</form>
.
现在在我的插件中我已将WebWork模块包含在处理此操作。当我单击“添加父”按钮时,没有任何事情发生。我需要我在Java Action类中选择的值。我肯定错过了一些东西。有人可以帮助我吗? 提前致谢。
解决方案
I'm not sure what's missing in your code, but the WebWork Sample Plugin has more information about this.
其他提示
As an alternative, you can declare a local variable named same as your select list, create getter and setter and the variable will get the selected value.
Also, yo can specify the form action as action="YourClass!yourMethod.jspa"
private String parentVersion;
public String getParentVersion() {
return parentVersion;
}
public void setParentVersion(String parentVersion) {
this.parentVersion = parentVersion;
}
不隶属于 StackOverflow