Author: ezheleznyakov
Date: 2007-10-12 12:02:55 -0400 (Fri, 12 Oct 2007)
New Revision: 4167
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/templates/vpe-templates-richfaces.xml
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
15:50:40 UTC (rev 4166)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2007-10-12
16:02:55 UTC (rev 4167)
@@ -37,21 +37,13 @@
private static final String WIDTH_ATTR_PANELMENU = "width";
private static final String STYLE_ATTR_PANELMENU = "style";
-
- // private static final String DISABLED_ATTR_PANELMENU = "disabled";
- // private static final String EXPANDSINGLE_ATTR_PANELMENU = "expandSingle";
private static final String STYLECLASS_ATTR_PANELMENU = "styleClass";
private static final String PANEL_MENU_GROUP_END = ":panelMenuGroup";
private static final String PANEL_MENU_ITEM_END = ":panelMenuItem";
- // private static final String PATH_TO_COLLAPSED_GROUP =
- // "/panelMenuGroup/collapsed.gif";
-
private static Map toggleMap = new HashMap();
- // private boolean collapsedFalg = false;
-
// private static final String DISABLED_STYLE_FOR_TABLE = "color:#B1ADA7";
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
@@ -61,20 +53,15 @@
String width = sourceElement.getAttribute(WIDTH_ATTR_PANELMENU);
String style = sourceElement.getAttribute(STYLE_ATTR_PANELMENU);
- // String disabled =
- // sourceElement.getAttribute(DISABLED_ATTR_PANELMENU);
- // String expandSingle = sourceElement
- // .getAttribute(EXPANDSINGLE_ATTR_PANELMENU);
- String styleClass = sourceElement
- .getAttribute(STYLECLASS_ATTR_PANELMENU);
+ String styleClass = sourceElement.getAttribute(STYLECLASS_ATTR_PANELMENU);
+
+ if(width != null) {
+ style += "" + "; width:" + width;
+ }
Element div = visualDocument.createElement(HTML.TAG_DIV);
VpeCreationData vpeCreationData = new VpeCreationData(div);
- if (width != null) {
- div.setAttribute(HtmlComponentUtil.HTML_WIDTH_ATTR, width);
- }
-
if (style != null) {
div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-12
15:50:40 UTC (rev 4166)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-12
16:02:55 UTC (rev 4167)
@@ -645,8 +645,7 @@
<vpe:tag name="rich:panelMenu" case-sensitive="yes">
<vpe:template children="yes" modify="yes"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesPanelMenuTemplate">
<vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="stylwe.height" />
+ <vpe:width width-attr="width" />
</vpe:resize>
<vpe:drag start-enable="yes"/>
<vpe:drop container="yes"/>