Fix for forum-reported NPE with ajax category selector

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8297 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mike Hatfield
2008-02-15 17:52:41 +00:00
parent f3969beff1
commit e3227a03cd

View File

@@ -140,11 +140,13 @@ public abstract class BaseAjaxItemPicker extends UIInput
Map requestMap = context.getExternalContext().getRequestParameterMap();
String fieldId = getHiddenFieldName();
String value = (String)requestMap.get(fieldId);
if (value != null)
{
if (value.equals("empty"))
{
this.setSubmittedValue(new String("empty"));
}
else if (value != null && value.length() != 0)
else if (value.length() != 0)
{
if (getSingleSelect() == true)
{
@@ -162,6 +164,7 @@ public abstract class BaseAjaxItemPicker extends UIInput
}
}
}
}
/**
* @see javax.faces.component.UIComponentBase#encodeBegin(javax.faces.context.FacesContext)