r99 - in trunk/simexplorer-is-web: . .settings .svn.ok .svn.ok/text-base .svn.ok/tmp build src src/main src/main/java src/main/java/fr src/main/java/fr/cemagref src/main/java/fr/cemagref/simexplorer src/main/java/fr/cemagref/simexplorer/is src/main/java/fr/cemagref/simexplorer/is/ui src/main/java/fr/cemagref/simexplorer/is/ui/web src/main/java/fr/cemagref/simexplorer/is/ui/web/base src/main/java/fr/cemagref/simexplorer/is/ui/web/components src/main/java/fr/cemagref/simexplorer/is/ui
Author: glandais Date: 2008-01-08 15:28:20 +0000 (Tue, 08 Jan 2008) New Revision: 99 Added: trunk/simexplorer-is-web/.classpath trunk/simexplorer-is-web/.classpath.tmp trunk/simexplorer-is-web/.project trunk/simexplorer-is-web/.settings/ trunk/simexplorer-is-web/.settings/org.eclipse.jdt.core.prefs trunk/simexplorer-is-web/.settings/org.eclipse.jst.common.project.facet.core.prefs trunk/simexplorer-is-web/.settings/org.eclipse.wst.common.component trunk/simexplorer-is-web/.settings/org.eclipse.wst.common.project.facet.core.xml trunk/simexplorer-is-web/.svn.ok/ trunk/simexplorer-is-web/.svn.ok/dir-prop-base trunk/simexplorer-is-web/.svn.ok/entries trunk/simexplorer-is-web/.svn.ok/format trunk/simexplorer-is-web/.svn.ok/prop-base/ trunk/simexplorer-is-web/.svn.ok/props/ trunk/simexplorer-is-web/.svn.ok/text-base/ trunk/simexplorer-is-web/.svn.ok/text-base/.classpath.svn-base trunk/simexplorer-is-web/.svn.ok/text-base/.project.svn-base trunk/simexplorer-is-web/.svn.ok/text-base/pom.xml.svn-base trunk/simexplorer-is-web/.svn.ok/tmp/ trunk/simexplorer-is-web/.svn.ok/tmp/prop-base/ trunk/simexplorer-is-web/.svn.ok/tmp/props/ trunk/simexplorer-is-web/.svn.ok/tmp/text-base/ trunk/simexplorer-is-web/build/ trunk/simexplorer-is-web/build/classes/ trunk/simexplorer-is-web/pom.xml trunk/simexplorer-is-web/src/ trunk/simexplorer-is-web/src/main/ trunk/simexplorer-is-web/src/main/java/ trunk/simexplorer-is-web/src/main/java/fr/ trunk/simexplorer-is-web/src/main/java/fr/cemagref/ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/ContextListener.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/base/ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/base/UseCaseMap.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/base/UseCasePage.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/beans/ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/components/ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/components/Layout.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/errors/ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/grid/ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/grid/ApplicationDataSource.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractApplicationDetail.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractApplicationExport.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractApplicationImport.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractApplicationList.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractGroupEdit.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractGroupList.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractUserEdit.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractUserList.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationDetail.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationExport.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationImport.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationList.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/UserList.java trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/services/ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/services/StorageServiceFactory.java trunk/simexplorer-is-web/src/main/resources/ trunk/simexplorer-is-web/src/main/resources/fr/ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/Layout.properties trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/Layout.tml trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/Layout_fr.properties trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/css/ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/css/Layout.css trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationDetail.properties trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationExport.properties trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationImport.properties trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationList.properties trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.properties trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.properties trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.properties trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/UserList.properties trunk/simexplorer-is-web/src/main/webapp/ trunk/simexplorer-is-web/src/main/webapp/ApplicationDetail.tml trunk/simexplorer-is-web/src/main/webapp/ApplicationExport.tml trunk/simexplorer-is-web/src/main/webapp/ApplicationImport.tml trunk/simexplorer-is-web/src/main/webapp/ApplicationList.tml trunk/simexplorer-is-web/src/main/webapp/GroupEdit.tml trunk/simexplorer-is-web/src/main/webapp/GroupList.tml trunk/simexplorer-is-web/src/main/webapp/META-INF/ trunk/simexplorer-is-web/src/main/webapp/META-INF/MANIFEST.MF trunk/simexplorer-is-web/src/main/webapp/UserEdit.tml trunk/simexplorer-is-web/src/main/webapp/UserList.tml trunk/simexplorer-is-web/src/main/webapp/WEB-INF/ trunk/simexplorer-is-web/src/main/webapp/WEB-INF/lib/ trunk/simexplorer-is-web/src/main/webapp/WEB-INF/web.xml trunk/simexplorer-is-web/src/main/webapp/images/ trunk/simexplorer-is-web/src/main/webapp/index.html trunk/simexplorer-is-web/src/main/webapp/js/ trunk/simexplorer-is-web/src/main/webapp/js/dftree.js trunk/simexplorer-is-web/src/main/webapp/js/treeLoader.js trunk/simexplorer-is-web/xmi/ trunk/simexplorer-is-web/xmi/simexplorer-is-web.zargo Log: Re import (changed web path) Added: trunk/simexplorer-is-web/.classpath =================================================================== --- trunk/simexplorer-is-web/.classpath (rev 0) +++ trunk/simexplorer-is-web/.classpath 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src/main/java"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.5"/> + <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> + <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> + <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"> + <attributes> + <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> + </attributes> + </classpathentry> + <classpathentry combineaccessrules="false" kind="src" path="/simexplorer-is-entities"/> + <classpathentry combineaccessrules="false" kind="src" path="/simexplorer-is-service"/> + <classpathentry combineaccessrules="false" kind="src" path="/tapestry5-treegrid"/> + <classpathentry kind="output" path="build/classes"/> +</classpath> Added: trunk/simexplorer-is-web/.classpath.tmp =================================================================== --- trunk/simexplorer-is-web/.classpath.tmp (rev 0) +++ trunk/simexplorer-is-web/.classpath.tmp 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src/main/java"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.5"/> + <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> + <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> + <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"> + <attributes> + <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> + </attributes> + </classpathentry> + <classpathentry combineaccessrules="false" kind="src" path="/simexplorer-is-entities"/> + <classpathentry combineaccessrules="false" kind="src" path="/simexplorer-is-service"/> + <classpathentry combineaccessrules="false" kind="src" path="/tapestry5-treegrid"/> + <classpathentry kind="output" path="build/classes"/> +</classpath> Added: trunk/simexplorer-is-web/.project =================================================================== --- trunk/simexplorer-is-web/.project (rev 0) +++ trunk/simexplorer-is-web/.project 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>simexplorer-is-web</name> + <comment></comment> + <projects> + <project>tapestry5-treegrid</project> + <project>simexplorer-is-entities</project> + <project>simexplorer-is-service</project> + </projects> + <buildSpec> + <buildCommand> + <name>org.maven.ide.eclipse.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.wst.common.project.facet.core.builder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.wst.validation.validationbuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.maven.ide.eclipse.maven2Nature</nature> + <nature>org.eclipse.wst.common.project.facet.core.nature</nature> + <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> + <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> + </natures> +</projectDescription> Added: trunk/simexplorer-is-web/.settings/org.eclipse.jdt.core.prefs =================================================================== --- trunk/simexplorer-is-web/.settings/org.eclipse.jdt.core.prefs (rev 0) +++ trunk/simexplorer-is-web/.settings/org.eclipse.jdt.core.prefs 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,7 @@ +#Tue Jan 08 15:35:48 CET 2008 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 Added: trunk/simexplorer-is-web/.settings/org.eclipse.jst.common.project.facet.core.prefs =================================================================== --- trunk/simexplorer-is-web/.settings/org.eclipse.jst.common.project.facet.core.prefs (rev 0) +++ trunk/simexplorer-is-web/.settings/org.eclipse.jst.common.project.facet.core.prefs 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,4 @@ +#Tue Jan 08 15:35:52 CET 2008 +classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER/owners=jst.java\:6.0 +classpath.helper/org.eclipse.jst.server.core.container\:\:org.eclipse.jst.server.tomcat.runtimeTarget\:\:Apache\ Tomcat\ v5.5/owners=jst.web\:2.4 +eclipse.preferences.version=1 Added: trunk/simexplorer-is-web/.settings/org.eclipse.wst.common.component =================================================================== --- trunk/simexplorer-is-web/.settings/org.eclipse.wst.common.component (rev 0) +++ trunk/simexplorer-is-web/.settings/org.eclipse.wst.common.component 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project-modules id="moduleCoreId" project-version="1.5.0"> + <wb-module deploy-name="simexplorer-is-web"> + <wb-resource deploy-path="/" source-path="/src/main/webapp"/> + <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> + <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/tapestry5-treegrid/tapestry5-treegrid"> + <dependency-type>uses</dependency-type> + </dependent-module> + <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/simexplorer-is-entities/simexplorer-is-entities"> + <dependency-type>uses</dependency-type> + </dependent-module> + <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/simexplorer-is-service/simexplorer-is-service"> + <dependency-type>uses</dependency-type> + </dependent-module> + <property name="context-root" value="simexplorer-is-web"/> + <property name="java-output-path" value="build/classes"/> + </wb-module> +</project-modules> Added: trunk/simexplorer-is-web/.settings/org.eclipse.wst.common.project.facet.core.xml =================================================================== --- trunk/simexplorer-is-web/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0) +++ trunk/simexplorer-is-web/.settings/org.eclipse.wst.common.project.facet.core.xml 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<faceted-project> + <runtime name="Apache Tomcat v5.5"/> + <fixed facet="jst.java"/> + <fixed facet="jst.web"/> + <installed facet="jst.java" version="6.0"/> + <installed facet="jst.web" version="2.4"/> +</faceted-project> Added: trunk/simexplorer-is-web/.svn.ok/dir-prop-base =================================================================== --- trunk/simexplorer-is-web/.svn.ok/dir-prop-base (rev 0) +++ trunk/simexplorer-is-web/.svn.ok/dir-prop-base 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,6 @@ +K 10 +svn:ignore +V 7 +target + +END Added: trunk/simexplorer-is-web/.svn.ok/entries =================================================================== --- trunk/simexplorer-is-web/.svn.ok/entries (rev 0) +++ trunk/simexplorer-is-web/.svn.ok/entries 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,70 @@ +8 + +dir +96 +svn+ssh://glandais at labs.libre-entreprise.org/svnroot/simexplorer-si/trunk/simexplorer-is-web +svn+ssh://glandais at labs.libre-entreprise.org/svnroot/simexplorer-si + + + +2008-01-04T16:55:38.241469Z +96 +glandais +has-props + +svn:special svn:externals svn:needs-lock + + + + + + + + + + + +722d4ed1-5654-48f2-973c-fc5317711c57 + +.classpath +file + + + + +2008-01-08T15:09:45.000000Z +48b49a178b38b7786930ac3cf87c5b12 +2008-01-04T16:00:46.830564Z +95 +glandais + +.project +file + + + + +2008-01-08T15:09:45.000000Z +6590a14bf77fc6cf4faa599574bea248 +2007-12-28T16:00:25.257635Z +91 +glandais + +.settings +dir + +pom.xml +file + + + + +2008-01-08T15:10:06.000000Z +290bf2374d7135771d3a64bfcb9a831d +2008-01-04T16:00:46.830564Z +95 +glandais + +src +dir + Added: trunk/simexplorer-is-web/.svn.ok/format =================================================================== --- trunk/simexplorer-is-web/.svn.ok/format (rev 0) +++ trunk/simexplorer-is-web/.svn.ok/format 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1 @@ +8 Added: trunk/simexplorer-is-web/.svn.ok/text-base/.classpath.svn-base =================================================================== --- trunk/simexplorer-is-web/.svn.ok/text-base/.classpath.svn-base (rev 0) +++ trunk/simexplorer-is-web/.svn.ok/text-base/.classpath.svn-base 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src/java"/> + <classpathentry kind="src" path="target/gen/java"/> + <classpathentry kind="src" path="src/ressources"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry combineaccessrules="false" kind="src" path="/simexplorer-is-storage"/> + <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"> + <attributes> + <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> + <classpathentry kind="output" path="target/classes"/> +</classpath> Added: trunk/simexplorer-is-web/.svn.ok/text-base/.project.svn-base =================================================================== --- trunk/simexplorer-is-web/.svn.ok/text-base/.project.svn-base (rev 0) +++ trunk/simexplorer-is-web/.svn.ok/text-base/.project.svn-base 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>simexplorer-is-web</name> + <comment>simexploreris web</comment> + <projects> + <project>simexplorer-is-storage</project> + </projects> + <buildSpec> + <buildCommand> + <name>org.maven.ide.eclipse.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.wst.common.project.facet.core.builder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.wst.validation.validationbuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.devzuz.q.maven.jdt.core.mavenIncrementalBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.maven.ide.eclipse.maven2Nature</nature> + <nature>org.devzuz.q.maven.jdt.core.mavenNature</nature> + <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> + <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> + <nature>org.eclipse.wst.common.project.facet.core.nature</nature> + </natures> +</projectDescription> Added: trunk/simexplorer-is-web/.svn.ok/text-base/pom.xml.svn-base =================================================================== --- trunk/simexplorer-is-web/.svn.ok/text-base/pom.xml.svn-base (rev 0) +++ trunk/simexplorer-is-web/.svn.ok/text-base/pom.xml.svn-base 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <artifactId>lutinproject</artifactId> + <groupId>lutinlib</groupId> + <version>2.2</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>simexplorer-is-web</groupId> + <artifactId>simexplorer-is-web</artifactId> + <packaging>war</packaging> + <version>0.0.1-SNAPSHOT</version> + <description></description> + + <profiles> + <profile> + <id>project</id> + + <activation> + <activeByDefault>true</activeByDefault> + </activation> + + <properties> + <!--Source base dir--> + <maven.src.dir> + ${basedir}/target/src-build + </maven.src.dir> + + <!--Test--> + <maven.test.skip>true</maven.test.skip> + + <!--Compile with ?--> + <maven.compile.source>1.5</maven.compile.source> + <maven.compile.target>1.5</maven.compile.target> + + <!--Verbose--> + <maven.verbose>false</maven.verbose> + </properties> + </profile> + </profiles> + + <build> + <resources> + <resource> + <directory>${maven.src.dir}/resources</directory> + <includes> + <include>**/*</include> + </includes> + </resource> + </resources> + <plugins> + <plugin> + <groupId>lutinplugin</groupId> + <artifactId>maven-processor-plugin</artifactId> + <version>0.12</version> + <executions> + <execution> + <id>Processor</id> + <phase>generate-sources</phase> + <goals> + <goal>process</goal> + </goals> + </execution> + </executions> + <configuration> + <srcDir>${basedir}/src</srcDir> + <destDir>${maven.src.dir}</destDir> + <includes> + <include>**/*.java</include> + </includes> + <filters> + org.codelutin.processor.filters.GeneratorTemplatesFilter, + org.codelutin.processor.filters.ActiveLogsCodeFilter + </filters> + <verbose>${maven.verbose}</verbose> + </configuration> + </plugin> + <plugin> + <groupId>lutinplugin</groupId> + <artifactId>maven-generator-plugin</artifactId> + <version>0.51-SNAPSHOT</version> + <executions> + <execution> + <id>Generator</id> + <phase>generate-sources</phase> + <goals> + <goal>zargo2xmi</goal> + <goal>xmi2statemodel</goal> + <goal>generate</goal> + </goals> + <configuration> + <srcDirZuml>src/xmi</srcDirZuml> + <srcXmiDest>target/gen/xmi/</srcXmiDest> + <srcGenDest>target/gen/models/</srcGenDest> + <includes>**/*.*model</includes> + <templates> + org.codelutin.topia.generator.TapestryWebGenerator + </templates> + <destDirGen>target/gen/java</destDirGen> + </configuration> + </execution> + </executions> + <dependencies> + <dependency> + <groupId>lutinlib</groupId> + <artifactId>topia</artifactId> + <version>2.0.26-SNAPSHOT</version> + <scope>compile</scope> + </dependency> + </dependencies> + </plugin> + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>CopyGenJavaVersSrcBuild</id> + <phase>process-sources</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <tasks> + <copy + todir="${basedir}/target/src-build/java" + verbose="${maven.verbose}" overwrite="false"> + <fileset + dir="${basedir}/target/gen/java" /> + </copy> + </tasks> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + <dependencies> + <dependency> + <groupId>org.apache.tapestry</groupId> + <artifactId>tapestry-upload</artifactId> + <version>5.0.7</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.3</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.healthmarketscience.rmiio</groupId> + <artifactId>rmiio</artifactId> + <version>2.0.0</version> + </dependency> + <dependency> + <groupId>org.directwebremoting</groupId> + <artifactId>dwr</artifactId> + <version>2.0.2</version> + <scope>compile</scope> + </dependency> + + </dependencies> +</project> \ No newline at end of file Added: trunk/simexplorer-is-web/pom.xml =================================================================== --- trunk/simexplorer-is-web/pom.xml (rev 0) +++ trunk/simexplorer-is-web/pom.xml 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><project> + <modelVersion>4.0.0</modelVersion> + <groupId>simexplorer-is</groupId> + <artifactId>simexplorer-is-web</artifactId> + <packaging>war</packaging> + <version>0.0.1-SNAPSHOT</version> + <description></description> + <build> + <plugins> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + </plugins> + </build> + <dependencies> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <version>5.1</version> + <classifier>jdk15</classifier> + <scope>test</scope> + </dependency> + <dependency> + <groupId>simexplorer-is</groupId> + <artifactId>simexplorer-is-entities</artifactId> + <version>0.0.1-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>simexplorer-is</groupId> + <artifactId>simexplorer-is-service</artifactId> + <version>0.0.1-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>tapestry5-treegrid</groupId> + <artifactId>tapestry5-treegrid</artifactId> + <version>0.0.1-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>jboss</groupId> + <artifactId>jbossall-client</artifactId> + <version>3.2.3</version> + </dependency> + <dependency> + <groupId>org.apache.tapestry</groupId> + <artifactId>tapestry-upload</artifactId> + <version>5.0.7</version> + </dependency> + </dependencies> +</project> \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/ContextListener.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/ContextListener.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/ContextListener.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,26 @@ +package fr.cemagref.simexplorer.is.ui.web; + +import javax.servlet.ServletContextEvent; +import javax.servlet.ServletContextListener; + +import fr.cemagref.simexplorer.is.ui.web.services.StorageServiceFactory; + +public class ContextListener implements ServletContextListener { + + public void contextDestroyed(ServletContextEvent arg0) { + try { + StorageServiceFactory.getService().close(); + } catch (Throwable e) { + e.printStackTrace(); + } + } + + public void contextInitialized(ServletContextEvent arg0) { + try { + StorageServiceFactory.getService().open(); + } catch (Throwable e) { + e.printStackTrace(); + } + } + +} Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/base/UseCaseMap.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/base/UseCaseMap.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/base/UseCaseMap.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,36 @@ +package fr.cemagref.simexplorer.is.ui.web.base; + +import java.util.HashMap; +import java.util.Map; + +public class UseCaseMap { + + /** + * Map (state name -> state instance) + */ + private Map<String,Object[]> mapUseCase; + + /** + * Constructor + */ + public UseCaseMap () { + mapUseCase = new HashMap<String,Object[]>(); + } + + /** + * New sub use case + */ + public void enterSubUseCase(String newUseCaseName, String previousUseCaseName, Object state) { + mapUseCase.put(newUseCaseName,new Object[]{previousUseCaseName,state}); + } + + /** + * Finish a subusecase + * + * Return the state that init the subuse case + * @return a state + */ + public Object[] leaveUseCase(String useCaseName) { + return mapUseCase.get(useCaseName); + } +} Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/base/UseCasePage.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/base/UseCasePage.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/base/UseCasePage.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,107 @@ +package fr.cemagref.simexplorer.is.ui.web.base; + +import org.apache.tapestry.Link; +import org.apache.tapestry.annotations.ApplicationState; +import org.apache.tapestry.ioc.annotations.Inject; +import org.apache.tapestry.annotations.Service; +import org.apache.tapestry.internal.services.LinkFactory; +import org.apache.tapestry.internal.services.LinkFactoryListener; +import org.apache.tapestry.services.Request; + +public abstract class UseCasePage implements LinkFactoryListener { + + private static final String UC_PARAMETER_NAME = "UC"; + private static final String UC_PARAMETER_SEPARATOR = ":"; + + @ApplicationState + private UseCaseMap useCaseManager; + private boolean useCaseManagerExists; + + @Inject + @Service("LinkFactory") + private LinkFactory _linkFactory; + + @Inject + @Service("Request") + private Request _request; + + private String UCName; + + public void onActivate() { + _linkFactory.addListener(this); + + UCName = _request.getParameter(UC_PARAMETER_NAME); + } + + protected abstract String getUseCaseName(); + + /** + * Create stack if not exists + */ + protected void init() { + if(!useCaseManagerExists) { + useCaseManager = new UseCaseMap(); + } + } + /** + * Enter in a new sub use case + */ + protected void enterUseCase() { + init(); + // current + String currentUCN = UCName; + // new + UCName = (currentUCN == null) ? getUseCaseName() : currentUCN + UC_PARAMETER_SEPARATOR + getUseCaseName(); + useCaseManager.enterSubUseCase(UCName, currentUCN, this); + } + + /** + * Leave a sub use case + */ + protected UseCasePage leaveUseCase() { + init(); + + UseCasePage nextPage = null; + + // current UCN + String UC = UCName; + + // get state + Object[] response = useCaseManager.leaveUseCase(UC); + + // if null, return null, don't change page + if(response != null) { + // get UCN before enter this one + UCName = (String) response[0]; + + nextPage = (UseCasePage) response[1]; + } + + return nextPage; + } + + /* (non-Javadoc) + * @see org.apache.tapestry.internal.services.LinkFactoryListener#createdActionLink(org.apache.tapestry.Link) + */ + public void createdActionLink(Link _link) { + addUCParameter(_link); + } + + /* (non-Javadoc) + * @see org.apache.tapestry.internal.services.LinkFactoryListener#createdPageLink(org.apache.tapestry.Link) + */ + public void createdPageLink(Link _link) { + // PageLink englobe ausssi les redirects envoyᅵs au client apres une + // action + addUCParameter(_link); + } + + protected void addUCParameter(Link _link) { + if(_link.getParameterValue(UC_PARAMETER_NAME) == null) { + + if(UCName != null) { + _link.addParameter(UC_PARAMETER_NAME, UCName); + } + } + } +} Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/components/Layout.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/components/Layout.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/components/Layout.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,95 @@ +/* *##% + * Copyright (C) 2006 Code Lutin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +package fr.cemagref.simexplorer.is.ui.web.components; + +import java.util.Locale; + +import org.apache.tapestry.Asset; +import org.apache.tapestry.annotations.IncludeStylesheet; +import org.apache.tapestry.annotations.InjectPage; +import org.apache.tapestry.annotations.Parameter; +import org.apache.tapestry.annotations.Path; +import org.apache.tapestry.annotations.Service; +import org.apache.tapestry.ioc.annotations.Inject; +import org.apache.tapestry.services.PersistentLocale; + +import fr.cemagref.simexplorer.is.ui.web.pages.UserList; + +/** + * AbstractPage.java + * + * @author chatellier + * @version $Revision: 1.1 $ + * + * Last update : $Date: 2007/05/14 07:56:43 $ By : $Author: E023931M $ + */ + at IncludeStylesheet("css/Layout.css") +public class Layout { + + /* linked state "UserList" */ + @InjectPage + private UserList userList; + + /** + * page title + */ + @Parameter("defaulttitle") + private String title; + + public Layout() { + super(); + } + + /** + * @return the title + */ + public String getTitle() { + return title; + } + + /** + * Set default title + */ + void getDefaultTitle() { + title = ""; + } + + @Inject + @Service("PersistentLocale") + private PersistentLocale persistentLocale; + + Object onActionFromSwitchLocaleFr() { + persistentLocale.set(new Locale("fr")); + return null; + } + + Object onActionFromSwitchLocaleEn() { + persistentLocale.set(new Locale("en")); + return null; + } + + Object onActionFromAdministration() { + return userList; + } + + public boolean getAdministrator() { + return true; + } + +} Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/grid/ApplicationDataSource.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/grid/ApplicationDataSource.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/grid/ApplicationDataSource.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,87 @@ +package fr.cemagref.simexplorer.is.ui.web.grid; + +import javax.naming.NamingException; + +import org.apache.tapestry.beaneditor.PropertyModel; +import org.apache.tapestry.grid.GridDataSource; + +import fr.cemagref.simexplorer.is.entities.metadata.MetaDataEntity; +import fr.cemagref.simexplorer.is.ui.web.services.StorageServiceFactory; + +public class ApplicationDataSource implements GridDataSource { + + private String query = ""; + private int indexStart = 0; + private MetaDataEntity[] entities = null; + + public ApplicationDataSource(String query) { + super(); + this.query = query; + } + + public ApplicationDataSource() { + super(); + this.query = ""; + } + + public int getAvailableRows() { + int result = 0; + try { + if (query.isEmpty()) { + result = StorageServiceFactory.getService() + .findApplicationsCount(false); + } else { + result = StorageServiceFactory.getService().findFullTextCount( + query, false); + } + } catch (NamingException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return result; + } + + public Class getRowType() { + return MetaDataEntity.class; + } + + public Object getRowValue(int index) { + return entities[index - indexStart]; + } + + public void prepare(int startIndex, int endIndex, PropertyModel sortModel, + boolean ascending) { + try { + this.indexStart = startIndex; + + int dateOrder = 0; + if (sortModel != null + && "creationDate".equals(sortModel.getPropertyName())) { + if (ascending) { + dateOrder = 1; + } else { + dateOrder = -1; + } + } + + if (query.isEmpty()) { + entities = StorageServiceFactory.getService() + .findApplications(false, startIndex, + 1 + endIndex - startIndex, dateOrder); + } else { + entities = StorageServiceFactory.getService().findFullText( + query, false, startIndex, 1 + endIndex - startIndex, + dateOrder); + } + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + this.indexStart = 0; + entities = new MetaDataEntity[0]; + } + } + +} Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractApplicationDetail.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractApplicationDetail.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractApplicationDetail.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,30 @@ +// Automatically generated by LutinGenerator +package fr.cemagref.simexplorer.is.ui.web.pages; + +import org.apache.tapestry.annotations.InjectPage; +import fr.cemagref.simexplorer.is.ui.web.base.UseCasePage; + +/* + * State AbstractApplicationDetail + */ +public abstract class AbstractApplicationDetail extends UseCasePage { + + /* linked state "ApplicationList" */ + @InjectPage + private ApplicationList applicationList; + + /* getter for state "ApplicationList" */ + protected ApplicationList getApplicationList() { + return applicationList; + } + + /* transition on "retour" event */ + public Object onActionFromRetour() { + return applicationList; + } + + /* return a unique state id for model */ + protected final String getUseCaseName() { + return "ad"; + } +} \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractApplicationExport.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractApplicationExport.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractApplicationExport.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,30 @@ +// Automatically generated by LutinGenerator +package fr.cemagref.simexplorer.is.ui.web.pages; + +import org.apache.tapestry.annotations.InjectPage; +import fr.cemagref.simexplorer.is.ui.web.base.UseCasePage; + +/* + * State AbstractApplicationExport + */ +public abstract class AbstractApplicationExport extends UseCasePage { + + /* linked state "ApplicationList" */ + @InjectPage + private ApplicationList applicationList; + + /* getter for state "ApplicationList" */ + protected ApplicationList getApplicationList() { + return applicationList; + } + + /* transition on "retour" event */ + public Object onActionFromRetour() { + return applicationList; + } + + /* return a unique state id for model */ + protected final String getUseCaseName() { + return "ae"; + } +} \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractApplicationImport.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractApplicationImport.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractApplicationImport.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,30 @@ +// Automatically generated by LutinGenerator +package fr.cemagref.simexplorer.is.ui.web.pages; + +import org.apache.tapestry.annotations.InjectPage; +import fr.cemagref.simexplorer.is.ui.web.base.UseCasePage; + +/* + * State AbstractApplicationImport + */ +public abstract class AbstractApplicationImport extends UseCasePage { + + /* linked state "ApplicationList" */ + @InjectPage + private ApplicationList applicationList; + + /* getter for state "ApplicationList" */ + protected ApplicationList getApplicationList() { + return applicationList; + } + + /* transition on "retour" event */ + public Object onActionFromRetour() { + return applicationList; + } + + /* return a unique state id for model */ + protected final String getUseCaseName() { + return "ai"; + } +} \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractApplicationList.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractApplicationList.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractApplicationList.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,73 @@ +// Automatically generated by LutinGenerator +package fr.cemagref.simexplorer.is.ui.web.pages; + +import org.apache.tapestry.annotations.InjectPage; +import fr.cemagref.simexplorer.is.ui.web.base.UseCasePage; + +/* + * State AbstractApplicationList + */ +public abstract class AbstractApplicationList extends UseCasePage { + + /* linked state "ApplicationDetail" */ + @InjectPage + private ApplicationDetail applicationDetail; + + /* getter for state "ApplicationDetail" */ + protected ApplicationDetail getApplicationDetail() { + return applicationDetail; + } + + /* transition on "detail" event */ + public Object onActionFromDetail() { + return applicationDetail; + } + + /* linked state "ApplicationImport" */ + @InjectPage + private ApplicationImport applicationImport; + + /* getter for state "ApplicationImport" */ + protected ApplicationImport getApplicationImport() { + return applicationImport; + } + + /* transition on "importer" event */ + public Object onActionFromImporter() { + return applicationImport; + } + + /* linked state "ApplicationExport" */ + @InjectPage + private ApplicationExport applicationExport; + + /* getter for state "ApplicationExport" */ + protected ApplicationExport getApplicationExport() { + return applicationExport; + } + + /* transition on "export" event */ + public Object onActionFromExport() { + return applicationExport; + } + + /* linked state "UserAdministration" */ + @InjectPage + private UserList userList; + + /* getter for state "UserAdministration" */ + protected UserList getUserList() { + return userList; + } + + /* transition on administration event */ + public Object onActionFromAdministration() { + enterUseCase(); + return userList; + } + + /* return a unique state id for model */ + protected final String getUseCaseName() { + return "al"; + } +} \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractGroupEdit.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractGroupEdit.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractGroupEdit.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,30 @@ +// Automatically generated by LutinGenerator +package fr.cemagref.simexplorer.is.ui.web.pages; + +import org.apache.tapestry.annotations.InjectPage; +import fr.cemagref.simexplorer.is.ui.web.base.UseCasePage; + +/* + * State AbstractGroupEdit + */ +public abstract class AbstractGroupEdit extends UseCasePage { + + /* linked state "GroupList" */ + @InjectPage + private GroupList groupList; + + /* getter for state "GroupList" */ + protected GroupList getGroupList() { + return groupList; + } + + /* transition on "retour" event */ + public Object onActionFromRetour() { + return groupList; + } + + /* return a unique state id for model */ + protected final String getUseCaseName() { + return "ge"; + } +} \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractGroupList.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractGroupList.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractGroupList.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,58 @@ +// Automatically generated by LutinGenerator +package fr.cemagref.simexplorer.is.ui.web.pages; + +import org.apache.tapestry.annotations.InjectPage; +import fr.cemagref.simexplorer.is.ui.web.base.UseCasePage; + +/* + * State AbstractGroupList + */ +public abstract class AbstractGroupList extends UseCasePage { + + /* linked state "UserList" */ + @InjectPage + private UserList userList; + + /* getter for state "UserList" */ + protected UserList getUserList() { + return userList; + } + + /* transition on "retour" event */ + public Object onActionFromRetour() { + return userList; + } + + /* linked state "GroupEdit" */ + @InjectPage + private GroupEdit groupEdit; + + /* getter for state "GroupEdit" */ + protected GroupEdit getGroupEdit() { + return groupEdit; + } + + /* transition on "edit" event */ + public Object onActionFromEdit() { + return groupEdit; + } + + /* linked state "UserEdit" */ + @InjectPage + private UserEdit userEdit; + + /* getter for state "UserEdit" */ + protected UserEdit getUserEdit() { + return userEdit; + } + + /* transition on "usergroup" event */ + public Object onActionFromUsergroup() { + return userEdit; + } + + /* return a unique state id for model */ + protected final String getUseCaseName() { + return "gl"; + } +} \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractUserEdit.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractUserEdit.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractUserEdit.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,44 @@ +// Automatically generated by LutinGenerator +package fr.cemagref.simexplorer.is.ui.web.pages; + +import org.apache.tapestry.annotations.InjectPage; +import fr.cemagref.simexplorer.is.ui.web.base.UseCasePage; + +/* + * State AbstractUserEdit + */ +public abstract class AbstractUserEdit extends UseCasePage { + + /* linked state "UserList" */ + @InjectPage + private UserList userList; + + /* getter for state "UserList" */ + protected UserList getUserList() { + return userList; + } + + /* transition on "retour" event */ + public Object onActionFromRetour() { + return userList; + } + + /* linked state "GroupList" */ + @InjectPage + private GroupList groupList; + + /* getter for state "GroupList" */ + protected GroupList getGroupList() { + return groupList; + } + + /* transition on "" event */ + public Object onActionFrom() { + return groupList; + } + + /* return a unique state id for model */ + protected final String getUseCaseName() { + return "ue"; + } +} \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractUserList.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractUserList.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/AbstractUserList.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,49 @@ +// Automatically generated by LutinGenerator +package fr.cemagref.simexplorer.is.ui.web.pages; + +import org.apache.tapestry.annotations.InjectPage; +import fr.cemagref.simexplorer.is.ui.web.base.UseCasePage; + +/* + * State AbstractUserList + */ +public abstract class AbstractUserList extends UseCasePage { + + /* linked state "GroupList" */ + @InjectPage + private GroupList groupList; + + /* getter for state "GroupList" */ + protected GroupList getGroupList() { + return groupList; + } + + /* transition on "group" event */ + public Object onActionFromGroup() { + return groupList; + } + + /* linked state "UserEdit" */ + @InjectPage + private UserEdit userEdit; + + /* getter for state "UserEdit" */ + protected UserEdit getUserEdit() { + return userEdit; + } + + /* transition on "edit" event */ + public Object onActionFromEdit() { + return userEdit; + } + + /* transition on "retour" event */ + public Object onActionFromRetour() { + return leaveUseCase(); + } + + /* return a unique state id for model */ + protected final String getUseCaseName() { + return "ul"; + } +} \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationDetail.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationDetail.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationDetail.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,273 @@ +package fr.cemagref.simexplorer.is.ui.web.pages; + +import java.io.ByteArrayOutputStream; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import java.util.StringTokenizer; + +import org.apache.tapestry.ComponentResources; +import org.apache.tapestry.Link; +import org.apache.tapestry.StreamResponse; +import org.apache.tapestry.annotations.Persist; +import org.apache.tapestry.ioc.annotations.Inject; +import org.apache.tapestry.util.TextStreamResponse; +import org.codelutin.tapestry.beans.TreeNode; + +import com.healthmarketscience.rmiio.RemoteOutputStreamServer; +import com.healthmarketscience.rmiio.SimpleRemoteOutputStream; + +import fr.cemagref.simexplorer.is.entities.data.Code; +import fr.cemagref.simexplorer.is.entities.data.Component; +import fr.cemagref.simexplorer.is.entities.data.Constant; +import fr.cemagref.simexplorer.is.entities.data.ConstantValue; +import fr.cemagref.simexplorer.is.entities.data.ExplorationApplication; +import fr.cemagref.simexplorer.is.entities.data.ExplorationData; +import fr.cemagref.simexplorer.is.entities.data.Library; +import fr.cemagref.simexplorer.is.entities.data.Result; +import fr.cemagref.simexplorer.is.entities.data.Structure; +import fr.cemagref.simexplorer.is.ui.web.services.StorageServiceFactory; + +public class ApplicationDetail extends AbstractApplicationDetail { + + @Inject + private ComponentResources resources; + + @Persist + private ExplorationApplication explorationApplication; + + public void setup(String uuid, String version) throws Exception { + explorationApplication = StorageServiceFactory.getService() + .getExplorationApplication(uuid, version); + } + + public List<String> getHeaders() { + List<String> result = new ArrayList<String>(); + result.add(""); + result.add(""); + result.add(""); + result.add(""); + return result; + } + + public List<TreeNode> getNodes() { + List<TreeNode> nodes = new ArrayList<TreeNode>(); + nodes.add(generateAppllication()); + return nodes; + } + + public Object exportElement(String uuid, String version) throws Exception { + StreamResponse response = null; + + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + RemoteOutputStreamServer xmlRemoteOutputStream = new SimpleRemoteOutputStream( + bos); + StorageServiceFactory.getService().exportElement( + xmlRemoteOutputStream.export(), uuid, version); + response = new TextStreamResponse("text/xml", bos.toString()); + + return response; + } + + public Object onExportea(String context) throws Exception { + return exportElement(explorationApplication.getMetaData().getUuid(), + explorationApplication.getMetaData().getVersion().toString()); + } + + public Object onExportElement(String context) throws Exception { + StringTokenizer st = new StringTokenizer(context, ","); + String uuid = st.nextToken(); + String version = st.nextToken(); + return exportElement(uuid, version); + } + + private String[] generateStringArray(String s1, String s2, String s3) { + List<String> result = new ArrayList<String>(); + result.add(s1); + result.add(s2); + result.add(s3); + result.add(""); + return result.toArray(new String[0]); + } + + private String[] generateStringArray(String s1, String s2, String s3, + String actionCaption, String action, Object context) { + List<String> result = new ArrayList<String>(); + result.add(s1); + result.add(s2); + result.add(s3); + Link link = resources.createActionLink(action, false, context); + StringBuffer sb = new StringBuffer(""); + sb.append("<a href=\""); + sb.append(link.toString()); + sb.append("\">"); + sb.append(actionCaption); + sb.append("</a>"); + result.add(sb.toString()); + return result.toArray(new String[0]); + } + + private TreeNode generateAppllication() { + TreeNode node = new TreeNode(); + node.setType(TreeNode.TYPE_FOLDER); + + node.setColumns(generateStringArray("Exploration Application", + explorationApplication.getMetaData().getDescription(), + explorationApplication.getMetaData().getVersion().toString(), + "Export", "exportea", null)); + TreeNode[] children = new TreeNode[2]; + children[0] = new TreeNode(); + children[0].setType(TreeNode.TYPE_FOLDER); + children[0].setColumns(generateStringArray("Components", "", "")); + children[0].setChildren(generateComponents()); + + children[1] = new TreeNode(); + children[1].setType(TreeNode.TYPE_FOLDER); + children[1].setColumns(generateStringArray("Explorations", "", "")); + children[1].setChildren(generateExplorations()); + + node.setChildren(children); + + return node; + } + + private TreeNode[] generateExplorations() { + TreeNode[] res = new TreeNode[explorationApplication.getExplorations() + .size()]; + int i = 0; + for (ExplorationData explorationData : explorationApplication + .getExplorations()) { + res[i] = new TreeNode(); + res[i].setType(TreeNode.TYPE_FOLDER); + res[i] + .setColumns(generateStringArray("Exploration data", + explorationData.getMetaData().getDescription(), + explorationData.getMetaData().getVersion() + .toString(), "Export", "exportElement", + explorationData.getMetaData().getUuid() + + "," + + explorationData.getMetaData() + .getVersion())); + TreeNode[] children = new TreeNode[2]; + children[0] = generateResult(explorationData.getResult()); + children[1] = new TreeNode(); + children[1].setType(TreeNode.TYPE_FOLDER); + children[1].setColumns(generateStringArray("Values", "", "")); + children[1].setChildren(generateValues(explorationData)); + res[i].setChildren(children); + i++; + } + return res; + } + + private TreeNode[] generateValues(ExplorationData explorationData) { + Set<ConstantValue> values = explorationData.getValuesMap(); + TreeNode[] res = new TreeNode[values.size()]; + int i = 0; + for (ConstantValue value : values) { + res[i] = new TreeNode(); + res[i].setType(TreeNode.TYPE_DOCUMENT); + res[i].setColumns(generateStringArray( + value.getConstant().getName(), value.getValue(), value + .getConstant().getType().getSimpleName())); + i++; + } + + return res; + } + + private TreeNode generateResult(Result result) { + TreeNode res = new TreeNode(); + res.setType(TreeNode.TYPE_DOCUMENT); + res.setColumns(generateStringArray("Result", "", "")); + return res; + } + + private TreeNode[] generateComponents() { + Set<Component> components = explorationApplication.getComponents(); + TreeNode[] res = new TreeNode[components.size()]; + + int i = 0; + for (Component component : components) { + res[i] = new TreeNode(); + res[i].setType(TreeNode.TYPE_FOLDER); + res[i].setColumns(generateStringArray("Component", component + .getMetaData().getDescription(), component.getMetaData() + .getVersion().toString(), "Export", "exportElement", + component.getMetaData().getUuid() + "," + + component.getMetaData().getVersion())); + TreeNode[] children = new TreeNode[4]; + for (int j = 0; j < children.length; j++) { + children[j] = new TreeNode(); + children[j].setType(TreeNode.TYPE_FOLDER); + } + children[0].setColumns(generateStringArray("Constants", "", "")); + children[0] + .setChildren(generateConstants(component.getConstants())); + children[1].setColumns(generateStringArray("Structures", "", "")); + children[1].setChildren(generateStructures(component + .getStructures())); + children[2].setColumns(generateStringArray("Codes", "", "")); + children[2].setChildren(generateCodes(component.getCodes())); + children[3].setColumns(generateStringArray("Libraries", "", "")); + children[3] + .setChildren(generateLibraries(component.getLibraries())); + res[i].setChildren(children); + i++; + } + + return res; + } + + private TreeNode[] generateLibraries(Set<Library> libraries) { + TreeNode[] res = new TreeNode[libraries.size()]; + int i = 0; + for (Library library : libraries) { + res[i] = new TreeNode(); + res[i].setType(TreeNode.TYPE_DOCUMENT); + res[i].setColumns(generateStringArray("Library", "", "")); + i++; + } + return res; + } + + private TreeNode[] generateCodes(Set<Code> codes) { + TreeNode[] res = new TreeNode[codes.size()]; + int i = 0; + for (Code code : codes) { + res[i] = new TreeNode(); + res[i].setType(TreeNode.TYPE_DOCUMENT); + res[i].setColumns(generateStringArray("Code", code.getLanguage(), + code.getCode())); + i++; + } + return res; + } + + private TreeNode[] generateStructures(Set<Structure> structures) { + TreeNode[] res = new TreeNode[structures.size()]; + int i = 0; + for (Structure structure : structures) { + res[i] = new TreeNode(); + res[i].setType(TreeNode.TYPE_DOCUMENT); + res[i].setColumns(generateStringArray("Structure", "", "")); + i++; + } + return res; + } + + private TreeNode[] generateConstants(Set<Constant> constants) { + TreeNode[] res = new TreeNode[constants.size()]; + int i = 0; + for (Constant constant : constants) { + res[i] = new TreeNode(); + res[i].setType(TreeNode.TYPE_DOCUMENT); + res[i].setColumns(generateStringArray("Constant", constant + .getName(), constant.getType().getSimpleName())); + i++; + } + return res; + } + +} Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationExport.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationExport.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationExport.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,9 @@ +package fr.cemagref.simexplorer.is.ui.web.pages; + +import org.apache.tapestry.annotations.Component; + +import fr.cemagref.simexplorer.is.ui.web.components.Layout; + +public class ApplicationExport extends AbstractApplicationExport { + +} Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationImport.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationImport.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationImport.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,42 @@ +package fr.cemagref.simexplorer.is.ui.web.pages; + +import org.apache.tapestry.annotations.Component; +import org.apache.tapestry.upload.services.UploadedFile; + +import com.healthmarketscience.rmiio.RemoteInputStreamServer; +import com.healthmarketscience.rmiio.SimpleRemoteInputStream; + +import fr.cemagref.simexplorer.is.ui.web.components.Layout; +import fr.cemagref.simexplorer.is.ui.web.services.StorageServiceFactory; + +public class ApplicationImport extends AbstractApplicationImport { + + private UploadedFile fileEA; + private UploadedFile fileLib; + + public UploadedFile getFileEA() { + return fileEA; + } + + public void setFileEA(UploadedFile fileEA) { + this.fileEA = fileEA; + } + + public UploadedFile getFileLib() { + return fileLib; + } + + public void setFileLib(UploadedFile fileLib) { + this.fileLib = fileLib; + } + + public void onSuccess() throws Exception { + if (fileEA != null) { + RemoteInputStreamServer zipRemoteStream = new SimpleRemoteInputStream( + fileEA.getStream()); + StorageServiceFactory.getService().saveElement( + zipRemoteStream.export()); + } + } + +} Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationList.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationList.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationList.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,82 @@ +package fr.cemagref.simexplorer.is.ui.web.pages; + +import java.util.ArrayList; +import java.util.List; +import java.util.StringTokenizer; + +import org.apache.tapestry.ComponentResources; +import org.apache.tapestry.annotations.InjectPage; +import org.apache.tapestry.annotations.Retain; +import org.apache.tapestry.beaneditor.BeanModel; +import org.apache.tapestry.internal.beaneditor.BeanModelImpl; +import org.apache.tapestry.ioc.annotations.Inject; +import org.apache.tapestry.services.BeanModelSource; + +import fr.cemagref.simexplorer.is.entities.metadata.MetaDataEntity; +import fr.cemagref.simexplorer.is.ui.web.grid.ApplicationDataSource; + +public class ApplicationList extends AbstractApplicationList { + + @Retain + private BeanModel model; + + @Inject + private BeanModelSource beanModelSource; + + @Inject + private ComponentResources resources; + + private MetaDataEntity application; + + @InjectPage + private ApplicationDetail applicationDetail; + + void pageLoaded() { + model = beanModelSource.create(MetaDataEntity.class, true, resources); + List<String> wantedProperties = new ArrayList<String>(); + wantedProperties.add("uuid"); + wantedProperties.add("name"); + wantedProperties.add("description"); + wantedProperties.add("version"); + wantedProperties.add("creationDate"); + List<String> properties = model.getPropertyNames(); + for (String property : properties) { + if (!"creationDate".equals(property)) { + model.get(property).sortable(false); + } + if (!wantedProperties.contains(property)) { + model = model.remove(property); + } + } + } + + public BeanModel getModel() { + return model; + } + + public ApplicationDataSource getApplications() { + return new ApplicationDataSource(); + } + + public MetaDataEntity getApplication() { + return application; + } + + public void setApplication(MetaDataEntity application) { + this.application = application; + } + + public String getDetailApplicationContext() { + String result = application.getUuid() + "," + application.getVersion(); + return result; + } + + public Object onActionFromDetailApplication(String context) throws Exception { + StringTokenizer st = new StringTokenizer(context, ","); + String uuid = st.nextToken(); + String version = st.nextToken(); + applicationDetail.setup(uuid, version); + return applicationDetail; + } + +} Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,18 @@ +package fr.cemagref.simexplorer.is.ui.web.pages; + +import org.apache.tapestry.annotations.Component; +import org.apache.tapestry.annotations.Persist; + +import fr.cemagref.simexplorer.is.ui.web.components.Layout; + +public class GroupEdit extends AbstractGroupEdit { + + @Persist + private int groupId; + + void onActivate(int groupId) { + this.groupId = groupId; + this.onActivate(); + } + +} Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,9 @@ +package fr.cemagref.simexplorer.is.ui.web.pages; + +import org.apache.tapestry.annotations.Component; + +import fr.cemagref.simexplorer.is.ui.web.components.Layout; + +public class GroupList extends AbstractGroupList { + +} Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,18 @@ +package fr.cemagref.simexplorer.is.ui.web.pages; + +import org.apache.tapestry.annotations.Component; +import org.apache.tapestry.annotations.Persist; + +import fr.cemagref.simexplorer.is.ui.web.components.Layout; + +public class UserEdit extends AbstractUserEdit { + + @Persist + private int userId; + + void onActivate(int userId) { + this.userId = userId; + this.onActivate(); + } + +} Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/UserList.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/UserList.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/pages/UserList.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,9 @@ +package fr.cemagref.simexplorer.is.ui.web.pages; + +import org.apache.tapestry.annotations.Component; + +import fr.cemagref.simexplorer.is.ui.web.components.Layout; + +public class UserList extends AbstractUserList { + +} Added: trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/services/StorageServiceFactory.java =================================================================== --- trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/services/StorageServiceFactory.java (rev 0) +++ trunk/simexplorer-is-web/src/main/java/fr/cemagref/simexplorer/is/ui/web/services/StorageServiceFactory.java 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,32 @@ +package fr.cemagref.simexplorer.is.ui.web.services; + +import java.util.Properties; +import java.util.Map.Entry; + +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.NamingException; + +import fr.cemagref.simexplorer.is.service.StorageService; + +public class StorageServiceFactory { + + private static StorageService serviceProjets = null; + + public static StorageService getService() throws NamingException { + if (serviceProjets == null) { + Properties properties = (Properties) System.getProperties().clone(); + properties.put("java.naming.provider.url", "jnp://localhost:1099"); + properties.put("java.naming.factory.initial", + "org.jnp.interfaces.NamingContextFactory"); + properties + .put("java.naming.factory.url.pkgs", "org.jnp.interfaces"); + + Context context = new InitialContext(properties); + serviceProjets = (StorageService) context + .lookup("ejb3/StorageService"); + } + return serviceProjets; + } + +} Added: trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/Layout.properties =================================================================== --- trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/Layout.properties (rev 0) +++ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/Layout.properties 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,22 @@ +abstractpage-windowtitle=Simexplorer SI +abstractpage-pagetitle=Simexplorer SI + +abstractpage-menutitle=Menu +abstractpage-menusubtitle1=Application Menu +abstractpage-menuitem1-1=List +abstractpage-menuitem1-2=Import + +abstractpage-menusubtitle2=Administration Menu +abstractpage-menuitem2-1=User list +abstractpage-menuitem2-2=Add user +abstractpage-menuitem2-3=Group list +abstractpage-menuitem2-4=Add group + +abstractpage-tip=Change your navigator language to see this website in another language. + +abstractpage-localeen=English +abstractpage-localefr=Français + +abstractpage-administration=Administration + +abstractpage-copyright=Copyright © 2007. Code Lutin - GPL Added: trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/Layout.tml =================================================================== --- trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/Layout.tml (rev 0) +++ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/Layout.tml 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,58 @@ +<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> + <head> + <title>${title}</title> + </head> + + <body> + + <!-- titre --> + <h1 id="Title">${message:abstractpage-pagetitle}</h1> + + <!-- barre --> + <div id="Header"> + <div class="Left"> + [<a t:type="actionlink" t:id="switchLocaleEn">${message:abstractpage-localeen}</a>] + - + [<a t:type="actionlink" t:id="switchLocaleFr">${message:abstractpage-localefr}</a>] + </div> + <div class="Right"> + <!-- + <t:if test="administrator"> + <a t:type="actionlink" t:id="administration">${message:abstractpage-administration}</a> + </t:if> + --> + </div> + + </div> + + <div id="Menu" class=""> + <!-- menu --> + <h1 class="tab">${message:abstractpage-menutitle}</h1> + <div id="tabMenu"> + + <h2 class="Title">${message:abstractpage-menusubtitle1}</h2> + <menu class="menu"> + <li><t:pagelink page="ApplicationList">${message:abstractpage-menuitem1-1}</t:pagelink></li> + <li><t:pagelink page="ApplicationImport">${message:abstractpage-menuitem1-2}</t:pagelink></li> + </menu> + + <!-- h2 class="Title">${message:abstractpage-menusubtitle2}</h2> + <menu class="menu"> + <li><t:pagelink page="UserList">${message:abstractpage-menuitem2-1}</t:pagelink></li> + <li><t:pagelink page="UserEdit" context="-1">${message:abstractpage-menuitem2-2}</t:pagelink></li> + <li><t:pagelink page="GroupList">${message:abstractpage-menuitem2-3}</t:pagelink></li> + <li><t:pagelink page="GroupEdit" context="-1">${message:abstractpage-menuitem2-4}</t:pagelink></li> + </menu --> + + </div> + </div> + + <div id="Content"> + <!-- main template here --> + <t:body/> + </div> + + <div id="FooterAdd">${message:abstractpage-copyright} + </div> + </body> +</html> \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/Layout_fr.properties =================================================================== --- trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/Layout_fr.properties (rev 0) +++ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/Layout_fr.properties 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,22 @@ +abstractpage-windowtitle=Simexplorer SI +abstractpage-pagetitle=Simexplorer SI + +abstractpage-menutitle=Menu +abstractpage-menusubtitle1=Application Menu +abstractpage-menuitem1-1=List +abstractpage-menuitem1-2=Import + +abstractpage-menusubtitle2=Administration Menu +abstractpage-menuitem2-1=User list +abstractpage-menuitem2-2=Add user +abstractpage-menuitem2-3=Group list +abstractpage-menuitem2-4=Add group + +abstractpage-tip=Change your navigator language to see this website in another language. + +abstractpage-localeen=English +abstractpage-localefr=Français + +abstractpage-administration=Administration + +abstractpage-copyright=Copyright © 2007. Code Lutin - GPL Added: trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/css/Layout.css =================================================================== --- trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/css/Layout.css (rev 0) +++ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/components/css/Layout.css 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,542 @@ +/***************************** Mise en forme gᅵnᅵrale ************************/ +h1.Title { + margin: 0px 0px 0px 0px; + padding: 0px; + font-size: 28px; + line-height: 28px; + font-weight: bold; + font-family: verdana, arial, helvetica, sans-serif; + color: #09c; +} + +h1.tab { + margin: 0px 0px 10px 0px; + padding: 5px; + font-size: 20px; + line-height: 28px; + font-weight: bold; + font-family: verdana, arial, helvetica, sans-serif; + color: #09c; + text-align: center; + border: 1px solid black; + -moz-border-radius: 10px; +} + +h2.Title { + margin: 0px 0px 10px 0px; + padding: 0px; + font-weight: bold; + color: #09c; + font-size: 18px; + font-family: verdana, arial, helvetica, sans-serif; +} + +hr.Ligne { + margin-bottom: 10px; +} + +.Container { + width: 100%; +} + +.Clear { + clear: both; +} + +.NoWrap { + font-size: 14px; + font-family: verdana, arial, helvetica, sans-serif; + white-space: nowrap; +} + +.MonoSpace { + font-size: 14px; + font-family: monospace; +} + +acronym.Acronym { + border: none; +} + +acronym.Acronym:hover { + cursor: help; +} + +/******************************** Les liens *****************************/ +a.Link { + color: black; + text-decoration: none; + font-size: 14px; + font-family: verdana, arial, helvetica, sans-serif; + vertical-align: middle; +} + +a.Link:link { + color: black; +} + +a.Link:visited { + color: black; +} + +a.Link:hover { + background-color: transparent; + text-decoration: underline; +} + +/******************************* Infos bulles ********************************/ +a.InfoBulle { + position: relative; + z-index: 24; + text-decoration: none; + cursor: help; + font-size: 14px; + font-family: verdana, arial, helvetica, sans-serif; +} + +a.InfoBulle:hover { + z-index: 25; +} + +a.InfoBulle:hover span.Info { + text-decoration: underline; +} + +a.InfoBulle span.Bulle { + display: none; + border: 1px solid black; +} + +a.InfoBulle:hover span.Bulle { + text-decoration: none; + display: block; + position: absolute; + top: 2em; + left: 2em; + width: 15em; + background-color: #deecf1; + text-align: center; +} + +/******************************* Block ****************************************/ +.Block { + position: relative; + z-index: 24; + text-decoration: none; + font-size: small; + font-family: verdana, arial, helvetica, sans-serif; +} + +.BlockHide { + display: none; +} + +.BlockShow { + border: 1px solid black; + display: block; + position: absolute; + z-index: 25; + top: 2em; + left: 2em; + padding: 5px; + background-color: #deecf1; +} + +/******************************* Menu ****************************************/ +h1.tab:hover { + background-color: #deecf1; + cursor: pointer; +} + +menu.Menu { + +} + +menu.Menu>li { + margin: 0px; + padding: 0px; + list-style-type: disc; + color: black; + font-size: 12px; + font-family: verdana, arial, helvetica, sans-serif; +} + +menu.Menu>li>a.Link { + font-size: 12px; + font-family: verdana, arial, helvetica, sans-serif; +} + +.Hide { + display: none; +} + +.Show { + +} + +/******************************* Prᅵsentation des donnᅵes ******************/ +fieldset.Fieldset { + margin: -10px 0px 20px 0px; + padding: 10px; + font-weight: bold; + border-color: #09c; + -moz-border-radius: 10px; +} + +fieldset.Fieldset>legend,fieldset.Fieldset>legend>a { + font-size: 18px; + font-weight: normal; + font-family: verdana, arial, helvetica, sans-serif; + color: #09c; + text-decoration: none; +} + +fieldset.Fieldset>legend>a:link { + +} + +fieldset.Fieldset>legend>a:hover { + text-decoration: underline; +} + +fieldset.Fieldset>legend>a.Actif { + text-decoration: underline; +} + +.FloatLeft,.FloatRight { + float: left; + width: 50%; + margin: 0; + padding: 0; +} + +.FloatRightRight { + float: left; + width: 50%; + margin: 0; + padding: 0; + text-align: right; +} + +.Group { + margin-bottom: 10px; + font-size: 14px; + font-family: verdana, arial, helvetica, sans-serif; +} + +.SmallText { + color: black; + font-size: 10px; + font-family: verdana, arial, helvetica, sans-serif; +} + +.MediumText { + color: black; + font-size: 12px; + font-family: verdana, arial, helvetica, sans-serif; +} + +.Normal { + color: black; + font-weight: normal; + font-size: 14px; + font-family: verdana, arial, helvetica, sans-serif; +} + +.Text { + color: black; + font-weight: bold; + font-size: 14px; + font-family: verdana, arial, helvetica, sans-serif; +} + +.Center { + text-align: center; +} + +.Large { + border-collapse: collapse; + font-size: 14px; + width: 100%; +} + +.Medium { + border-collapse: collapse; + font-size: 14px; + width: 90%; +} + +.Small { + border-collapse: collapse; + font-size: 14px; + width: 60%; +} + +.Green { + color: green; +} + +.Red { + color: red; +} + +/**************************** Tableau *************************************/ +table.Small td,table.Large td,table.Medium td { + border: 1px solid; + border-color: #09c; + padding: 5px; +} + +tr.Click:hover,td.Click:hover { + background-color: #deecf1; + cursor: pointer; +} + +table.Small td.Angle,table.Medium td.Angle,table.Large td.Angle { + border-left: none; + border-top: none; +} + +td.Colomun { + background-color: #eee; + font-weight: bold; + text-align: left; +} + +tr.First { /* Entᅵte du tableau */ + font-weight: bold; + background-color: #eee; + text-align: center; +} + +td.Actions { + text-align: center; +} + +td.Number { + text-align: right; +} + +td.LargeCase { + height: 75px; + vertical-align: top; +} + +td.LargeCaseSelect { + height: 75px; + vertical-align: top; + background-color: #deecf1; +} + +/******************************** Formulaires ********************************/ +.FormActions { + display: block; + text-align: right; + margin-bottom: 10px; +} + +.Form { + display: inline; + text-align: left; +} + +.FormActions input[type="password"],.FormActions input[type="radio"],.FormActions input[type="button"],.FormActions input[type="text"],.FormActions input[type="submit"],.FormActions textarea,.FormActions select,.Form input[type="password"],.Form input[type="radio"],.Form input[type="button"],.Form input[type="text"],.Form input[type="submit"],.Form textarea,.Form select,.Form button,.FormActions button,button + { + border: 1px solid black; + padding: 2px; + margin: 0px; + font: 12px verdana, arial, helvetica, sans-serif; + display: inline; +} + +.FormActions textarea.MonoSpace,.Form textarea.MonoSpace { + font-family: monospace; +} + +.FormLeft { + float: left; + width: 40%; + margin: 0; + padding: 0; + text-align: right; +} + +.FormRight { + float: left; + width: 60%; + margin: 0; + padding: 0; +} + +.FormLeft div.Normal,.FormRight div.Normal { + margin-bottom: 10px; +} + +.FormLeft div.Text,.FormRight div.Text { + margin: 0px; + margin-bottom: 8px; + margin-right: 5px; + padding: 3px; +} + +.Float { + float: left; + margin: 0; + margin-right: 5px; + padding: 0; +} + +/* Layout */ +body { /* background-image: url("../images/lutin.gif"); */ + background-repeat: no-repeat; + background-position: right top; + margin: 0px; + padding: 0px; + font-family: verdana, arial, helvetica, sans-serif; + color: #333; + background-color: white; +} + +#beforeheader { + display: table-row; + background-color: red; + margin: 0px 0px 15px 0px; + width: 100%; +} + +#Title { + display: table-cell; + font-size: 28px; + line-height: 28px; + font-weight: bold; + font-family: verdana, arial, helvetica, sans-serif; + color: #09c; + margin: 0px 0px 15px 0px; + padding: 5px 0px 0px 5px; +} + +#Google-AdSense { + display: table-cell; + width: 100%; + height: 60px; + text-align: right; + vertical-align: middle; +} + +#Header { + font-size: 12px; + margin: 10px 0px 10px 0px; + padding: 3px 5px 3px 5px; + border-style: solid; + border-color: black; + border-width: 1px 0px; + line-height: 11px; + background-color: #eee; + height: 14px; +} + +.Left { + float: left; + width: 40%; + margin: 0; + padding: 0; + text-align: left; +} + +.Right { + float: left; + width: 60%; + margin: 0; + padding: 0; + text-align: right; +} + +#Content { + margin: 0px 50px 50px 300px; + padding: 0px; + min-height: 455px; +} + +#Menu { + position: absolute; + top: 80px; + left: 10px; + padding: 10px 10px 0px 10px; + background-color: #eee; + border: 1px solid black; + -moz-border-radius: 10px; + line-height: 17px; + width: 250px; + z-index: 1; +} + +#Footer { + font-size: 12px; + position: relative; + text-align: right; + width: 100%; + margin: 10px 0px 0px 0px; + padding: 3px 0px 3px 0px; + border-style: solid; + border-color: black; + border-width: 1px 0px; + line-height: 11px; + background-color: #eee; + height: 14px; +} + +#FooterAdd { + font-size: 12px; + text-align: center; +} + +#AddressBar { + font-size: x-small; + margin-bottom: 7px; +} + +#AddressBar a.Link { + font-size: small; +} + +.Message { + font-size: 14px; + font-weight: bold; + font-family: verdana, arial, helvetica, sans-serif; + border: 1px solid black; + background-color: #deecf1; + padding: 5px; + margin-bottom: 5px; +} + +.Error { + font-size: 14px; + font-weight: bold; + font-family: verdana, arial, helvetica, sans-serif; + border: 1px solid black; + background-color: #ffecf1; + padding: 5px; + margin-bottom: 5px; +} + +.FieldError { + font-size: 14px; + font-weight: bold; + font-family: verdana, arial, helvetica, sans-serif; + border: 1px solid black; + background-color: #ffecf1; + padding: 5px; + margin-bottom: 5px; +} + +#FieldErrorExplication { + font-weight: normal; +} + +img.Img { + border-width: 0px; + border-style: none; + vertical-align: middle; + padding: 0px; + margin: 0px; +} \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationDetail.properties =================================================================== --- trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationDetail.properties (rev 0) +++ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationDetail.properties 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1 @@ +windowtitle=Application detail \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationExport.properties =================================================================== Added: trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationImport.properties =================================================================== --- trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationImport.properties (rev 0) +++ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationImport.properties 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,4 @@ +windowtitle=Import +upload=Upload +explorationapplication=Exploration application +library=Library \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationList.properties =================================================================== --- trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationList.properties (rev 0) +++ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/ApplicationList.properties 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1 @@ +windowtitle=Application list \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.properties =================================================================== --- trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.properties (rev 0) +++ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.properties 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,3 @@ +name=Name +cancel=Cancel +submit=Submit \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.properties =================================================================== --- trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.properties (rev 0) +++ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.properties 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,5 @@ +windowtitle=Manage groups +name=Name +modify=Modify +delete=Delete +addgroup=Add group \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.properties =================================================================== --- trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.properties (rev 0) +++ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.properties 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,8 @@ +name=Name +firstname=First name +mail=Mail +groups=Groups +add=Add +remove=Remove +submit=Submit +cancel=Cancel \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/UserList.properties =================================================================== --- trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/UserList.properties (rev 0) +++ trunk/simexplorer-is-web/src/main/resources/fr/cemagref/simexplorer/is/ui/web/pages/UserList.properties 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,6 @@ +windowtitle=Manage users +name=Name +firstname=First name +modify=Modify +delete=Delete +adduser=Add user \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/webapp/ApplicationDetail.tml =================================================================== --- trunk/simexplorer-is-web/src/main/webapp/ApplicationDetail.tml (rev 0) +++ trunk/simexplorer-is-web/src/main/webapp/ApplicationDetail.tml 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,7 @@ +<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" + title="message:windowtitle"> + + <table t:type="cl/TreeGrid" source="nodes" columnHeaders="headers"> + </table> + +</t:layout> Added: trunk/simexplorer-is-web/src/main/webapp/ApplicationExport.tml =================================================================== --- trunk/simexplorer-is-web/src/main/webapp/ApplicationExport.tml (rev 0) +++ trunk/simexplorer-is-web/src/main/webapp/ApplicationExport.tml 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,4 @@ +<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" + title="message:windowtitle"> + +</t:layout> Added: trunk/simexplorer-is-web/src/main/webapp/ApplicationImport.tml =================================================================== --- trunk/simexplorer-is-web/src/main/webapp/ApplicationImport.tml (rev 0) +++ trunk/simexplorer-is-web/src/main/webapp/ApplicationImport.tml 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,20 @@ +<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" + title="message:windowtitle"> + + <t:form> + <t:errors/> + + <h1 class="Title">${message:explorationapplication}</h1> + + <input t:type="upload" t:id="fileEA"/> + <br/> + + <h1 class="Title">${message:library}</h1> + + <input t:type="upload" t:id="fileLib"/> + <br/> + + <input type="submit" value="${message:upload}"/> + </t:form> + +</t:layout> Added: trunk/simexplorer-is-web/src/main/webapp/ApplicationList.tml =================================================================== --- trunk/simexplorer-is-web/src/main/webapp/ApplicationList.tml (rev 0) +++ trunk/simexplorer-is-web/src/main/webapp/ApplicationList.tml 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,10 @@ +<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" + title="message:windowtitle"> + + <table t:type="Grid" source="applications" row="application" model="model"> + <t:parameter name="uuidCell"> + <t:actionlink t:id="detailApplication" context="${detailApplicationContext}">Details</t:actionlink> + </t:parameter> + </table> + +</t:layout> Added: trunk/simexplorer-is-web/src/main/webapp/GroupEdit.tml =================================================================== --- trunk/simexplorer-is-web/src/main/webapp/GroupEdit.tml (rev 0) +++ trunk/simexplorer-is-web/src/main/webapp/GroupEdit.tml 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,21 @@ +<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" + title="message:windowtitle"> + + <t:form> + <t:errors/> + + <!-- + + <p>${message:name} : + <input t:type="TextField" t:id="name" t:validate="required,minlength=3" + t:value="group.name" size="30"/></p> + + --> + + <input t:type="Submit" t:value="message:submit"/> + + <a t:type="actionlink" t:id="cancel">${message:cancel}</a> + + </t:form> + +</t:layout> Added: trunk/simexplorer-is-web/src/main/webapp/GroupList.tml =================================================================== --- trunk/simexplorer-is-web/src/main/webapp/GroupList.tml (rev 0) +++ trunk/simexplorer-is-web/src/main/webapp/GroupList.tml 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,24 @@ +<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" + title="message:windowtitle"> + + <t:form> + <t:errors /> + + <table class="Large"> + <tr class="First"> + <td>${message:name}</td> + <td>${message:modify}</td> + <td>${message:delete}</td> + </tr> + <!-- t:loop source="groups" value="group"> + <tr> + <td>${group.name}</td> + <td><a t:type="ActionLink" t:id="edit" t:context="group.id">${message:modify}</a></td> + <td><a t:type="ActionLink" t:id="delete" t:context="group.id">${message:delete}</a></td> + </tr> + </t:loop --> + </table> + + </t:form> + +</t:layout> Added: trunk/simexplorer-is-web/src/main/webapp/META-INF/MANIFEST.MF =================================================================== --- trunk/simexplorer-is-web/src/main/webapp/META-INF/MANIFEST.MF (rev 0) +++ trunk/simexplorer-is-web/src/main/webapp/META-INF/MANIFEST.MF 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + Added: trunk/simexplorer-is-web/src/main/webapp/UserEdit.tml =================================================================== --- trunk/simexplorer-is-web/src/main/webapp/UserEdit.tml (rev 0) +++ trunk/simexplorer-is-web/src/main/webapp/UserEdit.tml 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,82 @@ +<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" + title="message:windowtitle"> + + <t:form> + <t:errors /> + + <!-- + + <p>${message:name} : <input t:type="TextField" t:id="name" + t:validate="required,minlength=3" t:value="user.name" size="30" /></p> + + <p>${message:firstname} : <input t:type="TextField" + t:id="firstName" t:validate="required,minlength=3" + t:value="user.firstName" size="30" /></p> + + <p>${message:mail} : <input t:type="TextField" t:id="mail" + t:validate="required,minlength=3" t:value="user.mail" size="30" /></p> + + <h1 class="Title">${message:groups}</h1> + + <table class="Large"> + <tr class="First"> + <td>${message:name}</td> + <td>${message:add}</td> + <td>${message:remove}</td> + </tr> + <tr> + <td class="Text">Member of :</td> + <td></td> + <td></td> + </tr> + <tr> + <td>XXXXX</td> + <td></td> + <td><a t:type="ActionLink" t:id="removeGroup0" + t:context="0">${message:remove}</a></td> + </tr> + <tr> + <td>YYYYYY</td> + <td></td> + <td><a t:type="ActionLink" t:id="removeGroup1" + t:context="0">${message:remove}</a></td> + </tr> + <tr> + <td>ZZZZZZZ</td> + <td></td> + <td><a t:type="ActionLink" t:id="removeGroup2" + t:context="0">${message:remove}</a></td> + </tr> + <tr> + <td class="Text">Available groups :</td> + <td></td> + <td></td> + </tr> + <tr> + <td>AAAAA</td> + <td><a t:type="ActionLink" t:id="removeGroup3" + t:context="0">${message:add}</a></td> + <td></td> + </tr> + <tr> + <td>BBBBB</td> + <td><a t:type="ActionLink" t:id="removeGroup4" + t:context="0">${message:add}</a></td> + <td></td> + </tr> + <tr> + <td>CCCCCCCC</td> + <td><a t:type="ActionLink" t:id="removeGroup5" + t:context="0">${message:add}</a></td> + <td></td> + </tr> + + </table> + --> + + <input t:type="Submit" t:value="message:submit" /> + + <a t:type="actionlink" t:id="cancel">${message:cancel}</a> + </t:form> + +</t:layout> Added: trunk/simexplorer-is-web/src/main/webapp/UserList.tml =================================================================== --- trunk/simexplorer-is-web/src/main/webapp/UserList.tml (rev 0) +++ trunk/simexplorer-is-web/src/main/webapp/UserList.tml 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,27 @@ +<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" + title="message:windowtitle"> + + <t:form> + <t:errors/> + + <table class="Large"> + <tr class="First"> + <td>${message:name}</td> + <td>${message:firstname}</td> + <td>${message:modify}</td> + <td>${message:delete}</td> + </tr> + + <!-- t:loop source="users" value="user"> + <tr> + <td>${user.name}</td> + <td>${user.firstName}</td> + <td><t:pagelink page="UserEdit" context="user.id">${message:modify}</t:pagelink></td> + <td><a t:type="ActionLink" t:id="delete" t:context="user.id">${message:delete}</a></td> + </tr> + </t:loop --> + </table> + + </t:form> + +</t:layout> Added: trunk/simexplorer-is-web/src/main/webapp/WEB-INF/web.xml =================================================================== --- trunk/simexplorer-is-web/src/main/webapp/WEB-INF/web.xml (rev 0) +++ trunk/simexplorer-is-web/src/main/webapp/WEB-INF/web.xml 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://java.sun.com/xml/ns/javaee" + xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_4.xsd" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_4.xsd" + id="WebApp_ID" version="2.4"> + + <display-name>simexplorer-is-web</display-name> + + <context-param> + <param-name>tapestry.app-package</param-name> + <param-value>fr.cemagref.simexplorer.is.ui.web</param-value> + </context-param> + + <filter> + <filter-name>tapestryfilter</filter-name> + <filter-class>org.apache.tapestry.TapestryFilter</filter-class> + </filter> + <filter-mapping> + <filter-name>tapestryfilter</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <servlet> + <servlet-name>dwr-invoker</servlet-name> + <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class> + <init-param> + <param-name>debug</param-name> + <param-value>true</param-value> + </init-param> + </servlet> + + <servlet-mapping> + <servlet-name>dwr-invoker</servlet-name> + <url-pattern>/js/dwr/*</url-pattern> + </servlet-mapping> + + <listener> + <listener-class> + fr.cemagref.simexplorer.is.ui.web.ContextListener + </listener-class> + </listener> + + <welcome-file-list> + <welcome-file>index.html</welcome-file> + </welcome-file-list> +</web-app> \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/webapp/index.html =================================================================== --- trunk/simexplorer-is-web/src/main/webapp/index.html (rev 0) +++ trunk/simexplorer-is-web/src/main/webapp/index.html 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/> + <meta http-equiv="refresh" + content="0; url=applicationlist"/> + <title></title> + <meta name="robots" content="noindex,follow"/> + </head> + + <body> + </body> +</html> \ No newline at end of file Added: trunk/simexplorer-is-web/src/main/webapp/js/dftree.js =================================================================== --- trunk/simexplorer-is-web/src/main/webapp/js/dftree.js (rev 0) +++ trunk/simexplorer-is-web/src/main/webapp/js/dftree.js 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,530 @@ +/* Dynamic Folder Tree + * Generates DHTML tree dynamically (on the fly). + * License: BSD. + * See details at http://www.opensource.org/licenses/bsd-license.php + * + * Copyright (c) 2004, 2005, 2006 + * Vinicius Cubas Brand, Raphael Derosso Pereira, Frank Alcantara + * {viniciuscb,raphaelpereira,frankalcantara} at users.sourceforge.net + * All rights reserved. + */ + + +// NODE +//Usage: a = new dNode({id:2, caption:'tree root', url:'http://www.w3.org'}); +function dNode(arrayProps) { + //mandatory fields + this.id; //node id + this.caption; //node caption + + //optional fields + this.url; //url to open + this.target; //target to open url + this.onClick; //javascript to execute onclick + this.onOpen; //javascript to execute when a node of the tree opens + this.onClose; //javascript to execute when a node of the tree closes + this.onFirstOpen; //javascript to execute only on the first open + this.iconClosed; //img.src of closed icon + this.iconOpen; //img.src of open icon + this.runJS = true; //(bool) if true, runs the on* props defined above + this.plusSign = true; //(bool) if the plus sign will appear or not + this.captionClass = 'l'; //(string) the class for this node's caption + + + //The parameters below are private + this._opened = false; //already opened + this._io = false; //is opened + + this._children = []; //references to children + this._parent; //pointer to parent + this._myTree; //pointer to myTree + + for (i in arrayProps) + { + if (i.charAt(0) != '_') + { + eval('this.'+i+' = arrayProps[\''+i+'\'];'); + } + } +} + +//changes node state from open to closed, and vice-versa +dNode.prototype.changeState = function() +{ + if (this._io) + { + this.close(); + } + else + { + this.open(); + } + + //cons = COokie of Node Status + //setCookie("cons"+this.id,this._io); +} + +dNode.prototype.open = function () { + if (!this._io) + { + if (!this._opened && this.runJS && this.onFirstOpen != null) + { + eval(this.onFirstOpen); + } + else if (this.runJS && this.onOpen != null) + { + eval(this.onOpen); + } + + this._opened = true; + this._io = true; + this._refresh(); + } +} + + +dNode.prototype.close = function() { + if (this._io) + { + if (this.runJS && this.onClose != null) + { + eval(this.onClose); + } + this._io = false; + this._refresh(); + } +} + +//alter node label and other properties +dNode.prototype.alter = function(arrayProps) +{ + for (i in arrayProps) + { + if (i != 'id' && i.charAt(0) != '_') + { + eval('this.'+i+' = arrayProps[\''+i+'\'];'); + } + } +} + +//css and dhtml refresh part +dNode.prototype._refresh = function() { + var nodeDiv = getObjectById("n"+this.id); + var plusSpan = getObjectById("p"+this.id); + var captionSpan = getObjectById("l"+this.id); + var childrenDiv = getObjectById("ch"+this.id); + + if (nodeDiv != null) + { + //Handling open and close: checks this._io and changes class as needed + if (!this._io) //just closed + { + childrenDiv.className = "closed"; + } + else //just opened + { + //prevents IE undesired behaviour when displaying empty DIVs +/* if (this._children.length > 0) + {*/ + childrenDiv.className = "opened"; + // } + } + + plusSpan.innerHTML = this._properPlus(); + + captionSpan.innerHTML = this.caption; + } + +//alter onLoad, etc + +} + +//gets the proper plus for this moment +dNode.prototype._properPlus = function() +{ + if (!this._io) + { + if (this._myTree.useIcons) + { + return (this.plusSign)?imageHTML(this._myTree.icons.plus):""; + } + else + { + return (this.plusSign)?"+":""; + } + } + else + { + if (this._myTree.useIcons) + { + return (this.plusSign)?imageHTML(this._myTree.icons.minus):""; + } + else + { + return (this.plusSign)?"-":""; + } + } +} + +//changes node to selected style class. Perform further actions. +dNode.prototype._select = function() +{ + + var captionSpan; + + if (this._myTree._selected) + { + this._myTree._selected._unselect(); + } + this._myTree._selected = this; + + captionSpan = getObjectById("l"+this.id); + + //changes class to selected link + if (captionSpan) + { + captionSpan.className = 'sl'; + } + +} + +//changes node to unselected style class. Perform further actions. +dNode.prototype._unselect = function() +{ + var captionSpan = getObjectById("l"+this.id); + + this._myTree._lastSelected = this._myTree._selected; + this._myTree._selected = null; + + //changes class to selected link + if (captionSpan) + { + captionSpan.className = this.captionClass; + } +} + + +//state can be open or closed +//warning: if drawed node is not child or root, bugs will happen +dNode.prototype._draw = function() +{ + var str; + var div; + var myClass = (this._io)? "opened" : "closed"; + var myPlus = this._properPlus(); + var append = true; + var myPlusOnClick = this._myTree.name+'.getNodeById(\''+this.id+'\').changeState();'; + var captionOnClickEvent = ""; +// var cook; + + var plusEventHandler = function(){ + eval(myPlusOnClick); + } + + var captionEventHandler = function(){ + eval(captionOnClickEvent); + } + + +/* if (this.myTree.followCookies) + { + this._io = getCookie("cons"+this.id); + }*/ + + //FIXME put this in a separate function, as this will be necessary in + //various parts + + captionOnClickEvent = this._myTree.name+'.getNodeById(\''+this.id+'\')._select(); '; + if (this.onClick) //FIXME when onclick && url + { + captionOnClickEvent += this.onClick; + } + else if (this.url && this.target) + { + captionOnClickEvent += 'window.open(\''+this.url+'\',\''+this.target+'\')'; + } + else if (this.url) + { + captionOnClickEvent += 'window.location=\''+this.url+'\''; + } + + + //The div of this node + divN = document.createElement('div'); + divN.id = 'n'+this.id; + divN.className = 'son'; + + //The span that holds the plus/minus sign + spanP = document.createElement('span'); + spanP.id = 'p'+this.id; + spanP.className = 'plus'; +// spanP.addEventListener('click',plusEventHandler,false); + spanP.onclick = plusEventHandler; + spanP.innerHTML = myPlus; + + //The span that holds the label/caption + spanL = document.createElement('span'); + spanL.id = 'l'+this.id; + spanL.className = this.captionClass; +// spanL.addEventListener('click',captionEventHandler,false); + spanL.onclick = captionEventHandler; + spanL.innerHTML = this.caption; + + //The div that holds the children + divCH = document.createElement('div'); + divCH.id = 'ch'+this.id; + divCH.className = myClass; + + +// str = '<div id="n'+this.id+'" class="son">'; +// str = '<span id="p'+this.id+'" class="plus" onclick="'+myPlusOnClick+'">'+myPlus+'</span>'; +// str += '<span id="l'+this.id+'" class="l"'+captionOnClickEvent+'>'+this.caption+'</span>'; +// str += '<div id="ch'+this.id+'" class="'+myClass+'"></div>'; + +// div.innerHTML = str; + divN.appendChild(spanP); + divN.appendChild(spanL); + divN.appendChild(divCH); + + + if (this._parent != null) + { + parentChildrenDiv = getObjectById("ch"+this._parent.id); + } + else //is root + { + parentChildrenDiv = getObjectById("dftree_"+this._myTree.name); +// append = false; + } + + if (parentChildrenDiv) + { + + parentChildrenDiv.appendChild(divN); +/* if (append) + { + parentChildrenDiv.innerHTML += str; + } + else + { + parentChildrenDiv.innerHTML = str; + }*/ + } +} + +// TREE +//Usage: t = new dFTree({name:t, caption:'tree root', url:'http://www.w3.org'}); +function dFTree(arrayProps) { + //mandatory fields + this.name; //the value of this must be the name of the object + + //optional fields + this.is_dynamic = true; //tree is dynamic, i.e. updated on the fly + this.followCookies = true;//use previous state (o/c) of nodes + this.useIcons = false; //use icons or not + + + //arrayProps[icondir]: Icons Directory + iconPath = (arrayProps['icondir'] != null)? arrayProps['icondir'] : ''; + + this.icons = { + root : iconPath+'/foldertree_base.gif', + folder : iconPath+'/foldertree_folder.gif', + folderOpen : iconPath+'/foldertree_folderopen.gif', + node : iconPath+'/foldertree_folder.gif', + empty : iconPath+'/foldertree_empty.gif', + line : iconPath+'/foldertree_line.gif', + join : iconPath+'/foldertree_join.gif', + joinBottom : iconPath+'/foldertree_joinbottom.gif', + plus : iconPath+'/foldertree_plus.gif', + plusBottom : iconPath+'/foldertree_plusbottom.gif', + minus : iconPath+'/foldertree_minus.gif', + minusBottom : iconPath+'/foldertree_minusbottom.gif', + nlPlus : iconPath+'/foldertree_nolines_plus.gif', + nlMinus : iconPath+'/foldertree_nolines_minus.gif' + }; + + //private + this._root; //reference to root node + this._aNodes = []; + this._lastSelected; //The last selected node + this._selected; //The actual selected node + + for (i in arrayProps) + { + if (i.charAt(0) != '_') + { + eval('this.'+i+' = arrayProps[\''+i+'\'];'); + } + } + +} + +dFTree.prototype.draw = function() { + if (!getObjectById("dftree_"+this.name)) + { + document.write('<div id="dftree_'+this.name+'"></div>'); + } + + if (this._root != null) + { + this._root._draw(); + this._drawBranch(this._root._children); + } + +} + +//Transforms tree in HTML code. Do not use it. Use draw() instead. +/*dFTree.prototype.toString = function() { + var str = ''; + + if (!getObjectById("dftree_"+this.name)) + { + str = '<div id="dftree_'+this.name+'"></div>'; + } + return str; + +/ * if (this.root != false) + { + this.root._draw(); + this._drawBranch(this.root.children); + }* / +}*/ + +//Recursive function, draws children +dFTree.prototype._drawBranch = function(childrenArray) { + var a=0; + for (a;a<childrenArray.length;a++) + { + childrenArray[a]._draw(); + this._drawBranch(childrenArray[a]._children); + } +} + +//add into a position +dFTree.prototype.add = function(node,pid) { + var auxPos; + var addNode = false; + if (typeof (auxPos = this._searchNode(node.id)) != "number") + { + // if parent exists, add node as its child + if (typeof (auxPos = this._searchNode(pid)) == "number") + { + node._parent = this._aNodes[auxPos]; + this._aNodes[auxPos]._children[this._aNodes[auxPos]._children.length] = node; + addNode = true; + } + else //if parent cannot be found and there is a tree root, ignores node + { + if (this._root == null) + { + this._root = node; + addNode = true; + } + } + if (addNode) + { + this._aNodes[this._aNodes.length] = node; + node._myTree = this; + if (this.is_dynamic) + { + node._draw(); + } + } + } + +} + +//arrayProps: same properties of Node +dFTree.prototype.alter = function(arrayProps) { + if (arrayProps['id']) + { + this.getNodeById(arrayProps['id']).alter(arrayProps); + } +} + +dFTree.prototype.getNodeById = function(nodeid) { + return this._aNodes[this._searchNode(nodeid)]; +} + + +//Searches for a node in the node array, returning the position of the array 4it +dFTree.prototype._searchNode = function(id) { + var a=0; + for (a;a<this._aNodes.length;a++) + { + if (this._aNodes[a].id == id) + { + return a; + } + } + return false; +} + + +//Auxiliar functions + +//For multi-browser compatibility +function getObjectById(name) +{ + if (document.getElementById) + { + return document.getElementById(name); + } + else if (document.all) + { + return document.all[name]; + } + else if (document.layers) + { + return document.layers[name]; + } + return false; +} + +// [Cookie] Clears a cookie +function clearCookie(cookieName) { + var now = new Date(); + var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24); + this.setCookie(cookieName, 'cookieValue', yesterday); + this.setCookie(cookieName, 'cookieValue', yesterday); +}; + +// [Cookie] Sets value in a cookie +function setCookie(cookieName, cookieValue, expires, path, domain, secure) { + document.cookie = + escape(cookieName) + '=' + escape(cookieValue) + + (expires ? '; expires=' + expires.toGMTString() : '') + + (path ? '; path=' + path : '') + + (domain ? '; domain=' + domain : '') + + (secure ? '; secure' : ''); +}; + +// [Cookie] Gets a value from a cookie +function getCookie(cookieName) { + var cookieValue = ''; + var posName = document.cookie.indexOf(escape(cookieName) + '='); + if (posName != -1) { + var posValue = posName + (escape(cookieName) + '=').length; + var endPos = document.cookie.indexOf(';', posValue); + if (endPos != -1) + { + cookieValue = unescape(document.cookie.substring(posValue, endPos)); + } + else + { + cookieValue = unescape(document.cookie.substring(posValue)); + } + } + return (cookieValue); +}; + + +function imageHTML(src,attributes) { + if (attributes != null) + { + attributes = ''; + } + return "<img "+attributes+" src=\""+src+"\">"; +} + Added: trunk/simexplorer-is-web/src/main/webapp/js/treeLoader.js =================================================================== --- trunk/simexplorer-is-web/src/main/webapp/js/treeLoader.js (rev 0) +++ trunk/simexplorer-is-web/src/main/webapp/js/treeLoader.js 2008-01-08 15:28:20 UTC (rev 99) @@ -0,0 +1,72 @@ +var tree; +var nodes = []; +var inode = 0; + +function getNodeCallback(treeNode) { + for (var i = 0; i < treeNode.enfants.length; i++) { + createNode(treeNode.enfants[i].id, treeNode.enfants[i].libelle, treeNode.id); + } +} + +function createNode(idNode, nodeCaption, parentId) { + var node = new dNode({id: idNode,caption: nodeCaption}); + + if (parentId == -1) { + TreeData.getNode(idNode, getNodeCallback); + } else { + node.alter({onFirstOpen: 'TreeData.getNode('+idNode+', getNodeCallback)'}); + } + + tree.add(node, parentId); + nodes[inode++] = node; +} + +function initTree() { + tree = new dFTree({name: 'tree', icondir: './images/tree'}); + tree.useIcons = true; + var i = 0; + var pid = []; + createNode(i++, 'Applications', -1); //root node + + /* + pid[0] = i; + createNode(i++, 'My first application', 0); + + pid[1] = i; + createNode(i++, 'Components [1]', pid[0]); + createNode(i++, 'Initialization [1]', pid[1]); + pid[2] = i; + createNode(i++, 'Experimental design [1]', pid[1]); + createNode(i++, 'Experimental design [1.1]', pid[2]); + createNode(i++, 'Input generating [1]', pid[1]); + createNode(i++, 'Model launching [1]', pid[1]); + createNode(i++, 'Output processing [1]', pid[1]); + + pid[1] = i; + createNode(i++, 'Explorations', pid[0]); + pid[2] = i; + createNode(i++, 'First Exploration [1]', pid[1]); + pid[3] = i; + createNode(i++, 'Factors [1]', pid[2]); + createNode(i++, 'F1 = range(2,10,2)', pid[3]); + createNode(i++, 'F2 = (0.2,0.8)', pid[3]); + pid[3] = i; + createNode(i++, 'Constants [1]', pid[2]); + pid[4] = i; + createNode(i++, 'Input generating', pid[3]); + createNode(i++, 'ageMax = 12', pid[4]); + pid[4] = i; + createNode(i++, 'Output processing', pid[3]); + createNode(i++, 'diagramTitle = \'first application\'', pid[4]); + + pid[0] = i; + createNode(i++, 'My second application', 0); + createNode(i++, 'Components', pid[0]); + createNode(i++, 'Explorations', pid[0]); + + */ + + for (var j = 0; j < inode; j++) { + nodes[j].open(); + } +} Added: trunk/simexplorer-is-web/xmi/simexplorer-is-web.zargo =================================================================== (Binary files differ) Property changes on: trunk/simexplorer-is-web/xmi/simexplorer-is-web.zargo ___________________________________________________________________ Name: svn:mime-type + application/octet-stream
participants (1)
-
glandais@users.labs.libre-entreprise.org