JBoss Tools SVN: r11097 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core: src/org/jboss/tools/hibernate/jpt/core/internal/context and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-10-23 06:27:41 -0400 (Thu, 23 Oct 2008)
New Revision: 11097
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/messages.properties
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnit.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2976
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF 2008-10-23 09:24:48 UTC (rev 11096)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF 2008-10-23 10:27:41 UTC (rev 11097)
@@ -7,7 +7,8 @@
org.eclipse.core.runtime,
org.eclipse.jpt.core,
org.eclipse.wst.validation,
- org.eclipse.jpt.utility;bundle-version="1.2.0"
+ org.eclipse.jpt.utility;bundle-version="1.2.0",
+ org.eclipse.core.resources;bundle-version="3.4.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: Hibernate Team
Export-Package: org.jboss.tools.hibernate.jpt.core.internal,
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnit.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnit.java 2008-10-23 09:24:48 UTC (rev 11096)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnit.java 2008-10-23 10:27:41 UTC (rev 11097)
@@ -10,16 +10,27 @@
******************************************************************************/
package org.jboss.tools.hibernate.jpt.core.internal.context;
+import java.io.File;
+import java.util.List;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
import org.eclipse.jpt.core.context.persistence.Persistence;
+import org.eclipse.jpt.core.context.persistence.Property;
import org.eclipse.jpt.core.internal.context.persistence.GenericPersistenceUnit;
import org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit;
+import org.eclipse.wst.validation.internal.core.Message;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.jboss.tools.hibernate.jpt.core.internal.context.basic.BasicHibernateProperties;
/**
* @author Dmitry Geraskov
*
*/
-public class HibernatePersistenceUnit extends GenericPersistenceUnit {
+public class HibernatePersistenceUnit extends GenericPersistenceUnit
+ implements Messages{
private HibernateProperties hibernateProperties;
@@ -42,4 +53,53 @@
return this.hibernateProperties.getBasicHibernate();
}
+ // ********** Validation ***********************************************
+ @Override
+ public void addToMessages(List<IMessage> messages) {
+ super.addToMessages(messages);
+ addFileNotExistsMessages(messages);
+ }
+
+ protected void addFileNotExistsMessages(List<IMessage> messages) {
+ String configFile = getBasicProperties().getConfigurationFile();
+ if (configFile != null && configFile.length() > 0){
+ IPath path = new Path(configFile);
+
+ if (new File(path.toOSString()).exists()) return;
+
+
+ IResource res= ResourcesPlugin.getWorkspace().getRoot().findMember(path);
+ if (res != null) {
+ int resType= res.getType();
+ if (resType != IResource.FILE) {
+ Property prop = getProperty(BasicHibernateProperties.HIBERNATE_CONFIG_FILE);
+ IMessage message = new HibernateMessage(IMessage.HIGH_SEVERITY,
+ NOT_A_FILE, new String[]{configFile}, getResource());
+ message.setLineNo(prop.getValidationTextRange().getLineNumber());
+ messages.add(message);
+ }
+ } else {
+ Property prop = getProperty(BasicHibernateProperties.HIBERNATE_CONFIG_FILE);
+ IMessage message = new HibernateMessage(IMessage.HIGH_SEVERITY,
+ FILE_NOT_FOUND, new String[]{configFile}, getResource());
+ message.setLineNo(prop.getValidationTextRange().getLineNumber());
+ messages.add(message);
+ }
+ }
+ }
}
+
+/*Fixes the problem with class loader*/
+class HibernateMessage extends Message {
+
+ /**
+ * @param aSeverity
+ * @param anId
+ * @param aParams
+ * @param aTargetObject
+ */
+ public HibernateMessage(int aSeverity, String anId, String[] aParams, Object aTargetObject) {
+ super(Messages.class.getName(), aSeverity, anId, aParams, aTargetObject);
+ }
+
+}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java 2008-10-23 10:27:41 UTC (rev 11097)
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.jpt.core.internal.context;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public interface Messages {
+
+ String NOT_A_FILE = "not_a_file";
+
+ String FILE_NOT_FOUND = "file_not_found";
+
+}
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/messages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/messages.properties (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/messages.properties 2008-10-23 10:27:41 UTC (rev 11097)
@@ -0,0 +1,2 @@
+not_a_file= Resource \"{0}\" is not a file.
+file_not_found = File \"{0}\" not found.
\ No newline at end of file
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
16 years, 2 months
JBoss Tools SVN: r11096 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test: src/org/jboss/tools/jsf/vpe/richfaces/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-10-23 05:24:48 -0400 (Thu, 23 Oct 2008)
New Revision: 11096
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml.xml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2810, tests for rich:pickList, rich:progressBar, rich:scrollableDataTable.
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml.xml 2008-10-23 09:24:48 UTC (rev 11096)
@@ -0,0 +1,89 @@
+<tests>
+ <test id="pickList">
+ <TABLE CLASS="rich-list-picklist" STYLE="">
+ <TBODY>
+ <TR>
+ <TD>
+ <DIV CLASS="rich-picklist-source-items" STYLE="width: 140px; height: 140px;">
+ <TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0"
+ CLASS="rich-picklist-body">
+ <TR>
+ <TD STYLE="border: 0px none ; padding: 0px;">
+ <DIV CLASS="rich-picklist-list">
+ <DIV CLASS="rich-picklist-list-content" STYLE="width: 140px; height: 140px;">
+ <TABLE CELLPADDING="0" CLASS="rich-picklist-internal-tab">
+ <TBODY>
+ <OPTION> Option 1 </OPTION>
+ <OPTION> Option 2 </OPTION>
+ <OPTION> Option 3 </OPTION>
+ </TBODY>
+ </TABLE>
+ </DIV>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </TD>
+ <TD STYLE="vertical-align: middle;">
+ <DIV CLASS="rich-picklist-controls">
+ <DIV CLASS="rich-picklist-control-button-class">
+ <DIV
+ STYLE="background-image: url(file:///D:/Projects/jboss_trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/pickList/button.gif);"
+ CLASS="rich-list-picklist-button">
+ <DIV CLASS="rich-list-picklist-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/pickList/arrow_remove.gif/"/> Remove
+ </DIV>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-picklist-control-button-class">
+ <DIV
+ STYLE="background-image: url(file:///D:/Projects/jboss_trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/pickList/button.gif);"
+ CLASS="rich-list-picklist-button">
+ <DIV CLASS="rich-list-picklist-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/pickList/arrow_copy_all.gif/"/> Copy all
+ </DIV>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-picklist-control-button-class">
+ <DIV
+ STYLE="background-image: url(file:///D:/Projects/jboss_trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/pickList/button.gif);"
+ CLASS="rich-list-picklist-button">
+ <DIV CLASS="rich-list-picklist-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/pickList/arrow_copy.gif/"/> Copy
+ </DIV>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-picklist-control-button-class">
+ <DIV
+ STYLE="/background-image: url\(.*org.jboss.tools.jsf.vpe.richfaces/resources/pickList/button.gif\);/"
+ CLASS="rich-list-picklist-button">
+ <DIV CLASS="rich-list-picklist-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/pickList/arrow_remove_all.gif/"/> Remove All
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </TD>
+ <TD>
+ <DIV CLASS="rich-picklist-target-items" STYLE="width: 140px; height: 140px;">
+ <TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0"
+ CLASS="rich-picklist-body">
+ <TR>
+ <TD STYLE="border: 0px none ; padding: 0px;">
+ <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar.xhtml.xml 2008-10-23 09:24:48 UTC (rev 11096)
@@ -0,0 +1,20 @@
+<tests>
+ <test id="progressBar">
+ <DIV
+ CLASS="rich-progress-bar-block rich-progress-bar-width rich-progress-bar-shell"
+ STYLE="height: 13px; text-align: left;">
+ <DIV CLASS="rich-progress-bar-height rich-progress-bar-uploaded null"
+ STYLE="height: 13px; width: 60%;">
+ <DIV
+ STYLE="height: 13px; font-weight: bold; position: relative; text-align: center;"> #{progressBarBean.currentValue} %
+ </DIV>
+ </DIV>
+ <DIV><BR STYLE="-moz-user-modify: read-write;"/>
+
+ </DIV>
+ <DIV><BR STYLE="-moz-user-modify: read-write;"/>
+
+ </DIV>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml 2008-10-23 08:21:25 UTC (rev 11095)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml 2008-10-23 09:24:48 UTC (rev 11096)
@@ -1,31 +1,61 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:rich="http://richfaces.org/rich">
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
<head>
</head>
<body>
-<!-- Scrollable Data Table component -->
- <rich:scrollableDataTable rowKeyVar="rkv" frozenColCount="1"
- height="150px" width="700px" rows="5" columnClasses="col"
- sortMode="single">
- <rich:column>
- <f:facet name="header">
- <h:outputText styleClass="headerText" value="Car" />
- </f:facet>
- <h:outputText value="Car1" />
- </rich:column>
- <rich:column>
- <f:facet name="header">
- <h:outputText styleClass="headerText" value="Model" />
- </f:facet>
- <h:outputText value="Model1" />
- </rich:column>
- </rich:scrollableDataTable>
+<f:view>
+<rich:scrollableDataTable id="scrollableDataTable" rowKeyVar="rkv" frozenColCount="1"
+ height="400px" width="700px" id="carList" rows="40"
+ columnClasses="col" value="#{dataTableScrollerBean.allCars}"
+ var="category" sortMode="single"
+ binding="#{dataTableScrollerBean.table}"
+ sortOrder="#{dataTableScrollerBean.order}"
+ selection="#{dataTableScrollerBean.selection}">
+
+ <rich:column id="make">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Make" />
+ </f:facet>
+ <h:outputText value="#{category.make}" />
+ </rich:column>
+ <rich:column id="model">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Model" />
+ </f:facet>
+ <h:outputText value="#{category.model}" />
+ </rich:column>
+ <rich:column id="price">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Price" />
+ </f:facet>
+ <h:outputText value="#{category.price}" />
+ </rich:column>
+ <rich:column id="mileage">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Mileage" />
+ </f:facet>
+ <h:outputText value="#{category.mileage}" />
+ </rich:column>
+ <rich:column width="200px" id="vin">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="VIN" />
+ </f:facet>
+ <h:outputText value="#{category.vin}" />
+ </rich:column>
+ <rich:column id="stock">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Stock" />
+ </f:facet>
+ <h:outputText value="#{category.stock}" />
+ </rich:column>
+ </rich:scrollableDataTable>
+</f:view>
</body>
</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml.xml 2008-10-23 09:24:48 UTC (rev 11096)
@@ -0,0 +1,160 @@
+<tests>
+ <test id="scrollableDataTable">
+ <TABLE>
+ <TR>
+ <TD>
+ <DIV CLASS="dr-table-hidden" STYLE="width: 700px; height: 400px;">
+ <TABLE WIDTH="700" ROWKEYVAR="rkv" FROZENCOLCOUNT="1" ID="carList"
+ ROWS="40" COLUMNCLASSES="col" VALUE="#{dataTableScrollerBean.allCars}"
+ VAR="category" SORTMODE="single" BINDING="#{dataTableScrollerBean.table}"
+ SORTORDER="#{dataTableScrollerBean.order}" SELECTION="#{dataTableScrollerBean.selection}"
+ CLASS="dr-table rich-table">
+ <COLGROUP SPAN="6">
+ </COLGROUP>
+ <THEAD>
+ <TR CLASS="dr-table-subheader rich-table-subheader">
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN CLASS="headerText"> Make </SPAN>
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN CLASS="headerText"> Model </SPAN>
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN CLASS="headerText"> Price </SPAN>
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN CLASS="headerText"> Mileage </SPAN>
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN CLASS="headerText"> VIN </SPAN>
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN CLASS="headerText"> Stock </SPAN>
+ </TD>
+ </TR>
+ </THEAD>
+ <TBODY>
+ <TR CLASS="dr-table-firstrow rich-table-firstrow">
+ <TD CLASS="dr-table-cell rich-table-cell" ID="make">
+ <SPAN> #{category.make} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="model">
+ <SPAN> #{category.model} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="price">
+ <SPAN> #{category.price} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="mileage">
+ <SPAN> #{category.mileage} </SPAN>
+ </TD>
+ <TD WIDTH="200" CLASS="dr-table-cell rich-table-cell" ID="vin">
+ <SPAN> #{category.vin} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="stock">
+ <SPAN> #{category.stock} </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-firstrow rich-table-firstrow">
+ <TD CLASS="dr-table-cell rich-table-cell" ID="make">
+ <SPAN> #{category.make} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="model">
+ <SPAN> #{category.model} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="price">
+ <SPAN> #{category.price} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="mileage">
+ <SPAN> #{category.mileage} </SPAN>
+ </TD>
+ <TD WIDTH="200" CLASS="dr-table-cell rich-table-cell" ID="vin">
+ <SPAN> #{category.vin} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="stock">
+ <SPAN> #{category.stock} </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-firstrow rich-table-firstrow">
+ <TD CLASS="dr-table-cell rich-table-cell" ID="make">
+ <SPAN> #{category.make} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="model">
+ <SPAN> #{category.model} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="price">
+ <SPAN> #{category.price} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="mileage">
+ <SPAN> #{category.mileage} </SPAN>
+ </TD>
+ <TD WIDTH="200" CLASS="dr-table-cell rich-table-cell" ID="vin">
+ <SPAN> #{category.vin} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="stock">
+ <SPAN> #{category.stock} </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-firstrow rich-table-firstrow">
+ <TD CLASS="dr-table-cell rich-table-cell" ID="make">
+ <SPAN> #{category.make} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="model">
+ <SPAN> #{category.model} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="price">
+ <SPAN> #{category.price} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="mileage">
+ <SPAN> #{category.mileage} </SPAN>
+ </TD>
+ <TD WIDTH="200" CLASS="dr-table-cell rich-table-cell" ID="vin">
+ <SPAN> #{category.vin} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="stock">
+ <SPAN> #{category.stock} </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-firstrow rich-table-firstrow">
+ <TD CLASS="dr-table-cell rich-table-cell" ID="make">
+ <SPAN> #{category.make} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="model">
+ <SPAN> #{category.model} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="price">
+ <SPAN> #{category.price} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="mileage">
+ <SPAN> #{category.mileage} </SPAN>
+ </TD>
+ <TD WIDTH="200" CLASS="dr-table-cell rich-table-cell" ID="vin">
+ <SPAN> #{category.vin} </SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell" ID="stock">
+ <SPAN> #{category.stock} </SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </DIV>
+ </TD>
+ <TD>
+ <DIV STYLE="overflow: scroll; width: 17px; height: 100%;">
+ </DIV>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <DIV STYLE="overflow: scroll; width: 100%; height: 17px;">
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2008-10-23 08:21:25 UTC (rev 11095)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2008-10-23 09:24:48 UTC (rev 11096)
@@ -244,15 +244,15 @@
}
public void testPickList() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/pickList.xhtml");//$NON-NLS-1$
}
public void testProgressBar() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/progressBar.xhtml");//$NON-NLS-1$
}
public void testScrollableDataTable() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/scrollableDataTable.xhtml");//$NON-NLS-1$
}
public void testSeparator() throws Throwable {
16 years, 2 months
JBoss Tools SVN: r11095 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test: src/org/jboss/tools/jsf/vpe/richfaces/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-10-23 04:21:25 -0400 (Thu, 23 Oct 2008)
New Revision: 11095
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenu.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuGroup.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuGroup.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuItem.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuItem.xhtml.xml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenu.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2810, tests for rich:panelMenu, rich:panelMenuGroup, rich:panelMenuItem.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml 2008-10-22 23:44:58 UTC (rev 11094)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml 2008-10-23 08:21:25 UTC (rev 11095)
@@ -10,7 +10,9 @@
</head>
<body>
+<f:view>
<rich:paint2D id="paint2D" width="300" height="120" data="#{paintData}"
format="png" paint="#{paintBean.paint}" />
+</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/panelMenu.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenu.xhtml 2008-10-22 23:44:58 UTC (rev 11094)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenu.xhtml 2008-10-23 08:21:25 UTC (rev 11095)
@@ -10,75 +10,62 @@
</head>
<body>
-<!-- Panel Menu component -->
-<h:panelGrid columns="2" columnClasses="cols" width="100%">
- <rich:panelMenu style="width:200px" mode="ajax"
+<f:view>
+ <rich:panelMenu id="panelMenu" style="width:200px" mode="ajax"
iconExpandedGroup="disc" iconCollapsedGroup="disc"
iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
- iconCollapsedTopGroup="chevronDown" iconCollapsedTopPosition="right">
- <!-- Panel Menu Group component -->
+ iconCollapsedTopGroup="chevronDown">
+ <rich:panelMenuItem label="Item 1">
+ <f:param name="current" value="Item 1"/>
+ </rich:panelMenuItem>
<rich:panelMenuGroup label="Group 1">
- <rich:panelMenuItem label="Item 1.1"
- action="#{panelMenu.updateCurrent}">
+ <rich:panelMenuItem label="Item 1.1">
<f:param name="current" value="Item 1.1" />
</rich:panelMenuItem>
- <!-- Panel Menu Item component -->
- <rich:panelMenuItem label="Item 1.2"
- action="#{panelMenu.updateCurrent}">
+ <rich:panelMenuItem label="Item 1.2">
<f:param name="current" value="Item 1.2" />
</rich:panelMenuItem>
- <rich:panelMenuItem label="Item 1.3"
- action="#{panelMenu.updateCurrent}">
+ <rich:panelMenuItem label="Item 1.3">
<f:param name="current" value="Item 1.3" />
</rich:panelMenuItem>
</rich:panelMenuGroup>
<rich:panelMenuGroup label="Group 2">
- <rich:panelMenuItem label="Item 2.1"
- action="#{panelMenu.updateCurrent}">
+ <rich:panelMenuItem label="Item 2.1">
<f:param name="current" value="Item 2.1" />
</rich:panelMenuItem>
- <rich:panelMenuItem label="Item 2.2"
- action="#{panelMenu.updateCurrent}">
+ <rich:panelMenuItem label="Item 2.2">
<f:param name="current" value="Item 2.2" />
</rich:panelMenuItem>
- <rich:panelMenuItem label="Item 2.3"
- action="#{panelMenu.updateCurrent}">
+ <rich:panelMenuItem label="Item 2.3">
<f:param name="current" value="Item 2.3" />
</rich:panelMenuItem>
<rich:panelMenuGroup label="Group 2.4">
- <rich:panelMenuItem label="Item 2.4.1"
- action="#{panelMenu.updateCurrent}">
+ <rich:panelMenuItem label="Item 2.4.1">
<f:param name="current" value="Item 2.4.1" />
</rich:panelMenuItem>
- <rich:panelMenuItem label="Item 2.4.2"
- action="#{panelMenu.updateCurrent}">
+ <rich:panelMenuItem label="Item 2.4.2">
<f:param name="current" value="Item 2.4.2" />
</rich:panelMenuItem>
- <rich:panelMenuItem label="Item 2.4.3"
- action="#{panelMenu.updateCurrent}">
+ <rich:panelMenuItem label="Item 2.4.3">
<f:param name="current" value="Item 2.4.3" />
</rich:panelMenuItem>
</rich:panelMenuGroup>
- <rich:panelMenuItem label="Item 2.5"
- action="#{panelMenu.updateCurrent}">
+ <rich:panelMenuItem label="Item 2.5">
<f:param name="current" value="Item 2.5" />
</rich:panelMenuItem>
</rich:panelMenuGroup>
<rich:panelMenuGroup label="Group 3">
- <rich:panelMenuItem label="Item 3.1"
- action="#{panelMenu.updateCurrent}">
+ <rich:panelMenuItem label="Item 3.1">
<f:param name="current" value="Item 3.1" />
</rich:panelMenuItem>
- <rich:panelMenuItem label="Item 3.2"
- action="#{panelMenu.updateCurrent}">
+ <rich:panelMenuItem label="Item 3.2">
<f:param name="current" value="Item 3.2" />
</rich:panelMenuItem>
- <rich:panelMenuItem label="Item 3.3"
- action="#{panelMenu.updateCurrent}">
+ <rich:panelMenuItem label="Item 3.3">
<f:param name="current" value="Item 3.3" />
</rich:panelMenuItem>
</rich:panelMenuGroup>
</rich:panelMenu>
-</h:panelGrid>
+</f:view>
</body>
</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenu.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenu.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenu.xhtml.xml 2008-10-23 08:21:25 UTC (rev 11095)
@@ -0,0 +1,89 @@
+<tests>
+ <test id="panelMenu">
+ <DIV BORDER="0" STYLE="margin-top: 3px; width: 200px;">
+ <DIV CLASS="dr-pmenu-top-self-div" BORDER="0" STYLE="margin-top: 3px;"
+ VPESUPPORT="panelMenuItem">
+ <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0"
+ STYLE="margin-top: 3px;" CLASS="rich-pmenu-item rich-pmenu-top-item">
+ <TR CLASS="">
+ <TD STYLE="" CLASS="dr-pmenu-nowrap">
+ <IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/spacer.gif/" />
+ <IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/points.gif/"
+ CLASS="rich-pmenu-item-icon rich-pmenu-top-item-icon" />
+ </TD>
+ <TD STYLE="width: 100%;" CLASS="rich-pmenu-item-label rich-pmenu-top-item-label"> Item 1</TD>
+ <TD STYLE="" CLASS="dr-pmenu-nowrap">
+ <IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/spacer.gif/" />
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ <DIV>
+ <DIV VPESUPPORT="panelMenuGroup" VPE-USER-TOGGLE-ID="1"
+ CLASS="dr-pmenu-group-div dr-pmenu-top-group-div">
+ <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0"
+ CLASS="dr-pmenu-top-group rich-pmenu-group" STYLE="margin-top: 3px;">
+ <TR>
+ <TD VPE-USER-TOGGLE-ID="1" CLASS="rich-pmenu-top-group-self-icon">
+ <IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/spacer.gif/" />
+ </TD>
+ <TD STYLE="width: 100%;" VPE-USER-TOGGLE-ID="1"
+ CLASS="rich-pmenu-top-group-self-label"> Group 1</TD>
+ <TD VPE-USER-TOGGLE-ID="1"
+ CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
+ <IMG
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/chevronDown.gif/" />
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </DIV>
+ <DIV>
+ <DIV VPESUPPORT="panelMenuGroup" VPE-USER-TOGGLE-ID="2"
+ CLASS="dr-pmenu-group-div dr-pmenu-top-group-div">
+ <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0"
+ CLASS="dr-pmenu-top-group rich-pmenu-group" STYLE="margin-top: 3px;">
+ <TR>
+ <TD VPE-USER-TOGGLE-ID="2" CLASS="rich-pmenu-top-group-self-icon">
+ <IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/spacer.gif/" />
+ </TD>
+ <TD STYLE="width: 100%;" VPE-USER-TOGGLE-ID="2"
+ CLASS="rich-pmenu-top-group-self-label"> Group 2</TD>
+ <TD VPE-USER-TOGGLE-ID="2"
+ CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
+ <IMG
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/chevronDown.gif/" />
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </DIV>
+ <DIV>
+ <DIV VPESUPPORT="panelMenuGroup" VPE-USER-TOGGLE-ID="3"
+ CLASS="dr-pmenu-group-div dr-pmenu-top-group-div">
+ <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0"
+ CLASS="dr-pmenu-top-group rich-pmenu-group" STYLE="margin-top: 3px;">
+ <TR>
+ <TD VPE-USER-TOGGLE-ID="3" CLASS="rich-pmenu-top-group-self-icon">
+ <IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/spacer.gif/" />
+ </TD>
+ <TD STYLE="width: 100%;" VPE-USER-TOGGLE-ID="3"
+ CLASS="rich-pmenu-top-group-self-label"> Group 3</TD>
+ <TD VPE-USER-TOGGLE-ID="3"
+ CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
+ <IMG
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/chevronDown.gif/" />
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </DIV>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenu.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuGroup.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuGroup.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuGroup.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuGroup.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuGroup.xhtml.xml 2008-10-23 08:21:25 UTC (rev 11095)
@@ -0,0 +1,25 @@
+<tests>
+ <test id="panelMenuGroup">
+ <DIV>
+ <DIV VPESUPPORT="panelMenuGroup" VPE-USER-TOGGLE-ID="1"
+ CLASS="dr-pmenu-group-div dr-pmenu-top-group-div">
+ <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0"
+ CLASS="dr-pmenu-top-group rich-pmenu-group" STYLE="margin-top: 3px;">
+ <TR>
+ <TD VPE-USER-TOGGLE-ID="1" CLASS="rich-pmenu-top-group-self-icon">
+ <IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/spacer.gif/"/>
+ </TD>
+ <TD STYLE="width: 100%;" VPE-USER-TOGGLE-ID="1"
+ CLASS="rich-pmenu-top-group-self-label"> Group 1</TD>
+ <TD VPE-USER-TOGGLE-ID="1"
+ CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
+ <IMG
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/chevronDown.gif/"/>
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuGroup.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuItem.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuItem.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuItem.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuItem.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuItem.xhtml.xml 2008-10-23 08:21:25 UTC (rev 11095)
@@ -0,0 +1,24 @@
+<tests>
+ <test id="panelMenuItem">
+ <DIV CLASS="dr-pmenu-top-self-div" BORDER="0" STYLE="margin-top: 3px;"
+ VPESUPPORT="panelMenuItem">
+ <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0"
+ STYLE="margin-top: 3px;" CLASS="rich-pmenu-item rich-pmenu-top-item">
+ <TR CLASS="">
+ <TD STYLE="" CLASS="dr-pmenu-nowrap">
+ <IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/spacer.gif/"/>
+ <IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/points.gif/"
+ CLASS="rich-pmenu-item-icon rich-pmenu-top-item-icon"/>
+ </TD>
+ <TD STYLE="width: 100%;" CLASS="rich-pmenu-item-label rich-pmenu-top-item-label"> Item 1 </TD>
+ <TD STYLE="" CLASS="dr-pmenu-nowrap">
+ <IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/spacer.gif/"/>
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenuItem.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2008-10-22 23:44:58 UTC (rev 11094)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2008-10-23 08:21:25 UTC (rev 11095)
@@ -232,15 +232,15 @@
}
public void testPanelMenu() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/panelMenu.xhtml");//$NON-NLS-1$
}
public void testPanelMenuGroup() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/panelMenuGroup.xhtml");//$NON-NLS-1$
}
public void testPanelMenuItem() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/panelMenuItem.xhtml");//$NON-NLS-1$
}
public void testPickList() throws Throwable {
16 years, 2 months
JBoss Tools SVN: r11091 - branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-22 19:23:37 -0400 (Wed, 22 Oct 2008)
New Revision: 11091
Removed:
branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IDeployableServer.java
branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IJBossServerConstants.java
branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IJBossServerPublisher.java
branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IJBossServerRuntime.java
branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IPollerFailureHandler.java
branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IServerStatePoller.java
branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/UnitedServerListener.java
branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/UnitedServerListenerManager.java
Log:
fix jboss tools compilation errors in as component
Deleted: branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IDeployableServer.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IDeployableServer.java 2008-10-22 23:22:51 UTC (rev 11090)
+++ branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IDeployableServer.java 2008-10-22 23:23:37 UTC (rev 11091)
@@ -1,39 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.core.server;
-
-import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
-
-/**
- *
- * @author rob.stryker(a)jboss.com
- */
-public interface IDeployableServer {
- public static final String DEPLOY_DIRECTORY = "org.jboss.ide.eclipse.as.core.server.deployDirectory";
- public static final String TEMP_DEPLOY_DIRECTORY = "org.jboss.ide.eclipse.as.core.server.tempDeployDirectory";
-
- public String getDeployDirectory();
- public String getConfigDirectory();
- public ServerAttributeHelper getAttributeHelper();
- public IServer getServer();
-}
Deleted: branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IJBossServerConstants.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IJBossServerConstants.java 2008-10-22 23:22:51 UTC (rev 11090)
+++ branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IJBossServerConstants.java 2008-10-22 23:23:37 UTC (rev 11091)
@@ -1,66 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.core.server;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-/**
- *
- * @author Rob Stryker
- *
- */
-public interface IJBossServerConstants {
-
- // Launch configuration constants
- public static final String JBOSS_SERVER_HOME_DIR = "jboss.server.home.dir";
- public static final String JBOSS_SERVER_BASE_DIR = "jboss.server.base.dir";
- public static final String JBOSS_SERVER_NAME = "jboss.server.name";
- public static final String JBOSS_HOME_DIR = "jboss.home.dir";
-
- // Folder constants
- public static final String DEFAULT_SERVER_NAME = "default";
- public static final String DEPLOY = "deploy";
- public static final String SERVER = "server";
-
- // Property keys stored in the server object
- public static final String SERVER_USERNAME = "org.jboss.ide.eclipse.as.core.server.userName";
- public static final String SERVER_PASSWORD = "org.jboss.ide.eclipse.as.core.server.password";
- public static final String JNDI_PORT = "org.jboss.ide.eclipse.as.core.server.jndiPort";
- public static final String WEB_PORT = "org.jboss.ide.eclipse.as.core.server.webPort";
- public static final String JNDI_PORT_DETECT = "org.jboss.ide.eclipse.as.core.server.jndiPortAutoDetect";
- public static final String WEB_PORT_DETECT= "org.jboss.ide.eclipse.as.core.server.webPortAutoDetect";
- public static final String JNDI_PORT_DETECT_XPATH = "org.jboss.ide.eclipse.as.core.server.jndiPortAutoDetect.XPath";
- public static final String WEB_PORT_DETECT_XPATH = "org.jboss.ide.eclipse.as.core.server.webPortAutoDetect.XPath";
- public static final String JNDI_PORT_DEFAULT_XPATH = "Ports" + Path.SEPARATOR + "JNDI";
- public static final String WEB_PORT_DEFAULT_XPATH = "Ports" + Path.SEPARATOR + "JBoss Web";
- public static final int JNDI_DEFAULT_PORT = 1099;
- public static final int JBOSS_WEB_DEFAULT_PORT = 8080;
-
-
- // Poller constants
- public static final String STARTUP_POLLER_KEY = "org.jboss.ide.eclipse.as.core.server.attributes.startupPollerKey";
- public static final String SHUTDOWN_POLLER_KEY = "org.jboss.ide.eclipse.as.core.server.attributes.shutdownPollerKey";
- public static final String DEFAULT_STARTUP_POLLER = "org.jboss.ide.eclipse.as.core.runtime.server.JMXPoller";
- public static final String DEFAULT_SHUTDOWN_POLLER = "org.jboss.ide.eclipse.as.core.runtime.server.processTerminatedPoller";
-
-}
Deleted: branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IJBossServerPublisher.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IJBossServerPublisher.java 2008-10-22 23:22:51 UTC (rev 11090)
+++ branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IJBossServerPublisher.java 2008-10-22 23:23:37 UTC (rev 11091)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.core.server;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.model.IModuleResourceDelta;
-import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
-
-/**
- *
- * @author Rob Stryker
- *
- */
-public interface IJBossServerPublisher {
- public static final int NO_PUBLISH = 0;
- public static final int INCREMENTAL_PUBLISH = 1;
- public static final int FULL_PUBLISH = 2;
- public static final int REMOVE_PUBLISH = 3;
-
- // pre-publish
- public boolean accepts(IServer server, IModule[] module);
-
-
- public IStatus publishModule(IServer server, IModule[] module,
- int publishType, IModuleResourceDelta[] delta,
- EventLogTreeItem log, IProgressMonitor monitor) throws CoreException;
-
- // post publish
- public int getPublishState();
-}
Deleted: branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IJBossServerRuntime.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IJBossServerRuntime.java 2008-10-22 23:22:51 UTC (rev 11090)
+++ branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IJBossServerRuntime.java 2008-10-22 23:23:37 UTC (rev 11091)
@@ -1,49 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.core.server;
-
-import java.util.HashMap;
-
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.wst.server.core.IRuntime;
-
-/**
- *
- * @author Rob Stryker
- */
-public interface IJBossServerRuntime {
- public static String PROPERTY_VM_ID = "PROPERTY_VM_ID";
- public static String PROPERTY_VM_TYPE_ID = "PROPERTY_VM_TYPE_ID";
-
- public static String PROPERTY_CONFIGURATION_NAME = "org.jboss.ide.eclipse.as.core.runtime.configurationName";
-
- public IRuntime getRuntime();
- public IVMInstall getVM();
- public void setVM(IVMInstall install);
- public String getJBossConfiguration();
- public void setJBossConfiguration(String config);
-
- // for startup
- public String getDefaultRunArgs();
- public String getDefaultRunVMArgs();
- public HashMap<String, String> getDefaultRunEnvVars();
-}
Deleted: branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IPollerFailureHandler.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IPollerFailureHandler.java 2008-10-22 23:22:51 UTC (rev 11090)
+++ branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IPollerFailureHandler.java 2008-10-22 23:23:37 UTC (rev 11091)
@@ -1,33 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.core.server;
-
-import java.util.List;
-
-/**
- * @author rob.stryker <rob.stryker(a)redhat.com>
- *
- */
-public interface IPollerFailureHandler {
- public boolean accepts(IServerStatePoller poller, String action, List<String> requiredProperties);
- public void handle(IServerStatePoller poller, String action, List<String> requiredProperties);
-}
Deleted: branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IServerStatePoller.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IServerStatePoller.java 2008-10-22 23:22:51 UTC (rev 11090)
+++ branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/IServerStatePoller.java 2008-10-22 23:23:37 UTC (rev 11091)
@@ -1,95 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.core.server;
-
-import java.util.List;
-import java.util.Properties;
-
-import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.server.internal.PollThread;
-import org.jboss.ide.eclipse.as.core.server.internal.ServerStatePollerType;
-
-/**
- * A server state poller will
- * @author Rob Stryker
- *
- */
-public interface IServerStatePoller {
-
- public static final boolean SERVER_UP = true;
- public static final boolean SERVER_DOWN = false;
-
- public static final int CANCEL = 0;
- public static final int TIMEOUT_REACHED = 1;
- public static final int SUCCESS = 2;
- public static final int FAILED = 3;
-
- /**
- * Force a successful state change if we timeout
- */
- public static final int TIMEOUT_BEHAVIOR_SUCCEED = 0;
-
- /**
- * Ignore the timeout and let the wst tools handle the timeout
- */
- public static final int TIMEOUT_BEHAVIOR_IGNORE = 1;
-
- /**
- * Force a failure upon timeout
- */
- public static final int TIMEOUT_BEHAVIOR_FAIL = 2;
-
- public ServerStatePollerType getPollerType();
- public void setPollerType(ServerStatePollerType type);
- public void beginPolling(IServer server, boolean expectedState, PollThread pt); // expected to launch own thread
- public IServer getServer();
- public boolean isComplete() throws PollingException, RequiresInfoException;
- public boolean getState() throws PollingException, RequiresInfoException;
- public void cleanup(); // clean up any resources / processes. Will ALWAYS be called
- public List<String> getRequiredProperties();
- public void failureHandled(Properties properties);
-
- /**
- * Cancel the polling.
- * @param type CANCEL or TIMEOUT_REACHED
- */
- public void cancel(int type);
-
- /**
- * Returns a TIMEOUT_BEHAVIOR_XXX constant
- * @return
- */
- public int getTimeoutBehavior();
-
- public class PollingException extends Exception {
- private static final long serialVersionUID = -7830978018908940551L;
- public PollingException(String message) {super(message);}
- }
-
- public class RequiresInfoException extends Exception {
- private static final long serialVersionUID = 5050044329807740335L;
- private boolean checked = false;
- public RequiresInfoException(String msg) {super(msg);}
- public void setChecked() { this.checked = true; }
- public boolean getChecked() { return this.checked; }
- }
-}
Deleted: branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/UnitedServerListener.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/UnitedServerListener.java 2008-10-22 23:22:51 UTC (rev 11090)
+++ branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/UnitedServerListener.java 2008-10-22 23:23:37 UTC (rev 11091)
@@ -1,45 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.core.server;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.ServerEvent;
-
-/**
- * This is a stub superclass which can be used
- * to override only those methods you care about.
- *
- * @author Rob Stryker
- *
- */
-public class UnitedServerListener {
-
- public void init(IServer server) {}
- public void serverAdded(IServer server) {}
- public void serverChanged(IServer server) {}
- public void serverRemoved(IServer server) {}
- public void serverChanged(ServerEvent event) {}
- public void publishStarted(IServer server){}
- public void publishFinished(IServer server, IStatus status){}
- public void cleanUp(IServer server) {}
-}
Deleted: branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/UnitedServerListenerManager.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/UnitedServerListenerManager.java 2008-10-22 23:22:51 UTC (rev 11090)
+++ branches/jbosstools-3.0.0.Beta1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/server/UnitedServerListenerManager.java 2008-10-22 23:23:37 UTC (rev 11091)
@@ -1,117 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.core.server;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.server.core.IPublishListener;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerLifecycleListener;
-import org.eclipse.wst.server.core.IServerListener;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.ServerEvent;
-
-/**
- * The UnitedServerListenerManager keeps an array of
- * UnitedServerListeners. The manager registers itself as
- * a listener for all server operations and passes
- * all requests to every UnitedServerListener that's been
- * added to the model.
- *
- * @author Rob Stryker
- *
- */
-public class UnitedServerListenerManager implements
- IServerLifecycleListener, IServerListener, IPublishListener {
- protected static UnitedServerListenerManager instance;
- public static UnitedServerListenerManager getDefault() {
- if( instance == null )
- instance = new UnitedServerListenerManager();
- return instance;
- }
-
- protected ArrayList<UnitedServerListener> list;
- protected UnitedServerListenerManager() {
- list = new ArrayList<UnitedServerListener>();
- ServerCore.addServerLifecycleListener(this);
- IServer[] allServers = ServerCore.getServers();
- for( int i = 0; i < allServers.length; i++ ) {
- allServers[i].addServerListener(this);
- allServers[i].addPublishListener(this);
- }
- }
-
-
- public void addListener(UnitedServerListener listener) {
- if( !list.contains(listener)) {
- list.add(listener);
- IServer[] allServers = ServerCore.getServers();
- for( int i = 0; i < allServers.length; i++ )
- listener.init(allServers[i]);
- }
- }
- public void removeListener(UnitedServerListener listener) {
- list.remove(listener);
- IServer[] allServers = ServerCore.getServers();
- for( int i = 0; i < allServers.length; i++ )
- listener.cleanUp(allServers[i]);
- }
-
- public void serverAdded(IServer server) {
- server.addServerListener(this);
- server.addPublishListener(this);
- for( Iterator<UnitedServerListener> i = list.iterator(); i.hasNext(); ) {
- i.next().serverAdded(server);
- }
- }
- public void serverChanged(IServer server) {
- for( Iterator<UnitedServerListener> i = list.iterator(); i.hasNext(); ) {
- i.next().serverChanged(server);
- }
- }
- public void serverRemoved(IServer server) {
- server.removeServerListener(this);
- server.removePublishListener(this);
- for( Iterator<UnitedServerListener> i = list.iterator(); i.hasNext(); ) {
- i.next().serverRemoved(server);
- }
- }
-
- public void serverChanged(ServerEvent event) {
- for( Iterator<UnitedServerListener> i = list.iterator(); i.hasNext(); ) {
- i.next().serverChanged(event);
- }
- }
-
- public void publishStarted(IServer server) {
- for( Iterator<UnitedServerListener> i = list.iterator(); i.hasNext(); )
- i.next().publishStarted(server);
- }
-
- public void publishFinished(IServer server, IStatus status) {
- for( Iterator<UnitedServerListener> i = list.iterator(); i.hasNext(); )
- i.next().publishFinished(server, status);
- }
-
-}
16 years, 2 months
JBoss Tools SVN: r11087 - in trunk: jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/column and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-10-22 15:43:46 -0400 (Wed, 22 Oct 2008)
New Revision: 11087
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/column/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/column/sortable.gif
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataGridTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.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
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SourceDomUtil.java
Log:
Method getClasses extracted from VpePanelGridCreator and placed into new class VpeClassUtil.
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/column/sortable.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/column/sortable.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java 2008-10-22 16:30:12 UTC (rev 11086)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java 2008-10-22 19:43:46 UTC (rev 11087)
@@ -10,15 +10,20 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.richfaces.template;
+import java.util.ArrayList;
import java.util.List;
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.mapping.VpeDomMapping;
+import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
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.util.HTML;
+import org.jboss.tools.vpe.editor.util.SourceDomUtil;
+import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -26,30 +31,52 @@
import org.w3c.dom.Node;
public class RichFacesColumnTemplate extends VpeAbstractTemplate {
+ private static final String HEADER_ICON_STYLE = "vertical-align:middle;";
+ private static final String SORTABLE_PATH = "column/sortable.gif"; //$NON-NLS-1$
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
Element sourceElement = (Element)sourceNode;
+ VpeCreationData creationData;
+ boolean visible = !RichFaces.VAL_FALSE.equals(sourceElement.getAttribute(RichFaces.ATTR_VISIBLE));
+
+ if (visible) {
+ nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
+ String columnClass = getColumnClass(sourceElement);
+ ComponentUtil.copyAttributes(sourceNode, td);
+ td.setAttribute(HTML.ATTR_CLASS, columnClass);
+ creationData = new VpeCreationData(td);
+
+ // Create mapping to Encode body
+ VpeChildrenInfo tdInfo = new VpeChildrenInfo(td);
+ List<Node> children = ComponentUtil.getChildren(sourceElement,true);
+ for (Node child : children) {
+ tdInfo.addSourceChild(child);
+ }
+ creationData.addChildrenInfo(tdInfo);
+
+ } else {
+ creationData = new VpeCreationData(null);
+ creationData.setChildrenInfoList(new ArrayList<VpeChildrenInfo>(0));
+ }
- nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
+ return creationData;
+ }
+
+ private String getColumnClass(Element sourceElement) {
+ String columnClass;
if(isHeader(sourceElement)) {
- td.setAttribute(HTML.ATTR_CLASS, "dr-table-headercell rich-table-headercell"); //$NON-NLS-1$
+ columnClass = "dr-table-headercell rich-table-headercell"; //$NON-NLS-1$
} else if(isFooter(sourceElement)) {
- td.setAttribute(HTML.ATTR_CLASS, "dr-table-footercell rich-table-footercell"); //$NON-NLS-1$
+ columnClass = "dr-table-footercell rich-table-footercell"; //$NON-NLS-1$
} else {
- td.setAttribute(HTML.ATTR_CLASS, "dr-table-cell rich-table-cell"); //$NON-NLS-1$
+ columnClass = "dr-table-cell rich-table-cell"; //$NON-NLS-1$
}
- ComponentUtil.copyAttributes(sourceNode, td);
- VpeCreationData creationData = new VpeCreationData(td);
-
- // Create mapping to Encode body
- VpeChildrenInfo tdInfo = new VpeChildrenInfo(td);
- List<Node> children = ComponentUtil.getChildren(sourceElement,true);
- for (Node child : children) {
- tdInfo.addSourceChild(child);
+
+ String styleClass = sourceElement.getAttribute(RichFaces.ATTR_STYLE_CLASS);
+ if (styleClass != null) {
+ columnClass += " " + styleClass; //$NON-NLS-1$
}
- creationData.addChildrenInfo(tdInfo);
-
- return creationData;
+ return columnClass;
}
private boolean isHeader(Element sourceElement) {
@@ -73,14 +100,56 @@
}
@Override
- public void removeAttribute(VpePageContext pageContext, Element sourceElement, nsIDOMDocument visualDocument, nsIDOMNode visualNode, Object data, String name) {
- nsIDOMElement visualElement = (nsIDOMElement)visualNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- visualElement.removeAttribute(name);
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
+ return true;
}
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.editor.template.VpeAbstractTemplate#getNodeForUptate(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMNode, java.lang.Object)
+ */
@Override
- public void setAttribute(VpePageContext pageContext, Element sourceElement, nsIDOMDocument visualDocument, nsIDOMNode visualNode, Object data, String name, String value) {
- nsIDOMElement visualElement = (nsIDOMElement)visualNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- visualElement.setAttribute(name, value);
+ public Node getNodeForUptate(VpePageContext pageContext, Node sourceNode,
+ nsIDOMNode visualNode, Object data) {
+ /* XXX: The implementation is a little tricky, it returns first n-th parent
+ * that has a nodeMapping. */
+
+ final VpeDomMapping domMapping = pageContext.getDomMapping();
+ SourceDomUtil.getParentHavingDomMapping(sourceNode, domMapping);
+ final Node parent = SourceDomUtil.getParentHavingDomMapping(sourceNode, domMapping);
+
+ if (parent != null) {
+ return parent;
+ } else {
+ return sourceNode;
+ }
}
+
+ /** Creates <code>IMG</code> tag if it is specified by <code><rich:column></code>
+ * attributes.
+ * @param pageContext
+ *
+ * @param column source <code><rich:column></code> element
+ * @param visualDocument Mozilla's Visual Document
+ * @return <code>IMG</code> tag if it is necessary, <code>null</code> otherwise */
+ public static nsIDOMElement getHeaderIcon(VpePageContext pageContext, Element column, nsIDOMDocument visualDocument) {
+ String sortable = ComponentUtil.getAttribute(column, RichFaces.ATTR_SORTABLE);
+ String sortBy = column.getAttribute(RichFaces.ATTR_SORT_BY);
+ if (RichFaces.VAL_TRUE.equals(sortable) || sortBy != null) {
+ nsIDOMElement img = visualDocument.createElement(HTML.TAG_IMG);
+ String sortIcon = column.getAttribute(RichFaces.ATTR_SORT_ICON);
+ if (sortIcon != null) {
+ sortIcon = VpeStyleUtil.addFullPathToImgSrc(sortIcon, pageContext, true);
+ sortIcon = sortIcon.replace('\\', '/');
+ img.setAttribute(HTML.ATTR_SRC, sortIcon);
+ } else {
+ ComponentUtil.setImg(img, SORTABLE_PATH);
+ }
+ img.setAttribute(HTML.ATTR_STYLE, HEADER_ICON_STYLE);
+ return img;
+ } else {
+ return null;
+ }
+ }
}
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataGridTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataGridTemplate.java 2008-10-22 16:30:12 UTC (rev 11086)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataGridTemplate.java 2008-10-22 19:43:46 UTC (rev 11087)
@@ -63,7 +63,7 @@
nsIDOMElement thead = visualDocument.createElement(HTML.TAG_THEAD);
table.appendChild(thead);
String headerClass = (String) sourceElement.getAttribute(RichFaces.ATTR_HEADER_CLASS);
- encodeTableHeaderOrFooterFacet(creationData, thead, columnsLength, visualDocument, header,
+ encodeTableHeaderOrFooterFacet(pageContext, creationData, thead, columnsLength, visualDocument, header,
"dr-table-header rich-table-header", //$NON-NLS-1$
"dr-table-header-continue rich-table-header-continue", //$NON-NLS-1$
"dr-table-headercell rich-table-headercell", //$NON-NLS-1$
@@ -76,7 +76,7 @@
nsIDOMElement tfoot = visualDocument.createElement(HTML.TAG_TFOOT);
table.appendChild(tfoot);
String footerClass = (String) sourceElement.getAttribute(RichFaces.ATTR_FOOTER_CLASS);
- encodeTableHeaderOrFooterFacet(creationData, tfoot, columnsLength, visualDocument, footer,
+ encodeTableHeaderOrFooterFacet(pageContext, creationData, tfoot, columnsLength, visualDocument, footer,
"dr-table-footer rich-table-footer", //$NON-NLS-1$
"dr-table-footer-continue rich-table-footer-continue", //$NON-NLS-1$
"dr-table-footercell rich-table-footercell", //$NON-NLS-1$
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2008-10-22 16:30:12 UTC (rev 11086)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2008-10-22 19:43:46 UTC (rev 11087)
@@ -73,7 +73,7 @@
table.appendChild(thead);
String headerClass = (String) sourceElement.getAttribute(RichFaces.ATTR_HEADER_CLASS);
if(header != null) {
- encodeTableHeaderOrFooterFacet(creationData, thead, columnsLength, visualDocument, header,
+ encodeTableHeaderOrFooterFacet(pageContext, creationData, thead, columnsLength, visualDocument, header,
"dr-table-header rich-table-header", //$NON-NLS-1$
"dr-table-header-continue rich-table-header-continue", //$NON-NLS-1$
"dr-table-headercell rich-table-headercell", //$NON-NLS-1$
@@ -86,7 +86,7 @@
if(styleClass!=null) {
tr.setAttribute(HTML.ATTR_CLASS, styleClass);
}
- encodeHeaderOrFooterFacets(creationData, tr, visualDocument, columnsHeaders,
+ encodeHeaderOrFooterFacets(pageContext, creationData, tr, visualDocument, columnsHeaders,
"dr-table-subheadercell rich-table-subheadercell", //$NON-NLS-1$
headerClass, RichFaces.NAME_FACET_HEADER, HTML.TAG_TD);
}
@@ -106,12 +106,12 @@
if(styleClass!=null) {
tr.setAttribute(HTML.ATTR_CLASS, styleClass);
}
- encodeHeaderOrFooterFacets(creationData, tr, visualDocument, columnsFooters,
+ encodeHeaderOrFooterFacets(pageContext, creationData, tr, visualDocument, columnsFooters,
"dr-table-subfootercell rich-table-subfootercell", //$NON-NLS-1$
footerClass, RichFaces.NAME_FACET_FOOTER, HTML.TAG_TD);
}
if (footer != null) {
- encodeTableHeaderOrFooterFacet(creationData, tfoot, columnsLength, visualDocument, footer,
+ encodeTableHeaderOrFooterFacet(pageContext, creationData, tfoot, columnsLength, visualDocument, footer,
"dr-table-footer rich-table-footer", //$NON-NLS-1$
"dr-table-footer-continue rich-table-footer-continue", //$NON-NLS-1$
"dr-table-footercell rich-table-footercell", //$NON-NLS-1$
@@ -148,10 +148,10 @@
trInfo.addSourceChild(child);
} else if(child.getNodeName().endsWith(RichFaces.TAG_COLUMN_GROUP)) {
- RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(creationData, (Element)child, visualDocument, tbody);
+ RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData, (Element)child, visualDocument, tbody);
tr = null;
} else if(child.getNodeName().endsWith(RichFaces.TAG_SUB_TABLE)) {
- RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(creationData, (Element)child, visualDocument, tbody);
+ RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData, (Element)child, visualDocument, tbody);
tr = null;
} else {
VpeChildrenInfo childInfo = new VpeChildrenInfo(tbody);
@@ -190,9 +190,12 @@
}
- public static void encodeHeaderOrFooterFacets(VpeCreationData creationData, nsIDOMElement parentTr, nsIDOMDocument visualDocument, ArrayList<Element> headersOrFooters, String skinCellClass, String headerClass, String facetName, String element) {
+ public static void encodeHeaderOrFooterFacets(VpePageContext pageContext, VpeCreationData creationData,
+ nsIDOMElement parentTr, nsIDOMDocument visualDocument, ArrayList<Element> headersOrFooters,
+ String skinCellClass, String headerClass, String facetName, String element) {
for (Element column : headersOrFooters) {
String classAttribute = facetName + "Class"; //$NON-NLS-1$
+
String columnHeaderClass = column.getAttribute(classAttribute);
nsIDOMElement td = visualDocument.createElement(element);
parentTr.appendChild(td);
@@ -205,19 +208,28 @@
}
Node facetBody = ComponentUtil.getFacet(column, facetName,true);
- VpeChildrenInfo child = new VpeChildrenInfo(td);
- child.addSourceChild(facetBody);
- creationData.addChildrenInfo(child);
+ nsIDOMElement span = visualDocument.createElement(HTML.TAG_SPAN);
+ td.appendChild(span);
+ if (RichFaces.NAME_FACET_HEADER.equals(facetName)) {
+ nsIDOMElement icon = RichFacesColumnTemplate.getHeaderIcon(pageContext, column, visualDocument);
+ if (icon != null) {
+ td.appendChild(icon);
+ }
+ }
+
+ VpeChildrenInfo childrenInfo = new VpeChildrenInfo(span);
+ childrenInfo.addSourceChild(facetBody);
+ creationData.addChildrenInfo(childrenInfo);
}
}
- protected void encodeTableHeaderOrFooterFacet(VpeCreationData creationData, nsIDOMElement parentTheadOrTfood, int columns, nsIDOMDocument visualDocument, Node facetBody, String skinFirstRowClass, String skinRowClass, String skinCellClass, String facetBodyClass, String element) {
+ protected void encodeTableHeaderOrFooterFacet(final VpePageContext pageContext, VpeCreationData creationData, nsIDOMElement parentTheadOrTfood, int columns, nsIDOMDocument visualDocument, Node facetBody, String skinFirstRowClass, String skinRowClass, String skinCellClass, String facetBodyClass, String element) {
boolean isColumnGroup = facetBody.getNodeName().endsWith(RichFaces.TAG_COLUMN_GROUP);
boolean isSubTable = facetBody.getNodeName().endsWith(RichFaces.TAG_SUB_TABLE);
if(isColumnGroup) {
- RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(creationData, (Element)facetBody, visualDocument, parentTheadOrTfood);
+ RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData, (Element)facetBody, visualDocument, parentTheadOrTfood);
} else if(isSubTable) {
- RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(creationData, (Element)facetBody, visualDocument, parentTheadOrTfood);
+ RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData, (Element)facetBody, visualDocument, parentTheadOrTfood);
} else {
nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
parentTheadOrTfood.appendChild(tr);
@@ -359,7 +371,7 @@
}
}
}
-
+
super.validate(pageContext, sourceNode, visualDocument, data);
}
@@ -374,4 +386,4 @@
nsIDOMElement visualElement = (nsIDOMElement)visualNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
visualElement.setAttribute(name, value);
}
-}
\ No newline at end of file
+}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java 2008-10-22 16:30:12 UTC (rev 11086)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java 2008-10-22 19:43:46 UTC (rev 11087)
@@ -175,7 +175,7 @@
String headerClass = (String) sourceElement
.getAttribute(HEADER_CLASS);
if (header != null) {
- encodeTableHeaderOrFooterFacet(creationData, thead,
+ encodeTableHeaderOrFooterFacet(pageContext, creationData, thead,
columnsLength, visualDocument, header,
DR_TABLE_HEADER_RICH_TABLE_HEADER,
DR_TABLE_HEADER_CONTINUE_RICH_TABLE_HEADER_CONTINUE,
@@ -226,7 +226,7 @@
footerClass);
}
if (footer != null) {
- encodeTableHeaderOrFooterFacet(creationData, tfoot,
+ encodeTableHeaderOrFooterFacet(pageContext, creationData, tfoot,
columnsLength, visualDocument, footer,
DR_TABLE_FOOTER_RICH_TABLE_FOOTER,
DR_TABLE_FOOTER_CONTINUE_RICH_TABLE_FOOTER_CONTINUE,
@@ -268,12 +268,12 @@
}
trInfo.addSourceChild(child);
} else if (child.getNodeName().endsWith(COLUMN_GROUP)) {
- RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(
+ RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(pageContext,
creationData, (Element) child, visualDocument,
tbody);
tr = null;
} else if (child.getNodeName().endsWith(SUB_TABLE)) {
- RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(
+ RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(pageContext,
creationData, (Element) child, visualDocument,
tbody);
tr = null;
@@ -469,7 +469,7 @@
* @param facetBodyClass
* @param element
*/
- protected void encodeTableHeaderOrFooterFacet(VpeCreationData creationData,
+ protected void encodeTableHeaderOrFooterFacet(final VpePageContext pageContext, VpeCreationData creationData,
nsIDOMElement parentTheadOrTfood, int columns,
nsIDOMDocument visualDocument, Element facetBody,
String skinFirstRowClass, String skinRowClass,
@@ -478,10 +478,10 @@
.endsWith(COLUMN_GROUP);
boolean isSubTable = facetBody.getNodeName().endsWith(SUB_TABLE);
if (isColumnGroup) {
- RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(creationData,
+ RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData,
facetBody, visualDocument, parentTheadOrTfood);
} else if (isSubTable) {
- RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(creationData,
+ RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData,
facetBody, visualDocument, parentTheadOrTfood);
} else {
nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-10-22 16:30:12 UTC (rev 11086)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-10-22 19:43:46 UTC (rev 11087)
@@ -170,7 +170,7 @@
Element captionFacet = ComponentUtil.getFacet(sourceElement, CAPTION_FACET);
if (null != captionFacet) {
// Creating table caption with facet content
- nsIDOMElement fecetDiv = encodeFacetsToDiv(captionFacet, false, CSS_CAPTION_CLASS, "", creationData, visualDocument);
+ nsIDOMElement fecetDiv = encodeFacetsToDiv(pageContext, captionFacet, false, CSS_CAPTION_CLASS, "", creationData, visualDocument);
captionRow_TD_DIV.appendChild(fecetDiv);
} else {
captionRow_TD_DIV.appendChild(visualDocument.createTextNode(captionLabel));
@@ -199,7 +199,7 @@
// ---------------------buttons------------------------
if (!"none".equalsIgnoreCase(controlsType)) {
- nsIDOMElement controlsDiv = createControlsDiv(creationData, visualDocument, sourceElement);
+ nsIDOMElement controlsDiv = createControlsDiv(pageContext, creationData, visualDocument, sourceElement);
buttonsTD.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
CSS_BUTTON_VALIGN_CLASS);
buttonsTD.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR, "center");
@@ -281,7 +281,7 @@
// --------------------------------------------
- nsIDOMElement contentDiv = createResultList(creationData, visualDocument,
+ nsIDOMElement contentDiv = createResultList(pageContext, creationData, visualDocument,
sourceElement);
tr1_TD1.appendChild(contentDiv);
@@ -297,7 +297,7 @@
*
* @return the element
*/
- private nsIDOMElement createControlsDiv( VpeCreationData creationData, nsIDOMDocument visualDocument,
+ private nsIDOMElement createControlsDiv(final VpePageContext pageContext, VpeCreationData creationData, nsIDOMDocument visualDocument,
Element sourceElement) {
String topControlClass = sourceElement.getAttribute(TOP_CONTROL_CLASS);
@@ -329,7 +329,7 @@
Element bottom_control_facet = ComponentUtil.getFacet(sourceElement, BOTTOM_CONTROL_FACET);
if (fastOrderControlsVisible) {
- nsIDOMElement btnTopDiv = createSingleButtonDiv(creationData, visualDocument,
+ nsIDOMElement btnTopDiv = createSingleButtonDiv(pageContext, creationData, visualDocument,
(null == topControlLabel ? TOP_CONTROL_LABEL_DEFAULT
: topControlLabel), TOP_CONTROL_IMG,
showButtonLabels, top_control_facet, CSS_TOP_CONTROL_CLASS, topControlClass);
@@ -337,11 +337,11 @@
}
if (orderControlsVisible) {
- nsIDOMElement btnUpDiv = createSingleButtonDiv(creationData, visualDocument,
+ nsIDOMElement btnUpDiv = createSingleButtonDiv(pageContext, creationData, visualDocument,
(null == upControlLabel ? UP_CONTROL_LABEL_DEFAULT
: upControlLabel), UP_CONTROL_IMG,
showButtonLabels, up_control_facet, CSS_UP_CONTROL_CLASS, upControlClass);
- nsIDOMElement btnDownDiv = createSingleButtonDiv(creationData, visualDocument,
+ nsIDOMElement btnDownDiv = createSingleButtonDiv(pageContext, creationData, visualDocument,
(null == downControlLabel ? DOWN_CONTROL_LABEL_DEFAULT
: downControlLabel), DOWN_CONTROL_IMG,
showButtonLabels, down_control_facet, CSS_DOWN_CONTROL_CLASS, downControlClass);
@@ -350,7 +350,7 @@
}
if (fastOrderControlsVisible) {
- nsIDOMElement btnBottomDiv = createSingleButtonDiv(creationData, visualDocument,
+ nsIDOMElement btnBottomDiv = createSingleButtonDiv(pageContext, creationData, visualDocument,
(null == bottomControlLabel ? BOTTOM_CONTROL_LABEL_DEFAULT
: bottomControlLabel), BOTTOM_CONTROL_IMG,
showButtonLabels, bottom_control_facet, CSS_BOTTOM_CONTROL_CLASS, bottomControlClass);
@@ -375,7 +375,7 @@
*
* @return the ns idom element
*/
- private nsIDOMElement createSingleButtonDiv(VpeCreationData creationData,
+ private nsIDOMElement createSingleButtonDiv(final VpePageContext pageContext, VpeCreationData creationData,
nsIDOMDocument visualDocument, String btnName, String imgName,
boolean showButtonLabels, Element buttonFacet, String cssStyleName,
String customStyleClass) {
@@ -402,7 +402,7 @@
if (null != buttonFacet) {
// Creating button with facet content
- nsIDOMElement fecetDiv = encodeFacetsToDiv(buttonFacet, true, cssStyleName, customStyleClass, creationData, visualDocument);
+ nsIDOMElement fecetDiv = encodeFacetsToDiv(pageContext, buttonFacet, true, cssStyleName, customStyleClass, creationData, visualDocument);
div2.appendChild(fecetDiv);
} else {
a.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_BUTTON_SELECTION_CLASS);
@@ -431,7 +431,7 @@
*
* @return the element
*/
- private nsIDOMElement createResultList(VpeCreationData creationData, nsIDOMDocument visualDocument,
+ private nsIDOMElement createResultList(final VpePageContext pageContext, VpeCreationData creationData, nsIDOMDocument visualDocument,
Element sourceElement) {
nsIDOMElement contentDiv = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
@@ -554,13 +554,13 @@
if (child.getNodeName().endsWith(":column")) {
trInfo.addSourceChild(child);
} else if (child.getNodeName().endsWith(":columnGroup")) {
- RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(
+ RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(pageContext,
creationData, (Element) child, visualDocument,
tbody);
tr = null;
trInfo = null;
} else if (child.getNodeName().endsWith(":subTable")) {
- RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(
+ RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(pageContext,
creationData, (Element) child, visualDocument,
tbody);
tr = null;
@@ -598,7 +598,7 @@
*
* @return the element
*/
- private nsIDOMElement encodeFacetsToDiv(Element facetBody,
+ private nsIDOMElement encodeFacetsToDiv(final VpePageContext pageContext, Element facetBody,
boolean isControlFacet, String cssStyleName,
String customStyleClass, VpeCreationData creationData,
nsIDOMDocument visualDocument) {
@@ -613,10 +613,10 @@
.endsWith(":columnGroup");
boolean isSubTable = facetBody.getNodeName().endsWith(":subTable");
if (isColumnGroup) {
- RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(creationData,
+ RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData,
facetBody, visualDocument, tbody);
} else if (isSubTable) {
- RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(creationData,
+ RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData,
facetBody, visualDocument, tbody);
} else {
nsIDOMElement tr = visualDocument
@@ -675,7 +675,7 @@
* @param facetBodyClass
* @param element
*/
- private void encodeTableHeaderOrFooterFacet(VpeCreationData creationData,
+ private void encodeTableHeaderOrFooterFacet(final VpePageContext pageContext, VpeCreationData creationData,
nsIDOMElement parentTheadOrTfood, int columns,
nsIDOMDocument visualDocument, Element facetBody,
String skinFirstRowClass, String skinCellClass,
@@ -684,10 +684,10 @@
.endsWith(":columnGroup");
boolean isSubTable = facetBody.getNodeName().endsWith(":subTable");
if (isColumnGroup) {
- RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(creationData,
+ RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData,
facetBody, visualDocument, parentTheadOrTfood);
} else if (isSubTable) {
- RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(creationData,
+ RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData,
facetBody, visualDocument, parentTheadOrTfood);
} else {
nsIDOMElement tr = visualDocument
@@ -727,6 +727,9 @@
/**
*
* @param creationData
+ /**
+ *
+ * @param creationData
* @param parentTr
* @param visualDocument
* @param headersOrFooters
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2008-10-22 16:30:12 UTC (rev 11086)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2008-10-22 19:43:46 UTC (rev 11087)
@@ -165,7 +165,7 @@
String headerClass = (String) sourceElement
.getAttribute(HEADER_CLASS);
if (header != null) {
- encodeTableHeaderOrFooterFacet(creationData, thead,
+ encodeTableHeaderOrFooterFacet(pageContext, creationData, thead,
columnsLength, visualDocument, header,
"dr-table-header rich-table-header",
"dr-table-header-continue rich-table-header-continue",
@@ -215,7 +215,7 @@
footerClass, FOOTER, HtmlComponentUtil.HTML_TAG_TD);
}
if (footer != null) {
- encodeTableHeaderOrFooterFacet(creationData, tfoot,
+ encodeTableHeaderOrFooterFacet(pageContext, creationData, tfoot,
columnsLength, visualDocument, footer,
"dr-table-footer rich-table-footer",
"dr-table-footer-continue rich-table-footer-continue",
@@ -259,12 +259,12 @@
}
trInfo.addSourceChild(child);
} else if (child.getNodeName().endsWith(":columnGroup")) {
- RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(
+ RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(pageContext,
creationData, (Element) child, visualDocument,
tbody);
tr = null;
} else if (child.getNodeName().endsWith(":subTable")) {
- RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(
+ RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(pageContext,
creationData, (Element) child, visualDocument,
tbody);
tr = null;
@@ -370,7 +370,7 @@
* @param facetBodyClass
* @param element
*/
- protected void encodeTableHeaderOrFooterFacet(VpeCreationData creationData,
+ protected void encodeTableHeaderOrFooterFacet(final VpePageContext pageContext, VpeCreationData creationData,
nsIDOMElement parentTheadOrTfood, int columns,
nsIDOMDocument visualDocument, Element facetBody,
String skinFirstRowClass, String skinRowClass,
@@ -379,10 +379,10 @@
.endsWith(":columnGroup");
boolean isSubTable = facetBody.getNodeName().endsWith(":subTable");
if (isColumnGroup) {
- RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(creationData,
+ RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData,
facetBody, visualDocument, parentTheadOrTfood);
} else if (isSubTable) {
- RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(creationData,
+ RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData,
facetBody, visualDocument, parentTheadOrTfood);
} else {
nsIDOMElement tr = visualDocument
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-10-22 16:30:12 UTC (rev 11086)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java 2008-10-22 19:43:46 UTC (rev 11087)
@@ -34,22 +34,10 @@
public class RichFacesSubTableTemplate extends VpeAbstractTemplate {
- /**
- *
- */
- private static final String VAL_TRUE = "true";
- /**
- *
- */
- private static final String ATTR_BREAK_BEFORE = "breakBefore"; //$NON-NLS-1$
- /**
- *
- */
- private static final String COLUMN_CLASSES_EXPRESSION = "{@columnClasses}"; //$NON-NLS-1$
- /**
- *
- */
- private static final String ROW_CLASSES_EXPRESSION = "{@rowClasses}"; //$NON-NLS-1$
+ 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;
@@ -69,15 +57,20 @@
* @param parentVisualNode
* @return
*/
- public VpeCreationData encode(VpeCreationData creationData, final Element sourceElement, final nsIDOMDocument visualDocument, final nsIDOMElement parentVisualNode) {
+ public VpeCreationData encode(final VpePageContext pageContext, VpeCreationData creationData, final Element sourceElement,
+ final nsIDOMDocument visualDocument, nsIDOMElement parentVisualNode) {
+
if(creationData!=null) {
// Encode header
- encodeHeader(creationData, sourceElement, visualDocument, parentVisualNode);
+ encodeHeader(pageContext, creationData, sourceElement, visualDocument, parentVisualNode);
}
initClasses(sourceElement, null);
nsIDOMElement curTr = visualDocument.createElement(HTML.TAG_TR);
+ if (parentVisualNode == null) {
+ parentVisualNode = curTr;
+ }
ComponentUtil.copyAttributes(sourceElement, curTr);
boolean header = false;
@@ -112,7 +105,7 @@
final List<Node> children = ComponentUtil.getChildren(sourceElement);
for (final Node child : children) {
if (child.getNodeName().endsWith(':' + RichFaces.TAG_COLUMN)) {
- final boolean breakBefore = VAL_TRUE.equals( ((Element)child).getAttribute(ATTR_BREAK_BEFORE) );
+ final boolean breakBefore = RichFaces.VAL_TRUE.equals( ((Element)child).getAttribute(RichFaces.ATTR_BREAK_BEFORE) );
if (breakBefore) {
curRow++;
curColumn = 0;
@@ -144,11 +137,11 @@
if(parentVisualNode!=null) {
// Encode footer
- encodeFooter(creationData, sourceElement, visualDocument, parentVisualNode);
+ encodeFooter(pageContext, creationData, sourceElement, visualDocument, parentVisualNode);
}
-
return creationData;
}
+
/** Adds necessary attributes to its children.*/
@Override
@@ -189,19 +182,21 @@
public VpeCreationData create(final VpePageContext pageContext, final Node sourceNode, final nsIDOMDocument visualDocument) {
final Element sourceElement = (Element)sourceNode;
- final VpeCreationData creationData = encode(null, sourceElement, visualDocument, null);
+ final VpeCreationData creationData = encode(pageContext, null, sourceElement, visualDocument, null);
return creationData;
}
- protected void encodeHeader(final VpeCreationData creationData, final Element sourceElement, final nsIDOMDocument visualDocument, final nsIDOMElement parentVisualNode) {
- encodeHeaderOrFooter(creationData, sourceElement, visualDocument, parentVisualNode, "header", "dr-subtable-header rich-subtable-header", "dr-subtable-headercell rich-subtable-headercell");
+ protected void encodeHeader(final VpePageContext pageContext, final VpeCreationData creationData, final Element sourceElement, final nsIDOMDocument visualDocument, final nsIDOMElement parentVisualNode) {
+ encodeHeaderOrFooter(pageContext, creationData, sourceElement, visualDocument, parentVisualNode, "header", "dr-subtable-header rich-subtable-header", "dr-subtable-headercell rich-subtable-headercell");
}
- protected void encodeFooter(final VpeCreationData creationData, final Element sourceElement, final nsIDOMDocument visualDocument, final nsIDOMElement parentVisualNode) {
- encodeHeaderOrFooter(creationData, sourceElement, visualDocument, parentVisualNode, "footer", "dr-subtable-footer rich-subtable-footer", "dr-subtable-footercell rich-subtable-footercell");
+ protected void encodeFooter(final VpePageContext pageContext, final VpeCreationData creationData, final Element sourceElement, final nsIDOMDocument visualDocument, final nsIDOMElement parentVisualNode) {
+ encodeHeaderOrFooter(pageContext, creationData, sourceElement, visualDocument, parentVisualNode, "footer", "dr-subtable-footer rich-subtable-footer", "dr-subtable-footercell rich-subtable-footercell");
}
- protected void encodeHeaderOrFooter(final VpeCreationData creationData, final Element sourceElement, final nsIDOMDocument visualDocument, final nsIDOMElement parentVisualNode, final String facetName, final String trClass, final String tdClass) {
+ protected void encodeHeaderOrFooter(final VpePageContext pageContext, final VpeCreationData creationData,
+ final Element sourceElement, final nsIDOMDocument visualDocument, final nsIDOMElement parentVisualNode,
+ final String facetName, final String trClass, final String tdClass) {
final ArrayList<Element> columns = RichFacesDataTableTemplate.getColumns(sourceElement);
final ArrayList<Element> columnsHeaders = RichFacesDataTableTemplate.getColumnsWithFacet(columns, facetName);
if(!columnsHeaders.isEmpty()) {
@@ -211,7 +206,7 @@
if(styleClass!=null) {
tr.setAttribute(HTML.ATTR_CLASS, styleClass);
}
- RichFacesDataTableTemplate.encodeHeaderOrFooterFacets(creationData, tr, visualDocument, columnsHeaders,
+ RichFacesDataTableTemplate.encodeHeaderOrFooterFacets(pageContext, creationData, tr, visualDocument, columnsHeaders,
tdClass,
null, facetName, HTML.TAG_TD);
}
@@ -307,4 +302,15 @@
final nsIDOMElement visualNode, final Object data, final String name, final String value) {
return true;
}
-}
\ No newline at end of file
+
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.editor.template.VpeAbstractTemplate#getNodeForUptate(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMNode, java.lang.Object)
+ */
+ @Override
+ public Node getNodeForUptate(VpePageContext pageContext, Node sourceNode,
+ nsIDOMNode visualNode, Object data) {
+ Node parent = sourceNode.getParentNode();
+ return parent;
+ }
+}
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-10-22 16:30:12 UTC (rev 11086)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java 2008-10-22 19:43:46 UTC (rev 11087)
@@ -17,67 +17,73 @@
* @author Sergey Dzmitrovich
*/
public class RichFaces {
-
/**
* The Constructor.
*/
private RichFaces() {
}
- /** jsf tags which are used with richFaces. */
- public static final String TAG_COLUMN = "column"; //$NON-NLS-1$
- public static final String TAG_COLUMNS = "columns"; //$NON-NLS-1$
- /** The Constant TAG_FACET. */
- public static final String TAG_FACET = "facet"; //$NON-NLS-1$
- public static final String TAG_COLUMN_GROUP = "columnGroup"; //$NON-NLS-1$
- public static final String TAG_SUB_TABLE = "subTable"; //$NON-NLS-1$
+ /** The Constant ATTR_ADD_CONTROL_LABEL. */
+ public static final String ATTR_ADD_CONTROL_LABEL = "addControlLabel"; //$NON-NLS-1$
+ public static final String ATTR_ALIGN = "align"; //$NON-NLS-1$
+ public static final String ATTR_BREAK_BEFORE = "breakBefore"; //$NON-NLS-1$
- /** The Constant ATTR_NAME. */
- public static final String ATTR_NAME = "name"; //$NON-NLS-1$
- /** The Constant ATTR_STYLE. */
- public static final String ATTR_STYLE = "style"; //$NON-NLS-1$
- /** The Constant ATTR_WIDTH. */
- public static final String ATTR_WIDTH = "width"; //$NON-NLS-1$
- /** The Constant ATTR_VALUE. */
- public static final String ATTR_VALUE = "value"; //$NON-NLS-1$
+ public static final String ATTR_CAPTION_CLASS = "captionClass"; //$NON-NLS-1$
+ public static final String ATTR_CAPTION_STYLE = "captionStyle"; //$NON-NLS-1$
+ /** The Constant ATTR_COLUMN_CLASSES. */
+ public static final String ATTR_COLUMN_CLASSES = "columnClasses"; //$NON-NLS-1$
+ public static final String ATTR_COLUMNS = "columns"; //$NON-NLS-1$
+ public static final String ATTR_COLUMNS_WIDTH = "columnsWidth"; //$NON-NLS-1$
+
+ /** The Constant ATTR_CONTROLS_TYPE. */
+ public static final String ATTR_CONTROLS_TYPE = "controlsType"; //$NON-NLS-1$
+ /** The Constant ATTR_DEFAULT_LABEL. */
+ public static final String ATTR_DEFAULT_LABEL = "defaultLabel"; //$NON-NLS-1$
+ public static final String ATTR_DIRECTION = "direction"; //$NON-NLS-1$
+ public static final String ATTR_DISABLED = "disabled";//$NON-NLS-1$
+ public static final String ATTR_ELEMENTS = "elements"; //$NON-NLS-1$
+ public static final String ATTR_FOOTER_CLASS = "footerClass"; //$NON-NLS-1$
+ public static final String ATTR_HEADER_CLASS = "headerClass"; //$NON-NLS-1$
+ /** The Constant ATTR_INPUT_CLASS. */
+ public static final String ATTR_INPUT_CLASS = "inputClass"; //$NON-NLS-1$
/** The Constant ATTR_INPUT_SIZE. */
public static final String ATTR_INPUT_SIZE = "inputSize"; //$NON-NLS-1$
- /** The Constant ATTR_INPUT_CLASS. */
- public static final String ATTR_INPUT_CLASS = "inputClass"; //$NON-NLS-1$
/** The Constant ATTR_INPUT_STYLE. */
public static final String ATTR_INPUT_STYLE = "inputStyle"; //$NON-NLS-1$
+ public static final String ATTR_LIST_HEIGHT = "listHeight"; //$NON-NLS-1$
+ public static final String ATTR_LIST_WIDTH = "listWidth"; //$NON-NLS-1$
+ /** The Constant ATTR_NAME. */
+ public static final String ATTR_NAME = "name"; //$NON-NLS-1$
+ public static final String ATTR_POPUP = "popup";//$NON-NLS-1$
/** The Constant ATTR_ROW_CLASSES. */
public static final String ATTR_ROW_CLASSES = "rowClasses"; //$NON-NLS-1$
- /** The Constant ATTR_COLUMN_CLASSES. */
- public static final String ATTR_COLUMN_CLASSES = "columnClasses"; //$NON-NLS-1$
- /** The Constant ATTR_CONTROLS_TYPE. */
- public static final String ATTR_CONTROLS_TYPE = "controlsType"; //$NON-NLS-1$
+ public static final String ATTR_SELECT_ITEM_LABEL = "itemLabel"; //$NON-NLS-1$
+ public static final String ATTR_SELECT_ITEM_VALUE = "itemValue"; //$NON-NLS-1$
/** The Constant ATTR_SHOW_BUTTON_LABELS. */
public static final String ATTR_SHOW_BUTTON_LABELS = "showButtonLabels"; //$NON-NLS-1$
- /** The Constant ATTR_DEFAULT_LABEL. */
- public static final String ATTR_DEFAULT_LABEL = "defaultLabel"; //$NON-NLS-1$
- /** The Constant ATTR_ADD_CONTROL_LABEL. */
- public static final String ATTR_ADD_CONTROL_LABEL = "addControlLabel"; //$NON-NLS-1$
+ public static final String ATTR_SORT_BY = "sortBy"; //$NON-NLS-1$
+ public static final String ATTR_SORT_ICON = "sortIcon"; //$NON-NLS-1$
+ public static final String ATTR_SORTABLE = "sortable"; //$NON-NLS-1$
+ /** The Constant ATTR_STYLE. */
+ public static final String ATTR_STYLE = "style"; //$NON-NLS-1$
/** The Constant ATTR_STYLE_CLASS. */
public static final String ATTR_STYLE_CLASS = "styleClass"; //$NON-NLS-1$
- public static final String ATTR_SELECT_ITEM_LABEL = "itemLabel"; //$NON-NLS-1$
- public static final String ATTR_SELECT_ITEM_VALUE = "itemValue"; //$NON-NLS-1$
- public static final String ATTR_DISABLED = "disabled";//$NON-NLS-1$
- public static final String ATTR_POPUP = "popup";//$NON-NLS-1$
- public static final String ATTR_DIRECTION = "direction"; //$NON-NLS-1$
- public static final String ATTR_ALIGN = "align"; //$NON-NLS-1$
- public static final String ATTR_LIST_WIDTH = "listWidth"; //$NON-NLS-1$
- public static final String ATTR_LIST_HEIGHT = "listHeight"; //$NON-NLS-1$
- public static final String ATTR_COLUMNS_WIDTH = "columnsWidth"; //$NON-NLS-1$
- public static final String ATTR_HEADER_CLASS = "headerClass"; //$NON-NLS-1$
- public static final String ATTR_FOOTER_CLASS = "footerClass"; //$NON-NLS-1$
- public static final String ATTR_CAPTION_CLASS = "captionClass"; //$NON-NLS-1$
- public static final String ATTR_CAPTION_STYLE = "captionStyle"; //$NON-NLS-1$
- public static final String ATTR_COLUMNS = "columns"; //$NON-NLS-1$
- public static final String ATTR_ELEMENTS = "elements"; //$NON-NLS-1$
-
+ /** The Constant ATTR_VALUE. */
+ public static final String ATTR_VALUE = "value"; //$NON-NLS-1$
+ public static final String ATTR_VISIBLE = "visible"; //$NON-NLS-1$
+ /** The Constant ATTR_WIDTH. */
+ public static final String ATTR_WIDTH = "width"; //$NON-NLS-1$
+ public static final String NAME_FACET_CAPTION = "caption"; //$NON-NLS-1$
+ public static final String NAME_FACET_FOOTER = "footer"; //$NON-NLS-1$
public static final String NAME_FACET_HEADER = "header"; //$NON-NLS-1$
- public static final String NAME_FACET_FOOTER = "footer"; //$NON-NLS-1$
- public static final String NAME_FACET_CAPTION = "caption"; //$NON-NLS-1$
-
+ /** jsf tags which are used with richFaces. */
+ public static final String TAG_COLUMN = "column"; //$NON-NLS-1$
+ public static final String TAG_COLUMN_GROUP = "columnGroup"; //$NON-NLS-1$
+ public static final String TAG_COLUMNS = "columns"; //$NON-NLS-1$
+ /** The Constant TAG_FACET. */
+ public static final String TAG_FACET = "facet"; //$NON-NLS-1$
+ public static final String TAG_SUB_TABLE = "subTable"; //$NON-NLS-1$
+
+ public static final String VAL_TRUE = "true"; //$NON-NLS-1$
+ public static final String VAL_FALSE = "false"; //$NON-NLS-1$
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SourceDomUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SourceDomUtil.java 2008-10-22 16:30:12 UTC (rev 11086)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SourceDomUtil.java 2008-10-22 19:43:46 UTC (rev 11087)
@@ -10,6 +10,10 @@
******************************************************************************/
package org.jboss.tools.vpe.editor.util;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
+import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
+import org.mozilla.interfaces.nsIDOMNode;
import org.w3c.dom.Node;
public class SourceDomUtil {
@@ -23,4 +27,24 @@
}
return null;
}
+
+
+ /** Finds first n-th parent of <code>sourceNode</code> that has
+ * a linked non-null nodeMaping in <code>domMapping</code>.
+ *
+ * @param domMapping
+ * @param sourceNode
+ * @return first n-th parent of <code>sourceNode</code> that has
+ * a linked non-null nodeMaping in <code>domMapping</code>
+ * or <code>null</code> if there is not any. */
+ public static Node getParentHavingDomMapping(final Node sourceNode, final VpeDomMapping domMapping) {
+ VpeNodeMapping nodeMapping = null;
+ Node parent = sourceNode;
+ do {
+ parent = parent.getParentNode();
+ nodeMapping = domMapping.getNodeMapping(parent);
+ } while (nodeMapping == null && parent != null);
+
+ return parent;
+ }
}
16 years, 2 months