JBoss Rich Faces SVN: r2297 - trunk/ui/dropdown-menu/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-08-16 11:06:42 -0400 (Thu, 16 Aug 2007)
New Revision: 2297
Modified:
trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx
Log:
http://jira.jboss.com/jira/browse/RF-607
Modified: trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx
===================================================================
--- trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx 2007-08-16 15:05:46 UTC (rev 2296)
+++ trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx 2007-08-16 15:06:42 UTC (rev 2297)
@@ -19,7 +19,7 @@
<f:clientid var="clientId"/>
<jsp:scriptlet>
- <![CDATA[org.richfaces.component.util.FormUtil.throwEnclFormReqExceptionIfNeed(context,component);]]>
+ <![CDATA[if (!((org.richfaces.component.UIDropDownMenu)component).getSubmitMode().equalsIgnoreCase("none")) org.richfaces.component.util.FormUtil.throwEnclFormReqExceptionIfNeed(context,component);]]>
</jsp:scriptlet>
<div id="#{clientId}"
style="#{component.attributes['style']};"
18 years, 8 months
JBoss Rich Faces SVN: r2296 - trunk/ui/menu-components/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-08-16 11:05:46 -0400 (Thu, 16 Aug 2007)
New Revision: 2296
Modified:
trunk/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx
Log:
http://jira.jboss.com/jira/browse/RF-607
Modified: trunk/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx
===================================================================
--- trunk/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx 2007-08-16 14:58:45 UTC (rev 2295)
+++ trunk/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx 2007-08-16 15:05:46 UTC (rev 2296)
@@ -18,6 +18,13 @@
/org/ajax4jsf/javascript/scripts/form.js,
/org/richfaces/renderkit/html/scripts/form.js
</h:scripts>
+
+ <jsp:scriptlet>
+ <![CDATA[
+ String mode = ((org.richfaces.component.UIMenuItem)component).getSubmitMode();
+ if (mode != null && !mode.equalsIgnoreCase("none")) org.richfaces.component.util.FormUtil.throwEnclFormReqExceptionIfNeed(context,component);
+ ]]>
+ </jsp:scriptlet>
<f:call name="initializeResources" />
18 years, 8 months
JBoss Rich Faces SVN: r2295 - in trunk/ui/tree/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-08-16 10:58:45 -0400 (Thu, 16 Aug 2007)
New Revision: 2295
Modified:
trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
trunk/ui/tree/src/main/templates/htmlTreeNode.jspx
Log:
custom user classes added
Modified: trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-08-16 14:01:25 UTC (rev 2294)
+++ trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-08-16 14:58:45 UTC (rev 2295)
@@ -151,7 +151,7 @@
String styleClasses = "";
if (context.getRowKey() != null) {
- styleClasses = "dr-tree-layout-on dr-tree-h-ic-div";
+ styleClasses = "dr-tree-layout-on dr-tree-h-ic-div rich-tree-node-cildren";
if (!context.isLast() && showLines) styleClasses += " dr-tree-h-ic-line";
}
if (styleClasses!="") getUtils().writeAttribute(writer, "class", styleClasses);
Modified: trunk/ui/tree/src/main/templates/htmlTreeNode.jspx
===================================================================
--- trunk/ui/tree/src/main/templates/htmlTreeNode.jspx 2007-08-16 14:01:25 UTC (rev 2294)
+++ trunk/ui/tree/src/main/templates/htmlTreeNode.jspx 2007-08-16 14:58:45 UTC (rev 2295)
@@ -31,7 +31,7 @@
<f:call name="initializeLines" />
<f:call name="initializeResources" />
- <table border="0" cellpadding="0" cellspacing="0" id="#{clientId}" class="dr-tree-full-width">
+ <table border="0" cellpadding="0" cellspacing="0" id="#{clientId}" class="dr-tree-full-width rich-tree-node">
<tbody>
<tr id="#{clientId}:mainRow" onclick="#{component.attributes['onclick']} #{this:getToggleScript(context, component, 'mainRow')}" >
@@ -40,7 +40,7 @@
<f:call name="utils.encodePassThruWithExclusions">
<f:parameter value="id,onclick"/>
</f:call>
- <td class="dr-tree-h-ic #{line}">
+ <td class="dr-tree-h-ic rich-tree-node-handleicon #{line}">
<div>
<jsp:scriptlet>
<![CDATA[
@@ -76,7 +76,7 @@
]]>
</jsp:scriptlet>
<span id="#{clientId}:handle:img:collapsed"
- class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img dr-tree-h-ic-facets"
+ class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img dr-tree-h-ic-facets rich-tree-node-handleicon-collapsed"
style="#{this:getHandleCollapsedDisplayStyle(context, component)}">
<jsp:scriptlet>
@@ -92,7 +92,7 @@
</jsp:scriptlet>
<img border="0" id="#{clientId}:handle:img:collapsed"
- src="#{collapsed}" class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img"
+ src="#{collapsed}" class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img rich-tree-node-handleicon-collapsed"
style="#{this:getHandleCollapsedDisplayStyle(context, component)}" alt="" />
<jsp:scriptlet>
@@ -110,7 +110,7 @@
</jsp:scriptlet>
<span id="#{clientId}:handle:img:expanded"
style="#{this:getHandleExpandedDisplayStyle(context, component)}"
- class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img dr-tree-h-ic-facets">
+ class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img dr-tree-h-ic-facets rich-tree-node-handleicon-expanded">
<jsp:scriptlet>
<![CDATA[
@@ -125,7 +125,7 @@
</jsp:scriptlet>
<img border="0" id="#{clientId}:handle:img:expanded" src="#{expanded}"
style="#{this:getHandleExpandedDisplayStyle(context, component)}"
- class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img" alt="" />
+ class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img rich-tree-node-handleicon-expanded" alt="" />
<jsp:scriptlet>
<![CDATA[
}
@@ -139,6 +139,16 @@
</jsp:scriptlet>
</div>
</td>
+
+ <jsp:scriptlet>
+ <![CDATA[
+ String iconClass = "rich-tree-node-icon";
+ if (component.getUITree().isLeaf()) {
+ iconClass += "-leaf";
+ }
+ variables.setVariable("iconClass",iconClass);
+ ]]>
+ </jsp:scriptlet>
<td
rich:ajaxselectedlistener="#{this:getAjaxSelectedListenerFlag(context, component)}"
rich:draggableoptions="#{this:getDraggableScriptOptions(context, component)}"
@@ -147,7 +157,7 @@
rich:onselected="#{component.attributes['onselected']}"
rich:onexpand="#{component.attributes['onexpand']}"
rich:oncollapse="#{component.attributes['oncollapse']}"
- class="dr-tree-h-ic #{lineFirst}" id="#{clientId}:icon">
+ class="dr-tree-h-ic #{iconClass} #{lineFirst}" id="#{clientId}:icon">
<jsp:scriptlet>
<![CDATA[
if (component.getUITree().isLeaf()) {
@@ -201,7 +211,7 @@
]]>
</jsp:scriptlet>
</td>
- <td class="dr-tree-h-text rich-tree-node #{component.attributes['nodeClass']}"
+ <td class="dr-tree-h-text rich-tree-node-text #{component.attributes['nodeClass']}"
rich:selectedclass="#{selectedClass}" rich:highlightedclass="#{highlightedClass}"
id="#{clientId}:text">
<vcp:body />
18 years, 8 months
JBoss Rich Faces SVN: r2294 - trunk.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-08-16 10:01:25 -0400 (Thu, 16 Aug 2007)
New Revision: 2294
Modified:
trunk/pom.xml
Log:
Eclipse new type comment added
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2007-08-16 14:00:26 UTC (rev 2293)
+++ trunk/pom.xml 2007-08-16 14:01:25 UTC (rev 2294)
@@ -1,176 +1,197 @@
-<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>root</artifactId>
- <packaging>pom</packaging>
- <name>Jboss RichFaces project</name>
- <version>3.1.0-SNAPSHOT</version>
- <url>http://labs.jboss.com/jbossrichfaces</url>
- <dependencies />
- <modules>
- <module>cdk</module>
- <module>framework</module>
- <module>ui</module>
- <module>docs</module>
- <module>ui/assembly</module>
- <module>extensions</module>
- <module>samples</module>
- <!--
- <module>sandbox</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>
- </repositories>
- <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>
- </distributionManagement>
- <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</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/trunk</developerConnection>
- <url>http://anonsvn.jboss.org/repos/richfaces/trunk</url>
- </scm>
- <profiles>
- <profile>
- <id>sandbox</id>
- <modules>
- <module>sandbox</module>
- </modules>
- </profile>
- <profile>
- <id>clover</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clover-plugin</artifactId>
- <configuration>
- <includesAllSourceRoots>
- true
- </includesAllSourceRoots>
- <licenseLocation>
- ${clover.license.path}
- </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>${clover.license.path}</licenseLocation>
- <jdk>1.5</jdk>
- </configuration>
- -->
- </plugin>
- </plugins>
- </reporting>
- </profile>
- </profiles>
+<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>root</artifactId>
+ <packaging>pom</packaging>
+ <name>Jboss RichFaces project</name>
+ <version>3.1.0-SNAPSHOT</version>
+ <url>http://labs.jboss.com/jbossrichfaces</url>
+ <dependencies />
+ <modules>
+ <module>cdk</module>
+ <module>framework</module>
+ <module>ui</module>
+ <module>docs</module>
+ <module>ui/assembly</module>
+ <module>extensions</module>
+ <module>samples</module>
+ <!--
+ <module>sandbox</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>
+ </repositories>
+ <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>
+ </distributionManagement>
+ <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</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/trunk</developerConnection>
+ <url>http://anonsvn.jboss.org/repos/richfaces/trunk</url>
+ </scm>
+ <profiles>
+ <profile>
+ <id>sandbox</id>
+ <modules>
+ <module>sandbox</module>
+ </modules>
+ </profile>
+ <profile>
+ <id>clover</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clover-plugin</artifactId>
+ <configuration>
+ <includesAllSourceRoots>
+ true
+ </includesAllSourceRoots>
+ <licenseLocation>
+ ${clover.license.path}
+ </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>${clover.license.path}</licenseLocation>
+ <jdk>1.5</jdk>
+ </configuration>
+ -->
+ </plugin>
+ </plugins>
+ </reporting>
+ </profile>
+ </profiles>
+<build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <groupId>org.apache.maven.plugins</groupId>
+ <configuration>
+ <additionalConfig>
+ <file>
+ <name>.settings/org.eclipse.jdt.ui.prefs</name>
+ <content>
+ <![CDATA[
+ eclipse.preferences.version=1
+ org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * $${tags}\r\n * <br /><br />\r\n * \r\n * Created $${date}\r\n * @author $${user}\r\n * @since ${project.artifact.selectedVersion.majorVersion}.${project.artifact.selectedVersion.minorVersion}\r\n */\r\n</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * License Agreement.\r\n *\r\n * JBoss RichFaces - Ajax4jsf Component Library\r\n *\r\n * Copyright (C) 2007 Exadel, Inc.\r\n *\r\n * This library is free software; you can redistribute it and/o!
r\r\n * modify it under the terms of the GNU Lesser General Public\r\n * License version 2.1 as published by the Free Software Foundation.\r\n *\r\n * This library is distributed in the hope that it will be useful,\r\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r\n * Lesser General Public License for more details.\r\n *\r\n * You should have received a copy of the GNU Lesser General Public\r\n * License along with this library; if not, write to the Free Software\r\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\r\n */\r\n</template></templates>
+ ]]>
+ </content>
+ </file>
+ </additionalConfig>
+ </configuration>
+ </plugin>
+ </plugins>
+</build>
</project>
\ No newline at end of file
18 years, 8 months
JBoss Rich Faces SVN: r2293 - in trunk/framework: test/src/test/java/org/richfaces/model and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-08-16 10:00:26 -0400 (Thu, 16 Aug 2007)
New Revision: 2293
Modified:
trunk/framework/api/src/main/java/org/richfaces/model/StackingTreeModel.java
trunk/framework/test/src/test/java/org/richfaces/model/StackingTreeDataModelTest.java
Log:
- StackingTreeModel optimized
- StackingTreeModelTest updated
Modified: trunk/framework/api/src/main/java/org/richfaces/model/StackingTreeModel.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/StackingTreeModel.java 2007-08-16 13:00:53 UTC (rev 2292)
+++ trunk/framework/api/src/main/java/org/richfaces/model/StackingTreeModel.java 2007-08-16 14:00:26 UTC (rev 2293)
@@ -74,7 +74,8 @@
return ((StackEntry) stackEntries.getLast()).model;
}
- return null;
+ throw new IllegalStateException(
+ "No tree element available or row key not set!");
}
public boolean isEmpty() {
@@ -99,6 +100,7 @@
while (iterator.hasNext()) {
StackEntry entry = (StackEntry) iterator.next();
if (entry.model != lastModel) {
+ //always true for non-recursive models
lastModel = entry.model;
stack.addFirst(entry);
}
@@ -215,7 +217,7 @@
* @see org.richfaces.model.AbstractTreeDataModel#getTreeNode()
*/
public TreeNode getTreeNode() {
- if (this.rowKey == null || isRowAvailable()) {
+ if (isRowAvailable()) {
return null;
}
@@ -230,10 +232,6 @@
*/
public boolean isLeaf() {
if (isRowAvailable()) {
- if (stackEntries.isEmpty()) {
- return false;
- }
-
StackEntry lastEntry = (StackEntry) stackEntries.getLast();
for (Iterator iterator = lastEntry.model.getInternalModelsIterator(); iterator.hasNext();) {
StackingTreeModel stackingTreeModel = (StackingTreeModel) iterator.next();
@@ -477,10 +475,6 @@
*/
public Object getRowData() {
if (isRowAvailable()) {
- if (stackEntries.isEmpty()) {
- return null;
- }
-
StackEntry lastEntry = (StackEntry) stackEntries.getLast();
return lastEntry.model.rowData;
}
Modified: trunk/framework/test/src/test/java/org/richfaces/model/StackingTreeDataModelTest.java
===================================================================
--- trunk/framework/test/src/test/java/org/richfaces/model/StackingTreeDataModelTest.java 2007-08-16 13:00:53 UTC (rev 2292)
+++ trunk/framework/test/src/test/java/org/richfaces/model/StackingTreeDataModelTest.java 2007-08-16 14:00:26 UTC (rev 2293)
@@ -143,6 +143,9 @@
assertTrue(this.stackingTreeModel.isRowAvailable());
assertNotNull(this.stackingTreeModel.getRowData());
+ assertNull(this.stackingTreeModel.getTreeNode());
+ assertFalse(this.stackingTreeModel.isLeaf());
+
this.stackingTreeModel.setRowKey(new ListRowKey(new StackingTreeModel.Key("project", "projectAAAAA")));
assertFalse(this.stackingTreeModel.isRowAvailable());
try {
@@ -151,6 +154,20 @@
} catch (Exception e) {
}
+
+ try {
+ this.stackingTreeModel.isLeaf();
+ fail();
+ } catch (Exception e) {
+
+ }
+
+ try {
+ this.stackingTreeModel.getTreeNode();
+ fail();
+ } catch (Exception e) {
+
+ }
}
public void testActiveData() throws Exception {
18 years, 8 months
JBoss Rich Faces SVN: r2292 - trunk/docs.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-08-16 09:00:53 -0400 (Thu, 16 Aug 2007)
New Revision: 2292
Modified:
trunk/docs/pom.xml
Log:
deleted ajaxguide module
Modified: trunk/docs/pom.xml
===================================================================
--- trunk/docs/pom.xml 2007-08-16 12:54:25 UTC (rev 2291)
+++ trunk/docs/pom.xml 2007-08-16 13:00:53 UTC (rev 2292)
@@ -74,6 +74,5 @@
<module>maven-docbook-plugin</module>
-->
<module>userguide</module>
- <module>ajaxguide</module>
</modules>
</project>
\ No newline at end of file
18 years, 8 months
JBoss Rich Faces SVN: r2291 - in trunk/docs: userguide/en/src/main/resources/css and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-08-16 08:54:25 -0400 (Thu, 16 Aug 2007)
New Revision: 2291
Added:
trunk/docs/userguide/en/src/main/resources/script/
trunk/docs/userguide/en/src/main/resources/script/toggle.js
trunk/docs/xslt/en/src/main/xslt/collapsing-navigation.xsl
Modified:
trunk/docs/userguide/en/src/main/resources/css/html.css
trunk/docs/xslt/en/src/main/xslt/html.xsl
Log:
RF-600
Modified: trunk/docs/userguide/en/src/main/resources/css/html.css
===================================================================
--- trunk/docs/userguide/en/src/main/resources/css/html.css 2007-08-16 12:53:34 UTC (rev 2290)
+++ trunk/docs/userguide/en/src/main/resources/css/html.css 2007-08-16 12:54:25 UTC (rev 2291)
@@ -337,3 +337,13 @@
SPAN.java16 {
FONT-SIZE: 8pt; COLOR: #646464; LINE-HEIGHT: 10px
}
+
+.expand_collapse_toc {
+ clear:both;
+ float:left;
+ font-family:monospace;
+ width:20px;
+ color: #2A7BD4;
+ cursor: pointer;
+}
+
Added: trunk/docs/userguide/en/src/main/resources/script/toggle.js
===================================================================
--- trunk/docs/userguide/en/src/main/resources/script/toggle.js (rev 0)
+++ trunk/docs/userguide/en/src/main/resources/script/toggle.js 2007-08-16 12:54:25 UTC (rev 2291)
@@ -0,0 +1,43 @@
+function dbToggle(node, expandText, collapseText) {
+ var dt = node.parentNode;
+ if (dt.nodeName.toLowerCase() == 'dt') {
+ var dd = dt.nextSibling;
+
+ if (dd && dd.nodeName.toLowerCase() == 'dd') {
+
+ if (dd.style && dd.style.display == 'none') {
+ dd.style.display = '';
+ node.innerHTML = collapseText;
+ } else {
+ dd.style.display = 'none';
+ node.innerHTML = expandText;
+ }
+
+ }
+
+ }
+
+}
+
+var toc = {
+ expand: function(node) {
+ toc.show(toc.findDD(node))
+ toc.hide(node);
+ toc.show(node.nextSibling);
+ },
+ collapse : function(node) {
+ toc.hide(toc.findDD(node))
+ toc.hide(node);
+ toc.show(node.previousSibling);
+ },
+ findDD : function(node) {
+ return node.parentNode.nextSibling;
+ },
+
+ hide: function(node) {
+ node.style.display = "none";
+ },
+ show: function(node) {
+ node.style.display = "";
+ }
+};
\ No newline at end of file
Added: trunk/docs/xslt/en/src/main/xslt/collapsing-navigation.xsl
===================================================================
--- trunk/docs/xslt/en/src/main/xslt/collapsing-navigation.xsl (rev 0)
+++ trunk/docs/xslt/en/src/main/xslt/collapsing-navigation.xsl 2007-08-16 12:54:25 UTC (rev 2291)
@@ -0,0 +1,199 @@
+<!DOCTYPE xsl:stylesheet>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0" xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ exclude-result-prefixes="#default">
+
+ <xsl:template name="subtoc">
+ <xsl:param name="toc-context" select="." />
+ <xsl:param name="nodes" select="NOT-AN-ELEMENT" />
+
+ <xsl:variable name="toc.mark">
+ <xsl:apply-templates mode="toc.mark" select="." />
+ </xsl:variable>
+
+ <xsl:variable name="should.collapse.list"
+ select="string-length(string($toc.mark)) > 0">
+ </xsl:variable>
+
+ <xsl:variable name="toc.on.plus.mark">
+ <xsl:choose>
+ <xsl:when test="$should.collapse.list">
+ <xsl:copy-of select="$toc.mark"></xsl:copy-of>
+ </xsl:when>
+ <xsl:otherwise>
+ <span class="expand_collapse_toc" style="visibility:hidden;">  </span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="nodes.plus" select="$nodes | qandaset" />
+
+ <xsl:variable name="subtoc">
+ <xsl:element name="{$toc.list.type}">
+ <xsl:choose>
+ <xsl:when test="$qanda.in.toc != 0">
+ <xsl:apply-templates mode="toc"
+ select="$nodes.plus">
+ <xsl:with-param name="toc-context"
+ select="$toc-context" />
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="toc"
+ select="$nodes">
+ <xsl:with-param name="toc-context"
+ select="$toc-context" />
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:element>
+ </xsl:variable>
+
+ <xsl:variable name="depth">
+ <xsl:choose>
+ <xsl:when test="local-name(.) = 'section'">
+ <xsl:value-of select="count(ancestor::section) + 1" />
+ </xsl:when>
+ <xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
+ <xsl:when test="local-name(.) = 'sect2'">2</xsl:when>
+ <xsl:when test="local-name(.) = 'sect3'">3</xsl:when>
+ <xsl:when test="local-name(.) = 'sect4'">4</xsl:when>
+ <xsl:when test="local-name(.) = 'sect5'">5</xsl:when>
+ <xsl:when test="local-name(.) = 'refsect1'">1</xsl:when>
+ <xsl:when test="local-name(.) = 'refsect2'">2</xsl:when>
+ <xsl:when test="local-name(.) = 'refsect3'">3</xsl:when>
+ <xsl:when test="local-name(.) = 'simplesect'">
+ <!-- sigh... -->
+ <xsl:choose>
+ <xsl:when test="local-name(..) = 'section'">
+ <xsl:value-of
+ select="count(ancestor::section)" />
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'sect1'">
+ 2
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'sect2'">
+ 3
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'sect3'">
+ 4
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'sect4'">
+ 5
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'sect5'">
+ 6
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'refsect1'">
+ 2
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'refsect2'">
+ 3
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'refsect3'">
+ 4
+ </xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="depth.from.context"
+ select="count(ancestor::*)-count($toc-context/ancestor::*)" />
+
+ <xsl:variable name="subtoc.list">
+ <xsl:choose>
+ <xsl:when test="$toc.dd.type = ''">
+ <xsl:copy-of select="$subtoc" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:element name="{$toc.dd.type}">
+ <xsl:if test="$should.collapse.list">
+ <xsl:attribute name="style">display:none;</xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="$subtoc" />
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+
+ <xsl:element name="{$toc.listitem.type}">
+
+ <xsl:copy-of select="$toc.on.plus.mark"></xsl:copy-of>
+ <xsl:call-template name="toc.line">
+ <xsl:with-param name="toc-context"
+ select="$toc-context" />
+ </xsl:call-template>
+
+ <xsl:if
+ test="$toc.listitem.type = 'li'
+ and $toc.section.depth > $depth and
+ ( ($qanda.in.toc = 0 and count($nodes)>0) or
+ ($qanda.in.toc != 0 and count($nodes.plus)>0) )
+ and $toc.max.depth > $depth.from.context">
+ <xsl:copy-of select="$subtoc.list" />
+ </xsl:if>
+ </xsl:element>
+ <xsl:if
+ test="$toc.listitem.type != 'li'
+ and $toc.section.depth > $depth and
+ ( ($qanda.in.toc = 0 and count($nodes)>0) or
+ ($qanda.in.toc != 0 and count($nodes.plus)>0) )
+ and $toc.max.depth > $depth.from.context">
+ <xsl:copy-of select="$subtoc.list" />
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="section|chapter" mode="toc.mark">
+ <xsl:variable name="subchapters">
+ <xsl:apply-templates select="child::section" mode="toc" />
+ </xsl:variable>
+
+ <xsl:if test="string-length(string($subchapters))">
+ <xsl:call-template name="toggle.expand.mark" />
+ <xsl:call-template name="toggle.collapse.mark" />
+ </xsl:if>
+
+ </xsl:template>
+
+ <xsl:template match="*" mode="toc.mark">
+
+ </xsl:template>
+
+ <xsl:template name="user.head.content">
+ <xsl:param name="node" select="." />
+ <script type="text/javascript" src="script/toggle.js"></script>
+ </xsl:template>
+
+ <xsl:template name="toggle.expand.mark">
+ <xsl:param name="visible" select="true()"/>
+ <span onclick="toc.expand(this)" class="expand_collapse_toc">
+ <xsl:call-template name="render.display">
+ <xsl:with-param name="visible" select="$visible" />
+ </xsl:call-template>
+ <xsl:text>+</xsl:text>
+ </span>
+ </xsl:template>
+
+ <xsl:template name="toggle.collapse.mark">
+ <xsl:param name="visible" select="false()"/>
+ <span onclick="toc.collapse(this)" class="expand_collapse_toc">
+ <xsl:call-template name="render.display">
+ <xsl:with-param name="visible" select="$visible" />
+ </xsl:call-template>
+ <xsl:text>-</xsl:text>
+ </span>
+ </xsl:template>
+
+ <xsl:template name="render.display">
+ <xsl:param name="visible" select="false()"/>
+ <xsl:attribute name="style">
+ <xsl:if test="not($visible)">display:none;</xsl:if>
+ </xsl:attribute>
+ </xsl:template>
+
+
+</xsl:stylesheet>
Modified: trunk/docs/xslt/en/src/main/xslt/html.xsl
===================================================================
--- trunk/docs/xslt/en/src/main/xslt/html.xsl 2007-08-16 12:53:34 UTC (rev 2290)
+++ trunk/docs/xslt/en/src/main/xslt/html.xsl 2007-08-16 12:54:25 UTC (rev 2291)
@@ -22,8 +22,8 @@
version="1.0"
xmlns="http://www.w3.org/TR/xhtml1/transitional"
exclude-result-prefixes="#default">
-
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
+<xsl:include href="./collapsing-navigation.xsl"></xsl:include>
<!--###################################################
HTML Settings
@@ -81,6 +81,6 @@
procedure before
</xsl:param>
<xsl:template match="section[@role = 'NotInToc']//*" mode="toc" />
- <xsl:template match="chapter[@role = 'NotInToc']//section//*" mode="toc" />
-
+ <xsl:template match="chapter[@role = 'NotInToc']//section//*" mode="toc" />
+
</xsl:stylesheet>
18 years, 8 months
JBoss Rich Faces SVN: r2290 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-08-16 08:53:34 -0400 (Thu, 16 Aug 2007)
New Revision: 2290
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml
Log:
fixed error with title
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml 2007-08-16 12:30:13 UTC (rev 2289)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml 2007-08-16 12:53:34 UTC (rev 2290)
@@ -124,6 +124,7 @@
</emphasis> used by the dataTable to your page style sheets</listitem>
</itemizedlist>
</section>
+
<section>
<title>Definition custom Style Classes:</title>
<figure>
@@ -135,7 +136,7 @@
</mediaobject>
</figure>
<para>On the screenshot there are class names defining the marked elements.</para>
- <title/>
+
<table>
<title>Component skin classes</title>
<tgroup cols="2">
18 years, 8 months
JBoss Rich Faces SVN: r2289 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-08-16 08:30:13 -0400 (Thu, 16 Aug 2007)
New Revision: 2289
Modified:
trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml
Log:
http://jira.jboss.com/jira/browse/RF-603 - added info about using "controlSeparator" facet; corrected description.
Modified: trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml 2007-08-16 12:04:31 UTC (rev 2288)
+++ trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml 2007-08-16 12:30:13 UTC (rev 2289)
@@ -74,15 +74,15 @@
<section>
<title>Details of Usage</title>
<para>The <emphasis role="bold">
- <property><rich:Datascroller></property>
- </emphasis> component provides table scrolling functionality the same as tomahawk scroller but
+ <property><rich:Datascroller></property>
+ </emphasis> component provides table scrolling functionalitity the same as tomahawk scroller but
with Ajax requests usage.</para>
<para>The component should be placed into footer of the parent table or be bound to it with the <emphasis>
- <property>"for"</property>
- </emphasis> attribute.</para>
+ <property>"for"</property>
+ </emphasis> attribute.</para>
<para>The table should also have the defined <emphasis>
- <property>"rows"</property>
- </emphasis> attribute limiting the quantity of inputted table rows.</para>
+ <property>"rows"</property>
+ </emphasis> attribute limiting the quantity of inputted table rows.</para>
<para>The scroller could limit the maximum quantity of rendered links on the table pages with
the help of the <emphasis>
<property>"maxPages"</property>
@@ -91,8 +91,8 @@
<itemizedlist>
<listitem>Page numbers for switching onto a particular page</listitem>
<listitem>The controls of fast switching: <emphasis>
- <property>"first",</property>
- </emphasis>
+ <property>"first",</property>
+ </emphasis>
<emphasis>
<property>"last",</property>
</emphasis>
@@ -111,7 +111,7 @@
</itemizedlist>
<para>The controls of fast switching are created adding the facets component with the
corresponding name:</para>
-
+
<para>
<emphasis role="bold">Example:</emphasis>
</para>
@@ -126,9 +126,18 @@
</rich:Datascroller>
...
]]></programlisting>
+ <figure>
+ <title>Datascroller controls</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/datascroller2.gif"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The screenshot shows one controller from each group.</para>
<para> There are also facets used to create the disabled states: <emphasis>
- <property>"first_disabled",</property>
- </emphasis>
+ <property>"first_disabled",</property>
+ </emphasis>
<emphasis>
<property>"last_disabled",</property>
</emphasis>
@@ -144,32 +153,21 @@
<emphasis>
<property>"fastrewind_disabled"</property>
</emphasis>. </para>
- <figure>
- <title>Datascroller controls</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/datascroller2.gif"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The screenshot shows one controller from each group.</para>
<para>For the <emphasis>
- <property>"fastforward"</property>
- </emphasis>/<emphasis>
- <property>"rewind"</property>
- </emphasis> controls customization the additional <emphasis>
- <property>"fastStep"</property>
- </emphasis> attribute is used. The attribute indicates pages quantity to switch onto when fast
+ <property>"fastforward"/"fastrewind"</property>
+ </emphasis> controls customization the additional <emphasis>
+ <property>"fastStep"</property>
+ </emphasis> attribute is used. The attribute indicates pages quantity to switch onto when fast
scrolling is used. </para>
<para>The <emphasis>
- <property>"pageIndexVar"</property>
- </emphasis> and <emphasis>
- <property>"pagesVar"</property>
- </emphasis> attributes provide an ability to show the current page and the number of pages in
- the dataScroller. These attributes are used for definition the names of variables, that wiil
+ <property>"pageIndexVar"</property>
+ </emphasis> and <emphasis>
+ <property>"pagesVar"</property>
+ </emphasis> attributes provide an ability to show the current page and the number of pages in
+ the dataScroller. These attributes are used for definition the names of variables, that will
be used in the facet with name<emphasis>
- <property>"pages"</property>
- </emphasis>.An example can be found below: </para>
+ <property>"pages".</property>
+ </emphasis> An example can be found below: </para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
@@ -190,8 +188,16 @@
</h:form>
...
]]></programlisting>
-
-
+ <para> It's possible to insert optional separators between controls. For this purpose use a <emphasis>
+ <property>"controlSeparator"</property>
+ </emphasis> facet. An example is placed below. </para>
+ <programlisting role="XML"><![CDATA[ ...
+ <f:facet name="controlSeparator">
+ <h:graphicImage value="/image/sep.gif"/>
+ </f:facet>
+...
+]]></programlisting>
+
</section>
<section>
<title>Look-and-Feel Customization</title>
18 years, 8 months
JBoss Rich Faces SVN: r2288 - in trunk: samples/modalpanel-sample/src/main/webapp/pages and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-08-16 08:04:31 -0400 (Thu, 16 Aug 2007)
New Revision: 2288
Modified:
trunk/samples/modalpanel-sample/src/main/java/org/richfaces/Bean.java
trunk/samples/modalpanel-sample/src/main/webapp/pages/index.jsp
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js
Log:
RF-483 fixed
Modified: trunk/samples/modalpanel-sample/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/samples/modalpanel-sample/src/main/java/org/richfaces/Bean.java 2007-08-16 10:57:29 UTC (rev 2287)
+++ trunk/samples/modalpanel-sample/src/main/java/org/richfaces/Bean.java 2007-08-16 12:04:31 UTC (rev 2288)
@@ -47,4 +47,12 @@
public void setContainerRendered(boolean containerRendered) {
this.containerRendered = containerRendered;
}
+
+ private int counter = 0;
+
+ public int getCounter() {
+ counter++;
+ System.out.println(counter);
+ return counter;
+ }
}
\ No newline at end of file
Modified: trunk/samples/modalpanel-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/modalpanel-sample/src/main/webapp/pages/index.jsp 2007-08-16 10:57:29 UTC (rev 2287)
+++ trunk/samples/modalpanel-sample/src/main/webapp/pages/index.jsp 2007-08-16 12:04:31 UTC (rev 2288)
@@ -23,7 +23,7 @@
<body style="text-align: center;">
<f:view>
<h:form id="_form">
-
+
<h:selectOneMenu>
<f:selectItem itemLabel="item1" itemValue="item1" />
<f:selectItem itemLabel="item2" itemValue="item2" />
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-08-16 10:57:29 UTC (rev 2287)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-08-16 12:04:31 UTC (rev 2288)
@@ -9,6 +9,20 @@
sizeA = 4;
sizeB = 40;
+function discardElement(element) {
+ var garbageBin = document.getElementById('IELeakGarbageBin');
+ if (!garbageBin) {
+ garbageBin = document.createElement('DIV');
+ garbageBin.id = 'IELeakGarbageBin';
+ garbageBin.style.display = 'none';
+ document.body.appendChild(garbageBin);
+ }
+
+ // move the element to the garbage bin
+ garbageBin.appendChild(element);
+ garbageBin.innerHTML = '';
+}
+
ModalPanel = Class.create();
{
@@ -39,9 +53,7 @@
while (i < ModalPanel.panels.length) {
var panel = ModalPanel.panels[i];
- var elt = $(panel.markerId);
-
- if (Element.isUninitialized(elt)) {
+ if (Element.isUninitialized(panel.markerId)) {
panel.destroy();
ModalPanel.panels.splice(i, 1);
@@ -92,8 +104,9 @@
ModalPanel.prototype = {
initialize: function(id, options) {
- this.markerId = id;
+ this.markerId = $(id);
+
this.id = id + "Container";
this.options = options;
@@ -132,7 +145,7 @@
this.header = new ModalPanel.Border(id + "Header", this, "move", ModalPanel.Header);
}
- $(this.id).modalPanel = this;
+ this.markerId.modalPanel = this;
var eDiv = $(this.div);
if (eDiv.style.setExpression)
@@ -169,8 +182,8 @@
this.eventFirstOnfocus = this.firstOnfocus.bindAsEventListener(this);
this.eventLastOnfocus = this.lastOnfocus.bindAsEventListener(this);
- this.firstHref = this.markerId + "FirstHref";
- this.lastHref = this.markerId + "LastHref";
+ this.firstHref = this.id + "FirstHref";
+ this.lastHref = this.id + "LastHref";
this.selectBehavior = options.selectBehavior;
},
@@ -178,14 +191,30 @@
destroy: function() {
this.traverseSelects(true);
+
+ this.parent = null;
+ this.firstOutside = null;
+ this.lastOutside = null;
+ if (this.header) {
+ this.header.destroy();
+ this.header=null;
+ }
+ for (var k = 0; k < this.borders.length; k++ ) {
+ this.borders[k].destroy();
+ }
+ this.borders = null;
+
if (this.floatedToBody) {
var element = $(this.id);
var parent = element.parentNode;
if (parent) {
parent.removeChild(element);
+ discardElement(element);
}
}
+ this.markerId.modalPanel = null;
+ this.markerId = null;
},
initIframe : function() {
@@ -413,17 +442,18 @@
var eIframe;
if (ModalPanel.disableSelects && !this.iframe) {
new Insertion.Top(eCdiv,
- "<iframe src=\"javascript:''\" frameborder=\"0\" scrolling=\"no\" id=\"" + this.markerId + "IFrame\"" +
+ "<iframe src=\"javascript:''\" frameborder=\"0\" scrolling=\"no\" id=\"" + this.id + "IFrame\"" +
"style=\"position: absolute; width: 1px; height: 1px; background-color: white; overflow-y: hidden; z-index: 1;\">" +
"</iframe>");
- this.iframe = this.markerId + "IFrame";
+ this.iframe = this.id + "IFrame";
eIframe = $(this.iframe);
//alert("IFrame:" + eIframe + "created!");
- eIframe.onload = this.initIframe.bind(eIframe);
+ //eIframe.onload = this.initIframe.bind(eIframe);
+ Event.observe(eIframe, 'load', this.initIframe.bindAsEventListener(eIframe));
}
var options = {};
@@ -772,8 +802,8 @@
if (e && target) {
var input = document.createElement("input");
input.type = "hidden";
- input.id = this.markerId + "OpenedState";
- input.name = this.markerId + "OpenedState";
+ input.id = this.id + "OpenedState";
+ input.name = this.id + "OpenedState";
input.value = this.shown ? "true" : "false";
target.appendChild(input);
@@ -782,8 +812,8 @@
for (var i = 0; i < keys.length; i++) {
input = document.createElement("input");
input.type = "hidden";
- input.id = this.markerId + "StateOption_" + keys[i];
- input.name = this.markerId + "StateOption_" + keys[i];
+ input.id = this.id + "StateOption_" + keys[i];
+ input.name = this.id + "StateOption_" + keys[i];
input.value = this.userOptions[keys[i]];
target.appendChild(input);
@@ -802,14 +832,14 @@
for (var i = 0; i < ModalPanel.panels.length; i++ ) {
var pnl = ModalPanel.panels[i];
if (pnl && pnl.markerId) {
- var pnlId = pnl.markerId;
+ var pnlId = pnl.markerId.id;
if (pnlId) {
//try to match ids
if (pnlId.length >= prefId.length) {
var substr = pnlId.substring(pnlId.length - prefId.length, pnlId.length);
if (substr == prefId) {
- return pnl.id;
+ return pnl.markerId;
}
}
}
@@ -819,17 +849,17 @@
}
Richfaces.showModalPanel = function (id, opts) {
- var panel = $(id + "Container");
+ var panel = $(id);
if (!panel) {
- panel = $(Richfaces.findModalPanel(id));
+ panel = Richfaces.findModalPanel(id);
}
panel.modalPanel.show(opts);
}
Richfaces.hideModalPanel = function (id, opts) {
- var panel = $(id + "Container");
+ var panel = $(id);
if (!panel) {
- panel = $(Richfaces.findModalPanel(id));
+ panel = Richfaces.findModalPanel(id);
}
panel.modalPanel.hide(opts);
}
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js 2007-08-16 10:57:29 UTC (rev 2287)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js 2007-08-16 12:04:31 UTC (rev 2288)
@@ -6,7 +6,8 @@
var element = $(id);
element.style.cursor = cursor;
- $(id).onmousedown = this.startDrag.bindAsEventListener(this);
+ //$(id).onmousedown = this.startDrag.bindAsEventListener(this);
+ Event.observe($(id), 'mousedown', this.startDrag.bindAsEventListener(this));
this.modalPanel = modalPanel;
this.sizer = sizer;
@@ -14,6 +15,11 @@
this.boundDoDrag = this.doDrag.bindAsEventListener(this);
this.boundEndDrag = this.endDrag.bindAsEventListener(this);
},
+
+ destroy: function()
+ {
+ this.modalPanel=null;
+ },
show: function() {
Element.show(this.id);
@@ -107,6 +113,7 @@
$(this.modalPanel.cursorDiv).style.zIndex = -200;
document.onselectstart = this.onselectStartHandler;
+ this.onselectStartHandler = null;
},
doPosition: function() {
18 years, 8 months