} else {
LOG.warn("Layout Constraints inside of a non LayoutBase component!");
}
if (parent instanceof LayoutContainer) {
LayoutContainer container = (LayoutContainer) parent;
if (borderLeft != null) {
if (borderLeft.isLiteral()) {
container.setBorderLeft(Measure.parse(borderLeft.getValue()));
} else {
parent.setValueBinding(Attributes.BORDER_LEFT,
faceletContext.getFacesContext().getApplication().createValueBinding(borderLeft.getValue()));
}
}
if (borderRight != null) {
if (borderRight.isLiteral()) {
container.setBorderRight(Measure.parse(borderRight.getValue()));
} else {
parent.setValueBinding(Attributes.BORDER_RIGHT,
faceletContext.getFacesContext().getApplication().createValueBinding(borderRight.getValue()));
}
}
if (borderTop != null) {
if (borderTop.isLiteral()) {
container.setBorderTop(Measure.parse(borderTop.getValue()));
} else {
parent.setValueBinding(Attributes.BORDER_TOP,
faceletContext.getFacesContext().getApplication().createValueBinding(borderTop.getValue()));
}
}
if (borderBottom != null) {
if (borderBottom.isLiteral()) {
container.setBorderBottom(Measure.parse(borderBottom.getValue()));
} else {
parent.setValueBinding(Attributes.BORDER_BOTTOM,
faceletContext.getFacesContext().getApplication().createValueBinding(borderBottom.getValue()));
}
}
if (paddingLeft != null) {
if (paddingLeft.isLiteral()) {
container.setPaddingLeft(Measure.parse(paddingLeft.getValue()));
} else {
parent.setValueBinding(Attributes.PADDING_LEFT,
faceletContext.getFacesContext().getApplication().createValueBinding(paddingLeft.getValue()));
}
}
if (paddingRight != null) {
if (paddingRight.isLiteral()) {
container.setPaddingRight(Measure.parse(paddingRight.getValue()));
} else {
parent.setValueBinding(Attributes.PADDING_RIGHT,
faceletContext.getFacesContext().getApplication().createValueBinding(paddingRight.getValue()));
}
}
if (paddingTop != null) {
if (paddingTop.isLiteral()) {
container.setPaddingTop(Measure.parse(paddingTop.getValue()));
} else {
parent.setValueBinding(Attributes.PADDING_TOP,
faceletContext.getFacesContext().getApplication().createValueBinding(paddingTop.getValue()));
}
}
if (paddingBottom != null) {
if (paddingBottom.isLiteral()) {
container.setPaddingBottom(Measure.parse(paddingBottom.getValue()));
} else {
parent.setValueBinding(Attributes.PADDING_BOTTOM,
faceletContext.getFacesContext().getApplication().createValueBinding(paddingBottom.getValue()));
}
}