String uid = root.createUniqueId();
if (checkForAlreadyCreated(panel, uid)) {
return;
}
Application application = faceletContext.getFacesContext().getApplication();
UILabel label = (UILabel) application.createComponent(UILabel.COMPONENT_TYPE);
label.setRendererType(RendererTypes.LABEL);
label.setId(uid);
label.getAttributes().put(Attributes.FOR, "@auto");
if (tipAttribute != null) {
if (tipAttribute.isLiteral()) {
panel.setTip(tipAttribute.getValue(faceletContext));
} else {
ValueExpression expression = tipAttribute.getValueExpression(faceletContext, String.class);
ELAdaptor.setExpression(panel, Attributes.TIP, expression);
}
}
if (labelAttribute != null) {
if (labelAttribute.isLiteral()) {
label.setValue(labelAttribute.getValue(faceletContext));
} else {
ValueExpression expression = labelAttribute.getValueExpression(faceletContext, String.class);
ELAdaptor.setExpression(label, Attributes.VALUE, expression);
}
}
if (markupAttribute != null) {
if (markupAttribute.isLiteral()) {
label.setMarkup(Markup.valueOf(markupAttribute.getValue()));
} else {
ValueExpression expression = markupAttribute.getValueExpression(faceletContext, Object.class);
ELAdaptor.setExpression(label, Attributes.MARKUP, expression);
}
}