} else if (parent.getAttributes().get("tobago.panel") != null
&& parent.getAttributes().get("tobago.panel") instanceof UIExtensionPanel) {
parent = (UIComponent) parent.getAttributes().get("tobago.panel");
}
if (parent instanceof LayoutBase) {
final LayoutBase component = (LayoutBase) parent;
if (parent instanceof LayoutComponent && columnSpan != null) {
if (columnSpan.isLiteral()) {
((LayoutComponent) component).setColumnSpan(Integer.valueOf(columnSpan.getValue()));
} else {
parent.setValueExpression(Attributes.COLUMN_SPAN,
columnSpan.getValueExpression(faceletContext, Integer.TYPE));
}
}
if (parent instanceof LayoutComponent && rowSpan != null) {
if (rowSpan.isLiteral()) {
((LayoutComponent) component).setRowSpan(Integer.valueOf(rowSpan.getValue()));
} else {
parent.setValueExpression(Attributes.ROW_SPAN,
rowSpan.getValueExpression(faceletContext, Integer.TYPE));
}
}
if (width != null) {
if (width.isLiteral()) {
component.setWidth(Measure.valueOf(width.getValue()));
} else {
parent.setValueExpression(Attributes.WIDTH,
width.getValueExpression(faceletContext, Object.class));
}
}
if (height != null) {
if (height.isLiteral()) {
component.setHeight(Measure.valueOf(height.getValue()));
} else {
parent.setValueExpression(Attributes.HEIGHT,
height.getValueExpression(faceletContext, Object.class));
}
}
if (minimumWidth != null) {
if (minimumWidth.isLiteral()) {
component.setMinimumWidth(Measure.valueOf(minimumWidth.getValue()));
} else {
parent.setValueExpression(Attributes.MINIMUM_WIDTH,
minimumWidth.getValueExpression(faceletContext, Object.class));
}
}
if (minimumHeight != null) {
if (minimumHeight.isLiteral()) {
component.setMinimumHeight(Measure.valueOf(minimumHeight.getValue()));
} else {
parent.setValueExpression(Attributes.MINIMUM_HEIGHT,
minimumHeight.getValueExpression(faceletContext, Object.class));
}
}
if (preferredWidth != null) {
if (preferredWidth.isLiteral()) {
component.setPreferredWidth(Measure.valueOf(preferredWidth.getValue()));
} else {
parent.setValueExpression(Attributes.PREFERRED_WIDTH,
preferredWidth.getValueExpression(faceletContext, Object.class));
}
}
if (preferredHeight != null) {
if (preferredHeight.isLiteral()) {
component.setPreferredHeight(Measure.valueOf(preferredHeight.getValue()));
} else {
parent.setValueExpression(Attributes.PREFERRED_HEIGHT,
preferredHeight.getValueExpression(faceletContext, Object.class));
}
}
if (maximumWidth != null) {
if (maximumWidth.isLiteral()) {
component.setMaximumWidth(Measure.valueOf(maximumWidth.getValue()));
} else {
parent.setValueExpression(Attributes.MAXIMUM_WIDTH,
maximumWidth.getValueExpression(faceletContext, Object.class));
}
}
if (maximumHeight != null) {
if (maximumHeight.isLiteral()) {
component.setMaximumHeight(Measure.valueOf(maximumHeight.getValue()));
} else {
parent.setValueExpression(Attributes.MAXIMUM_HEIGHT,
maximumHeight.getValueExpression(faceletContext, Object.class));
}
}
if (marginLeft != null) {
if (marginLeft.isLiteral()) {
component.setMarginLeft(Measure.valueOf(marginLeft.getValue()));
} else {
parent.setValueExpression(Attributes.MARGIN_LEFT,
marginLeft.getValueExpression(faceletContext, Object.class));
}
}
if (marginRight != null) {
if (marginRight.isLiteral()) {
component.setMarginRight(Measure.valueOf(marginRight.getValue()));
} else {
parent.setValueExpression(Attributes.MARGIN_RIGHT,
marginRight.getValueExpression(faceletContext, Object.class));
}
}
if (marginTop != null) {
if (marginTop.isLiteral()) {
component.setMarginTop(Measure.valueOf(marginTop.getValue()));
} else {
parent.setValueExpression(Attributes.MARGIN_TOP,
marginTop.getValueExpression(faceletContext, Object.class));
}
}
if (marginBottom != null) {
if (marginBottom.isLiteral()) {
component.setMarginBottom(Measure.valueOf(marginBottom.getValue()));
} else {
parent.setValueExpression(Attributes.MARGIN_BOTTOM,
marginBottom.getValueExpression(faceletContext, Object.class));
}
}