[Suiviobsmer-commits] r463 - in trunk/wao-ui: . src/main/java/fr/ifremer/wao/ui/pages src/main/webapp src/main/webapp/WEB-INF
Author: fdesbois Date: 2010-04-20 00:37:48 +0000 (Tue, 20 Apr 2010) New Revision: 463 Log: - #2246 : Resolve issue on activity Calendar : use boats page context for selected immatriculation in return link. - Add i18n tapestry-bundle goal to retrieve messages from business module. Modified: trunk/wao-ui/pom.xml trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/BoatActivityCalendar.java trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Boats.java trunk/wao-ui/src/main/webapp/BoatActivityCalendar.tml trunk/wao-ui/src/main/webapp/WEB-INF/ Modified: trunk/wao-ui/pom.xml =================================================================== --- trunk/wao-ui/pom.xml 2010-04-19 23:41:59 UTC (rev 462) +++ trunk/wao-ui/pom.xml 2010-04-20 00:37:48 UTC (rev 463) @@ -107,81 +107,93 @@ <!-- ************************************************************* --> <!-- *** Build Environment ************************************** --> <!-- ************************************************************* --> - <build> + <build> <!-- call result war : suiviobsmer-xxx.war --> <!--<finalName>wao-${project.version}</finalName>--> <!-- Add main class into war to make it executable --> - <plugins> - <plugin> - <artifactId>maven-war-plugin</artifactId> - <configuration> - <archive> - <manifest> - <mainClass>org.nuiton.util.war.WinstoneLauncher</mainClass> - </manifest> - </archive> - <overlays> - <overlay> - <groupId>org.nuiton</groupId> - <artifactId>nuiton-utils</artifactId> - <type>jar</type> - <includes> - <include>**/war/Winstone*</include> - </includes> - </overlay> - <overlay> - <groupId>org.jvnet.hudson.winstone</groupId> - <artifactId>winstone</artifactId> - <type>jar</type> - </overlay> - </overlays> - </configuration> - </plugin> + <plugins> + + <plugin> + <groupId>org.nuiton.i18n</groupId> + <artifactId>maven-i18n-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>tapestry-bundle</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-war-plugin</artifactId> + <configuration> + <archive> + <manifest> + <mainClass>org.nuiton.util.war.WinstoneLauncher</mainClass> + </manifest> + </archive> + <overlays> + <overlay> + <groupId>org.nuiton</groupId> + <artifactId>nuiton-utils</artifactId> + <type>jar</type> + <includes> + <include>**/war/Winstone*</include> + </includes> + </overlay> + <overlay> + <groupId>org.jvnet.hudson.winstone</groupId> + <artifactId>winstone</artifactId> + <type>jar</type> + </overlay> + </overlays> + </configuration> + </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>2.5</version> - <executions> - <execution> - <id>default-client</id> +<!-- <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>2.5</version> + <executions> + <execution> + <id>default-client</id> - <!--goals><goal>test</goal></goals--> - </execution> - </executions> - <configuration> - <includes> - <include>**/*Test.java</include> - </includes> - </configuration> - </plugin> + goals><goal>test</goal></goals + </execution> + </executions> + <configuration> + <includes> + <include>**/*Test.java</include> + </includes> + </configuration> + </plugin>--> - </plugins> - </build> + </plugins> + </build> - <repositories> + <repositories> <!-- Repository for fckeditor component needed for News page --> - <repository> - <id>m2-release-repository.orientimport.kenai.com</id> - <name>Orient Import Oy Maven Release Repository</name> - <url>http://kenai.com/svn/t5-easy-fckeditor~maven-release-repository</url> - <layout>default</layout> - </repository> + <repository> + <id>m2-release-repository.orientimport.kenai.com</id> + <name>Orient Import Oy Maven Release Repository</name> + <url>http://kenai.com/svn/t5-easy-fckeditor~maven-release-repository</url> + <layout>default</layout> + </repository> - <repository> - <id>tapestry</id> - <name>Tapestry Formos</name> - <url>http://tapestry.formos.com/maven-repository</url> - </repository> + <repository> + <id>tapestry</id> + <name>Tapestry Formos</name> + <url>http://tapestry.formos.com/maven-repository</url> + </repository> - </repositories> + </repositories> <scm> <url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/wao-ui/?root=suiviobsmer</url> - <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/wao-ui</connection> - <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/wao-ui</developerConnection> - </scm> + <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/wao-ui</connection> + <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/wao-ui</developerConnection> + </scm> </project> Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/BoatActivityCalendar.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/BoatActivityCalendar.java 2010-04-19 23:41:59 UTC (rev 462) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/BoatActivityCalendar.java 2010-04-20 00:37:48 UTC (rev 463) @@ -194,11 +194,15 @@ /*************************** RETURN LINK **********************************/ - @InjectPage - private Boats boatsPage; + public Object[] getBoatsPageContext() { + return new Object[] {null, getBoat().getImmatriculation()}; + } - Object onActionFromReturnToBoats() { - boatsPage.setBoatSelectedImmatriculation(getBoat().getImmatriculation()); - return boatsPage; - } +// @InjectPage +// private Boats boatsPage; +// +// Object onActionFromReturnToBoats() { +// boatsPage.setBoatSelectedImmatriculation(getBoat().getImmatriculation()); +// return boatsPage; +// } } Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Boats.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Boats.java 2010-04-19 23:41:59 UTC (rev 462) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Boats.java 2010-04-20 00:37:48 UTC (rev 463) @@ -132,7 +132,7 @@ private String sampleRowContextId; /** Selected boat immatriculation for showing boatInfos */ - @Persist("flash") + @Persist(PersistenceConstants.FLASH) private Integer boatSelectedImmatriculation; public Integer getBoatSelectedImmatriculation() { @@ -147,11 +147,17 @@ private FeedBack filterFeedback; void setupRender() throws WaoException { + + if (boatSelectedImmatriculation != null && getBoatSelected() == null) { + layout.addFatal("L'immatriculation " + boatSelectedImmatriculation + + " ne correspond à aucun navire affichable. " + + "Veuillez à enlever cette immatriculation de l'url puis" + + " rechargez la page."); + boatSelectedImmatriculation = null; + } + sampleRow = null; getSampleRow(); - // Profession select reset -// professionSelectModel = null; -// getProfessionSelectModel(); // Manage sampleRow from context if (isSampleRowExists()) { @@ -167,11 +173,13 @@ initSelectFilters(false, false, false); companyBoatInfos = null; - //boatSelectedImmatriculation = null; } void onActivate(EventContext ec) { sampleRowContextId = ec.get(String.class, 0); + if (ec.getCount() > 1) { + boatSelectedImmatriculation = ec.get(Integer.class, 1); + } // boatSelectedImmatriculation = ec.get(Integer.class, 1); } @@ -854,7 +862,8 @@ private BoatActivityCalendar calendarPage; public boolean hasActivityCalendar() throws WaoException { - return getBoatSelected().sizeActivityCalendar() != 0; + return getBoatSelected() != null && + getBoatSelected().sizeActivityCalendar() != 0; } Object onActionFromShowLastActivityCalendar() throws WaoException { Modified: trunk/wao-ui/src/main/webapp/BoatActivityCalendar.tml =================================================================== --- trunk/wao-ui/src/main/webapp/BoatActivityCalendar.tml 2010-04-19 23:41:59 UTC (rev 462) +++ trunk/wao-ui/src/main/webapp/BoatActivityCalendar.tml 2010-04-20 00:37:48 UTC (rev 463) @@ -34,7 +34,7 @@ <t:if t:test="activityCalendar"> <h1>Calendrier d'activité ${activityCalendar.year}</h1> <p class="acenter"> - <a t:type="actionlink" t:id="returnToBoats" class="return" title="Retour sur ${activityCalendar.boat.name}"> + <a t:type="pagelink" t:id="returnToBoats" t:page="boats" t:context="boatsPageContext" class="return" title="Retour sur ${activityCalendar.boat.name}"> <img src="${asset:context:}/img/boat.png" alt="Navire"/> Revenir sur les informations du navire <img src="${asset:context:}/img/boat.png" alt="Navire"/> Property changes on: trunk/wao-ui/src/main/webapp/WEB-INF ___________________________________________________________________ Added: svn:ignore + app_fr.properties app_en.properties
participants (1)
-
fdesbois@users.labs.libre-entreprise.org