Author: ezheleznyakov
Date: 2007-10-12 05:47:40 -0400 (Fri, 12 Oct 2007)
New Revision: 4141
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-847
Create templates for <rich:panelMenu/>, <rich:panelMenuGroup/> and
<rich:panelMenuItem> components.
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2007-10-12
09:43:38 UTC (rev 4140)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2007-10-12
09:47:40 UTC (rev 4141)
@@ -47,7 +47,6 @@
// private static final String PATH_TO_COLLAPSED_GROUP =
// "/panelMenuGroup/collapsed.gif";
- @SuppressWarnings("unchecked")
private static Map toggleMap = new HashMap();
// private boolean collapsedFalg = false;
@@ -83,8 +82,6 @@
div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
}
- //VpeChildrenInfo childrenInfo = new VpeChildrenInfo(div);
- // vpeCreationData.addChildrenInfo(childrenInfo);
List<Node> children = ComponentUtil.getChildren(sourceElement);
int activeId = getActiveId(sourceElement, children);
int i = 0;
@@ -97,19 +94,20 @@
RichFacesPanelMenuGroupTemplate.encode(pageContext,
vpeCreationData, (Element) child, visualDocument, div,
active);
+ i++;
} else if (child.getNodeName().endsWith(PANEL_MENU_ITEM_END)) {
RichFacesPanelMenuItemTemplate.encode(pageContext,
vpeCreationData, (Element) child, visualDocument, div,
active);
} else {
- Element childDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ Element childDiv = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
VpeChildrenInfo childrenInfo = new VpeChildrenInfo(childDiv);
div.appendChild(childDiv);
childrenInfo.addSourceChild(child);
vpeCreationData.addChildrenInfo(childrenInfo);
}
- i++;
- }
+ }
return vpeCreationData;
}