[jbosstools-commits] JBoss Tools SVN: r7040 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Thu Mar 20 08:55:50 EDT 2008
Author: dmaliarevich
Date: 2008-03-20 08:55:49 -0400 (Thu, 20 Mar 2008)
New Revision: 7040
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1697, dir attr added, code adjustment
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java 2008-03-20 12:46:17 UTC (rev 7039)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java 2008-03-20 12:55:49 UTC (rev 7040)
@@ -44,6 +44,9 @@
private final String HEADER_ALINGMENT = "headerAlignment"; //$NON-NLS-1$
private final String HEADER_SPACING = "headerSpacing"; //$NON-NLS-1$
private final String SELECTED_TAB = "selectedTab"; //$NON-NLS-1$
+ private final String DIR = "dir"; //$NON-NLS-1$
+ private final String DIR_RTL = "RTL"; //$NON-NLS-1$
+ private final String DIR_LTR = "LTR"; //$NON-NLS-1$
private final String CONTENT_CLASS = "contentClass"; //$NON-NLS-1$
private final String CONTENT_STYLE = "contentStyle"; //$NON-NLS-1$
@@ -52,7 +55,6 @@
private final String INACTIVE_TAB_CLASS = "inactiveTabClass"; //$NON-NLS-1$
private final String DISABLED_TAB_CLASS = "disabledTabClass"; //$NON-NLS-1$
-
private final String ZERO = "0"; //$NON-NLS-1$
private final String ONE = "1"; //$NON-NLS-1$
private final String TWO = "2"; //$NON-NLS-1$
@@ -72,6 +74,7 @@
VpeCreationData creationData = new VpeCreationData(table);
ComponentUtil.setCSSLink(pageContext, CSS_FILE_PATH, RICH_FACES_TAB_PANEL);
+ setDirAttr(table, sourceElement);
table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
ComponentUtil.getAttribute(sourceElement, HtmlComponentUtil.HTML_STYLECLASS_ATTR)
+ SPACE + CSS_PANEL
@@ -262,6 +265,22 @@
return style;
}
+
+
+ /**
+ * Sets the dir attribute to the element.
+ *
+ * @param element the element
+ * @param dir the dir value
+ */
+ private void setDirAttr(nsIDOMElement element, Element sourceElement) {
+ String dir = ComponentUtil.getAttribute(sourceElement, DIR);
+ if ((null != dir) && (!EMPTY.equals(dir))){
+ if ((DIR_LTR.equalsIgnoreCase(dir)) || (DIR_RTL.equalsIgnoreCase(dir))) {
+ element.setAttribute(DIR, dir);
+ }
+ }
+ }
private String getHeaderAlignment(Element sourceElement) {
String headerAlignment = sourceElement.getAttribute(HEADER_ALINGMENT);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java 2008-03-20 12:46:17 UTC (rev 7039)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java 2008-03-20 12:55:49 UTC (rev 7040)
@@ -34,6 +34,7 @@
private static final String DISABLED = "disabled"; //$NON-NLS-1$
private static final String LABEL = "label"; //$NON-NLS-1$
+ private static final String LABEL_WIDTH = "labelWidth"; //$NON-NLS-1$
private static final String CSS_HEADER = "rich-tab-header"; //$NON-NLS-1$
private static final String CSS_LABEL = "rich-tab-label"; //$NON-NLS-1$
@@ -76,7 +77,6 @@
nsIDOMElement td = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
if(creationData==null) {
-
creationData = new VpeCreationData(td);
} else {
parentTr.appendChild(td);
@@ -86,7 +86,6 @@
}
// td.setAttribute("style", "position: relative;");
td.setAttribute(HtmlComponentUtil.HTML_HEIGHT_ATTR, "100%");
-
nsIDOMElement table = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
td.appendChild(table);
@@ -175,7 +174,7 @@
td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-tbpnl-tbtopbrdr"
+ SPACE + RichFacesTabPanelTemplate.CSS_SIDE_CELL);
td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, "width: "
- + ComponentUtil.getAttribute(sourceElement,"labelWidth") + ";");
+ + ComponentUtil.getAttribute(sourceElement, LABEL_WIDTH) + ";");
td.setAttribute(VPE_USER_TOGGLE_ID, toggleId);
table = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
More information about the jbosstools-commits
mailing list