mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
WW-2109:
id resolution for <s:form> - minor cleanups git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@565746 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -225,9 +225,10 @@ public class Form extends ClosingUIBean {
|
||||
|
||||
if (id != null) {
|
||||
addParameter("id", escape(id));
|
||||
} else if ( action != null ) {
|
||||
addParameter("id", escape(action));
|
||||
}
|
||||
|
||||
// if no id given, it will be tried to generate it from the action attribute in the
|
||||
// corresponding evaluateExtraParams method
|
||||
if (Dispatcher.getInstance().isPortletSupportActive() && PortletActionContext.isPortletRequest()) {
|
||||
evaluateExtraParamsPortletRequest(namespace, action);
|
||||
} else {
|
||||
@@ -293,8 +294,8 @@ public class Form extends ClosingUIBean {
|
||||
}
|
||||
|
||||
// if the id isn't specified, use the action name
|
||||
if (id == null) {
|
||||
addParameter("id", action);
|
||||
if (id == null && action!=null) {
|
||||
addParameter("id", escape(action));
|
||||
}
|
||||
} else if (action != null) {
|
||||
// Since we can't find an action alias in the configuration, we just assume
|
||||
@@ -374,11 +375,6 @@ public class Form extends ClosingUIBean {
|
||||
*/
|
||||
private void evaluateExtraParamsPortletRequest(String namespace, String action) {
|
||||
|
||||
if (this.action != null) {
|
||||
// if it isn't specified, we'll make somethig up
|
||||
action = findString(this.action);
|
||||
}
|
||||
|
||||
String type = "action";
|
||||
if (TextUtils.stringSet(method)) {
|
||||
if ("GET".equalsIgnoreCase(method.trim())) {
|
||||
|
||||
Reference in New Issue
Block a user