JBoss Rich Faces SVN: r220 - in trunk: richfaces/drag-drop/src/main/resources/org/richfaces/renderkit/html/scripts and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-03-30 09:26:07 -0400 (Fri, 30 Mar 2007)
New Revision: 220
Modified:
trunk/richfaces-samples/dragDropDemo/src/main/webapp/pages/index.jsp
trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DragIndicatorRendererBase.java
trunk/richfaces/drag-drop/src/main/resources/org/richfaces/renderkit/html/scripts/drag-indicator.js
trunk/richfaces/drag-drop/src/main/templates/org/richfaces/htmlDragIndicator.jspx
Log:
RF-53 fixed: Drag Indicator's acceptClass and rejectClass attributes don't work
Demo app updated
Modified: trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DragIndicatorRendererBase.java
===================================================================
--- trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DragIndicatorRendererBase.java 2007-03-30 12:17:01 UTC (rev 219)
+++ trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DragIndicatorRendererBase.java 2007-03-30 13:26:07 UTC (rev 220)
@@ -44,8 +44,6 @@
*
*/
public class DragIndicatorRendererBase extends HeaderResourcesRendererBase {
- public static final String ACCEPT_CLASS_ATTR = "ils:acceptclass";
- public static final String REJECT_CLASS_ATTR = "ils:rejectclass";
public static final String ACCEPT_CLASS = "acceptClass";
public static final String REJECT_CLASS = "rejectClass";
public static final String RENDERER_TYPE = "com.exadel.jsf.renderer.DropIndicatorRenderer";
Modified: trunk/richfaces/drag-drop/src/main/resources/org/richfaces/renderkit/html/scripts/drag-indicator.js
===================================================================
--- trunk/richfaces/drag-drop/src/main/resources/org/richfaces/renderkit/html/scripts/drag-indicator.js 2007-03-30 12:17:01 UTC (rev 219)
+++ trunk/richfaces/drag-drop/src/main/resources/org/richfaces/renderkit/html/scripts/drag-indicator.js 2007-03-30 13:26:07 UTC (rev 220)
@@ -98,7 +98,10 @@
}
};
-function createDragIndicator(elt) {
+function createDragIndicator(elt, acceptClass, rejectClass) {
Object.extend(elt, DragIndicator);
+
+ elt.ils_acceptClass = acceptClass;
+ elt.ils_rejectClass = rejectClass;
}
Modified: trunk/richfaces/drag-drop/src/main/templates/org/richfaces/htmlDragIndicator.jspx
===================================================================
--- trunk/richfaces/drag-drop/src/main/templates/org/richfaces/htmlDragIndicator.jspx 2007-03-30 12:17:01 UTC (rev 219)
+++ trunk/richfaces/drag-drop/src/main/templates/org/richfaces/htmlDragIndicator.jspx 2007-03-30 13:26:07 UTC (rev 220)
@@ -34,7 +34,7 @@
/*]]>*/
<f:call name="encodeChildScripts" />
/*<![CDATA[*/
- createDragIndicator(elt);
+ createDragIndicator(elt, '#{component.attributes["acceptClass"]}', '#{component.attributes["rejectClass"]}');
/*]]>*/
</script>
<vcp:body />
Modified: trunk/richfaces-samples/dragDropDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/richfaces-samples/dragDropDemo/src/main/webapp/pages/index.jsp 2007-03-30 12:17:01 UTC (rev 219)
+++ trunk/richfaces-samples/dragDropDemo/src/main/webapp/pages/index.jsp 2007-03-30 13:26:07 UTC (rev 220)
@@ -12,6 +12,16 @@
.dropzoneDecoration {
width: 100px; height: 100px; border: 2px dotted navy;
}
+
+ .accept {
+ border: 3px dotted green;
+ padding: 10px;
+ }
+
+ .reject {
+ border: 3px dashed red;
+ padding: 10px;
+ }
</style>
</head>
<body>
@@ -61,7 +71,7 @@
</h:dataTable>
</h:panelGrid>
- <dnd:dragIndicator id="indicator">
+ <dnd:dragIndicator id="indicator" acceptClass="accept" rejectClass="reject">
<f:facet name="single">
<f:verbatim>
{marker} <b>{testDrag}</b> {label}
17 years, 1 month
JBoss Rich Faces SVN: r219 - trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-03-30 08:17:01 -0400 (Fri, 30 Mar 2007)
New Revision: 219
Modified:
trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DnDEventsExchangeMailer.java
trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java
trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java
Log:
http://jira.jboss.com/jira/browse/RF-54 fixed
Modified: trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DnDEventsExchangeMailer.java
===================================================================
--- trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DnDEventsExchangeMailer.java 2007-03-30 02:19:34 UTC (rev 218)
+++ trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DnDEventsExchangeMailer.java 2007-03-30 12:17:01 UTC (rev 219)
@@ -93,7 +93,7 @@
}
public void mailEvent(String sourceId, UIComponent target, FacesContext facesContext, FacesEvent facesEvent,
- EventCallback callback, Object type, Object value) {
+ EventCallback callback, Object type, Object value, boolean isDraggable) {
facesEvent.queue();
UIComponent component = (UIComponent) components.get(sourceId);
@@ -117,7 +117,7 @@
Object acceptedTypes;
Object dragType;
- if (target instanceof Draggable) {
+ if (isDraggable) {
draggable = (Draggable) target;
dropzone = (Dropzone) component;
Modified: trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java
===================================================================
--- trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java 2007-03-30 02:19:34 UTC (rev 218)
+++ trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java 2007-03-30 12:17:01 UTC (rev 219)
@@ -99,7 +99,7 @@
eventsExchanger.mailEvent(dropTargetId, component,
context, new DragEvent(component), dragEventsCallback, draggable.getDragType(),
- draggable.getDragValue());
+ draggable.getDragValue(), true);
}
}
Modified: trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java
===================================================================
--- trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java 2007-03-30 02:19:34 UTC (rev 218)
+++ trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java 2007-03-30 12:17:01 UTC (rev 219)
@@ -150,7 +150,7 @@
eventsExchanger.mailEvent(dragSourceId, component,
context, new DropEvent(component), dropEventsCallback,
dropzone.getAcceptedTypes(),
- dropzone.getDropValue()
+ dropzone.getDropValue(), false
);
}
}
17 years, 1 month
JBoss Rich Faces SVN: r218 - trunk/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-03-29 22:19:34 -0400 (Thu, 29 Mar 2007)
New Revision: 218
Modified:
trunk/richfaces/pom.xml
Log:
move clover instrumentation to separate profile
Modified: trunk/richfaces/pom.xml
===================================================================
--- trunk/richfaces/pom.xml 2007-03-30 02:03:08 UTC (rev 217)
+++ trunk/richfaces/pom.xml 2007-03-30 02:19:34 UTC (rev 218)
@@ -93,23 +93,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <artifactId>maven-clover-plugin</artifactId>
- <executions>
- <execution>
- <phase>verify</phase>
- <goals>
- <goal>instrument</goal>
- <goal>aggregate</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <includesAllSourceRoots>true</includesAllSourceRoots>
- <licenseLocation>${cloverLicense}</licenseLocation>
- <jdk>1.5</jdk>
- </configuration>
- </plugin>
</plugins>
</build>
<modules>
@@ -310,14 +293,6 @@
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
</plugin>
- <plugin>
- <artifactId>maven-clover-plugin</artifactId>
- <configuration>
- <includesAllSourceRoots>true</includesAllSourceRoots>
- <licenseLocation>${cloverLicense}</licenseLocation>
- <jdk>1.5</jdk>
- </configuration>
- </plugin>
</plugins>
</reporting>
<distributionManagement>
@@ -336,5 +311,51 @@
</site>
<downloadUrl>http://labs.jboss.com/portal/jbossrichfaces/downloads</downloadUrl>
</distributionManagement>
+ <profiles>
+ <profile>
+ <id>clover</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clover-plugin</artifactId>
+ <configuration>
+ <includesAllSourceRoots>
+ true
+ </includesAllSourceRoots>
+ <licenseLocation>
+ ${cloverLicense}
+ </licenseLocation>
+ <jdk>1.5</jdk>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>instrument</goal>
+ <goal>aggregate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clover-plugin</artifactId>
+ <!--
+ <configuration>
+ <licenseLocation>${cloverLicense}</licenseLocation>
+ <jdk>1.5</jdk>
+ </configuration>
+ -->
+ </plugin>
+ </plugins>
+ </reporting>
+ </profile>
+ </profiles>
</project>
17 years, 1 month
JBoss Rich Faces SVN: r217 - trunk/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-03-29 22:03:08 -0400 (Thu, 29 Mar 2007)
New Revision: 217
Modified:
trunk/richfaces/pom.xml
Log:
About 70% of a panel code covered by a Junit tests.
Setup build for a clover reports.
Modified: trunk/richfaces/pom.xml
===================================================================
--- trunk/richfaces/pom.xml 2007-03-30 02:02:13 UTC (rev 216)
+++ trunk/richfaces/pom.xml 2007-03-30 02:03:08 UTC (rev 217)
@@ -1,358 +1,340 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-parent</artifactId>
- <packaging>pom</packaging>
- <name>RichFaces Components</name>
- <version>3.0.1-SNAPSHOT</version>
- <url>http://richfaces.ajax4jsf.org</url>
- <!--
- <url>http://labs.jboss.com/jbossrichfaces</url>
- -->
- <licenses>
- <license>
- <name>LGPL 2.1</name>
- <url>http://www.gnu.org/licenses/lgpl.html</url>
- <distribution>repo</distribution>
- <comments>
- GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
- </comments>
- </license>
- </licenses>
- <issueManagement>
- <system>JIRA</system>
- <url>http://jira.jboss.org/jira/browse/RF</url>
- </issueManagement>
- <developers>
- <developer>
- <id>alexsmirnov</id>
- <name>Alexander Smirnov</name>
- <email>alexsmirnov(a)exadel.com</email>
- <organization>Exadel Inc.</organization>
- <organizationUrl>http://www.exadel.com</organizationUrl>
- <roles>
- <role>architect</role>
- <role>developer</role>
- </roles>
- <timezone>-3</timezone>
- </developer>
- <developer>
- <id>ishabalov</id>
- <name>Igor Shabalov</name>
- <email>ishabalov(a)exadel.com</email>
- <organization>Exadel Inc.</organization>
- <organizationUrl>http://www.exadel.com</organizationUrl>
- <roles>
- <role>architect</role>
- <role>developer</role>
- </roles>
- <timezone>+8</timezone>
- </developer>
- <developer>
- <id>sergeysmirnov</id>
- <name>Sergey Smirnov</name>
- <email>sergeysmirnov(a)exadel.com</email>
- <organization>Exadel Inc.</organization>
- <organizationUrl>http://www.exadel.com</organizationUrl>
- <roles>
- <role>architect</role>
- <role>developer</role>
- </roles>
- <timezone>+8</timezone>
- </developer>
- <developer>
- <id>nbelayevsky</id>
- <name>Nik Belyaevsky</name>
- <email>nbelayevsky(a)exadel.com</email>
- <organization>Exadel Inc.</organization>
- <organizationUrl>http://www.exadel.com</organizationUrl>
- <roles>
- <role>architect</role>
- <role>developer</role>
- </roles>
- <timezone>-2</timezone>
- </developer>
- </developers>
- <distributionManagement>
- <downloadUrl>
- http://labs.jboss.com/portal/jbossrichfaces/downloads
- </downloadUrl>
- <repository>
- <id>release-repository</id>
- <uniqueVersion>false</uniqueVersion>
- <url>${releaseRepository}</url>
- </repository>
- <snapshotRepository>
- <id>snap-repository</id>
- <uniqueVersion>true</uniqueVersion>
- <url>${snapshotRepository}</url>
- </snapshotRepository>
- <site>
- <id>richfaces-site</id>
- <url>richfaces/</url>
- </site>
- </distributionManagement>
- <scm>
- <connection>
- scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/richfaces/
- </connection>
- <developerConnection>
- scm:svn:https://svn.jboss.org/repos/richfaces/trunk/richfaces/
- </developerConnection>
- <url>
- http://anonsvn.jboss.org/repos/richfaces/trunk/richfaces/
- </url>
- </scm>
- <pluginRepositories>
- <pluginRepository>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <id>maven2-snapshots.jboss.org</id>
- <name>Jboss Repository for Maven Snapshots</name>
- <url>http://snapshots.jboss.com/</url>
- </pluginRepository>
- </pluginRepositories>
- <repositories>
- <repository>
- <releases />
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- <id>maven-repository.dev.java.net</id>
- <name>Java.net Repository for Maven</name>
- <url>
- https://maven-repository.dev.java.net/nonav/repository
- </url>
- <layout>legacy</layout>
- </repository>
- <repository>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <id>maven2-snapshots.jboss.org</id>
- <name>Jboss Repository for Maven Snapshots</name>
- <url>http://snapshots.jboss.com/</url>
- </repository>
- </repositories>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-source</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clover-plugin</artifactId>
- <configuration>
- <includesAllSourceRoots>true</includesAllSourceRoots>
- <licenseLocation>${cloverLicense}</licenseLocation>
- <jdk>1.5</jdk>
- </configuration>
- <executions>
- <execution>
- <phase>pre-site</phase>
- <goals>
- <goal>instrument</goal>
- <goal>aggregate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>
- maven-project-info-reports-plugin
- </artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <quiet>true</quiet>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- <configuration>
- <aggregate>true</aggregate>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jdepend-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>changelog-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <configuration>
- <xmlOutput>false</xmlOutput>
- <threshold>Normal</threshold>
- <effort>Max</effort>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-report-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clover-plugin</artifactId>
- <configuration>
- <includesAllSourceRoots>true</includesAllSourceRoots>
- <licenseLocation>${cloverLicense}</licenseLocation>
- <jdk>1.5</jdk>
- </configuration>
- </plugin>
- </plugins>
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-parent</artifactId>
+ <packaging>pom</packaging>
+ <name>RichFaces Components</name>
+ <version>3.0.1-SNAPSHOT</version>
+ <url>http://richfaces.ajax4jsf.org</url>
+ <properties>
+ <maven.test.failure.ignore>true</maven.test.failure.ignore>
+ </properties>
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://jira.jboss.org/jira/browse/RF</url>
+ </issueManagement>
+ <ciManagement>
+ <system>cruisecontrol</system>
+ </ciManagement>
+ <developers>
+ <developer>
+ <id>alexsmirnov</id>
+ <name>Alexander Smirnov</name>
+ <email>alexsmirnov(a)exadel.com</email>
+ <organization>Exadel Inc.</organization>
+ <organizationUrl>http://www.exadel.com</organizationUrl>
+ <roles>
+ <role>architect</role>
+ <role>developer</role>
+ </roles>
+ <timezone>-3</timezone>
+ </developer>
+ <developer>
+ <id>ishabalov</id>
+ <name>Igor Shabalov</name>
+ <email>ishabalov(a)exadel.com</email>
+ <organization>Exadel Inc.</organization>
+ <organizationUrl>http://www.exadel.com</organizationUrl>
+ <roles>
+ <role>architect</role>
+ <role>developer</role>
+ </roles>
+ <timezone>+8</timezone>
+ </developer>
+ <developer>
+ <id>sergeysmirnov</id>
+ <name>Sergey Smirnov</name>
+ <email>sergeysmirnov(a)exadel.com</email>
+ <organization>Exadel Inc.</organization>
+ <organizationUrl>http://www.exadel.com</organizationUrl>
+ <roles>
+ <role>architect</role>
+ <role>developer</role>
+ </roles>
+ <timezone>+8</timezone>
+ </developer>
+ <developer>
+ <id>nbelayevsky</id>
+ <name>Nik Belyaevsky</name>
+ <email>nbelayevsky(a)exadel.com</email>
+ <organization>Exadel Inc.</organization>
+ <organizationUrl>http://www.exadel.com</organizationUrl>
+ <roles>
+ <role>architect</role>
+ <role>developer</role>
+ </roles>
+ <timezone>-2</timezone>
+ </developer>
+ </developers>
+ <licenses>
+ <license>
+ <name>LGPL 2.1</name>
+ <url>http://www.gnu.org/licenses/lgpl.html</url>
+ <distribution>repo</distribution>
+ <comments>GNU LESSER GENERAL PUBLIC LICENSE Version 2.1</comments>
+ </license>
+ </licenses>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/richfaces/</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/trunk/richfaces/</developerConnection>
+ <url>http://anonsvn.jboss.org/repos/richfaces/trunk/richfaces/</url>
+ </scm>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-source</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-clover-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>instrument</goal>
+ <goal>aggregate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <includesAllSourceRoots>true</includesAllSourceRoots>
+ <licenseLocation>${cloverLicense}</licenseLocation>
+ <jdk>1.5</jdk>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <modules>
+ <module>common</module>
+ <module>drag-drop</module>
+ <module>panel</module>
+ <module>panelbar</module>
+ <module>dataFilterSlider</module>
+ <module>gmap</module>
+ <module>separator</module>
+ <module>spacer</module>
+ <module>paint2D</module>
+ <module>togglePanel</module>
+ <module>tabPanel</module>
+ <module>simpleTogglePanel</module>
+ <module>toolBar</module>
+ <module>inputnumber-slider</module>
+ <module>inputnumber-spinner</module>
+ <module>tree</module>
+ <module>suggestionbox</module>
+ <module>dataTable</module>
+ <module>modal-panel</module>
+ <module>datascroller</module>
+ <module>menu-components</module>
+ <module>dropdown-menu</module>
+ <module>panelmenu</module>
+ </modules>
+ <repositories>
+ <repository>
+ <releases />
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ <id>maven-repository.dev.java.net</id>
+ <name>Java.net Repository for Maven</name>
+ <url>https://maven-repository.dev.java.net/nonav/repository</url>
+ <layout>legacy</layout>
+ </repository>
+ <repository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ <id>maven2-snapshots.jboss.org</id>
+ <name>Jboss Repository for Maven Snapshots</name>
+ <url>http://snapshots.jboss.com/</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ <id>maven2-snapshots.jboss.org</id>
+ <name>Jboss Repository for Maven Snapshots</name>
+ <url>http://snapshots.jboss.com/</url>
+ </pluginRepository>
+ </pluginRepositories>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.1_02</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>jsp-api</artifactId>
+ <groupId>javax.servlet.jsp</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jstl</artifactId>
+ <groupId>javax.servlet.jsp.jstl</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>1.1_02</version>
+ <scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>jsp-api</artifactId>
+ <groupId>javax.servlet.jsp</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jstl</artifactId>
+ <groupId>javax.servlet.jsp.jstl</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>ajax4jsf</artifactId>
+ <version>1.1.1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>test</artifactId>
+ <version>1.1.1-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>htmlunit</groupId>
+ <artifactId>htmlunit</artifactId>
+ <version>1.10</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <version>1.1.11</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>el-impl</groupId>
+ <artifactId>el-impl</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <quiet>true</quiet>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <configuration>
+ <aggregate>true</aggregate>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jdepend-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>changelog-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <configuration>
+ <xmlOutput>false</xmlOutput>
+ <threshold>Normal</threshold>
+ <effort>Max</effort>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-clover-plugin</artifactId>
+ <configuration>
+ <includesAllSourceRoots>true</includesAllSourceRoots>
+ <licenseLocation>${cloverLicense}</licenseLocation>
+ <jdk>1.5</jdk>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ <distributionManagement>
+ <repository>
+ <uniqueVersion>false</uniqueVersion>
+ <id>release-repository</id>
+ <url>${releaseRepository}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snap-repository</id>
+ <url>${snapshotRepository}</url>
+ </snapshotRepository>
+ <site>
+ <id>richfaces-site</id>
+ <url>richfaces/</url>
+ </site>
+ <downloadUrl>http://labs.jboss.com/portal/jbossrichfaces/downloads</downloadUrl>
+ </distributionManagement>
+</project>
- </reporting>
- <ciManagement>
- <notifiers></notifiers>
- <system>cruisecontrol</system>
- </ciManagement>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.1_02</version>
- <exclusions>
- <!-- No longer presented in any repo -->
- <exclusion>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.servlet.jsp.jstl</groupId>
- <artifactId>jstl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <version>1.1_02</version>
- <scope>runtime</scope>
- <exclusions>
- <!-- No longer presented in any repo -->
- <exclusion>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.servlet.jsp.jstl</groupId>
- <artifactId>jstl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.ajax4jsf</groupId>
- <artifactId>ajax4jsf</artifactId>
- <version>1.1.1-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.ajax4jsf</groupId>
- <artifactId>test</artifactId>
- <version>1.1.1-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- <version>1.1.11</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>el-impl</groupId>
- <artifactId>el-impl</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.4</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.0</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
- <modules>
- <module>common</module>
- <module>drag-drop</module>
- <module>panel</module>
- <module>panelbar</module>
- <module>dataFilterSlider</module>
- <module>gmap</module>
- <module>separator</module>
- <module>spacer</module>
- <module>paint2D</module>
- <module>togglePanel</module>
- <module>tabPanel</module>
- <module>simpleTogglePanel</module>
- <module>toolBar</module>
- <module>inputnumber-slider</module>
- <module>inputnumber-spinner</module>
- <module>tree</module>
- <module>suggestionbox</module>
- <module>dataTable</module>
- <module>modal-panel</module>
- <module>datascroller</module>
- <module>menu-components</module>
- <module>dropdown-menu</module>
- <module>panelmenu</module>
- </modules>
-</project>
\ No newline at end of file
17 years, 1 month
JBoss Rich Faces SVN: r216 - in trunk/richfaces/panel: src/test and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-03-29 22:02:13 -0400 (Thu, 29 Mar 2007)
New Revision: 216
Added:
trunk/richfaces/panel/src/test/java/org/richfaces/component/html/
trunk/richfaces/panel/src/test/java/org/richfaces/component/html/HtmlPanelTest.java
trunk/richfaces/panel/src/test/java/org/richfaces/taglib/
trunk/richfaces/panel/src/test/java/org/richfaces/taglib/PanelTagTest.java
trunk/richfaces/panel/src/test/resources/
trunk/richfaces/panel/src/test/resources/WEB-INF/
trunk/richfaces/panel/src/test/resources/WEB-INF/web.xml
Modified:
trunk/richfaces/panel/pom.xml
trunk/richfaces/panel/src/test/java/org/richfaces/component/JSFComponentTest.java
Log:
About 70% of a panel code covered by a Junit tests.
Setup build for a clover reports.
Modified: trunk/richfaces/panel/pom.xml
===================================================================
--- trunk/richfaces/panel/pom.xml 2007-03-29 19:10:02 UTC (rev 215)
+++ trunk/richfaces/panel/pom.xml 2007-03-30 02:02:13 UTC (rev 216)
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>richfaces-parent</artifactId>
@@ -14,7 +14,7 @@
<plugin>
<groupId>org.ajax4jsf.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>1.1.1-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -36,9 +36,10 @@
</build>
<dependencies>
<dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
+ <groupId>org.richfaces</groupId>
+ <artifactId>common</artifactId>
+ <version>${project.version}</version>
</dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>
+
Modified: trunk/richfaces/panel/src/test/java/org/richfaces/component/JSFComponentTest.java
===================================================================
--- trunk/richfaces/panel/src/test/java/org/richfaces/component/JSFComponentTest.java 2007-03-29 19:10:02 UTC (rev 215)
+++ trunk/richfaces/panel/src/test/java/org/richfaces/component/JSFComponentTest.java 2007-03-30 02:02:13 UTC (rev 216)
@@ -21,18 +21,34 @@
package org.richfaces.component;
+import java.util.List;
+
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import javax.faces.component.UIComponent;
+import javax.faces.component.html.HtmlCommandLink;
+import javax.faces.component.html.HtmlOutputText;
+import javax.faces.render.Renderer;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.html.HtmlPanel;
+import org.richfaces.renderkit.html.PanelRenderer;
+
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
/**
* Unit test for simple Component.
*/
public class JSFComponentTest
- extends TestCase
+ extends AbstractAjax4JsfTestCase
{
- /**
+
+
+ HtmlPanel htmlPanel;
+
+ /**
* Create the test case
*
* @param testName name of the test case
@@ -42,12 +58,84 @@
super( testName );
}
+ public void setUp() throws Exception {
+ super.setUp();
+ htmlPanel = new HtmlPanel();
+ htmlPanel.setId("panel");
+ htmlPanel.setRendererType("panelRenderer");
+ facesContext.getViewRoot().getChildren().add(htmlPanel);
+ renderKit.addRenderer(HtmlPanel.COMPONENT_FAMILY, "panelRenderer", new PanelRenderer());
+ }
+ public void tearDown() throws Exception {
+ super.tearDown();
+ htmlPanel = null;
+ }
/**
* Rigourous Test :-)
+ * @throws Exception
*/
- public void testComponent()
+ public void testRender() throws Exception
{
- assertTrue( true );
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ System.out.println(page.asXml());
+ HtmlElement div = page.getHtmlElementById("panel");
+ assertNotNull(div);
+ assertEquals("div", div.getNodeName());
}
+
+ /**
+ * Rigourous Test :-)
+ * @throws Exception
+ */
+ public void testRenderStyle() throws Exception
+ {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ List elementsByTagName = page.getDocumentElement().getHtmlElementsByTagName("link");
+ assertEquals(1, elementsByTagName.size());
+ HtmlElement link = (HtmlElement) elementsByTagName.get(0);
+ assertTrue(link.getAttributeValue("href").contains("org/richfaces/renderkit/html/css/panel.xcss"));
+ }
+
+ /**
+ * Rigourous Test :-)
+ * @throws Exception
+ */
+ public void testRenderHeader() throws Exception
+ {
+ UIComponent text = createComponent(HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(), null, null , null);
+ htmlPanel.getFacets().put("header", text);
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ System.out.println(page.asXml());
+ HtmlElement div = page.getHtmlElementById("panel_header");
+ assertNotNull(div);
+ }
+
+ /**
+ * Rigourous Test :-)
+ * @throws Exception
+ */
+ public void testRenderAttributes() throws Exception
+ {
+ Object[][] attributes ={{"style","xxx","style","xxx"},{"onclick","alert()","onclick","alert()"},{"styleClass","yyy","class","dr-pnl rich-panel yyy"}};
+ UIComponent text = createComponent(HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(), null, null , null);
+ htmlPanel.getFacets().put("header", text);
+ for (int i = 0; i < attributes.length; i++) {
+ Object[] attr = attributes[i];
+ htmlPanel.getAttributes().put(attr[0], attr[1]);
+ }
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ System.out.println(page.asXml());
+ HtmlElement div = page.getHtmlElementById("panel");
+ assertNotNull(div);
+ for (int i = 0; i < attributes.length; i++) {
+ Object[] attr = attributes[i];
+ assertEquals(attr[3],div.getAttributeValue((String) attr[2]));
+ }
+
+ }
}
Added: trunk/richfaces/panel/src/test/java/org/richfaces/component/html/HtmlPanelTest.java
===================================================================
--- trunk/richfaces/panel/src/test/java/org/richfaces/component/html/HtmlPanelTest.java (rev 0)
+++ trunk/richfaces/panel/src/test/java/org/richfaces/component/html/HtmlPanelTest.java 2007-03-30 02:02:13 UTC (rev 216)
@@ -0,0 +1,34 @@
+package org.richfaces.component.html;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+
+import junit.framework.TestCase;
+
+public class HtmlPanelTest extends AbstractAjax4JsfTestCase {
+
+ public HtmlPanelTest(String name) {
+ super(name);
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+ }
+
+ public void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testSaveStateFacesContext() {
+ HtmlPanel panel = new HtmlPanel();
+ panel.setBodyClass("panelBodyClass");
+ panel.setHeaderClass("headerClass");
+ Object state = panel.saveState(facesContext);
+ HtmlPanel newPanel = new HtmlPanel();
+ newPanel.restoreState(facesContext, state);
+ assertEquals("panelBodyClass", newPanel.getBodyClass());
+ assertEquals("headerClass", newPanel.getHeaderClass());
+ }
+
+}
Added: trunk/richfaces/panel/src/test/java/org/richfaces/taglib/PanelTagTest.java
===================================================================
--- trunk/richfaces/panel/src/test/java/org/richfaces/taglib/PanelTagTest.java (rev 0)
+++ trunk/richfaces/panel/src/test/java/org/richfaces/taglib/PanelTagTest.java 2007-03-30 02:02:13 UTC (rev 216)
@@ -0,0 +1,96 @@
+/**
+ *
+ */
+package org.richfaces.taglib;
+
+import java.io.IOException;
+import java.util.Enumeration;
+
+import javax.faces.webapp.UIComponentTag;
+import javax.servlet.Servlet;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequestWrapper;
+import javax.servlet.http.HttpSession;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.PageContext;
+import javax.servlet.jsp.el.ExpressionEvaluator;
+import javax.servlet.jsp.el.VariableResolver;
+import javax.servlet.jsp.tagext.Tag;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.html.HtmlPanel;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PanelTagTest extends AbstractAjax4JsfTestCase {
+
+ PanelTag panelTag;
+
+
+ /**
+ * @param name
+ */
+ public PanelTagTest(String name) {
+ super(name);
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
+ */
+ public void setUp() throws Exception {
+ super.setUp();
+ panelTag = new PanelTag();
+ panelTag.setParent(new UIComponentTag(){
+
+ public String getComponentType() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getRendererType() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int doStartTag() throws JspException {
+ // TODO Auto-generated method stub
+ return Tag.EVAL_BODY_INCLUDE;
+ }
+
+ public int doEndTag() throws JspException {
+ // TODO Auto-generated method stub
+ return Tag.EVAL_BODY_INCLUDE;
+ }
+
+ });
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
+ */
+ public void tearDown() throws Exception {
+ super.tearDown();
+ panelTag = null;
+ }
+
+ /**
+ * Test method for {@link org.richfaces.taglib.PanelTag#setProperties(javax.faces.component.UIComponent)}.
+ * @throws JspException
+ */
+ public void testSetPropertiesUIComponent() throws JspException {
+ HtmlPanel panel = new HtmlPanel();
+ panelTag.setBodyClass("panel");
+ panelTag.setHeaderClass("headClass");
+ panelTag.setProperties(panel);
+ assertEquals("panel", panel.getBodyClass());
+ assertEquals("headClass", panel.getHeaderClass());
+ }
+
+}
Added: trunk/richfaces/panel/src/test/resources/WEB-INF/web.xml
===================================================================
--- trunk/richfaces/panel/src/test/resources/WEB-INF/web.xml (rev 0)
+++ trunk/richfaces/panel/src/test/resources/WEB-INF/web.xml 2007-03-30 02:02:13 UTC (rev 216)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>testcase</display-name>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.CONFIG_FILES</param-name>
+ <param-value>/WEB-INF/faces-config.xml</param-value>
+ </context-param>
+
+ <filter>
+ <description>Convert HTML to XML</description>
+ <display-name>Filter</display-name>
+ <filter-name>A4J</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ <init-param>
+ <param-name>publicid</param-name>
+ <param-value>-//W3C//DTD XHTML 1.0 Transitional//EN</param-value>
+ </init-param>
+ <init-param>
+ <param-name>systemid</param-name>
+ <param-value>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</param-value>
+ </init-param>
+ <init-param>
+ <param-name>namespace</param-name>
+ <param-value>http://www.w3.org/1999/xhtml</param-value>
+ </init-param>
+ <init-param>
+ <param-name>forceparser</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>rewriteid</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <init-param>
+ <param-name>mime-type</param-name>
+ <param-value>text/xml</param-value>
+ </init-param>
+ <init-param>
+ <param-name>log4j-init-file</param-name>
+ <param-value>WEB-INF/log4j.xml</param-value>
+ </init-param>
+ <init-param>
+ <param-name>enable-cache</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ </filter>
+ <filter-mapping>
+ <filter-name>A4J</filter-name>
+ <url-pattern>*.jsf</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>A4J</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+ <listener>
+ <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+</web-app>
17 years, 1 month
JBoss Rich Faces SVN: r215 - in trunk/richfaces-samples/tree-demo/src/main: webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-03-29 15:10:02 -0400 (Thu, 29 Mar 2007)
New Revision: 215
Modified:
trunk/richfaces-samples/tree-demo/src/main/java/org/richfaces/Bean.java
trunk/richfaces-samples/tree-demo/src/main/webapp/pages/index.jsp
Log:
Drag enable/disable switch added as test case to http://jira.jboss.com/jira/browse/RF-48
Modified: trunk/richfaces-samples/tree-demo/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/richfaces-samples/tree-demo/src/main/java/org/richfaces/Bean.java 2007-03-29 19:09:33 UTC (rev 214)
+++ trunk/richfaces-samples/tree-demo/src/main/java/org/richfaces/Bean.java 2007-03-29 19:10:02 UTC (rev 215)
@@ -64,6 +64,8 @@
private String pathToExpand;
+ private boolean dragOn = true;
+
public String getIcon() {
return icon;
}
@@ -292,4 +294,12 @@
return null;
}
+
+ public boolean isDragOn() {
+ return dragOn;
+ }
+
+ public void setDragOn(boolean dragOn) {
+ this.dragOn = dragOn;
+ }
}
\ No newline at end of file
Modified: trunk/richfaces-samples/tree-demo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/richfaces-samples/tree-demo/src/main/webapp/pages/index.jsp 2007-03-29 19:09:33 UTC (rev 214)
+++ trunk/richfaces-samples/tree-demo/src/main/webapp/pages/index.jsp 2007-03-29 19:10:02 UTC (rev 215)
@@ -44,6 +44,13 @@
</h:selectOneRadio>
<h:outputText value="SwitchType is: #{bean.switchType}" />
<br />
+ <h:outputText value="Drag switch:" />
+ <h:selectOneRadio value="#{bean.dragOn}" onclick="submit()">
+ <f:selectItem itemLabel="on" itemValue="#{true}" />
+ <f:selectItem itemLabel="off" itemValue="#{false}" />
+ </h:selectOneRadio>
+ <h:outputText value="Drag is: #{bean.dragOn ? 'on' : 'off'}" />
+ <br />
<h:commandButton value="#{bean.commandButtonCaption}"
actionListener="#{bean.changeIcons}" />
@@ -61,7 +68,7 @@
immediate="false"
acceptedTypes="file1"
- dragType="file1"
+ dragType="#{bean.dragOn ? 'file1' : ''}"
iconCollapsed="#{bean.iconCollapsed}"
iconExpanded="#{bean.iconExpanded}"
17 years, 1 month
JBoss Rich Faces SVN: r214 - trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-03-29 15:09:33 -0400 (Thu, 29 Mar 2007)
New Revision: 214
Modified:
trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js
Log:
Check for null drag type added in order to deny drag when dragType is absent. http://jira.jboss.com/jira/browse/RF-48
Modified: trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js
===================================================================
--- trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js 2007-03-29 19:06:04 UTC (rev 213)
+++ trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js 2007-03-29 19:09:33 UTC (rev 214)
@@ -28,7 +28,7 @@
* @return type of draggable content
*/
getContentType: function() {
- return "ZZZZZ";
+ return null;
},
/**
* implementations are responsible for getting drag indicator
@@ -81,44 +81,47 @@
startDrag : function(event) {
var type = this.getContentType();
- var indicator = this.getIndicator();
- var drag = new DnD.Drag(this, indicator, type);
- if (indicator.id.indexOf("_rfDefaultDragIndicator") != -1) {
- var target = drag.source.getElement();
- var offSets = Position.cumulativeOffset(target);
- indicator.indicatorWidth = Element.getWidth(target);
- indicator.indicatorHeight = Element.getHeight(target);
- indicator.position(offSets[0], offSets[1]);
- indicator.removalX = Event.pointerX(event) - offSets[0];
- indicator.removalY = Event.pointerY(event) - offSets[1];
- }
+ if (type) {
- DnD.startDrag(drag);
- DnD.updateDrag(event);
- this.ondragstart(event, drag);
- if (indicator) {
- indicator.show();
- }
-
- if( this.options && this.options.ondragstart) {
- this.options.ondragstart();
- }
-
- // cancel out any text selections
- //document.body.focus();
-
- // prevent text selection in IE
- this.onSelectStartHandler = document.onselectstart;
- this.onDragStartHandler = document.ondragstart;
-
- document.onselectstart = function () { return false; };
- document.ondragstart = function () { DnD.ieReleaseCapture(); return false; };
-
- if (document.releaseCapture) {
- Event.observe(document, "mousemove", DnD.ieReleaseCapture);
- }
-
+ var indicator = this.getIndicator();
+ var drag = new DnD.Drag(this, indicator, type);
+
+ if (indicator.id.indexOf("_rfDefaultDragIndicator") != -1) {
+ var target = drag.source.getElement();
+ var offSets = Position.cumulativeOffset(target);
+ indicator.indicatorWidth = Element.getWidth(target);
+ indicator.indicatorHeight = Element.getHeight(target);
+ indicator.position(offSets[0], offSets[1]);
+ indicator.removalX = Event.pointerX(event) - offSets[0];
+ indicator.removalY = Event.pointerY(event) - offSets[1];
+ }
+
+ DnD.startDrag(drag);
+ DnD.updateDrag(event);
+ this.ondragstart(event, drag);
+ if (indicator) {
+ indicator.show();
+ }
+
+ if( this.options && this.options.ondragstart) {
+ this.options.ondragstart();
+ }
+
+ // cancel out any text selections
+ //document.body.focus();
+
+ // prevent text selection in IE
+ this.onSelectStartHandler = document.onselectstart;
+ this.onDragStartHandler = document.ondragstart;
+
+ document.onselectstart = function () { return false; };
+ document.ondragstart = function () { DnD.ieReleaseCapture(); return false; };
+
+ if (document.releaseCapture) {
+ Event.observe(document, "mousemove", DnD.ieReleaseCapture);
+ }
+ }
},
/**
*
17 years, 1 month
JBoss Rich Faces SVN: r213 - in trunk: richfaces-samples/dropdownmenu-sample and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-03-29 15:06:04 -0400 (Thu, 29 Mar 2007)
New Revision: 213
Modified:
trunk/richfaces-samples/dropdownmenu-sample/
trunk/richfaces/panelmenu/
Log:
target svn:ignor'ed
Property changes on: trunk/richfaces/panelmenu
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/richfaces-samples/dropdownmenu-sample
___________________________________________________________________
Name: svn:ignore
- .settings
.project
.classpath
+ .settings
.project
.classpath
target
17 years, 1 month
JBoss Rich Faces SVN: r212 - trunk/richfaces/simpleTogglePanel/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-03-29 11:02:22 -0400 (Thu, 29 Mar 2007)
New Revision: 212
Modified:
trunk/richfaces/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx
Log:
http://jira.jboss.com/jira/browse/RF-43 Fixed
Modified: trunk/richfaces/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx
===================================================================
--- trunk/richfaces/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx 2007-03-29 14:30:04 UTC (rev 211)
+++ trunk/richfaces/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx 2007-03-29 15:02:22 UTC (rev 212)
@@ -60,7 +60,7 @@
style="position : relative;"
onclick="#{this:getOnClick(context,component)}">
- #{component.attributes['label']} &nbsp;
+ #{component.attributes['label']} <jsp:scriptlet><![CDATA[writer.write(" ");]]></jsp:scriptlet>
<div id="#{clientId}_switch"
style="position : absolute; top: 0px; right: 5px;">
<jsp:scriptlet><![CDATA[
17 years, 1 month
JBoss Rich Faces SVN: r211 - trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: F.antonov
Date: 2007-03-29 10:30:04 -0400 (Thu, 29 Mar 2007)
New Revision: 211
Modified:
trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/pages/index.jsp
Log:
Improvement for demo application.
Modified: trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/pages/index.jsp 2007-03-29 14:29:39 UTC (rev 210)
+++ trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/pages/index.jsp 2007-03-29 14:30:04 UTC (rev 211)
@@ -18,9 +18,9 @@
<h:panelGrid id="grid" columns="2" cellspacing="4">
<ddm:dropDownMenu id="MenuItem1" popupWidth="#{bean.width}" value="Item1">
- <mc:menuItem id="menuItem11" value="Active11: ajax" mode="ajax"/>
- <mc:menuItem id="menuItem12" value="Active12"/>
- <mc:menuItem id="menuItem13" value="Active13" icon="/images/ico1.gif"/>
+ <mc:menuItem id="menuItem11" value="Active11: ajax" mode="ajax" actionListener="#{bean.actionListener}"/>
+ <mc:menuItem id="menuItem12" value="Active12" actionListener="#{bean.actionListener}" immediate="true"/>
+ <mc:menuItem id="menuItem13" value="Active13" action="#{bean.action}" icon="/images/ico1.gif"/>
<mc:menuItem id="menuItem14" value="Active14"/>
<mc:menuGroup id="menuGroup1" value="Group1">
<mc:menuItem id="menuGroup1Item1" value="Active"/>
17 years, 1 month