mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
WW-3103, patch from Jordi Albert, fixing emptyOption param, thanks!
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@771753 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+7
@@ -63,6 +63,13 @@ public class SelectHandler extends AbstractTagHandler implements TagGenerator {
|
||||
boolean selected = ContainUtil.contains(value, params.get("headerKey"));
|
||||
writeOption(headerKey, headerValue, selected);
|
||||
}
|
||||
|
||||
//emptyoption
|
||||
Object emptyOption = params.get("emptyOption");
|
||||
if (emptyOption != null && emptyOption.toString().equals(Boolean.toString(true))) {
|
||||
boolean selected = ContainUtil.contains(value, "") || ContainUtil.contains(value, null);
|
||||
writeOption("", "", selected);
|
||||
}
|
||||
|
||||
Object listObj = params.get("list");
|
||||
String listKey = (String) params.get("listKey");
|
||||
|
||||
Reference in New Issue
Block a user