// if there was a dataSource defined we need to get it based upon the expression
// if the variable comes back null, we then create a DivPanelState and set it back
// to the property referred to by the expression.
DivPanelState state = null;
if (_dataSource != null) {
ExpressionHandling _expr;
_expr = new ExpressionHandling(this);
try {
state = getState(_expr);
}
catch (IllegalExpressionException iee) {
String s = Bundle.getString("TreeRootError", new Object[]{_dataSource, iee.getMessage()});
registerTagError(s, null);
return SKIP_BODY;
}
if (hasErrors())
reportAndExit(SKIP_BODY);
// if we got here and the state is null then create a new divPanel, and push it back on
// the expression
if (state == null) {
try {
state = new DivPanelState();
String datasource = "{" + _dataSource + "}";
_expr.updateExpression(datasource, state, pageContext);
}
catch (ExpressionUpdateException e) {
String s = Bundle.getString("Tags_UnableToWriteTree", new Object[]{_dataSource, e.getMessage()});
registerTagError(s, null);
reportErrors();