我正在尝试以这种方式开发带有三个 aui:button 的 aui:form ...
<portlet:actionURL name="generateRule" var="generateRuleURL"/>
<portlet:actionURL name="generateRuleAnd" var="generateRuleAndURL"/>
<portlet:actionURL name="generateRuleOr" var="generateRuleOrURL"/>
<aui:form action="<%= generateRuleURL.toString() %>" method="post">
<aui:fieldset column="false">
<aui:select name="FirstRuleElement" >
<aui:option value="Age">
<liferay-ui:message key="Age" />
</aui:option>
<aui:option value="Country">
<liferay-ui:message key="Country" />
</aui:option>
<aui:option value="Direction">
<liferay-ui:message key="Direction" />
</aui:option>
</aui:select>
<aui:select name="FirstRuleAttribute" >
<aui:option value="Age">
<liferay-ui:message key="Age" />
</aui:option>
<aui:option value="Country">
<liferay-ui:message key="Country" />
</aui:option>
<aui:option value="Direction">
<liferay-ui:message key="Direction" />
</aui:option>
</aui:select>
</aui:fieldset>
<aui:fieldset column="false">
<aui:button-row>
<aui:button type="submit" value="End" />
<aui:button type="submit" value="And"
onClick="<%= generateRuleAndURL.toString()%>" />
<aui:button type="submit" value="Or"
onClick="<%= generateRuleOrURL.toString()%>" />
</aui:button-row>
</aui:fieldset>
</aui:form>
我想从 Portlet 执行不同的方法,具体取决于按下的按钮......
public void generateRule(ActionRequest request, ActionResponse response)
public void generateRuleAnd(ActionRequest request, ActionResponse response)
public void generateRuleOr(ActionRequest request, ActionResponse response)
使用此功能检索数据...
request.getParameter("FirstRuleElement")
但是通过单击 And 和 Or 按钮,我没有得到表单的请求参数。
你知道我怎么能解决这个问题吗?
谢谢你,奥里奥尔