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:
Wesley Wannemacher
2009-05-05 14:43:54 +00:00
parent 38d0a2f54e
commit f64557a7bc
@@ -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");