public void toSAX(ContentHandler contentHandler, LexicalHandler lexicalHandler,
NamespaceSupport namespaces) throws SAXException
{
if (!merged)
{
AttributeMap divAttributes = new AttributeMap();
divAttributes.put(A_NAME, name);
divAttributes.put(A_ID, context.generateID(E_DIVISION, name));
if (interactive)
{
divAttributes.put(A_INTERACTIVE, "yes");
divAttributes.put(A_ACTION, action);
divAttributes.put(A_METHOD, method);
if (behaviorAJAXenabled)
{
divAttributes.put(A_BEHAVIOR,"ajax");
}
if (behaviorSensitiveFields != null)
{
divAttributes.put(A_BEHVIOR_SENSITIVE_FIELDS,behaviorSensitiveFields);
}
}
if (PAGINATION_SIMPLE.equals(paginationType))
{
divAttributes.put(A_PAGINATION, paginationType);
if (previousPage != null)
divAttributes.put(A_PREVIOUS_PAGE, previousPage);
if (nextPage != null)
divAttributes.put(A_NEXT_PAGE, nextPage);
divAttributes.put(A_ITEMS_TOTAL, itemsTotal);
divAttributes.put(A_FIRST_ITEM_INDEX, firstItemIndex);
divAttributes.put(A_LAST_ITEM_INDEX, lastItemIndex);
}
else if (PAGINATION_MASKED.equals(paginationType))
{
divAttributes.put(A_PAGINATION, paginationType);
divAttributes.put(A_ITEMS_TOTAL, itemsTotal);
divAttributes.put(A_FIRST_ITEM_INDEX, firstItemIndex);
divAttributes.put(A_LAST_ITEM_INDEX, lastItemIndex);
divAttributes.put(A_CURRENT_PAGE, currentPage);
divAttributes.put(A_PAGES_TOTAL, pagesTotal);
divAttributes.put(A_PAGE_URL_MASK, pageURLMask);
}
if (rend != null)
divAttributes.put(A_RENDER, rend);
startElement(contentHandler, namespaces, E_DIVISION, divAttributes);
if (head != null)
head.toSAX(contentHandler, lexicalHandler, namespaces);