protected Class<? extends UIComponent> getComponentClass() {
return UIComboBox.class;
}
protected void doDecode(FacesContext context, UIComponent component) {
UIComboBox comboBox = null;
if (component instanceof UIComboBox) {
comboBox = (UIComboBox) component;
} else {
if (logger.isDebugEnabled()) {
logger.debug("No decoding necessary since the component " + component.getId() + " is not an instance or a sub class of UIComboBox");
}
return;
}
String clientId = comboBox.getClientId(context);
if (clientId == null) {
throw new NullPointerException("component client id is NULL");
}
if (InputUtils.isDisabled(comboBox) || InputUtils.isReadOnly(comboBox)) {
if (logger.isDebugEnabled()) {
logger.debug(("No decoding necessary since the component " + component.getId() + " is disabled"));
}
}
Map <String, String> request = context.getExternalContext().getRequestParameterMap();
String newValue = (String) request.get(clientId);
if (newValue != null) {
comboBox.setSubmittedValue(newValue);
}
}