From bridges-commits-returnlarry25@example.org Mon Aug 07 13:49:12 2006 Return-Path: <bridges-commits-returnlarry25@example.org> Delivered-To: larry25@example.org Received: (qmail 18024 invoked from network); 7 Aug 2006 13:49:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 7 Aug 2006 13:49:12 -0000 Received: (qmail 62629 invoked by uid 500); 7 Aug 2006 13:49:05 -0000 Delivered-To: larry25@example.org Received: (qmail 62581 invoked by uid 500); 7 Aug 2006 13:49:05 -0000 Mailing-List: contact larry25@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:larry25@example.org> List-Unsubscribe: <mailto:larry25@example.org> List-Post: <mailto:larry25@example.org> List-Id: <bridges-commits.portals.apache.org> Reply-To: larry25@example.org Delivered-To: mailing list larry25@example.org Delivered-To: moderator for larry25@example.org Received: (qmail 83621 invoked by uid 99); 7 Aug 2006 12:13:13 -0000 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r429313 [1/2] - in /portals/bridges/trunk/applications/springmvc: ./ src/ src/java/ src/java/org/ src/java/org/apache/ src/java/org/apache/portals/ src/java/org/apache/portals/applications/ src/java/org/apache/portals/applications/springmvc... Date: Mon, 07 Aug 2006 12:12:41 -0000 To: larry25@example.org From: larry25@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <larry25@example.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: smilek Date: Mon Aug 7 05:12:38 2006 New Revision: 429313 URL: http://svn.apache.org/viewvc?rev=429313&view=rev Log: spring mvc portlet demo - XML viewer which which uses dojo widgets TabContainer and Tree Added: portals/bridges/trunk/applications/springmvc/ portals/bridges/trunk/applications/springmvc/.classpath portals/bridges/trunk/applications/springmvc/.project portals/bridges/trunk/applications/springmvc/project.properties portals/bridges/trunk/applications/springmvc/project.xml portals/bridges/trunk/applications/springmvc/src/ portals/bridges/trunk/applications/springmvc/src/java/ portals/bridges/trunk/applications/springmvc/src/java/log4j.properties portals/bridges/trunk/applications/springmvc/src/java/messages.properties portals/bridges/trunk/applications/springmvc/src/java/messages_de.properties portals/bridges/trunk/applications/springmvc/src/java/org/ portals/bridges/trunk/applications/springmvc/src/java/org/apache/ portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/ portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/ portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/ portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTree.java portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreeDeleteController.java portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreePrefsController.java portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreePrefsListController.java portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreeService.java portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreeViewController.java portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/resources/ portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/resources/DOMTree.properties portals/bridges/trunk/applications/springmvc/src/java/views.properties portals/bridges/trunk/applications/springmvc/src/webapp/ portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/ portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/context/ portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/context/applicationContext.xml portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/context/portlet/ portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/context/portlet/domtree.xml portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/data/ portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/data/test.xml portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/domtree.properties portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/dtd/ portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/dtd/spring-beans.dtd portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jetspeed-portlet.xml portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jsp/ portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jsp/dojo-includes.jsp portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jsp/domTreeEdit.jsp portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jsp/domTreeEditList.jsp portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jsp/include.jsp portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/portlet.xml portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/tags/ portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/tags/c.tld portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/tags/fmt.tld portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/tags/fn.tld portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/tags/html/ portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/tags/html/attributes.tag portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/tags/html/errors.tag portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/tags/html/imagesPath.tag portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/tags/html/include.jsp portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/tags/html/input.tag portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/tags/html/rootPath.tag portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/tags/html/textarea.tag portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/tags/portlet.tld portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/tags/spring.tld portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/view/ portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/view/dojo-includes.vm portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/view/domTreeView.vm portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/web.xml portals/bridges/trunk/applications/springmvc/src/webapp/images/ portals/bridges/trunk/applications/springmvc/src/webapp/images/delete.png (with props) portals/bridges/trunk/applications/springmvc/src/webapp/images/edit.png (with props) portals/bridges/trunk/applications/springmvc/src/webapp/images/new.png (with props) portals/bridges/trunk/applications/springmvc/src/webapp/images/note.gif (with props) portals/bridges/trunk/applications/springmvc/src/webapp/images/plus.gif (with props) portals/bridges/trunk/applications/springmvc/src/webapp/images/removesmall.gif (with props) Added: portals/bridges/trunk/applications/springmvc/.classpath URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/.classpath?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/.classpath (added) +++ portals/bridges/trunk/applications/springmvc/.classpath Mon Aug 7 05:12:38 2006 @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src/java"/> + <classpathentry exported="true" kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.3.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/jstl/jars/jstl-1.0.6.jar"/> + <classpathentry exported="true" kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.8.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/taglibs/jars/standard-1.0.6.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/org.springframework/jars/spring-beans-2.0-m4.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/org.springframework/jars/spring-context-2.0-m4.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/org.springframework/jars/spring-core-2.0-m4.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/org.springframework/jars/spring-portlet-2.0-m4.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/org.springframework/jars/spring-web-2.0-m4.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/org.springframework/jars/spring-webmvc-2.0-m4.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/portlet-api/jars/portlet-api-1.0.jar"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="var" path="MAVEN_REPO/org.springframework/jars/spring-mock-2.0-m4.jar"/> + <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"/> + <classpathentry kind="output" path="bin"/> +</classpath> Added: portals/bridges/trunk/applications/springmvc/.project URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/.project?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/.project (added) +++ portals/bridges/trunk/applications/springmvc/.project Mon Aug 7 05:12:38 2006 @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>springmvc-demo</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> Added: portals/bridges/trunk/applications/springmvc/project.properties URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/project.properties?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/project.properties (added) +++ portals/bridges/trunk/applications/springmvc/project.properties Mon Aug 7 05:12:38 2006 @@ -0,0 +1,23 @@ +# Copyright 2004 The Apache Software Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# $Id: project.properties 187283 2004-08-17 20:03:06Z dlestrat $ +# + +maven.multiproject.type=war +maven.license.licenseFile=${basedir}/../../LICENSE.TXT + +org.apache.jetspeed.portlet.app.name = springmvc-demo + +jetspeed.version = 2.1-dev Added: portals/bridges/trunk/applications/springmvc/project.xml URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/project.xml?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/project.xml (added) +++ portals/bridges/trunk/applications/springmvc/project.xml Mon Aug 7 05:12:38 2006 @@ -0,0 +1,184 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + $Id$ +--> +<project> + <pomVersion>3</pomVersion> + <artifactId>springmvc-demo</artifactId> + <name>Spring Portlet Jetspeed Application</name> + <currentVersion>1.0</currentVersion> + + <dependencies> + + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-beans</artifactId> + <version>2.0-m4</version> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + <version>2.0-m4</version> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-core</artifactId> + <version>2.0-m4</version> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-portlet</artifactId> + <version>2.0-m4</version> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-web</artifactId> + <version>2.0-m4</version> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-webmvc</artifactId> + <version>2.0-m4</version> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-mock</artifactId> + <version>2.0-m4</version> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + + <!-- jstl support --> + <dependency> + <groupId>jstl</groupId> + <artifactId>jstl</artifactId> + <version>1.0.6</version> + <type>jar</type> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>taglibs</groupId> + <artifactId>standard</artifactId> + <version>1.0.6</version> + <type>jar</type> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <id>log4j</id> + <version>1.2.8</version> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.0.4</version> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <id>commons-collections</id> + <version>3.0</version> + <type>jar</type> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + + <dependency> + <id>portlet-api</id> + <version>1.0</version> + <properties> + <war.bundle>false</war.bundle> + </properties> + </dependency> + <dependency> + <id>junit</id> + <version>3.8.1</version> + <properties> + <war.bundle>false</war.bundle> + </properties> + </dependency> + + <dependency> + <groupId>org.apache.portals.jetspeed-2</groupId> + <artifactId>portals-gems</artifactId> + <version>${jetspeed.version}</version> + <type>jar</type> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + + <!-- Velocity --> + <dependency> + <id>velocity</id> + <version>1.4</version> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + <dependency> + <id>velocity-tools</id> + <version>1.1</version> + <url>http://jakarta.apache.org/velocity</url> + <properties> + <war.bundle>true</war.bundle> + </properties> + </dependency> + + </dependencies> + + <!-- build information for the project --> + + <build> + <sourceDirectory>src/java</sourceDirectory> + <unitTestSourceDirectory>src/test</unitTestSourceDirectory> + <unitTest> + <includes> + <include>**/*Test.java</include> + </includes> + <excludes> + <exclude>**/NaughtyTest.java</exclude> + </excludes> + </unitTest> + <resources> + <resource> + <directory>${basedir}/src/java</directory> + <excludes> + <exclude>**/*.java</exclude> + </excludes> + <includes> + <include>**/*.vm</include> + <include>**/*.xml</include> + <include>**/*.properties</include> + </includes> + </resource> + </resources> + </build> +</project> Added: portals/bridges/trunk/applications/springmvc/src/java/log4j.properties URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/java/log4j.properties?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/java/log4j.properties (added) +++ portals/bridges/trunk/applications/springmvc/src/java/log4j.properties Mon Aug 7 05:12:38 2006 @@ -0,0 +1,17 @@ +#log4j.debug=TRUE + +#log4j.rootLogger=FATAL, stdout +#log4j.rootLogger=ERROR, stdout +log4j.rootLogger=WARN, stdout +#log4j.rootLogger=INFO, stdout +#log4j.rootLogger=DEBUG, stdout + +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n + +# spring portlet mvc classes +log4j.logger.org.springframework.web.portlet=DEBUG + +# spring portlet mvc sample classes +log4j.logger.org.springframework.web.portlet.sample=DEBUG Added: portals/bridges/trunk/applications/springmvc/src/java/messages.properties URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/java/messages.properties?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/java/messages.properties (added) +++ portals/bridges/trunk/applications/springmvc/src/java/messages.properties Mon Aug 7 05:12:38 2006 @@ -0,0 +1,23 @@ + +required=Required +required.java.util.Date=A date of the form 'MM/dd/yyyy' is required + +typeMismatch=Invalid Data Entry +typeMismatch.java.lang.Integer=Must be a number +typeMismatch.java.util.Date=Must be of the form 'MM/dd/yyyy' + +button.home=Home +button.edit=Edit + +exception.generalError.title=General Error + +exception.notAuthorized.title=Access Not Permitted +exception.notAuthorized.message=You do not have permission to access this area. + +exception.notAvailable.title=Resource Not Available +exception.notAvailable.message=That resource is not available. + +exception.contactAdmin=Please contact your System Administrator for assistance. + +portlet.exceptions.title=Sample Exceptions +portlet.exceptions.message=This portlet lets you see what uncaught exceptions will look like in your portlet. Select one of the exceptions below in order to throw it. Added: portals/bridges/trunk/applications/springmvc/src/java/messages_de.properties URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/java/messages_de.properties?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/java/messages_de.properties (added) +++ portals/bridges/trunk/applications/springmvc/src/java/messages_de.properties Mon Aug 7 05:12:38 2006 @@ -0,0 +1,15 @@ + +# Apologies to those fluent in German -- these translations are straight from BabelFish and are only for demonstration purposes. + +exception.generalError.title=Allgemeine Störung + +exception.notAuthorized.title=Zugang Nicht Die Erlaubnis Gehabt +exception.notAuthorized.message=Sie haben nicht Erlaubnis, diesen Bereich zugänglich zu machen. + +exception.notAvailable.title=Hilfsmittel Nicht Vorhanden +exception.notAvailable.message=Dieses Hilfsmittel ist nicht vorhanden. + +exception.contactAdmin=Treten Sie bitte mit Ihrem Systemverwalter für Unterstützung in Verbindung. + +portlet.exceptions.title=Beispielausnahmen +portlet.exceptions.message=Dieses portlet läßt Sie sehen, welche uncaught Ausnahmen wie in Ihrem portlet aussehen. Wählen Sie eine der Ausnahmen unten vor, um sie zu werfen. Added: portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTree.java URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTree.java?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTree.java (added) +++ portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTree.java Mon Aug 7 05:12:38 2006 @@ -0,0 +1,110 @@ +package org.apache.portals.applications.springmvc; + +import java.io.Serializable; +import java.lang.Comparable; + +public class DOMTree implements Comparable, Serializable +{ + private static final long serialVersionUID = 1L; + + private String name; + private String path; + private org.w3c.dom.Document doc; + private String message; + + private int hashCode = Integer.MIN_VALUE; + + + public DOMTree() + { + super(); + } + + public DOMTree( String name, String path ) + { + super(); + setName( name ); + setPath( path ); + } + + public String getName() + { + return name; + } + + public void setName( String name ) + { + if (name == null) name = ""; + this.name = name; + this.hashCode = Integer.MIN_VALUE; + } + + public String getPath() + { + return path; + } + + public void setPath( String path ) + { + if (path == null) path = ""; + this.path = path; + this.hashCode = Integer.MIN_VALUE; + } + + public void setParsedDocument( org.w3c.dom.Document doc ) + { + this.doc = doc; + } + public org.w3c.dom.Document getParsedDocument() + { + return doc; + } + + public String getMessage() + { + return message; + } + + public void setMessage( String message ) + { + this.message = message; + } + + public int compareTo(Object obj) + { + if (obj == null) throw new NullPointerException( "Cannot compare to null object" ); + if (!(obj instanceof DOMTree)) throw new ClassCastException( "Can only compare to class" + this.getClass().getName() ); + if (this.name == null || this.path == null) throw new NullPointerException( "This object is not initialized yet" ); + if (this.equals(obj)) return 0; + DOMTree dt = (DOMTree)obj; + int res = getName().compareTo(dt.getName()); + if (res != 0) return res; + return getPath().compareTo(dt.getPath()); + } + + public boolean equals(Object obj) + { + if ( obj == null ) return false; + if ( !(obj instanceof DOMTree) ) return false; + if ( this.name == null || this.path == null ) return false; + DOMTree dt = (DOMTree)obj; + return (this.name.equals(dt.getName()) && + this.path.equals(dt.getPath())); + } + + public int hashCode() + { + if (Integer.MIN_VALUE == this.hashCode) + { + String hashStr = this.getClass().getName() + ":" + this.toString(); + this.hashCode = hashStr.hashCode(); + } + return this.hashCode; + } + + public String toString() + { + return this.name + ":" + this.path; + } + +} Added: portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreeDeleteController.java URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreeDeleteController.java?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreeDeleteController.java (added) +++ portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreeDeleteController.java Mon Aug 7 05:12:38 2006 @@ -0,0 +1,38 @@ +package org.apache.portals.applications.springmvc; + +import java.util.HashMap; +import java.util.Map; + +import javax.portlet.ActionRequest; +import javax.portlet.ActionResponse; +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; + +import org.springframework.beans.factory.InitializingBean; +import org.springframework.web.portlet.mvc.AbstractController; +import org.springframework.web.portlet.ModelAndView; + +public class DOMTreeDeleteController extends AbstractController implements InitializingBean +{ + private DOMTreeService domTreeService; + + public void afterPropertiesSet() throws Exception + { + if (this.domTreeService == null) + throw new IllegalArgumentException( "DOMTreeService is required" ); + } + + + public void handleActionRequestInternal( ActionRequest request, ActionResponse response ) throws Exception + { + // get the id and delete it + String name = request.getParameter( "domTree" ) ; + domTreeService.deleteDOMTree( name, request ); + response.setRenderParameter( "action", "list" ); + } + + public void setDomTreeService( DOMTreeService domTreeService ) + { + this.domTreeService = domTreeService; + } +} Added: portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreePrefsController.java URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreePrefsController.java?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreePrefsController.java (added) +++ portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreePrefsController.java Mon Aug 7 05:12:38 2006 @@ -0,0 +1,78 @@ +package org.apache.portals.applications.springmvc; + +import java.util.HashMap; +import java.util.Map; + +import javax.portlet.ActionRequest; +import javax.portlet.ActionResponse; +import javax.portlet.PortletRequest; +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; + +import org.springframework.beans.factory.InitializingBean; +import org.springframework.validation.BindException; +import org.springframework.web.portlet.bind.PortletRequestDataBinder; +import org.springframework.web.portlet.mvc.SimpleFormController; +import org.springframework.web.portlet.ModelAndView; + +import org.apache.portals.applications.springmvc.DOMTree; + +public class DOMTreePrefsController extends SimpleFormController implements InitializingBean { + + private DOMTreeService domTreeService; + + public void afterPropertiesSet() throws Exception + { + if ( this.domTreeService == null ) + throw new IllegalArgumentException( "DOMTreeService is required" ); + } + + public void onSubmitAction( ActionRequest request, ActionResponse response, + Object command, BindException errors ) throws Exception + { + String save = request.getParameter( "save" ); + if ( save != null ) + { + domTreeService.saveDOMTree( request.getParameter("name"), request.getParameter("path"), request ); + } + response.setRenderParameter( "action", "list" ); + } + + protected Object formBackingObject( PortletRequest request ) throws Exception + { + String name = request.getParameter( "domTree" ); + if ( name == null ) + { + return new DOMTree(); + } + else + { + return domTreeService.getDOMTree( name, request ); + } + } + + protected void initBinder(PortletRequest request, PortletRequestDataBinder binder) + throws Exception + { + //SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy"); + //binder.registerCustomEditor(Date.class, null, new CustomDateEditor(dateFormat, true)); + //binder.setAllowedFields(new String[] {"author","title","description","availability","count"}); + } + + protected ModelAndView renderInvalidSubmit(RenderRequest request, RenderResponse response) + throws Exception + { + return null; + } + + protected void handleInvalidSubmit(ActionRequest request, ActionResponse response) + throws Exception + { + response.setRenderParameter( "action","view" ); + } + + public void setDomTreeService(DOMTreeService domTreeService) + { + this.domTreeService = domTreeService; + } +} Added: portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreePrefsListController.java URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreePrefsListController.java?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreePrefsListController.java (added) +++ portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreePrefsListController.java Mon Aug 7 05:12:38 2006 @@ -0,0 +1,34 @@ +package org.apache.portals.applications.springmvc; + +import java.util.HashMap; +import java.util.Map; + +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; + +import org.springframework.beans.factory.InitializingBean; +import org.springframework.web.portlet.mvc.AbstractController; +import org.springframework.web.portlet.ModelAndView; + +public class DOMTreePrefsListController extends AbstractController implements InitializingBean +{ + private DOMTreeService domTreeService; + + public void afterPropertiesSet() throws Exception + { + if (this.domTreeService == null) + throw new IllegalArgumentException( "A DOMTreeService is required" ); + } + + public ModelAndView handleRenderRequestInternal( RenderRequest request, RenderResponse response ) throws Exception + { + Map model = new HashMap(); + model.put( "list", domTreeService.getAllDOMTrees( request ) ); + return new ModelAndView( "domTreeEditList", "model", model ); + } + + public void setDomTreeService( DOMTreeService domTreeService ) + { + this.domTreeService = domTreeService; + } +} Added: portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreeService.java URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreeService.java?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreeService.java (added) +++ portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreeService.java Mon Aug 7 05:12:38 2006 @@ -0,0 +1,216 @@ +package org.apache.portals.applications.springmvc; + +import java.io.InputStream; +import java.io.IOException; +import java.util.Iterator; +import java.util.List; +import java.util.Enumeration; +import java.util.ArrayList; +import java.util.SortedSet; +import java.util.TreeSet; +import java.util.regex.Pattern; +import java.util.regex.Matcher; + +import javax.portlet.PortletPreferences; +import javax.portlet.PortletRequest; +import javax.portlet.PortletContext; +import javax.portlet.ReadOnlyException; +import javax.portlet.ValidatorException; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.xpath.XPathFactory; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.BeansException; +import org.springframework.context.support.ApplicationObjectSupport; + +import org.w3c.dom.Node ; +import org.w3c.dom.NodeList ; + +public class DOMTreeService extends ApplicationObjectSupport +{ + private static final String DOM_TREE_NO_PATH = "domtree_no_path"; + private static final String DOM_TREE_NO_PARSE = "domtree_no_parse"; + private static final Log log = LogFactory.getLog( DOMTreeService.class); + + protected DocumentBuilderFactory domFactory = null; + protected XPathFactory xpathFactory = null; + + public void initApplicationContext() throws BeansException + { + domFactory = DocumentBuilderFactory.newInstance(); + domFactory.setValidating(false); + xpathFactory = XPathFactory.newInstance(); + } + + public DOMTree getDOMTree( String name, PortletRequest request ) + { + if ( name == null ) name = ""; + PortletPreferences prefs = request.getPreferences(); + String path = prefs.getValue( name, "" ); + return new DOMTree( name, path ); + } + + public void saveDOMTree( String name, String path, PortletRequest request ) + { + DOMTree dt = new DOMTree( name, path ); + saveDOMTree( dt, request ); + } + + public void saveDOMTree( DOMTree dt, PortletRequest request ) + { + if ( dt == null ) return ; + PortletPreferences prefs = request.getPreferences(); + try + { + prefs.setValue( dt.getName(), dt.getPath() ); + prefs.store(); + } + catch ( ReadOnlyException e ) { } + catch ( IOException e ) { } + catch ( ValidatorException e ) { } + } + + public void deleteDOMTree( String name, PortletRequest request ) + { + if ( name == null ) name = ""; + PortletPreferences prefs = request.getPreferences(); + try + { + prefs.reset( name ); + prefs.store(); + } + catch ( ReadOnlyException e ) { } + catch ( IOException e ) { } + catch ( ValidatorException e ) { } + } + + public SortedSet getAllDOMTrees( PortletRequest request ) + { + return getAllDOMTrees( request, null ); + } + public SortedSet getAllDOMTrees( PortletRequest request, List addTo ) + { + if ( addTo == null ) + { + addTo = new ArrayList(); + } + PortletPreferences prefs = request.getPreferences(); + Enumeration e = prefs.getNames(); + while ( e.hasMoreElements() ) + { + String name = (String)e.nextElement(); + String path = prefs.getValue( name, "" ); + addTo.add( new DOMTree( name, path ) ); + } + return (SortedSet) new TreeSet( addTo ); + } + + public SortedSet parseAllDOMTrees( PortletRequest request, PortletContext context, List addTo ) + { + SortedSet domTreeSet = getAllDOMTrees( request, addTo ); + Iterator domTreeSetIter = domTreeSet.iterator(); + while ( domTreeSetIter.hasNext() ) + { + DOMTree dt = (DOMTree)domTreeSetIter.next(); + if ( dt.getPath() == null || dt.getPath().length() == 0 ) + { + dt.setMessage( DOM_TREE_NO_PATH ); + } + else + { + InputStream is = context.getResourceAsStream( dt.getPath() ); + org.w3c.dom.Document doc = parseXml( is ); + dt.setParsedDocument( doc ); + if ( doc == null ) + { + dt.setMessage( DOM_TREE_NO_PARSE ); + } + } + } + return domTreeSet; + } + + + // general xml parsing utilities + + protected org.w3c.dom.Document parseXml( InputStream is ) + { + DocumentBuilder docBuilder = null; + org.w3c.dom.Document doc = null; + try + { + docBuilder = domFactory.newDocumentBuilder(); + } + catch (ParserConfigurationException e) + { + log.error( "Cannot create DocumentBuilder due to " + e.getClass().getSimpleName() + " " + e.getMessage() ); + } + if ( docBuilder != null ) + { + try + { + doc = docBuilder.parse(is); + } + catch (Exception e) + { + log.error( "Cannot parse due to " + e.getClass().getSimpleName() + " " + e.getMessage() ); + } + } + return doc; + } + public static class DOMNodeHelper + { + public DOMNodeHelper() + { + } + public List createNodeList( NodeList nl ) + { + List domNodeList = new ArrayList(); + if ( nl != null ) + { + for ( int i = 0 ; i < nl.getLength() ; i++ ) + { + domNodeList.add( nl.item( i ) ); + } + } + return domNodeList; + } + public boolean isElementNode( Node n ) + { + return n != null && n.getNodeType() == Node.ELEMENT_NODE; + } + public boolean isTextNode( Node n ) + { + return n != null && n.getNodeType() == Node.TEXT_NODE; + } + public boolean isNonEmptyTextNode( Node n ) + { + if ( n != null && n.getNodeType() == Node.TEXT_NODE ) + { + String nodeVal = n.getNodeValue(); + if ( nodeVal != null && nodeVal.trim().length() > 0 ) + { + return true ; + } + } + return false; + } + public boolean isAttributeNode( Node n ) + { + return n != null && n.getNodeType() == Node.ATTRIBUTE_NODE; + } + public boolean isDocumentNode( Node n ) + { + return n != null && n.getNodeType() == Node.DOCUMENT_NODE; + } + public String replaceLineBreaks( String s ) + { + Pattern p = Pattern.compile( "\\s*((\\r\\n)|\\n)\\s*" ); + Matcher m = p.matcher( s ); + return m.replaceAll( " " ); + } + } +} Added: portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreeViewController.java URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreeViewController.java?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreeViewController.java (added) +++ portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/DOMTreeViewController.java Mon Aug 7 05:12:38 2006 @@ -0,0 +1,78 @@ +package org.apache.portals.applications.springmvc; + +import java.util.HashMap; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.util.SortedSet; + +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; +import javax.portlet.PortletConfig; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.web.portlet.mvc.AbstractController; +import org.springframework.web.portlet.ModelAndView; +import org.springframework.web.portlet.context.PortletConfigAware; + +public class DOMTreeViewController extends AbstractController implements InitializingBean, PortletConfigAware +{ + private static final Log log = LogFactory.getLog( DOMTreeViewController.class); + + private DOMTreeService domTreeService ; + private PortletConfig portletConfig ; + + private String xmlFilePath = null ; + private String xmlFileName = null ; + + public void afterPropertiesSet() throws Exception { + if (this.domTreeService == null) + throw new IllegalArgumentException("A DOMTreeService is required"); + } + + public ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response) throws Exception + { + List addTo = new ArrayList(); + if ( getXmlFilePath() != null ) + { + addTo.add( new DOMTree( getXmlFileName(), getXmlFilePath() ) ); + } + SortedSet domTreeSet = domTreeService.parseAllDOMTrees( request, this.getPortletContext(), addTo ); + + Map model = new HashMap(); + model.put( "messages", portletConfig.getResourceBundle( request.getLocale() ) ); + model.put( "domTreeList", domTreeSet ); + model.put( "domNodeHelper", new DOMTreeService.DOMNodeHelper() ); + + return new ModelAndView("domTreeView", "model", model); + } + + public void setDomTreeService(DOMTreeService domTreeService) + { + this.domTreeService = domTreeService; + } + + public String getXmlFilePath() + { + return this.xmlFilePath ; + } + public void setXmlFilePath(String xmlFile) + { + this.xmlFilePath = xmlFile; + } + public String getXmlFileName() + { + return this.xmlFileName; + } + public void setXmlFileName(String xmlFileName) + { + this.xmlFileName = xmlFileName; + } + public void setPortletConfig(PortletConfig portletConfig) + { + + this.portletConfig = portletConfig; + } +} Added: portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/resources/DOMTree.properties URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/resources/DOMTree.properties?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/resources/DOMTree.properties (added) +++ portals/bridges/trunk/applications/springmvc/src/java/org/apache/portals/applications/springmvc/resources/DOMTree.properties Mon Aug 7 05:12:38 2006 @@ -0,0 +1,17 @@ +javax.portlet.title = DOMTreeViewer Portlet +javax.portlet.short-title = DOMTreeViewer +javax.portlet.keywords = DOMTreeViewer +domtree_list = XML File List +domtree_list_empty = No XML files have been configured. Please use edit mode to add XML files. +domtree_no_path = Incomplete configuration +domtree_no_parse = XML parse failure +undefined = undefined +name = Name +path = File Path +add = Add +edit = Edit +save = Save +delete = Delete +cancel = Cancel +help.title = Help Mode +help.text = DOMTreeViewer Portlet \ No newline at end of file Added: portals/bridges/trunk/applications/springmvc/src/java/views.properties URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/java/views.properties?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/java/views.properties (added) +++ portals/bridges/trunk/applications/springmvc/src/java/views.properties Mon Aug 7 05:12:38 2006 @@ -0,0 +1,9 @@ + +domTreeView.class = org.springframework.web.servlet.view.velocity.VelocityView +domTreeView.url = domTreeView.vm + +domTreeEdit.class = org.springframework.web.servlet.view.JstlView +domTreeEdit.url = /WEB-INF/jsp/domTreeEdit.jsp + +domTreeEditList.class = org.springframework.web.servlet.view.JstlView +domTreeEditList.url = /WEB-INF/jsp/domTreeEditList.jsp \ No newline at end of file Added: portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/context/applicationContext.xml URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/context/applicationContext.xml?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/context/applicationContext.xml (added) +++ portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/context/applicationContext.xml Mon Aug 7 05:12:38 2006 @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "../dtd/spring-beans.dtd"> + +<beans> + + <!-- Message source for this context, loaded from localized "messages_xx" files --> + <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"> + <property name="basenames"> + <list> + <value>messages</value> + </list> + </property> + </bean> + + <!-- Default View Resolver --> + + <bean id="resourceBundleViewResolver" class="org.springframework.web.servlet.view.ResourceBundleViewResolver"> + <property name="order"><value>0</value></property> + <property name="basename"><value>views</value></property> + </bean> + + <bean id="velocityConfig" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer"> + <property name="resourceLoaderPath"><value>/WEB-INF/view/</value></property> + </bean> + + <!-- Abstract Default Exception Handler Bean --> + <bean id="defaultExceptionHandlerTemplate" class="org.springframework.web.portlet.handler.SimpleMappingExceptionResolver" abstract="true"> + <property name="defaultErrorView" value="defError"/> + <property name="exceptionMappings"> + <props> + <prop key="javax.portlet.PortletSecurityException">notAuthorized</prop> + <prop key="javax.portlet.UnavailableException">notAvailable</prop> + </props> + </property> + </bean> + +</beans> Added: portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/context/portlet/domtree.xml URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/context/portlet/domtree.xml?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/context/portlet/domtree.xml (added) +++ portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/context/portlet/domtree.xml Mon Aug 7 05:12:38 2006 @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "../../dtd/spring-beans.dtd"> +<beans> + + <!-- Property Configurer --> + + <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> + <property name="locations"> + <list> + <value>WEB-INF/domtree.properties</value> + </list> + </property> + </bean> + + + <!-- Services --> + + <bean id="domTreeService" class="org.apache.portals.applications.springmvc.DOMTreeService"> + + </bean> + + + <!-- Controllers --> + + <bean id="domtreeControllerTemplate" abstract="true"> + <property name="domTreeService"><ref bean="domTreeService"/></property> + </bean> + + <bean id="domtreeViewController" class="org.apache.portals.applications.springmvc.DOMTreeViewController" parent="domtreeControllerTemplate"> + <property name="xmlFilePath" value="/WEB-INF/data/test.xml" /> + <property name="xmlFileName" value="Property Test" /> + </bean> + + <bean id="domtreePrefsController" class="org.apache.portals.applications.springmvc.DOMTreePrefsController" parent="domtreeControllerTemplate"> + <property name="sessionForm" value="true"/> + <property name="formView" value="domTreeEdit"/> + </bean> + + <bean id="domtreePrefsListController" class="org.apache.portals.applications.springmvc.DOMTreePrefsListController" parent="domtreeControllerTemplate"> + + </bean> + + <bean id="domtreeDeleteController" class="org.apache.portals.applications.springmvc.DOMTreeDeleteController" parent="domtreeControllerTemplate"/> + + + <!-- Handler Mapping --> + + <bean id="parameterMappingInterceptor" class="org.springframework.web.portlet.handler.ParameterMappingInterceptor"/> + + <bean id="portletModeParameterHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeParameterHandlerMapping"> + <property name="order" value="10"/> + <property name="interceptors"> + <list> + <ref bean="parameterMappingInterceptor"/> + </list> + </property> + <property name="portletModeParameterMap"> + <map> + <entry key="edit"> + <map> + <entry key="editDomTree"><ref bean="domtreePrefsController"/></entry> + <entry key="newDomTree"><ref bean="domtreePrefsController"/></entry> + <entry key="deleteDomTree"><ref bean="domtreeDeleteController"/></entry> + <entry key="list"><ref bean="domtreePrefsListController"/></entry> + </map> + </entry> + </map> + </property> + </bean> + + <bean id="portletModeHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping"> + <property name="order" value="10"/> + <property name="portletModeMap"> + <map> + <entry key="view"><ref bean="domtreeViewController"/></entry> + <entry key="edit"><ref bean="domtreePrefsListController"/></entry> + </map> + </property> + </bean> + + + <!-- Exceptions Handler --> + + <bean id="defaultExceptionHandler" parent="defaultExceptionHandlerTemplate"/> + +</beans> Added: portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/data/test.xml URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/data/test.xml?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/data/test.xml (added) +++ portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/data/test.xml Mon Aug 7 05:12:38 2006 @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd + http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" + version="1.0"> + + <portlet> + <portlet-name>domtree</portlet-name> + <portlet-class>org.apache.portals.gems.dojo.DojoSpringMVCPortlet</portlet-class> + <init-param> + <name>contextConfigLocation</name> + <value>/WEB-INF/context/portlet/domtree.xml</value> + </init-param> + <supports> + <mime-type>text/html</mime-type> + <portlet-mode>view</portlet-mode> + </supports> + <portlet-info> + <title>DOM Tree View</title> + </portlet-info> + </portlet> + + <user-attribute> + <name>user.login.id</name> + </user-attribute> + <user-attribute> + <name>user.name</name> + </user-attribute> + <user-attribute> + <name>user.name.full</name> + </user-attribute> + +</portlet-app> Added: portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/domtree.properties URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/domtree.properties?rev=429313&view=auto ============================================================================== (empty) Added: portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/dtd/spring-beans.dtd URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/dtd/spring-beans.dtd?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/dtd/spring-beans.dtd (added) +++ portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/dtd/spring-beans.dtd Mon Aug 7 05:12:38 2006 @@ -0,0 +1,650 @@ +<!-- + Spring XML Beans DTD + Authors: Rod Johnson, Juergen Hoeller, Alef Arendsen, Colin Sampaleanu, Rob Harrop + + This defines a simple and consistent way of creating a namespace + of JavaBeans objects, managed by a Spring BeanFactory, read by + XmlBeanDefinitionReader (with DefaultXmlBeanDefinitionParser). + + This document type is used by most Spring functionality, including + web application contexts, which are based on bean factories. + + Each "bean" element in this document defines a JavaBean. + Typically the bean class is specified, along with JavaBean properties + and/or constructor arguments. + + Bean instances can be "singletons" (shared instances) or "prototypes" + (independent instances). Further scopes are supposed to be built on top + of the core BeanFactory infrastructure and are therefore not part of it. + + References among beans are supported, i.e. setting a JavaBean property + or a constructor argument to refer to another bean in the same factory + (or an ancestor factory). + + As alternative to bean references, "inner bean definitions" can be used. + Singleton flags of such inner bean definitions are effectively ignored: + Inner beans are typically anonymous prototypes. + + There is also support for lists, sets, maps, and java.util.Properties + as bean property types or constructor argument types. + + As the format is simple, a DTD is sufficient, and there's no need + for a schema at this point. + + XML documents that conform to this DTD should declare the following doctype: + + <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" + "http://www.springframework.org/dtd/spring-beans.dtd"> +--> + + +<!-- + The document root. A document can contain bean definitions only, + imports only, or a mixture of both (typically with imports first). +--> +<!ELEMENT beans ( + description?, + (import | alias | bean)* +)> + +<!-- + Default values for all bean definitions. Can be overridden at + the "bean" level. See those attribute definitions for details. +--> +<!ATTLIST beans default-lazy-init (true | false) "false"> +<!ATTLIST beans default-autowire (no | byName | byType | constructor | autodetect) "no"> +<!ATTLIST beans default-dependency-check (none | objects | simple | all) "none"> +<!ATTLIST beans default-init-method CDATA #IMPLIED> +<!ATTLIST beans default-destroy-method CDATA #IMPLIED> +<!ATTLIST beans default-merge (true | false) "false"> + +<!-- + Element containing informative text describing the purpose of the enclosing + element. Always optional. + Used primarily for user documentation of XML bean definition documents. +--> +<!ELEMENT description (#PCDATA)> + + +<!-- + Specifies an XML bean definition resource to import. +--> +<!ELEMENT import EMPTY> + +<!-- + The relative resource location of the XML bean definition file to import, + for example "myImport.xml" or "includes/myImport.xml" or "../myImport.xml". +--> +<!ATTLIST import resource CDATA #REQUIRED> + + +<!-- + Defines an alias for a bean, which can reside in a different definition file. +--> +<!ELEMENT alias EMPTY> + +<!-- + The name of the bean to define an alias for. +--> +<!ATTLIST alias name CDATA #REQUIRED> + +<!-- + The alias name to define for the bean. +--> +<!ATTLIST alias alias CDATA #REQUIRED> + +<!-- + Allows for arbitrary metadata to be attached to a bean definition. +--> +<!ELEMENT meta EMPTY> + +<!-- + Specifies the key name of the metdata parameter being defined +--> +<!ATTLIST meta key CDATA #REQUIRED> + +<!-- + Specifies the value of the metadata parameter being defined as a String +--> +<!ATTLIST meta value CDATA #REQUIRED> + +<!-- + Defines a single (usually named) bean. + + A bean definition may contain nested tags for constructor arguments, + property values, lookup methods, and replaced methods. Mixing constructor + injection and setter injection on the same bean is explicitly supported. +--> +<!ELEMENT bean ( + description?, + (meta | constructor-arg | property | lookup-method | replaced-method)* +)> + +<!-- + Beans can be identified by an id, to enable reference checking. + + There are constraints on a valid XML id: if you want to reference your bean + in Java code using a name that's illegal as an XML id, use the optional + "name" attribute. If neither is given, the bean class name is used as id + (with an appended counter like "#2" if there is already a bean with that name). +--> +<!ATTLIST bean id ID #IMPLIED> + +<!-- + Optional. Can be used to create one or more aliases illegal in an id. + Multiple aliases can be separated by any number of spaces, commas, or + semi-colons (or indeed any mixture of the three). +--> +<!ATTLIST bean name CDATA #IMPLIED> + +<!-- + Each bean definition must specify the fully qualified name of the class, + except if it pure serves as parent for child bean definitions. +--> +<!ATTLIST bean class CDATA #IMPLIED> + +<!-- + Optionally specify a parent bean definition. + + Will use the bean class of the parent if none specified, but can + also override it. In the latter case, the child bean class must be + compatible with the parent, i.e. accept the parent's property values + and constructor argument values, if any. + + A child bean definition will inherit constructor argument values, + property values and method overrides from the parent, with the option + to add new values. If init method, destroy method, factory bean and/or factory + method are specified, they will override the corresponding parent settings. + + The remaining settings will always be taken from the child definition: + depends on, autowire mode, dependency check, singleton, lazy init. +--> +<!ATTLIST bean parent CDATA #IMPLIED> + +<!-- + Is this bean "abstract", i.e. not meant to be instantiated itself but + rather just serving as parent for concrete child bean definitions. + Default is "false". Specify "true" to tell the bean factory to not try to + instantiate that particular bean in any case. + + Note: This attribute will not be inherited by child bean definitions. + Hence, it needs to be specified per concrete bean definition. +--> +<!ATTLIST bean abstract (true | false) "false"> + +<!-- + Is this bean a "singleton" (one shared instance, which will + be returned by all calls to getBean() with the id), + or a "prototype" (independent instance resulting from each call to + getBean(). Default is singleton. + + Singletons are most commonly used, and are ideal for multi-threaded + service objects. + + Note: This attribute will not be inherited by child bean definitions. + Hence, it needs to be specified per concrete bean definition. +--> +<!ATTLIST bean singleton (true | false) "true"> + +<!-- + If this bean should be lazily initialized. + If false, it will get instantiated on startup by bean factories + that perform eager initialization of singletons. + + + Note: This attribute will not be inherited by child bean definitions. + Hence, it needs to be specified per concrete bean definition. +--> +<!ATTLIST bean lazy-init (true | false | default) "default"> + +<!-- + Indicates whether or not this bean should be considered when looking + for candidates to satisfy another beans autowiring requirements. +--> +<!ATTLIST bean autowire-candidate (true | false) "true"> + +<!-- + Optional attribute controlling whether to "autowire" bean properties. + This is an automagical process in which bean references don't need to be coded + explicitly in the XML bean definition file, but Spring works out dependencies. + + There are 5 modes: + + 1. "no" + The traditional Spring default. No automagical wiring. Bean references + must be defined in the XML file via the <ref> element. We recommend this + in most cases as it makes documentation more explicit. + + 2. "byName" + Autowiring by property name. If a bean of class Cat exposes a dog property, + Spring will try to set this to the value of the bean "dog" in the current factory. + If there is no matching bean by name, nothing special happens; + use dependency-check="objects" to raise an error in that case. + + 3. "byType" + Autowiring if there is exactly one bean of the property type in the bean factory. + If there is more than one, a fatal error is raised, and you can't use byType + autowiring for that bean. If there is none, nothing special happens; + use dependency-check="objects" to raise an error in that case. + + 4. "constructor" + Analogous to "byType" for constructor arguments. If there isn't exactly one bean + of the constructor argument type in the bean factory, a fatal error is raised. + + 5. "autodetect" + Chooses "constructor" or "byType" through introspection of the bean class. + If a default constructor is found, "byType" gets applied. + + The latter two are similar to PicoContainer and make bean factories simple to + configure for small namespaces, but doesn't work as well as standard Spring + behaviour for bigger applications. + + Note that explicit dependencies, i.e. "property" and "constructor-arg" elements, + always override autowiring. Autowire behavior can be combined with dependency + checking, which will be performed after all autowiring has been completed. + + Note: This attribute will not be inherited by child bean definitions. + Hence, it needs to be specified per concrete bean definition. +--> +<!ATTLIST bean autowire (no | byName | byType | constructor | autodetect | default) "default"> + +<!-- + Optional attribute controlling whether to check whether all this + beans dependencies, expressed in its properties, are satisfied. + Default is no dependency checking. + + "simple" type dependency checking includes primitives and String + "object" includes collaborators (other beans in the factory) + "all" includes both types of dependency checking + + Note: This attribute will not be inherited by child bean definitions. + Hence, it needs to be specified per concrete bean definition. +--> +<!ATTLIST bean dependency-check (none | objects | simple | all | default) "default"> + +<!-- + The names of the beans that this bean depends on being initialized. + The bean factory will guarantee that these beans get initialized before. + + Note that dependencies are normally expressed through bean properties or + constructor arguments. This property should just be necessary for other kinds + of dependencies like statics (*ugh*) or database preparation on startup. + + Note: This attribute will not be inherited by child bean definitions. + Hence, it needs to be specified per concrete bean definition. +--> +<!ATTLIST bean depends-on CDATA #IMPLIED> + +<!-- + Optional attribute for the name of the custom initialization method + to invoke after setting bean properties. The method must have no arguments, + but may throw any exception. +--> +<!ATTLIST bean init-method CDATA #IMPLIED> + +<!-- + Optional attribute for the name of the custom destroy method to invoke + on bean factory shutdown. The method must have no arguments, + but may throw any exception. Note: Only invoked on singleton beans! +--> +<!ATTLIST bean destroy-method CDATA #IMPLIED> + +<!-- + Optional attribute specifying the name of a factory method to use to + create this object. Use constructor-arg elements to specify arguments + to the factory method, if it takes arguments. Autowiring does not apply + to factory methods. + + If the "class" attribute is present, the factory method will be a static + method on the class specified by the "class" attribute on this bean + definition. Often this will be the same class as that of the constructed + object - for example, when the factory method is used as an alternative + to a constructor. However, it may be on a different class. In that case, + the created object will *not* be of the class specified in the "class" + attribute. This is analogous to FactoryBean behavior. + + If the "factory-bean" attribute is present, the "class" attribute is not + used, and the factory method will be an instance method on the object + returned from a getBean call with the specified bean name. The factory + bean may be defined as a singleton or a prototype. + + The factory method can have any number of arguments. Autowiring is not + supported. Use indexed constructor-arg elements in conjunction with the + factory-method attribute. + + Setter Injection can be used in conjunction with a factory method. + Method Injection cannot, as the factory method returns an instance, + which will be used when the container creates the bean. +--> +<!ATTLIST bean factory-method CDATA #IMPLIED> + +<!-- + Alternative to class attribute for factory-method usage. + If this is specified, no class attribute should be used. + This should be set to the name of a bean in the current or + ancestor factories that contains the relevant factory method. + This allows the factory itself to be configured using Dependency + Injection, and an instance (rather than static) method to be used. +--> +<!ATTLIST bean factory-bean CDATA #IMPLIED> + +<!-- + Bean definitions can specify zero or more constructor arguments. + This is an alternative to "autowire constructor". + Arguments correspond to either a specific index of the constructor argument + list or are supposed to be matched generically by type. + + Note: A single generic argument value will just be used once, rather than + potentially matched multiple times (as of Spring 1.1). + + constructor-arg elements are also used in conjunction with the factory-method + element to construct beans using static or instance factory methods. +--> +<!ELEMENT constructor-arg ( + description?, + (bean | ref | idref | value | null | list | set | map | props)? +)> + +<!-- + The constructor-arg tag can have an optional index attribute, + to specify the exact index in the constructor argument list. Only needed + to avoid ambiguities, e.g. in case of 2 arguments of the same type. +--> +<!ATTLIST constructor-arg index CDATA #IMPLIED> + +<!-- + The constructor-arg tag can have an optional type attribute, + to specify the exact type of the constructor argument. Only needed + to avoid ambiguities, e.g. in case of 2 single argument constructors + that can both be converted from a String. +--> +<!ATTLIST constructor-arg type CDATA #IMPLIED> + +<!-- + A short-cut alternative to a child element "ref bean=". +--> +<!ATTLIST constructor-arg ref CDATA #IMPLIED> + +<!-- + A short-cut alternative to a child element "value". +--> +<!ATTLIST constructor-arg value CDATA #IMPLIED> + + +<!-- + Bean definitions can have zero or more properties. + Property elements correspond to JavaBean setter methods exposed + by the bean classes. Spring supports primitives, references to other + beans in the same or related factories, lists, maps and properties. +--> +<!ELEMENT property ( + description?, meta*, + (bean | ref | idref | value | null | list | set | map | props)? +)> + +<!-- + The property name attribute is the name of the JavaBean property. + This follows JavaBean conventions: a name of "age" would correspond + to setAge()/optional getAge() methods. +--> +<!ATTLIST property name CDATA #REQUIRED> + +<!-- + A short-cut alternative to a child element "ref bean=". +--> +<!ATTLIST property ref CDATA #IMPLIED> + +<!-- + A short-cut alternative to a child element "value". +--> +<!ATTLIST property value CDATA #IMPLIED> + + +<!-- + A lookup method causes the IoC container to override the given method and return + the bean with the name given in the bean attribute. This is a form of Method Injection. + It's particularly useful as an alternative to implementing the BeanFactoryAware + interface, in order to be able to make getBean() calls for non-singleton instances + at runtime. In this case, Method Injection is a less invasive alternative. +--> +<!ELEMENT lookup-method EMPTY> + +<!-- + Name of a lookup method. This method should take no arguments. +--> +<!ATTLIST lookup-method name CDATA #IMPLIED> + +<!-- + Name of the bean in the current or ancestor factories that the lookup method + should resolve to. Often this bean will be a prototype, in which case the + lookup method will return a distinct instance on every invocation. This + is useful for single-threaded objects. +--> +<!ATTLIST lookup-method bean CDATA #IMPLIED> + + +<!-- + Similar to the lookup method mechanism, the replaced-method element is used to control + IoC container method overriding: Method Injection. This mechanism allows the overriding + of a method with arbitrary code. +--> +<!ELEMENT replaced-method ( + (arg-type)* +)> + +<!-- + Name of the method whose implementation should be replaced by the IoC container. + If this method is not overloaded, there's no need to use arg-type subelements. + If this method is overloaded, arg-type subelements must be used for all + override definitions for the method. +--> +<!ATTLIST replaced-method name CDATA #IMPLIED> + +<!-- + Bean name of an implementation of the MethodReplacer interface + in the current or ancestor factories. This may be a singleton or prototype + bean. If it's a prototype, a new instance will be used for each method replacement. + Singleton usage is the norm. +--> +<!ATTLIST replaced-method replacer CDATA #IMPLIED> + +<!-- + Subelement of replaced-method identifying an argument for a replaced method + in the event of method overloading. +--> +<!ELEMENT arg-type (#PCDATA)> + +<!-- + Specification of the type of an overloaded method argument as a String. + For convenience, this may be a substring of the FQN. E.g. all the + following would match "java.lang.String": + - java.lang.String + - String + - Str + + As the number of arguments will be checked also, this convenience can often + be used to save typing. +--> +<!ATTLIST arg-type match CDATA #IMPLIED> + + +<!-- + Defines a reference to another bean in this factory or an external + factory (parent or included factory). +--> +<!ELEMENT ref EMPTY> + +<!-- + References must specify a name of the target bean. + The "bean" attribute can reference any name from any bean in the context, + to be larry25@example.org. + Local references, using the "local" attribute, have to use bean ids; + they can be checked by this DTD, thus should be preferred for references + within the same bean factory XML file. +--> +<!ATTLIST ref bean CDATA #IMPLIED> +<!ATTLIST ref local IDREF #IMPLIED> +<!ATTLIST ref parent CDATA #IMPLIED> + + +<!-- + Defines a string property value, which must also be the id of another + bean in this factory or an external factory (parent or included factory). + While a regular 'value' element could instead be used for the same effect, + using idref in this case allows validation of local bean ids by the xml + parser, and name completion by helper tools. +--> +<!ELEMENT idref EMPTY> + +<!-- + ID refs must specify a name of the target bean. + The "bean" attribute can reference any name from any bean in the context, + potentially to be checked at runtime by bean factory implementations. + Local references, using the "local" attribute, have to use bean ids; + they can be checked by this DTD, thus should be preferred for references + within the same bean factory XML file. +--> +<!ATTLIST idref bean CDATA #IMPLIED> +<!ATTLIST idref local IDREF #IMPLIED> + + +<!-- + Contains a string representation of a property value. + The property may be a string, or may be converted to the + required type using the JavaBeans PropertyEditor + machinery. This makes it possible for application developers + to write custom PropertyEditor implementations that can + convert strings to objects. + + Note that this is recommended for simple objects only. + Configure more complex objects by populating JavaBean + properties with references to other beans. +--> +<!ELEMENT value (#PCDATA)> + +<!-- + The value tag can have an optional type attribute, to specify the + exact type that the value should be converted to. Only needed + if the type of the target property or constructor argument is + too generic: for example, in case of a collection element. +--> +<!ATTLIST value type CDATA #IMPLIED> + +<!-- + Denotes a Java null value. Necessary because an empty "value" tag + will resolve to an empty String, which will not be resolved to a + null value unless a special PropertyEditor does so. +--> +<!ELEMENT null (#PCDATA)> + + +<!-- + A list can contain multiple inner bean, ref, collection, or value elements. + Java lists are untyped, pending generics support in Java 1.5, + although references will be strongly typed. + A list can also map to an array type. The necessary conversion + is automatically performed by the BeanFactory. +--> +<!ELEMENT list ( + (bean | ref | idref | value | null | list | set | map | props)* +)> + +<!-- Enable/disable merging for collections when using parent/child beans --> +<!ATTLIST list merge (true | false | default) "default"> + +<!-- Specify the default Java type for nested values --> +<!ATTLIST list value-type CDATA #IMPLIED> + +<!-- + A set can contain multiple inner bean, ref, collection, or value elements. + Java sets are untyped, pending generics support in Java 1.5, + although references will be strongly typed. +--> +<!ELEMENT set ( + (bean | ref | idref | value | null | list | set | map | props)* +)> + +<!-- Enable/disable merging for collections when using parent/child beans --> +<!ATTLIST set merge (true | false | default) "default"> + +<!-- Specify the default Java type for nested values --> +<!ATTLIST set value-type CDATA #IMPLIED> + +<!-- + A Spring map is a mapping from a string key to object. + Maps may be empty. +--> +<!ELEMENT map ( + (entry)* +)> + +<!-- Enable/disable merging for collections when using parent/child beans --> +<!ATTLIST map merge (true | false | default) "default"> + +<!-- Specify the default Java type for nested entry keys --> +<!ATTLIST map key-type CDATA #IMPLIED> + +<!-- Specify the default Java type for nested entry values --> +<!ATTLIST map value-type CDATA #IMPLIED> + +<!-- + A map entry can be an inner bean, ref, value, or collection. + The key of the entry is given by the "key" attribute or child element. +--> +<!ELEMENT entry ( + key?, + (bean | ref | idref | value | null | list | set | map | props)? +)> + +<!-- + Each map element must specify its key as attribute or as child element. + A key attribute is always a String value. +--> +<!ATTLIST entry key CDATA #IMPLIED> + +<!-- + A short-cut alternative to a "key" element with a "ref bean=" child element. +--> +<!ATTLIST entry key-ref CDATA #IMPLIED> + +<!-- + A short-cut alternative to a child element "value". +--> +<!ATTLIST entry value CDATA #IMPLIED> + +<!-- + A short-cut alternative to a child element "ref bean=". +--> +<!ATTLIST entry value-ref CDATA #IMPLIED> + +<!-- + A key element can contain an inner bean, ref, value, or collection. +--> +<!ELEMENT key ( + (bean | ref | idref | value | null | list | set | map | props) +)> + + +<!-- + Props elements differ from map elements in that values must be strings. + Props may be empty. +--> +<!ELEMENT props ( + (prop)* +)> + +<!-- Enable/disable merging for collections when using parent/child beans --> +<!ATTLIST props merge (true | false | default) "default"> + +<!-- + Element content is the string value of the property. + Note that whitespace is trimmed off to avoid unwanted whitespace + caused by typical XML formatting. +--> +<!ELEMENT prop (#PCDATA)> + +<!-- + Each property element must specify its key. +--> +<!ATTLIST prop key CDATA #REQUIRED> + Added: portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jetspeed-portlet.xml URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jetspeed-portlet.xml?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jetspeed-portlet.xml (added) +++ portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jetspeed-portlet.xml Mon Aug 7 05:12:38 2006 @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Copyright 2004 The Apache Software Foundation + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--> +<portlet-app id="springportletjs" version="1.0" + xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" + xmlns:js="http://portals.apache.org/jetspeed" + xmlns:dc="http://www.purl.org/dc"> + + <dc:title>Spring MVC Sample Portlets</dc:title> + <dc:title xml:lang="en">Spring MVC Sample Portlets</dc:title> + <dc:creator>J2 Team</dc:creator> + + <js:services> + <js:service name='HeaderResource'/> + </js:services> + +</portlet-app> Added: portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jsp/dojo-includes.jsp URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jsp/dojo-includes.jsp?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jsp/dojo-includes.jsp (added) +++ portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jsp/dojo-includes.jsp Mon Aug 7 05:12:38 2006 @@ -0,0 +1,7 @@ +dojo.require('dojo.widget.*'); +dojo.require('dojo.widget.Tree'); +dojo.require("dojo.widget.Button"); +dojo.require("dojo.widget.TabContainer"); +dojo.require("dojo.widget.ContentPane"); +dojo.require("dojo.widget.LayoutContainer"); +dojo.require("dojo.widget.Manager"); Added: portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jsp/domTreeEdit.jsp URL: http://svn.apache.org/viewvc/portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jsp/domTreeEdit.jsp?rev=429313&view=auto ============================================================================== --- portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jsp/domTreeEdit.jsp (added) +++ portals/bridges/trunk/applications/springmvc/src/webapp/WEB-INF/jsp/domTreeEdit.jsp Mon Aug 7 05:12:38 2006 @@ -0,0 +1,54 @@ +<%@ page session="false" %> +<%@ page import="javax.portlet.*"%> +<%@ page import="java.util.*"%> +<%@ include file="/WEB-INF/jsp/include.jsp" %> + +<portlet:actionURL portletMode="edit" var="myAction"> + <portlet:param name="save" value="save"/> + <portlet:param name="action" value="editDomTree"/> +</portlet:actionURL> + +<portlet:renderURL portletMode="view" var="viewRender"> + <portlet:param name="action" value="list"/> +</portlet:renderURL> + +<jsp:useBean id="addUrl" scope="request" + class="java.lang.String" /> +<jsp:useBean id="cancelUrl" scope="request" + class="java.lang.String" /> +<portlet:defineObjects/> +<% +ResourceBundle myText = portletConfig.getResourceBundle(request.getLocale()); +%> +<B><%=myText.getString("domtree_list")%></B><br> + +<form name="editDomTreeForm" method="post" action="<%=myAction%>" method="post"> +<TABLE CELLPADDING=0 CELLSPACING=4> + <TR> + <TD> + <B><%=myText.getString("name")%></B> + </TD> + <TD> + <B><%=myText.getString("path")%></B> + </TD> + <TD> + </TD> + </TR> + <TR> + <TD> + <html:input path="command.name"/> <!-- <INPUT NAME="name"
{'source': 'Apache Software Foundation Public Mail Archives'}