public VariableInfo[] getVariableInfo(TagData data) {
//$NON-NLS-1$
List variables = new ArrayList(2);
Object idObj = data.getAttribute(TagAttributeInfo.ID);
// handle both the id and uid attributes
if (idObj == null)
{
idObj = data.getAttribute("uid"); //$NON-NLS-1$
}
// avoid errors, but "id" and "id_rownum" will not be defined
if (idObj != TagData.REQUEST_TIME_VALUE && idObj != null)
{
String tagId = idObj.toString();
// don't try to add variables if id is not a valid java identifier.
if (isJavaId(tagId))
{
// current row
variables.add(new VariableInfo(tagId, Object.class.getName(), true, VariableInfo.NESTED));
// current row number
variables.add(new VariableInfo(
tagId + ROWNUM_SUFFIX,
Integer.class.getName(),
true,
VariableInfo.NESTED));
}
}
return (VariableInfo[]) variables.toArray(new VariableInfo[]{});
}
Variables TableTag makes available in the pageContext. |