private static final String CONTROLS_FACET = "controls";
private static final String EMPTY_DEFAULT_LABEL = "\u00a0\u00a0\u00a0";
@Override
protected void doDecode(FacesContext context, UIComponent component) {
UIInplaceSelect inplaceSelect = null;
if (component instanceof UIInplaceSelect) {
inplaceSelect = (UIInplaceSelect) component;
} else {
if (logger.isDebugEnabled()) {
logger.debug("No decoding necessary since the component " + component.getId()
+ " is not an instance or a sub class of UIInplaceSelect");
}
return;
}
String clientId = inplaceSelect.getClientId(context);
if (clientId == null) {
throw new NullPointerException("component client id is NULL");
}
if (InputUtils.isDisabled(inplaceSelect) || InputUtils.isReadOnly(inplaceSelect)) {
if (logger.isDebugEnabled()) {
logger.debug(("No decoding necessary since the component " + component.getId() + " is disabled"));
}
return;
}
Map <String,String> request = context.getExternalContext().getRequestParameterMap();
String newValue = (String) request.get(clientId);
if (newValue != null && newValue.length()!= 0) {
inplaceSelect.setSubmittedValue(newValue);
} else {
inplaceSelect.setSubmittedValue(null);
}
}