}
protected void setProperties(UIComponent component) {
super.setProperties(component);
MapComponent map = (MapComponent) component;
// if (current != null) {
// map.setCurrent(current);
// }
if (styleClass != null) {
if (FacesUtils.isExpression(styleClass)) {
ValueBinding vb = FacesContext.getCurrentInstance()
.getApplication().
createValueBinding(styleClass);
map.setValueBinding("styleClass", vb);
} else {
map.getAttributes().put("styleClass", styleClass);
}
}
if (actionListener != null) {
if (FacesUtils.isExpression(actionListener)) {
Class args[] = {ActionEvent.class};
MethodBinding mb = FacesContext.getCurrentInstance()
.getApplication()
.createMethodBinding(actionListener, args);
map.setActionListener(mb);
} else {
Object params [] = {actionListener};
throw new javax.faces.FacesException();
}
}
if (action != null) {
if (FacesUtils.isExpression(action)) {
MethodBinding vb = FacesContext.getCurrentInstance()
.getApplication()
.createMethodBinding(action, null);
map.setAction(vb);
} else {
map.setAction(Util.createConstantMethodBinding(action));
}
}
if (immediate != null) {
if (FacesUtils.isExpression(immediate)) {
ValueBinding vb = FacesContext.getCurrentInstance()
.getApplication().
createValueBinding(immediate);
map.setValueBinding("immediate", vb);
} else {
boolean _immediate = new Boolean(immediate).booleanValue();
map.setImmediate(_immediate);
}
}
}