JBoss Tools SVN: r12300 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-12-05 07:06:48 -0500 (Fri, 05 Dec 2008)
New Revision: 12300
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataListTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableStyleClassesApplier.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java
Log:
RESOLVED - issue JBIDE-3261: rich:dataList bugs.
https://jira.jboss.org/jira/browse/JBIDE-3261
- the issue have been fixed;
- some cut-paste removed
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataListTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataListTemplate.java 2008-12-05 11:59:04 UTC (rev 12299)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataListTemplate.java 2008-12-05 12:06:48 UTC (rev 12300)
@@ -10,13 +10,19 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.richfaces.template;
+import java.util.List;
+
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.template.expression.VpeExpression;
+import org.jboss.tools.vpe.editor.template.expression.VpeExpressionException;
+import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
+import org.jboss.tools.vpe.editor.util.VpeClassUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
@@ -28,33 +34,50 @@
*/
public class RichFacesDataListTemplate extends VpeAbstractTemplate {
/** CSS_FILE_NAME */
- final static private String CSS_FILE_NAME = "dataList/dataList.css";
+ final static private String CSS_FILE_NAME = "dataList/dataList.css";//$NON-NLS-1$
final static private int NUMBER_OF_ROWS_TO_DISPLAY = 1;
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
Element sourceElement = (Element)sourceNode;
- nsIDOMElement unorderedList = visualDocument.createElement("ul");
+ nsIDOMElement unorderedList = visualDocument.createElement(HTML.TAG_UL);
- ComponentUtil.setCSSLink(pageContext, CSS_FILE_NAME, "richFacesDataList");
+ ComponentUtil.setCSSLink(pageContext, CSS_FILE_NAME, "richFacesDataList");//$NON-NLS-1$
VisualDomUtil.copyAttributes(sourceNode, unorderedList);
ComponentUtil.correctAttribute(sourceElement, unorderedList,
- HtmlComponentUtil.HTML_STYLECLASS_ATTR,
- HtmlComponentUtil.HTML_CLASS_ATTR,
- "dr-list rich-datalist",
- "dr-list rich-datalist");
+ RichFaces.ATTR_STYLE_CLASS,
+ HTML.ATTR_CLASS,
+ "dr-list rich-datalist", //$NON-NLS-1$
+ "dr-list rich-datalist");//$NON-NLS-1$
ComponentUtil.correctAttribute(sourceElement, unorderedList,
- HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.HTML_STYLE_ATTR, null, null);
+ RichFaces.ATTR_STYLE,
+ HTML.ATTR_STYLE, null, null);
VpeCreationData creatorInfo = new VpeCreationData(unorderedList);
+
+ final List<String> rowClasses;
+ try {
+ final VpeExpression exprRowClasses = RichFaces.getExprRowClasses();
+ rowClasses = VpeClassUtil.getClasses(exprRowClasses, sourceNode,
+ pageContext);
+ } catch (VpeExpressionException e) {
+ throw new RuntimeException(e);
+ }
+ final int rowClassesSize = rowClasses.size();
+
int rows = NUMBER_OF_ROWS_TO_DISPLAY;
for (int i = 0; i < rows; i++) {
- nsIDOMElement listItem = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_LI);
- listItem.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-list-item rich-list-item");
+ nsIDOMElement listItem = visualDocument.createElement(HTML.TAG_LI);
+
+ String rowClass = "dr-list-item rich-list-item"; //$NON-NLS-1$
+ if (rowClassesSize > 0) {
+ rowClass+= " " + rowClasses.get(i % rowClassesSize); //$NON-NLS-1$
+ }
+
+ listItem.setAttribute(HTML.ATTR_CLASS, rowClass);
unorderedList.appendChild(listItem);
VpeChildrenInfo info = new VpeChildrenInfo(listItem);
@@ -66,7 +89,7 @@
}
- void encodeListItem(VpeChildrenInfo info, Element sourceElement) {
+ private void encodeListItem(VpeChildrenInfo info, Element sourceElement) {
NodeList children = sourceElement.getChildNodes();
int cnt = children != null ? children.getLength() : 0;
@@ -86,4 +109,11 @@
}
}
}
+
+ @Override
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
+ return true;
+ }
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableStyleClassesApplier.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableStyleClassesApplier.java 2008-12-05 11:59:04 UTC (rev 12299)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableStyleClassesApplier.java 2008-12-05 12:06:48 UTC (rev 12300)
@@ -37,10 +37,6 @@
* @author yradtsevich
*/
public class RichFacesDataTableStyleClassesApplier {
- private static final String COLUMN_CLASSES_EXPRESSION =
- "{@" + RichFaces.ATTR_COLUMN_CLASSES + "}"; //$NON-NLS-1$ //$NON-NLS-2$
- private static final String ROW_CLASSES_EXPRESSION =
- "{@" + RichFaces.ATTR_ROW_CLASSES + "}"; //$NON-NLS-1$ //$NON-NLS-2$
private final List<String> rowClasses;
private final List<String> columnClasses;
@@ -54,21 +50,13 @@
*/
public RichFacesDataTableStyleClassesApplier(final nsIDOMDocument visualDocument,
final VpePageContext pageContext, final Node sourceNode) {
- VpeExpression rowClassesExpr;
- VpeExpression columnClassesExpr;
+ final VpeExpression exprRowClasses = RichFaces.getExprRowClasses();
+ final VpeExpression exprColumnClasses = RichFaces.getExprColumnClasses();
+
try {
- rowClassesExpr = VpeExpressionBuilder
- .buildCompletedExpression(ROW_CLASSES_EXPRESSION, true).getExpression();
- columnClassesExpr = VpeExpressionBuilder
- .buildCompletedExpression(COLUMN_CLASSES_EXPRESSION, true).getExpression();
- } catch (final VpeExpressionBuilderException e) {
- throw new RuntimeException(e);
- }
-
- try {
- rowClasses = VpeClassUtil.getClasses(rowClassesExpr, sourceNode,
+ rowClasses = VpeClassUtil.getClasses(exprRowClasses, sourceNode,
pageContext);
- columnClasses = VpeClassUtil.getClasses(columnClassesExpr, sourceNode,
+ columnClasses = VpeClassUtil.getClasses(exprColumnClasses, sourceNode,
pageContext);
} catch (final VpeExpressionException e) {
throw new RuntimeException(e);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java 2008-12-05 11:59:04 UTC (rev 12299)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java 2008-12-05 12:06:48 UTC (rev 12300)
@@ -35,10 +35,6 @@
public class RichFacesSubTableTemplate extends VpeAbstractTemplate {
- private static final String COLUMN_CLASSES_EXPRESSION =
- "{@" + RichFaces.ATTR_COLUMN_CLASSES + "}"; //$NON-NLS-1$ //$NON-NLS-2$
- private static final String ROW_CLASSES_EXPRESSION =
- "{@" + RichFaces.ATTR_ROW_CLASSES + "}"; //$NON-NLS-1$ //$NON-NLS-2$
private static final String DEAFAULT_CELL_CLASS = "dr-subtable-cell rich-subtable-cell"; //$NON-NLS-1$
private static List<String> rowClasses;
private static List<String> columnClasses;
@@ -275,21 +271,13 @@
}
private void initClasses(final Node sourceNode, final VpePageContext pageContext) {
- VpeExpression rowClassesExpr;
- VpeExpression columnClassesExpr;
- try {
- rowClassesExpr = VpeExpressionBuilder
- .buildCompletedExpression(ROW_CLASSES_EXPRESSION, caseSensitive).getExpression();
- columnClassesExpr = VpeExpressionBuilder
- .buildCompletedExpression(COLUMN_CLASSES_EXPRESSION, caseSensitive).getExpression();
- } catch (final VpeExpressionBuilderException e) {
- throw new RuntimeException(e);
- }
+ final VpeExpression exprRowClasses = RichFaces.getExprRowClasses();
+ final VpeExpression exprColumnClasses = RichFaces.getExprColumnClasses();
try {
- rowClasses = VpeClassUtil.getClasses(rowClassesExpr, sourceNode,
+ rowClasses = VpeClassUtil.getClasses(exprRowClasses, sourceNode,
pageContext);
- columnClasses = VpeClassUtil.getClasses(columnClassesExpr, sourceNode,
+ columnClasses = VpeClassUtil.getClasses(exprColumnClasses, sourceNode,
pageContext);
} catch (final VpeExpressionException e) {
throw new RuntimeException(e);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java 2008-12-05 11:59:04 UTC (rev 12299)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java 2008-12-05 12:06:48 UTC (rev 12300)
@@ -11,6 +11,10 @@
package org.jboss.tools.jsf.vpe.richfaces.template.util;
+import org.jboss.tools.vpe.editor.template.expression.VpeExpression;
+import org.jboss.tools.vpe.editor.template.expression.VpeExpressionBuilder;
+import org.jboss.tools.vpe.editor.template.expression.VpeExpressionBuilderException;
+
/**
* contain rich faces tags and general attributes.
*
@@ -100,4 +104,40 @@
public static final String VAL_TRUE = "true"; //$NON-NLS-1$
public static final String VAL_FALSE = "false"; //$NON-NLS-1$
+
+ private static VpeExpression exprColumnClasses = null;
+ /**
+ * Returns the expression to extract style-classes from a {@code 'columnClasses'} attribute.
+ */
+ public static VpeExpression getExprColumnClasses() {
+ if (exprColumnClasses == null) {
+ try {
+ exprColumnClasses = VpeExpressionBuilder
+ .buildCompletedExpression("{@" + ATTR_COLUMN_CLASSES + "}", true) //$NON-NLS-1$ //$NON-NLS-2$
+ .getExpression();
+ } catch (VpeExpressionBuilderException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ return exprColumnClasses;
+ }
+
+ private static VpeExpression exprRowClasses = null;
+ /**
+ * Returns the expression to extract style-classes from a {@code 'rowClasses'} attribute.
+ */
+ public static VpeExpression getExprRowClasses() {
+ if (exprRowClasses == null) {
+ try {
+ exprRowClasses = VpeExpressionBuilder
+ .buildCompletedExpression("{@" + ATTR_ROW_CLASSES + "}", true) //$NON-NLS-1$ //$NON-NLS-2$
+ .getExpression();
+ } catch (VpeExpressionBuilderException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ return exprRowClasses;
+ }
}
17 years, 4 months
JBoss Tools SVN: r12299 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-12-05 06:59:04 -0500 (Fri, 05 Dec 2008)
New Revision: 12299
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
Log:
RESOLVED - issue JBIDE-3348: <rich:panelMenu style="width:YYY;"> does not work in VPE.
https://jira.jboss.org/jira/browse/JBIDE-3348
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 2008-12-05 11:56:08 UTC (rev 12298)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2008-12-05 11:59:04 UTC (rev 12299)
@@ -108,7 +108,7 @@
String styleClass = sourceElement.getAttribute(STYLE_CLASS);
if (width != null) {
- style += "" + "; width:" + width; //$NON-NLS-1$ //$NON-NLS-2$
+ style = "width:" + width + ";" + style; //$NON-NLS-1$ //$NON-NLS-2$
}
nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
17 years, 4 months
JBoss Tools SVN: r12298 - in trunk: jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-12-05 06:56:08 -0500 (Fri, 05 Dec 2008)
New Revision: 12298
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml
Log:
RESOLVED - issue JBIDE-2817: Incorrect action of attributes "width" and "height" within some tags.
https://jira.jboss.org/jira/browse/JBIDE-2817
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2008-12-05 10:28:51 UTC (rev 12297)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2008-12-05 11:56:08 UTC (rev 12298)
@@ -162,8 +162,8 @@
<vpe:drag start-enable="yes" />
</vpe:dnd>
<vpe:resize>
- <vpe:width width-attr="width" />
- <vpe:height height-attr="height" />
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
</vpe:resize>
</vpe:template>
</vpe:if>
@@ -172,8 +172,8 @@
height="{@height}" class="{@styleClass}" style="{@style}"
title="{tagstring()}" alt="{jsfvalue(@alt)}"/>
<vpe:resize>
- <vpe:width width-attr="width" />
- <vpe:height height-attr="height" />
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
</vpe:resize>
</vpe:template>
</vpe:tag>
@@ -625,8 +625,8 @@
captionClass="{@captionClass}" captionStyle="{@captionStyle}" rowClasses="{@rowClasses}" cellspacing="{@cellspacing}"
cellpadding="{@cellpadding}" bgcolor="{@bgcolor}"
title="{tagstring()}" table-size="{@columns}" />
- <vpe:resize>
- <vpe:width width-attr="width" />
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
</vpe:resize>
<vpe:dnd>
@@ -649,7 +649,7 @@
rowClasses="{@rowClasses}" frame="{@frame}" rules="{@rules}"
class="{@styleClass}" style="{@style}" title="{tagstring()}" dir="{@dir}"/>
<vpe:resize>
- <vpe:width width-attr="width" />
+ <vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
</vpe:resize>
<vpe:dnd>
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 2008-12-05 10:28:51 UTC (rev 12297)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-12-05 11:56:08 UTC (rev 12298)
@@ -169,7 +169,7 @@
<vpe:template children="no" modify="yes"
class="org.jboss.tools.jsf.vpe.richfaces.template.InputNumberSliderTemplate">
<vpe:resize>
- <vpe:width width-attr="width" />
+ <vpe:width width-attr="style.width" />
</vpe:resize>
<vpe:dnd>
<vpe:drag start-enable="yes" />
@@ -217,8 +217,8 @@
<vpe:template children="no" modify="yes"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesSpacerTemplate">
<vpe:resize>
- <vpe:width width-attr="width" />
- <vpe:height height-attr="height" />
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
</vpe:resize>
<vpe:dnd>
<vpe:drag start-enable="yes" />
@@ -239,8 +239,8 @@
<vpe:template children="no" modify="no"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesSeparatorTemplate">
<vpe:resize>
- <vpe:width width-attr="width" />
- <vpe:height height-attr="height" />
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
</vpe:resize>
<vpe:dnd>
<vpe:drag start-enable="yes" />
@@ -282,8 +282,8 @@
<vpe:template class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesToolBarTemplate"
children="yes" modify="no">
<vpe:resize>
- <vpe:width width-attr="width" />
- <vpe:height height-attr="height" />
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
</vpe:resize>
<vpe:dnd>
<vpe:drag start-enable="yes"/>
@@ -430,8 +430,8 @@
<vpe:tag name="rich:panelBar" case-sensitive="yes">
<vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesPanelBarTemplate">
<vpe:resize>
- <vpe:width width-attr="width" />
- <vpe:height height-attr="height" />
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
</vpe:resize>
<vpe:dnd>
<vpe:drag start-enable="yes"/>
@@ -452,8 +452,8 @@
<vpe:tag name="rich:simpleTogglePanel" case-sensitive="yes">
<vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesSimpleTogglePanelTemplate">
<vpe:resize>
- <vpe:width width-attr="width" />
- <vpe:height height-attr="height" />
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
</vpe:resize>
<vpe:dnd>
<vpe:drag start-enable="yes"/>
@@ -487,8 +487,8 @@
<vpe:tag name="rich:tabPanel" case-sensitive="yes">
<vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesTabPanelTemplate">
<vpe:resize>
- <vpe:width width-attr="width" />
- <vpe:height height-attr="height" />
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
</vpe:resize>
<vpe:dnd>
<vpe:drag start-enable="yes"/>
@@ -696,7 +696,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="width" />
+ <vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
</vpe:resize>
<vpe:dnd>
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml 2008-12-05 10:28:51 UTC (rev 12297)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml 2008-12-05 11:56:08 UTC (rev 12298)
@@ -1855,7 +1855,7 @@
value="{src(@background)}" />
</vpe:copy>
<vpe:resize>
- <vpe:width width-attr="width"
+ <vpe:width width-attr="style.width"
disable-absolute-position="yes" />
<vpe:height height-attr="style.height"
tag-xpath="tr" test="{hasinparents('tr')}"
@@ -1899,7 +1899,7 @@
<vpe:copy
attrs="id,style,class,rowspan,colspan,headers,abbr,scope,axis,align,char,charoff,valign,width,height,bgcolor,dir" />
<vpe:resize>
- <vpe:width width-attr="width"
+ <vpe:width width-attr="style.width"
disable-absolute-position="yes" />
<vpe:height height-attr="style.height" tag-xpath="tr"
test="{hasinparents('tr')}" disable-absolute-position="yes" />
17 years, 4 months
JBoss Tools SVN: r12297 - in documentation/trunk/movies/common_resources: Buttons and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-12-05 05:28:51 -0500 (Fri, 05 Dec 2008)
New Revision: 12297
Added:
documentation/trunk/movies/common_resources/Buttons/
documentation/trunk/movies/common_resources/Buttons/custom_gotoframebutton.png
Log:
https://jira.jboss.org/jira/browse/JBDS-426 - making and adding a new button;
Added: documentation/trunk/movies/common_resources/Buttons/custom_gotoframebutton.png
===================================================================
(Binary files differ)
Property changes on: documentation/trunk/movies/common_resources/Buttons/custom_gotoframebutton.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 4 months
JBoss Tools SVN: r12296 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-12-05 05:12:06 -0500 (Fri, 05 Dec 2008)
New Revision: 12296
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-3287, styles and classes were updated, html structure was updated, JUnit test was updated.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml 2008-12-05 10:12:02 UTC (rev 12295)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml 2008-12-05 10:12:06 UTC (rev 12296)
@@ -10,8 +10,34 @@
</head>
<body>
<f:view>
- <rich:messages id="messages">
- </rich:messages>
+ <rich:messages id="messages" layout="table" tooltip="true"
+ showDetail="false" showSummary="true" passedLabel="No Error"
+ errorLabelClass="errorLabel" fatalLabelClass="fatalLabel"
+ infoLabelClass="infoLabel" warnLabelClass="warnLabel"
+ warnMarkerClass="markerWarn" infoMarkerClass="markerInfo"
+ errorMarkerClass="markerError" fatalMarkerClass="markerFatal"
+ errorClass="errorClass" fatalClass="fatalClass" warnClass="warnClass"
+ infoClass="infoClass" styleClass="infoClass"
+ style="color:Turquoise;text-align:center;font-size:small;font-style:italic;border-style:dotted;background-color:Orchid;font-family:Arial CE,Arial Narrow;text-decoration:line-through;font-weight:bolder;">
+ <f:facet name="errorMarker">
+
+ <h:outputText value="Error" />
+ </f:facet>
+ <f:facet name="fatalMarker">
+ <h:outputText value="Fatal" />
+ </f:facet>
+ <f:facet name="infoMarker">
+ <h:outputText value="Info" />
+ </f:facet>
+ <f:facet name="warnMarker">
+ <h:outputText value="Warning" />
+ </f:facet>
+ <f:facet name="passedMarker">
+ <h:outputText value="Passed" />
+ </f:facet>
+ <h:outputText value="#{messages.summary}">
+ </h:outputText>
+ </rich:messages>
</f:view>
</body>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml.xml 2008-12-05 10:12:02 UTC (rev 12295)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml.xml 2008-12-05 10:12:06 UTC (rev 12296)
@@ -1,37 +1,57 @@
<tests>
<test id="messages">
- <TABLE>
+ <TABLE CELLSPACING="0" CELLPADDING="0"
+ STYLE="border-style: dotted; color: Turquoise; text-align: center; font-size: small; font-style: italic; background-color: Orchid; font-family: Arial CE,Arial Narrow; text-decoration: line-through; font-weight: bolder;"
+ CLASS="rich-messages infoClass">
<TR>
<TD>
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ <SPAN CLASS="rich-messages-marker">
+ <DIV>
+ <SPAN> Passed </SPAN>
+ </DIV>
+ </SPAN>
+ <SPAN CLASS="rich-messages-label"> No Error </SPAN>
</TD>
- <TD>
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
- </TD>
</TR>
<TR>
- <TD>
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ <TD CLASS="errorClass">
+ <SPAN CLASS="rich-messages-marker markerError">
+ <DIV>
+ <SPAN> Error </SPAN>
+ </DIV>
+ </SPAN>
+ <SPAN CLASS="rich-messages-label errorLabel"> Error message </SPAN>
</TD>
- <TD> Error message</TD>
</TR>
<TR>
- <TD>
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ <TD CLASS="fatalClass">
+ <SPAN CLASS="rich-messages-marker markerFatal">
+ <DIV>
+ <SPAN> Fatal </SPAN>
+ </DIV>
+ </SPAN>
+ <SPAN CLASS="rich-messages-label fatalLabel"> Fatal message </SPAN>
</TD>
- <TD> Fatal message</TD>
</TR>
<TR>
- <TD>
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ <TD CLASS="infoClass">
+ <SPAN CLASS="rich-messages-marker markerInfo">
+ <DIV>
+ <SPAN> Info </SPAN>
+ </DIV>
+ </SPAN>
+ <SPAN CLASS="rich-messages-label infoLabel"> Info message </SPAN>
</TD>
- <TD> Info message</TD>
</TR>
<TR>
- <TD>
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ <TD CLASS="warnClass">
+ <SPAN CLASS="rich-messages-marker markerWarn">
+ <DIV>
+ <SPAN> Warning </SPAN>
+ </DIV>
+ </SPAN>
+ <SPAN CLASS="rich-messages-label warnLabel"> Warning message </SPAN>
</TD>
- <TD> Warning message</TD>
</TR>
</TABLE>
</test>
17 years, 4 months
JBoss Tools SVN: r12295 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-12-05 05:12:02 -0500 (Fri, 05 Dec 2008)
New Revision: 12295
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3287, styles and classes were updated, html structure was updated, JUnit test was updated.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java 2008-12-05 10:09:40 UTC (rev 12294)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java 2008-12-05 10:12:02 UTC (rev 12295)
@@ -32,33 +32,33 @@
*/
public class RichFacesMessageTemplate extends VpeAbstractTemplate {
- private static String VALIDATION_MESSAGE = "Validation message";
+ private static String VALIDATION_MESSAGE = "Validation message"; //$NON-NLS-1$
- protected static String PASSED_LABEL_ATTRIBUTE_NAME = "passedLabel";
- protected static String LABEL_CLASS_ATTRIBUTE_NAME = "labelClass";
- protected static String MARKER_CLASS_ATTRIBUTE_NAME = "markerClass";
- protected static String MARKER_STYLE_ATTRIBUTE_NAME = "markerStyle";
+ protected static String PASSED_LABEL_ATTRIBUTE_NAME = "passedLabel"; //$NON-NLS-1$
+ protected static String LABEL_CLASS_ATTRIBUTE_NAME = "labelClass"; //$NON-NLS-1$
+ protected static String MARKER_CLASS_ATTRIBUTE_NAME = "markerClass"; //$NON-NLS-1$
+ protected static String MARKER_STYLE_ATTRIBUTE_NAME = "markerStyle"; //$NON-NLS-1$
- protected static String ERROR_MARKER_CLASS_ATTRIBUTE_NAME = "errorMarkerClass";
- protected static String ERROR_LABEL_CLASS_ATTRIBUTE_NAME = "errorLabelClass";
- protected static String ERROR_CLASS_ATTRIBUTE_NAME = "errorClass";
+ protected static String ERROR_MARKER_CLASS_ATTRIBUTE_NAME = "errorMarkerClass"; //$NON-NLS-1$
+ protected static String ERROR_LABEL_CLASS_ATTRIBUTE_NAME = "errorLabelClass"; //$NON-NLS-1$
+ protected static String ERROR_CLASS_ATTRIBUTE_NAME = "errorClass"; //$NON-NLS-1$
- protected static String FATAL_MARKER_CLASS_ATTRIBUTE_NAME = "fatalMarkerClass";
- protected static String FATAL_LABEL_CLASS_ATTRIBUTE_NAME = "fatalLabelClass";
- protected static String FATAL_CLASS_ATTRIBUTE_NAME = "fatalClass";
+ protected static String FATAL_MARKER_CLASS_ATTRIBUTE_NAME = "fatalMarkerClass"; //$NON-NLS-1$
+ protected static String FATAL_LABEL_CLASS_ATTRIBUTE_NAME = "fatalLabelClass"; //$NON-NLS-1$
+ protected static String FATAL_CLASS_ATTRIBUTE_NAME = "fatalClass"; //$NON-NLS-1$
- protected static String INFO_MARKER_CLASS_ATTRIBUTE_NAME = "infoMarkerClass";
- protected static String INFO_LABEL_CLASS_ATTRIBUTE_NAME = "infoLabelClass";
- protected static String INFO_CLASS_ATTRIBUTE_NAME = "infoClass";
+ protected static String INFO_MARKER_CLASS_ATTRIBUTE_NAME = "infoMarkerClass"; //$NON-NLS-1$
+ protected static String INFO_LABEL_CLASS_ATTRIBUTE_NAME = "infoLabelClass"; //$NON-NLS-1$
+ protected static String INFO_CLASS_ATTRIBUTE_NAME = "infoClass"; //$NON-NLS-1$
- protected static String WARN_MARKER_CLASS_ATTRIBUTE_NAME = "warnMarkerClass";
- protected static String WARN_LABEL_CLASS_ATTRIBUTE_NAME = "warnLabelClass";
- protected static String WARN_CLASS_ATTRIBUTE_NAME = "warnClass";
+ protected static String WARN_MARKER_CLASS_ATTRIBUTE_NAME = "warnMarkerClass"; //$NON-NLS-1$
+ protected static String WARN_LABEL_CLASS_ATTRIBUTE_NAME = "warnLabelClass"; //$NON-NLS-1$
+ protected static String WARN_CLASS_ATTRIBUTE_NAME = "warnClass"; //$NON-NLS-1$
- protected static String ERROR_MESSAGE = "Error message";
- protected static String FATAL_MESSAGE = "Fatal message";
- protected static String INFO_MESSAGE = "Info message";
- protected static String WARNING_MESSAGE = "Warning message";
+ protected static String ERROR_MESSAGE = "Error message"; //$NON-NLS-1$
+ protected static String FATAL_MESSAGE = "Fatal message"; //$NON-NLS-1$
+ protected static String INFO_MESSAGE = "Info message"; //$NON-NLS-1$
+ protected static String WARNING_MESSAGE = "Warning message"; //$NON-NLS-1$
protected String passedLabelValue;
protected String labelClassValue;
@@ -79,14 +79,14 @@
protected String styleValue;
protected String styleClassValue;
- protected static String[] markers = { "passedMarker", "errorMarker",
- "fatalMarker", "infoMarker", "warnMarker" };
+ protected static String[] markers = { "passedMarker", "errorMarker", //$NON-NLS-1$ //$NON-NLS-2$
+ "fatalMarker", "infoMarker", "warnMarker" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- protected static String FACET_TAG_NAME = "facet";
+ protected static String FACET_TAG_NAME = "facet"; //$NON-NLS-1$
- protected static String NAME_ATTRIBUTE_NAME = "name";
+ protected static String NAME_ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
- private final static String MESSAGE_STYLE = "padding-left: 1px;padding-right: 1px;padding-top: 1px;padding-bottom: 1px";
+ private final static String MESSAGE_STYLE = "padding-left: 1px;padding-right: 1px;padding-top: 1px;padding-bottom: 1px"; //$NON-NLS-1$
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
@@ -146,14 +146,14 @@
nsIDOMElement span = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_SPAN);
- if (styleValue != null && !styleValue.trim().equals(""))
+ if (styleValue != null && !styleValue.trim().equals("")) //$NON-NLS-1$
span
.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
styleValue);
- if (styleClassValue != null && !styleClassValue.trim().equals(""))
+ if (styleClassValue != null && !styleClassValue.trim().equals("")) //$NON-NLS-1$
span.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
styleClassValue);
- if (labelClassValue != null && !labelClassValue.trim().equals(""))
+ if (labelClassValue != null && !labelClassValue.trim().equals("")) //$NON-NLS-1$
span.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
labelClassValue);
@@ -231,7 +231,7 @@
nsIDOMElement tbody = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TBODY);
- tbody.setAttribute(HtmlComponentUtil.HTML_ATTR_VALIGN, "top");
+ tbody.setAttribute(HtmlComponentUtil.HTML_ATTR_VALIGN, "top"); //$NON-NLS-1$
tableHeader.appendChild(tbody);
nsIDOMElement tr = visualDocument
@@ -239,10 +239,10 @@
tbody.appendChild(tr);
- if (styleValue != null && !styleValue.trim().equals(""))
+ if (styleValue != null && !styleValue.trim().equals("")) //$NON-NLS-1$
tableHeader.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
styleValue);
- if (styleClassValue != null && !styleClassValue.trim().equals(""))
+ if (styleClassValue != null && !styleClassValue.trim().equals("")) //$NON-NLS-1$
tableHeader.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
styleClassValue);
@@ -257,54 +257,54 @@
case 0: // passed
if (markerClassValue != null
- && !markerClassValue.trim().equals(""))
+ && !markerClassValue.trim().equals("")) //$NON-NLS-1$
td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
markerClassValue);
if (markerStyleValue != null
- && !markerStyleValue.trim().equals(""))
+ && !markerStyleValue.trim().equals("")) //$NON-NLS-1$
td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
markerStyleValue);
break;
case 1: // error
if (errorClassValue != null
- && !errorClassValue.trim().equals(""))
+ && !errorClassValue.trim().equals("")) //$NON-NLS-1$
td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
errorClassValue);
if (errorMarkerClassValue != null
- && !errorMarkerClassValue.trim().equals(""))
+ && !errorMarkerClassValue.trim().equals("")) //$NON-NLS-1$
td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
errorMarkerClassValue);
break;
case 2: // fatal
if (fatalClassValue != null
- && !fatalClassValue.trim().equals(""))
+ && !fatalClassValue.trim().equals("")) //$NON-NLS-1$
td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
fatalClassValue);
if (fatalMarkerClassValue != null
- && !fatalMarkerClassValue.trim().equals(""))
+ && !fatalMarkerClassValue.trim().equals("")) //$NON-NLS-1$
td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
fatalMarkerClassValue);
break;
case 3: // info
if (infoClassValue != null
- && !infoClassValue.trim().equals(""))
+ && !infoClassValue.trim().equals("")) //$NON-NLS-1$
td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
infoClassValue);
if (infoMarkerClassValue != null
- && !infoMarkerClassValue.trim().equals(""))
+ && !infoMarkerClassValue.trim().equals("")) //$NON-NLS-1$
td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
infoMarkerClassValue);
break;
case 4: // warn
if (warnClassValue != null
- && !warnClassValue.trim().equals(""))
+ && !warnClassValue.trim().equals("")) //$NON-NLS-1$
td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
warnClassValue);
if (warnMarkerClassValue != null
- && !warnMarkerClassValue.trim().equals(""))
+ && !warnMarkerClassValue.trim().equals("")) //$NON-NLS-1$
td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
warnMarkerClassValue);
@@ -328,7 +328,7 @@
nsIDOMElement td1 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
- if (labelClassValue != null && !labelClassValue.trim().equals(""))
+ if (labelClassValue != null && !labelClassValue.trim().equals("")) //$NON-NLS-1$
td1
.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
labelClassValue);
@@ -364,7 +364,7 @@
if (!(nodeList.item(i) instanceof Element))
continue;
- String facetName = nodeList.item(i).getPrefix() + ":"
+ String facetName = nodeList.item(i).getPrefix() + ":" //$NON-NLS-1$
+ FACET_TAG_NAME;
if (nodeList.item(i).getNodeName().equalsIgnoreCase(facetName)
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java 2008-12-05 10:09:40 UTC (rev 12294)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java 2008-12-05 10:12:02 UTC (rev 12295)
@@ -12,10 +12,13 @@
import java.util.HashMap;
-import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.Constants;
+import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMText;
@@ -24,6 +27,15 @@
public class RichFacesMessagesTemplate extends RichFacesMessageTemplate {
+ private static final String LAYOUT = "layout"; //$NON-NLS-1$
+ private static final String LIST = "list"; //$NON-NLS-1$
+ private static final String TABLE = "table"; //$NON-NLS-1$
+ private static final String ITERATOR = "iterator"; //$NON-NLS-1$
+
+ private static final String CSS_RICH_MESSAGES = "rich-messages"; //$NON-NLS-1$
+ private static final String CSS_RICH_MESSAGES_MARKER = "rich-messages-marker"; //$NON-NLS-1$
+ private static final String CSS_RICH_MESSAGES_LABEL = "rich-messages-label"; //$NON-NLS-1$
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
@@ -67,33 +79,46 @@
.getAttribute(WARN_CLASS_ATTRIBUTE_NAME);
styleValue = ((Element) sourceNode)
- .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ .getAttribute(HTML.ATTR_STYLE);
styleClassValue = ((Element) sourceNode)
- .getAttribute(HtmlComponentUtil.HTML_STYLECLASS_ATTR);
+ .getAttribute(RichFaces.ATTR_STYLE_CLASS);
+
+ String styleClass = CSS_RICH_MESSAGES;
+ String layout = ((Element) sourceNode).getAttribute(LAYOUT);
+ nsIDOMElement container = null;
+ if (TABLE.equalsIgnoreCase(layout)) {
+ container = visualDocument.createElement(HTML.TAG_TABLE);
+ container.setAttribute(HTML.ATTR_CELLPADDING, "0"); //$NON-NLS-1$
+ container.setAttribute(HTML.ATTR_CELLSPACING, "0"); //$NON-NLS-1$
+ } else {
+ /*
+ * If layout is either list or iterator or not specified
+ * use list layout by default.
+ */
+ container = visualDocument.createElement(HTML.TAG_DL);
+ }
+
+ if (ComponentUtil.isNotBlank(styleValue)) {
+ container.setAttribute(HTML.ATTR_STYLE, styleValue);
+ }
+ if (ComponentUtil.isNotBlank(styleClassValue)) {
+ styleClass += Constants.WHITE_SPACE + styleClassValue;
+ }
+ container.setAttribute(HTML.ATTR_CLASS, styleClass);
+
+ creationData = new VpeCreationData(container);
- nsIDOMElement table = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
-
- if (styleValue != null && !styleValue.trim().equals(""))
- table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, styleValue);
- if (styleClassValue != null && !styleClassValue.trim().equals(""))
- table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- styleClassValue);
-
- creationData = new VpeCreationData(table);
-
HashMap<String, Node> facets = getFacelets((Element) sourceNode);
for (int i = 0; i < markers.length; i++) {
if (facets.containsKey(markers[i])) {
- table.appendChild(createVisualMessage(creationData,
- visualDocument, i, (Element) facets.get(markers[i])));
+ container.appendChild(createVisualMessage(creationData,
+ visualDocument, layout, i, (Element) facets.get(markers[i])));
} else {
- table.appendChild(createVisualMessage(creationData,
- visualDocument, i, null));
+ container.appendChild(createVisualMessage(creationData,
+ visualDocument, layout, i, null));
}
}
-
return creationData;
}
@@ -106,107 +131,120 @@
* @return
*/
private nsIDOMElement createVisualMessage(VpeCreationData creationData,
- nsIDOMDocument visualDocument, int markerNum, Element facet) {
+ nsIDOMDocument visualDocument, String layout, int markerNum,
+ Element facet) {
- String labelMessage = "";
+ String containerClass = Constants.EMPTY;
+ String markerClass = CSS_RICH_MESSAGES_MARKER;
+ String labelClass = CSS_RICH_MESSAGES_LABEL;
+
+ String labelMessage = Constants.EMPTY;
+ nsIDOMElement topContainer = null;
+ nsIDOMElement container = null;
+ nsIDOMElement marker = null;
+ nsIDOMElement label = null;
- nsIDOMElement tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ if (TABLE.equalsIgnoreCase(layout)) {
+ nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
+ container = visualDocument.createElement(HTML.TAG_TD);
+ marker = visualDocument.createElement(HTML.TAG_SPAN);
+ label = visualDocument.createElement(HTML.TAG_SPAN);
+ tr.appendChild(container);
+ container.appendChild(marker);
+ container.appendChild(label);
+ topContainer = tr;
+ } else {
+ /*
+ * If layout is either list or iterator or not specified use list
+ * layout by default.
+ */
+ container = visualDocument.createElement(HTML.TAG_DT);
+ marker = visualDocument.createElement(HTML.TAG_SPAN);
+ label = visualDocument.createElement(HTML.TAG_SPAN);
+ container.appendChild(marker);
+ container.appendChild(label);
+ topContainer = container;
+ }
- nsIDOMElement td1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
-
- nsIDOMElement td2 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
if (facet != null) {
- VpeChildrenInfo childrenInfo = new VpeChildrenInfo(td1);
+ VpeChildrenInfo childrenInfo = new VpeChildrenInfo(marker);
creationData.addChildrenInfo(childrenInfo);
childrenInfo.addSourceChild(facet);
}
- // apply styles and classes
+ /*
+ * apply styles and classes
+ */
switch (markerNum) {
case 0: // passed
- labelMessage = (passedLabelValue == null) ? "" : passedLabelValue;
- if (labelClassValue != null && !labelClassValue.trim().equals(""))
- td2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- labelClassValue);
- if (markerClassValue != null && !markerClassValue.trim().equals(""))
- td1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- markerClassValue);
- if (markerStyleValue != null && !markerStyleValue.trim().equals(""))
- td1.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- markerStyleValue);
+ labelMessage = (passedLabelValue == null) ? Constants.EMPTY : passedLabelValue;
+ if (ComponentUtil.isNotBlank(markerClassValue)) {
+ markerClass += Constants.WHITE_SPACE + markerClassValue;
+ }
+ if (ComponentUtil.isNotBlank(labelClassValue)) {
+ labelClass += Constants.WHITE_SPACE + labelClassValue;
+ }
break;
case 1: // error
- if (errorClassValue != null && !errorClassValue.trim().equals(""))
- tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- errorClassValue);
- if (errorMarkerClassValue != null
- && !errorMarkerClassValue.trim().equals(""))
- td1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- errorMarkerClassValue);
- if (errorLabelClassValue != null
- && !errorLabelClassValue.trim().equals(""))
- td2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- errorLabelClassValue);
-
labelMessage = ERROR_MESSAGE;
+ if (ComponentUtil.isNotBlank(errorClassValue)) {
+ containerClass += Constants.WHITE_SPACE + errorClassValue;
+ }
+ if (ComponentUtil.isNotBlank(errorMarkerClassValue)) {
+ markerClass += Constants.WHITE_SPACE + errorMarkerClassValue;
+ }
+ if (ComponentUtil.isNotBlank(errorLabelClassValue)) {
+ labelClass += Constants.WHITE_SPACE + errorLabelClassValue;
+ }
break;
case 2: // fatal
labelMessage = FATAL_MESSAGE;
- if (fatalClassValue != null && !fatalClassValue.trim().equals(""))
- tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- fatalClassValue);
- if (fatalMarkerClassValue != null
- && !fatalMarkerClassValue.trim().equals(""))
- td1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- fatalMarkerClassValue);
- if (fatalLabelClassValue != null
- && !fatalLabelClassValue.trim().equals(""))
- td2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- fatalLabelClassValue);
+ if (ComponentUtil.isNotBlank(fatalClassValue)) {
+ containerClass += Constants.WHITE_SPACE + fatalClassValue;
+ }
+ if (ComponentUtil.isNotBlank(fatalMarkerClassValue)) {
+ markerClass += Constants.WHITE_SPACE + fatalMarkerClassValue;
+ }
+ if (ComponentUtil.isNotBlank(fatalLabelClassValue)) {
+ labelClass += Constants.WHITE_SPACE + fatalLabelClassValue;
+ }
break;
case 3: // info
labelMessage = INFO_MESSAGE;
- if (infoClassValue != null && !infoClassValue.trim().equals(""))
- tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- infoClassValue);
- if (infoMarkerClassValue != null
- && !infoMarkerClassValue.trim().equals(""))
- td1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- infoMarkerClassValue);
- if (infoLabelClassValue != null
- && !infoLabelClassValue.trim().equals(""))
- td2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- infoLabelClassValue);
+ if (ComponentUtil.isNotBlank(infoClassValue)) {
+ containerClass += Constants.WHITE_SPACE + infoClassValue;
+ }
+ if (ComponentUtil.isNotBlank(infoMarkerClassValue)) {
+ markerClass += Constants.WHITE_SPACE + infoMarkerClassValue;
+ }
+ if (ComponentUtil.isNotBlank(infoLabelClassValue)) {
+ labelClass += Constants.WHITE_SPACE + infoLabelClassValue;
+ }
break;
case 4: // warn
labelMessage = WARNING_MESSAGE;
- if (warnClassValue != null && !warnClassValue.trim().equals(""))
- tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- warnClassValue);
- if (warnMarkerClassValue != null
- && !warnMarkerClassValue.trim().equals(""))
- td1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- warnMarkerClassValue);
- if (warnLabelClassValue != null
- && !warnLabelClassValue.trim().equals(""))
- td2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- warnLabelClassValue);
+ if (ComponentUtil.isNotBlank(warnClassValue)) {
+ containerClass += Constants.WHITE_SPACE + warnClassValue;
+ }
+ if (ComponentUtil.isNotBlank(warnMarkerClassValue)) {
+ markerClass += Constants.WHITE_SPACE + warnMarkerClassValue;
+ }
+ if (ComponentUtil.isNotBlank(warnLabelClassValue)) {
+ labelClass += Constants.WHITE_SPACE + warnLabelClassValue;
+ }
break;
default:
break;
}
- if (labelClassValue != null && !labelClassValue.trim().equals(""))
- td2
- .setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- labelClassValue);
+ if (ComponentUtil.isNotBlank(containerClass)) {
+ container.setAttribute(HTML.ATTR_CLASS, containerClass);
+ }
+ marker.setAttribute(HTML.ATTR_CLASS, markerClass);
+ label.setAttribute(HTML.ATTR_CLASS, labelClass);
+
nsIDOMText text = visualDocument.createTextNode(labelMessage);
- tr.appendChild(td1);
- tr.appendChild(td2);
- td2.appendChild(text);
- return tr;
+ label.appendChild(text);
+ return topContainer;
}
}
\ No newline at end of file
17 years, 4 months
JBoss Tools SVN: r12294 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-12-05 05:09:40 -0500 (Fri, 05 Dec 2008)
New Revision: 12294
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSubView.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3354, template structure was updated, JUnit test was updated.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSubView.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSubView.java 2008-12-05 10:09:35 UTC (rev 12293)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfSubView.java 2008-12-05 10:09:40 UTC (rev 12294)
@@ -31,31 +31,15 @@
*/
public class JsfSubView extends VpeAbstractTemplate {
- private static String TABLE_WIDTH_STYLE = "width: 100%;"; //$NON-NLS-1$
-
- /**
- * Instantiates a new jsf sub view.
- */
- public JsfSubView() {
- }
+ private static String WRAPPER_DIV_STYLE = "width: 100%; display: table;"; //$NON-NLS-1$
- /* (non-Javadoc)
- * @see org.jboss.tools.vpe.editor.template.VpeTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
- */
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
Element sourceElement = (Element)sourceNode;
- nsIDOMElement table = visualDocument.createElement(HTML.TAG_TABLE);
- nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
- nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
+ div.setAttribute(VpeStyleUtil.ATTRIBUTE_STYLE, WRAPPER_DIV_STYLE);
- table.setAttribute(VpeStyleUtil.ATTRIBUTE_STYLE, TABLE_WIDTH_STYLE);
- td.appendChild(div);
- tr.appendChild(td);
- table.appendChild(tr);
-
- VpeCreationData creationData = new VpeCreationData(table);
+ VpeCreationData creationData = new VpeCreationData(div);
VpeChildrenInfo divInfo = new VpeChildrenInfo(div);
creationData.addChildrenInfo(divInfo);
17 years, 4 months
JBoss Tools SVN: r12293 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-12-05 05:09:35 -0500 (Fri, 05 Dec 2008)
New Revision: 12293
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/subview.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/subview.jsp.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-3354, template structure was updated, JUnit test was updated.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/subview.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/subview.jsp 2008-12-05 02:26:10 UTC (rev 12292)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/subview.jsp 2008-12-05 10:09:35 UTC (rev 12293)
@@ -7,12 +7,12 @@
<body>
<f:view>
- <h1><h:outputText value="subview" /></h1>
- <f:subview id="subview1">
- </f:subview>
- <f:subview id="subview2">
- subview content
- </f:subview>
+ <h:form
+ style="color:red;text-align:center;font-size:26px;font-style:italic;border-style:dotted;background-color:green;border-color:Orchid;text-decoration:underline;border-width:thick;font-weight:bolder;">
+ <f:subview id="subview">
+ <h4>JSF SubView Component</h4>
+ </f:subview>
+ </h:form>
</f:view>
</body>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/subview.jsp.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/subview.jsp.xml 2008-12-05 02:26:10 UTC (rev 12292)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/subview.jsp.xml 2008-12-05 10:09:35 UTC (rev 12293)
@@ -1,25 +1,10 @@
<tests>
- <test id="subview1">
- <TABLE
- STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px; width: 100%;">
- <TR>
- <TD>
- <DIV></DIV>
- <BR />
- </TD>
- </TR>
- </TABLE>
+ <test id="subview">
+ <DIV
+ STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px; width: 100%; display: table;">
+ <H4 STYLE="-moz-user-modify: read-write;">
+ <SPAN> JSF SubView Component </SPAN>
+ </H4>
+ </DIV>
</test>
- <test id="subview2">
- <TABLE
- STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px; width: 100%;">
- <TR>
- <TD>
- <DIV>
- <SPAN> subview content</SPAN>
- </DIV>
- </TD>
- </TR>
- </TABLE>
- </test>
</tests>
\ No newline at end of file
17 years, 4 months
JBoss Tools SVN: r12292 - in trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-12-04 21:26:10 -0500 (Thu, 04 Dec 2008)
New Revision: 12292
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/preferences/SeamSettingsPreferencesPageTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/PackageNamesTest.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java
Log:
fix test errors in seam ui tests
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/preferences/SeamSettingsPreferencesPageTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/preferences/SeamSettingsPreferencesPageTest.java 2008-12-04 21:47:05 UTC (rev 12291)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/preferences/SeamSettingsPreferencesPageTest.java 2008-12-05 02:26:10 UTC (rev 12292)
@@ -44,9 +44,9 @@
IProject project = null;
static String PROJECT_NAME = "TestSeamSettingsPreferencesPage";
- static String MODEL_PACKAGE_NAME = "org.domain." + PROJECT_NAME + ".entity";
- static String ACTION_PACKAGE_NAME = "org.domain." + PROJECT_NAME + ".session";
- static String TEST_PACKAGE_NAME = "org.domain." + PROJECT_NAME + ".test";
+ static String MODEL_PACKAGE_NAME = ("org.domain." + PROJECT_NAME + ".entity").toLowerCase();
+ static String ACTION_PACKAGE_NAME = ("org.domain." + PROJECT_NAME + ".session").toLowerCase();
+ static String TEST_PACKAGE_NAME = ("org.domain." + PROJECT_NAME + ".test").toLowerCase();
static String RUNTIME_NAME = "Seam 1.2.0 Seam Settings Page Test";
public SeamSettingsPreferencesPageTest() {
@@ -108,13 +108,13 @@
assertEquals("Seam settings version 1.1 property is not set", pref.get(ISeamFacetDataModelProperties.SEAM_SETTINGS_VERSION, ""), ISeamFacetDataModelProperties.SEAM_SETTINGS_VERSION_1_1);
assertEquals("Seam runtime property is not set", pref.get(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME, ""), RUNTIME_NAME);
assertEquals("Seam deployment type property is not set", pref.get(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS, ""), ISeamFacetDataModelProperties.DEPLOY_AS_WAR);
- assertEquals("Model package name property is not set", pref.get(ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME, ""), MODEL_PACKAGE_NAME);
+ assertEquals("Model package name property is not set", MODEL_PACKAGE_NAME,pref.get(ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME, ""));
assertEquals("Model source folder property is not set", pref.get(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER, ""), "/" + PROJECT_NAME + "/src");
- assertEquals("Action package name property is not set", pref.get(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME, ""), ACTION_PACKAGE_NAME);
+ assertEquals("Action package name property is not set", ACTION_PACKAGE_NAME, pref.get(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME, ""));
assertEquals("Action source folder property is not set", pref.get(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER, ""), "/" + PROJECT_NAME + "/src");
assertEquals("Seam 'create tests' property is not set", pref.get(ISeamFacetDataModelProperties.TEST_CREATING, ""), "true");
assertEquals("Test project property is not set", pref.get(ISeamFacetDataModelProperties.SEAM_TEST_PROJECT, ""), PROJECT_NAME);
- assertEquals("Test package name property is not set", pref.get(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME, ""), TEST_PACKAGE_NAME);
+ assertEquals("Test package name property is not set", TEST_PACKAGE_NAME, pref.get(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME, ""));
assertEquals("Test source folder property is not set", pref.get(ISeamFacetDataModelProperties.TEST_SOURCE_FOLDER, ""), "/" + PROJECT_NAME + "/src");
assertEquals("View folder property is not set", pref.get(ISeamFacetDataModelProperties.WEB_CONTENTS_FOLDER, ""), "/" + PROJECT_NAME);
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/PackageNamesTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/PackageNamesTest.java 2008-12-04 21:47:05 UTC (rev 12291)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/PackageNamesTest.java 2008-12-05 02:26:10 UTC (rev 12292)
@@ -19,6 +19,7 @@
import org.jboss.tools.common.util.WorkbenchUtils;
import org.jboss.tools.seam.ui.ISeamUiConstants;
import org.jboss.tools.seam.ui.internal.project.facet.SeamInstallWizardPage;
+import org.jboss.tools.test.util.JobUtils;
/**
* @author dazarov
* JBIDE-3254 tests
@@ -85,21 +86,26 @@
private SeamInstallWizardPage startCreateSeamWizard(String projectName){
wizard = (NewProjectDataModelFacetWizard)WorkbenchUtils.findWizardByDefId(ISeamUiConstants.NEW_SEAM_PROJECT_WIZARD_ID);
+ wizard.getDataModel().setStringProperty("IProjectCreationPropertiesNew.PROJECT_NAME", projectName);
+
WizardDialog dialog = new WizardDialog(
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
wizard);
- wizard.getDataModel().setStringProperty("IProjectCreationPropertiesNew.PROJECT_NAME", projectName);
+
dialog.create();
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+ // delay is needed to wait for dialog initialization is finished
+ // such as default runtime and configuration for seam wizard
+ JobUtils.delay(2000);
startSeamPrjWzPg = wizard.getStartingPage();
assertNotNull("Cannot create seam start wizard page", startSeamPrjWzPg);
-
IWizardPage webModuleWizPg = wizard.getNextPage(startSeamPrjWzPg);
assertNotNull("Cannot create dynamic web project wizard page",webModuleWizPg);
IWizardPage jsfCapabilitiesWizPg = wizard.getNextPage(webModuleWizPg);
assertNotNull("Cannot create JSF capabilities wizard page",jsfCapabilitiesWizPg);
SeamInstallWizardPage seamWizPg = (SeamInstallWizardPage)wizard.getNextPage(jsfCapabilitiesWizPg);
assertNotNull("Cannot create seam facet wizard page",seamWizPg);
-
return seamWizPg;
}
}
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java 2008-12-04 21:47:05 UTC (rev 12291)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java 2008-12-05 02:26:10 UTC (rev 12292)
@@ -34,6 +34,7 @@
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
import org.jboss.tools.seam.core.project.facet.SeamVersion;
import org.jboss.tools.seam.ui.ISeamUiConstants;
+import org.jboss.tools.test.util.JobUtils;
import org.osgi.framework.Bundle;
/**
@@ -65,20 +66,26 @@
@Override
protected void setUp() throws Exception {
super.setUp();
+
+ }
+
+ /**
+ *
+ */
+ public void testSeamProjectNewWizardInstanceIsCreated() {
wizard = (NewProjectDataModelFacetWizard)WorkbenchUtils.findWizardByDefId(ISeamUiConstants.NEW_SEAM_PROJECT_WIZARD_ID);
WizardDialog dialog = new WizardDialog(
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
wizard);
dialog.create();
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+ JobUtils.delay(2000);
+ boolean canFinish = wizard.canFinish();
+ assertFalse("Finish button is enabled at first wizard page before all requerd fileds are valid.", canFinish);
startSeamPrjWzPg = wizard.getStartingPage();
wizard.getDataModel().setStringProperty("IProjectCreationPropertiesNew.PROJECT_NAME","testName");
assertNotNull("Cannot create seam start wizard page", startSeamPrjWzPg);
- }
-
- /**
- *
- */
- public void testSeamProjectNewWizardInstanceIsCreated() {
IWizardPage webModuleWizPg = wizard.getNextPage(startSeamPrjWzPg);
assertNotNull("Cannot create dynamic web project wizard page",webModuleWizPg);
IWizardPage jsfCapabilitiesWizPg = wizard.getNextPage(webModuleWizPg);
@@ -94,10 +101,18 @@
* See http://jira.jboss.com/jira/browse/JBIDE-1111
*/
public void testJiraJbide1111() {
+ wizard = (NewProjectDataModelFacetWizard)WorkbenchUtils.findWizardByDefId(ISeamUiConstants.NEW_SEAM_PROJECT_WIZARD_ID);
+ WizardDialog dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ wizard);
+ dialog.create();
+ dialog.setBlockOnOpen(false);
+
+ startSeamPrjWzPg = wizard.getStartingPage();
+ wizard.getDataModel().setStringProperty("IProjectCreationPropertiesNew.PROJECT_NAME","testName");
+ assertNotNull("Cannot create seam start wizard page", startSeamPrjWzPg);
// Check Finish button
- boolean canFinish = wizard.canFinish();
- assertFalse("Finish button is enabled at first wizard page before all requerd fileds are valid.", canFinish);
- wizard.performCancel();
+
// Create JBoss AS Runtime, Server, HSQL DB Driver
try {
@@ -120,21 +135,21 @@
} catch (IOException e) {
fail("Cannot create Seam Runtime to test New Seam Project Wizard. " + e.getMessage());
}
+ dialog.open();
+ JobUtils.delay(2000);
- try {
- setUp();
- } catch (Exception e) {
- fail("Cannot create New Seam Project Wizard. " + e.getMessage());
- }
-
// Check Finish button
- canFinish = wizard.canFinish();
+ boolean canFinish = wizard.canFinish();
assertFalse("Finish button is enabled at first wizard page before user entered the project name.", canFinish);
-
+ wizard.performCancel();
+
// Set project name
IDataModel model = wizard.getDataModel();
model.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, "testSeamProjectNewWizardAllowsToFinishAtFirstPageProjectName");
+ dialog.open();
+ JobUtils.delay(2000);
+
// Check Finish button
canFinish = wizard.canFinish();
assertTrue("Finish button is disabled at first wizard page in spite of created JBoss AS Runtime, Server, DB Connection and Seam Runtime and valid project name.", canFinish);
17 years, 4 months
JBoss Tools SVN: r12291 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-12-04 16:47:05 -0500 (Thu, 04 Dec 2008)
New Revision: 12291
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml.xml
Log:
test JUnit test error
testDatascroller Failure value of #text is "?\239?\191?\189?\239?\191?\189" but must be "?\194?\171?\194?\171"
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml.xml 2008-12-04 20:55:58 UTC (rev 12290)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml.xml 2008-12-04 21:47:05 UTC (rev 12291)
@@ -5,8 +5,8 @@
CLASS="rich-dtascroller-table">
<TBODY>
<TR>
- <TD ALIGN="center" CLASS="rich-datascr-button rich-datascr-button-dsbld">««</TD>
- <TD ALIGN="center" CLASS="rich-datascr-button rich-datascr-button-dsbld">«</TD>
+ <TD ALIGN="center" CLASS="rich-datascr-button rich-datascr-button-dsbld">««</TD>
+ <TD ALIGN="center" CLASS="rich-datascr-button rich-datascr-button-dsbld">«</TD>
<TD ALIGN="center" CLASS="rich-datascr-button rich-datascr-button-dsbld">
<BR _MOZ_DIRTY="" TYPE="_moz"/>
</TD>
17 years, 4 months