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