Author: yradtsevich
Date: 2008-10-08 14:37:02 -0400 (Wed, 08 Oct 2008)
New Revision: 10753
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java
Log:
Bug fix
https://jira.jboss.org/jira/browse/JBIDE-2856 .
Now attributes style and styleClass are not applied for popup menu, selection items and
input.
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java 2008-10-08
17:35:10 UTC (rev 10752)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java 2008-10-08
18:37:02 UTC (rev 10753)
@@ -183,9 +183,12 @@
final nsIDOMElement rootDiv = visualDocument.createElement(HTML.TAG_DIV);
//Fix
https://jira.jboss.org/jira/browse/JBIDE-2430 issue with resizement.
- rootDiv.setAttribute(HTML.ATTR_STYLE,
HTML.STYLE_PARAMETER_WIDTH+Constants.COLON+sourceWidth);
+ rootDiv.setAttribute(HTML.ATTR_STYLE,
HTML.STYLE_PARAMETER_WIDTH+Constants.COLON+sourceWidth);
+ final nsIDOMElement comboBoxDiv = visualDocument.createElement(HTML.TAG_DIV);
final nsIDOMElement secondDiv = visualDocument.createElement(HTML.TAG_DIV);
- secondDiv.setAttribute(HTML.ATTR_ALIGN, this.sourceAlign);
+ comboBoxDiv.setAttribute(HTML.ATTR_ALIGN, this.sourceAlign); //$NON-NLS-1$
+ secondDiv.setAttribute(HTML.ATTR_ALIGN, this.sourceAlign);
+ //comboBoxDiv.setAttribute(HTML.ATTR_CLASS,
styleClasess.get("secondDiv")); //$NON-NLS-1$
secondDiv.setAttribute(HTML.ATTR_CLASS, styleClasess.get("secondDiv"));
//$NON-NLS-1$
String secondDivSubStyle = "; position: {0}; z-index: {1} ;";
//$NON-NLS-1$
if (isToggle) {
@@ -194,6 +197,8 @@
secondDivSubStyle = MessageFormat.format(secondDivSubStyle,
"static", "0"); //$NON-NLS-1$ //$NON-NLS-2$
}
// TODO add ATTR_STYLE.
+ comboBoxDiv.setAttribute(HTML.ATTR_STYLE, HTML.STYLE_PARAMETER_WIDTH +
Constants.COLON + this.sourceListWidth
+ + Constants.SEMICOLON + secondDivSubStyle);
secondDiv.setAttribute(HTML.ATTR_STYLE, HTML.STYLE_PARAMETER_WIDTH +
Constants.COLON + this.sourceListWidth
+ Constants.SEMICOLON + secondDivSubStyle + sourceStyle);
final nsIDOMElement thirdDiv = visualDocument.createElement(HTML.TAG_DIV);
@@ -248,11 +253,12 @@
+ calculateWithForDiv(this.sourceWidth, 10));
forthEmptyDiv.appendChild(visualDocument.createTextNode("Struts"));
//$NON-NLS-1$
- rootDiv.appendChild(secondDiv);
+ rootDiv.appendChild(comboBoxDiv);
+ comboBoxDiv.appendChild(secondDiv);
secondDiv.appendChild(thirdDiv);
if (isToggle) {
- secondDiv.appendChild(createToogleDiv(pageContext, source, visualDocument));
+ comboBoxDiv.appendChild(createToogleDiv(pageContext, source, visualDocument));
}
thirdDiv.appendChild(firstInput);
thirdDiv.appendChild(secondInput);