From: <tri...@us...> - 2006-10-06 09:57:57
|
Revision: 3009 http://svn.sourceforge.net/uni-d/?rev=3009&view=rev Author: triathlon98 Date: 2006-10-06 02:57:43 -0700 (Fri, 06 Oct 2006) Log Message: ----------- fix spelling Modified Paths: -------------- trunk/Uni-d/client/src/main/java/be/unid/persistence/om/ExceptionCodes.java trunk/Uni-d/client/src/main/java/be/unid/persistence/om/UnidProxy.java trunk/Uni-d/generate/src/main/velocity/ejb3/MediatorRoot.java.vm trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-exceptions.properties Modified: trunk/Uni-d/client/src/main/java/be/unid/persistence/om/ExceptionCodes.java =================================================================== --- trunk/Uni-d/client/src/main/java/be/unid/persistence/om/ExceptionCodes.java 2006-10-05 13:12:10 UTC (rev 3008) +++ trunk/Uni-d/client/src/main/java/be/unid/persistence/om/ExceptionCodes.java 2006-10-06 09:57:43 UTC (rev 3009) @@ -69,6 +69,6 @@ int CME_DATA_HAS_BEEN_ALREADY_CHANGED = 92001; - int UONA_OPPERATION_NOT_ALLOWED = 93001; + int UONA_OPERATION_NOT_ALLOWED = 93001; } Modified: trunk/Uni-d/client/src/main/java/be/unid/persistence/om/UnidProxy.java =================================================================== --- trunk/Uni-d/client/src/main/java/be/unid/persistence/om/UnidProxy.java 2006-10-05 13:12:10 UTC (rev 3008) +++ trunk/Uni-d/client/src/main/java/be/unid/persistence/om/UnidProxy.java 2006-10-06 09:57:43 UTC (rev 3009) @@ -49,7 +49,7 @@ public void removeEntityBean() throws UnidPersistenceException { - throw new UnidPersistenceException( ExceptionCodes.UONA_OPPERATION_NOT_ALLOWED ); + throw new UnidPersistenceException( ExceptionCodes.UONA_OPERATION_NOT_ALLOWED ); } public void setUnidUpdate( boolean update ) Modified: trunk/Uni-d/generate/src/main/velocity/ejb3/MediatorRoot.java.vm =================================================================== --- trunk/Uni-d/generate/src/main/velocity/ejb3/MediatorRoot.java.vm 2006-10-05 13:12:10 UTC (rev 3008) +++ trunk/Uni-d/generate/src/main/velocity/ejb3/MediatorRoot.java.vm 2006-10-06 09:57:43 UTC (rev 3009) @@ -165,11 +165,11 @@ #if( !$field.isAuto() ) #if( !$field.isLink() ) void add${field.Singular}($fieldtype el) throws UnidPersistenceException { - throw new UnidOperationNotAllowed(UONA_OPPERATION_NOT_ALLOWED, "$table.Name, add$field.Name,"+entity.getUnidType()); + throw new UnidOperationNotAllowed( UONA_OPERATION_NOT_ALLOWED, "$table.Name, add$field.Name,"+entity.getUnidType()); } #else void addUnidLink${field.Singular}(UOID el) throws UnidPersistenceException { - throw new UnidOperationNotAllowed(UONA_OPPERATION_NOT_ALLOWED, "$table.Name, addUnidLink$field.Name, "+entity.getUnidType()); + throw new UnidOperationNotAllowed( UONA_OPERATION_NOT_ALLOWED, "$table.Name, addUnidLink$field.Name, "+entity.getUnidType()); } #end #end @@ -233,11 +233,11 @@ #if( !$field.isAuto() ) #if( !$field.isLink() ) void remove${field.Singular}($fieldtype el) throws UnidPersistenceException { - throw new UnidOperationNotAllowed(UONA_OPPERATION_NOT_ALLOWED, "$table.Name, remove$field.Name, "+entity.getUnidType() ); + throw new UnidOperationNotAllowed( UONA_OPERATION_NOT_ALLOWED, "$table.Name, remove$field.Name, "+entity.getUnidType() ); } #else void removeUnidLink${field.Singular}(UOID el) throws UnidPersistenceException { - throw new UnidOperationNotAllowed(UONA_OPPERATION_NOT_ALLOWED, "$table.Name, removeUnidLink$field.Name, "+ entity.getUnidType()); + throw new UnidOperationNotAllowed( UONA_OPERATION_NOT_ALLOWED, "$table.Name, removeUnidLink$field.Name, "+ entity.getUnidType()); } #end #end @@ -342,11 +342,11 @@ #if( !$field.isImmutable() && !$field.isAuto() ) #if( !$field.isLink() ) void set${field.Name}($fieldtype $field.VarName) throws UnidPersistenceException { - throw new UnidOperationNotAllowed(UONA_OPPERATION_NOT_ALLOWED, "$table.Name, set$field.Name, "+ entity.getUnidType()); + throw new UnidOperationNotAllowed( UONA_OPERATION_NOT_ALLOWED, "$table.Name, set$field.Name, "+ entity.getUnidType()); } #else void setUnidLink${field.Name}(UOID $field.VarName) throws UnidPersistenceException { - throw new UnidOperationNotAllowed(UONA_OPPERATION_NOT_ALLOWED, "$table.Name, setUnidLink$field.Name, "+ entity.getUnidType()); + throw new UnidOperationNotAllowed( UONA_OPERATION_NOT_ALLOWED, "$table.Name, setUnidLink$field.Name, "+ entity.getUnidType()); } #end #end @@ -360,7 +360,7 @@ public $action.Return ${action.Name}( $action.ParametersListWithTypes ) throws UnidPersistenceException { - throw new UnidOperationNotAllowed(UONA_OPPERATION_NOT_ALLOWED, "$table.Name, ${action.Name}, "+ entity.getUnidType()); + throw new UnidOperationNotAllowed( UONA_OPERATION_NOT_ALLOWED, "$table.Name, ${action.Name}, "+ entity.getUnidType()); } #end Modified: trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-exceptions.properties =================================================================== --- trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-exceptions.properties 2006-10-05 13:12:10 UTC (rev 3008) +++ trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-exceptions.properties 2006-10-06 09:57:43 UTC (rev 3009) @@ -30,4 +30,4 @@ 92001=Data has already changed -93001=OpperationNotAllowed +93001=Operation is not allowed This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tri...@us...> - 2006-10-09 10:40:55
|
Revision: 3012 http://svn.sourceforge.net/uni-d/?rev=3012&view=rev Author: triathlon98 Date: 2006-10-09 03:40:39 -0700 (Mon, 09 Oct 2006) Log Message: ----------- UNI-330 setdatedaypast?\239?\191?\189 added (with testcases, inc testcases for setdateday) Modified Paths: -------------- trunk/Uni-d/docs/src/wiki/UtilScriptDate.wiki trunk/Uni-d/util/src/main/java/be/unid/util/script/DateExtension.java Added Paths: ----------- trunk/Uni-d/util/src/test/java/be/unid/util/script/ trunk/Uni-d/util/src/test/java/be/unid/util/script/DateExtensionTest.java Modified: trunk/Uni-d/docs/src/wiki/UtilScriptDate.wiki =================================================================== --- trunk/Uni-d/docs/src/wiki/UtilScriptDate.wiki 2006-10-08 22:34:03 UTC (rev 3011) +++ trunk/Uni-d/docs/src/wiki/UtilScriptDate.wiki 2006-10-09 10:40:39 UTC (rev 3012) @@ -7,6 +7,8 @@ - datecalc(date, offset) : given the start date and the number or days to add, it returns a new date. - dateday(date) : return the day of the week for the date given as parameter. Monday is returned as 1, and sunday as 7. - dateweek(date) : return the iso week numberfor the date given as parameter. +- setdateday(date, day) : return the date with the day changed to the passed day (as integer) +- setdatedaypast(date, day) : return the date with the day changed to the passed day (integer), forcing to be before the past dat. So, if the day is larger than the day in the passed date, then that day in the previous month is returned. ----- $Id$ Modified: trunk/Uni-d/util/src/main/java/be/unid/util/script/DateExtension.java =================================================================== --- trunk/Uni-d/util/src/main/java/be/unid/util/script/DateExtension.java 2006-10-08 22:34:03 UTC (rev 3011) +++ trunk/Uni-d/util/src/main/java/be/unid/util/script/DateExtension.java 2006-10-09 10:40:39 UTC (rev 3012) @@ -104,6 +104,10 @@ try { String date = (String) params.get( 0 ); + if ( date.length() != 8 ) + { + throw new FSException( "dateday(string) failed, date invalid, yyyyMMdd expected" ); + } GregorianCalendar cal = new GregorianCalendar(); cal.set( Integer.parseInt( date.substring( 0, 4 ) ), Integer.parseInt( date.substring( 4, 6 ) ) - 1, @@ -127,6 +131,10 @@ try { String date = (String) params.get( 0 ); + if ( date.length() != 8 ) + { + throw new FSException( "dateweek(string) failed, date invalid, yyyyMMdd expected" ); + } GregorianCalendar cal = new GregorianCalendar(); cal.setFirstDayOfWeek( Calendar.MONDAY ); cal.setMinimalDaysInFirstWeek( 4 ); @@ -152,7 +160,12 @@ try { String date = (String) params.get( 0 ); + if ( date.length() != 8 ) + { + throw new FSException( "setdateday(string, integer) failed, date invalid, yyyyMMdd expected" ); + } GregorianCalendar cal = new GregorianCalendar(); + cal.setLenient( false ); cal.set( Integer.parseInt( date.substring( 0, 4 ) ), Integer.parseInt( date.substring( 4, 6 ) ) - 1, (Integer) params.get( 1 ) ); @@ -162,5 +175,50 @@ { throw new FSException( "setdateday(string,integer) failed, date invalid?" ); } } } ); + ext.addFunctionExtension( "setdatedaypast", new FSFunctionExtension() + { + public Object callFunction( String name, ArrayList params ) + throws FSException + { + System.out.println( name+" "+params ); + if ( params.size() != 2 || !( params.get( 0 ) instanceof String ) || + !( params.get( 1 ) instanceof Integer ) ) + { + throw new FSException( "setdateday(string,integer) wrong parameter count/type" ); + } + try + { + String date = (String) params.get( 0 ); + if ( date.length() != 8 ) + { + throw new FSException( "setdateday(string, integer) failed, date invalid, yyyyMMdd expected" ); + } + GregorianCalendar cal = new GregorianCalendar(); + cal.setLenient( false ); + cal.set( Integer.parseInt( date.substring( 0, 4 ) ), + Integer.parseInt( date.substring( 4, 6 ) ) - 1, + Integer.parseInt( date.substring( 6, 8 ) ) ); + int year = cal.get( Calendar.YEAR ); + int month = cal.get( Calendar.MONTH ); + int day = cal.get( Calendar.DAY_OF_MONTH ); + System.out.println( "org "+year+" "+month+" "+day ); + int newday = (Integer) params.get( 1 ); + if ( newday > day ) + { + month--; + if ( month < 0 ) + { + month = 11; + year--; + } + } + System.out.println( "new "+year+" "+month+" "+newday ); + cal.set( year, month, newday ); + return dateFormat.format( cal.getTime() ); + } + catch ( Exception ex ) + { throw new FSException( "setdateday(string,integer) failed, date invalid?" ); } + } + } ); } } Added: trunk/Uni-d/util/src/test/java/be/unid/util/script/DateExtensionTest.java =================================================================== --- trunk/Uni-d/util/src/test/java/be/unid/util/script/DateExtensionTest.java (rev 0) +++ trunk/Uni-d/util/src/test/java/be/unid/util/script/DateExtensionTest.java 2006-10-09 10:40:39 UTC (rev 3012) @@ -0,0 +1,106 @@ +/** + * This file is part of IC-trace + * Copyright (c) C.A.B. nv, Nijlen, Belgium + */ + +package be.unid.util.script; + +import junit.framework.TestCase; +import murlen.util.fscript.*; + +/** + * Tests for DateExtension class + * + * @author <a href="mailto:jo...@ca...">Joachim Van der Auwera</a> + * @version $Revision: $ + */ + +public class DateExtensionTest + extends TestCase +{ + FScript fscript; + + protected void setUp() + throws Exception + { + super.setUp(); + if ( fscript == null ) + { + fscript = new FScript(); + FSFastExtension fastExtension = new FSFastExtension(); + DateExtension.addExtension( fastExtension ); + fscript.registerExtension( fastExtension ); + } + } + + public void testSetdateday() + throws Exception + { + assertEquals( "20060312", fscript.evaluateExpression( "setdateday( \"20060315\", 12)" ) ); + assertEquals( "20060318", fscript.evaluateExpression( "setdateday( \"20060315\", 18)" ) ); + assertEquals( "20060118", fscript.evaluateExpression( "setdateday( \"20060115\", 18)" ) ); + try + { + fscript.evaluateExpression( "setdateday( \"20060315\", 32)" ); + fail(); + } + catch ( FSException fe ) {/*ok*/} + try + { + fscript.evaluateExpression( "setdateday( \"20060315\", 0)" ); + fail(); + } + catch ( FSException fe ) {/*ok*/} + try + { + fscript.evaluateExpression( "setdateday( \"20061415\", 0)" ); + fail(); + } + catch ( FSException fe ) {/*ok*/} + try + { + fscript.evaluateExpression( "setdateday( \"200614\", 0)" ); + fail(); + } + catch ( FSException fe ) {/*ok*/} + assertEquals( "20060330", fscript.evaluateExpression( "setdateday( \"20060315\", 30)" ) ); + } + + public void testSetdatedaypast() + throws Exception + { + assertEquals( "20060312", fscript.evaluateExpression( "setdatedaypast( \"20060315\", 12)" ) ); + assertEquals( "20060218", fscript.evaluateExpression( "setdatedaypast( \"20060315\", 18)" ) ); + assertEquals( "20051218", fscript.evaluateExpression( "setdatedaypast( \"20060115\", 18)" ) ); + try + { + fscript.evaluateExpression( "setdatedaypast( \"20060315\", 32)" ); + fail(); + } + catch ( FSException fe ) {/*ok*/} + try + { + fscript.evaluateExpression( "setdatedaypast( \"20060315\", 0)" ); + fail(); + } + catch ( FSException fe ) {/*ok*/} + try + { + fscript.evaluateExpression( "setdatedaypast( \"20061415\", 0)" ); + fail(); + } + catch ( FSException fe ) {/*ok*/} + try + { + fscript.evaluateExpression( "setdatedaypast( \"200614\", 0)" ); + fail(); + } + catch ( FSException fe ) {/*ok*/} + try + { + fscript.evaluateExpression( "setdatedaypast( \"20060315\", 30)" ); + fail(); + } + catch ( FSException fe ) {/*ok*/} + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tri...@us...> - 2006-10-14 17:50:17
|
Revision: 3017 http://svn.sourceforge.net/uni-d/?rev=3017&view=rev Author: triathlon98 Date: 2006-10-14 10:49:55 -0700 (Sat, 14 Oct 2006) Log Message: ----------- wiki configreader Modified Paths: -------------- trunk/Uni-d/pom.xml trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/WikiSubRenderer.java trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/WikiSubRendererAdapter.java trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/line/LineRenderer.java trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/simple/SurroundMarkupRenderer.java Added Paths: ----------- trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/ConfigReader.java trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/ConfigReaderTest.java Modified: trunk/Uni-d/pom.xml =================================================================== --- trunk/Uni-d/pom.xml 2006-10-13 18:46:03 UTC (rev 3016) +++ trunk/Uni-d/pom.xml 2006-10-14 17:49:55 UTC (rev 3017) @@ -87,6 +87,27 @@ </plugin> </plugins> </build> + <!-- + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-report-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <configuration> + <links>http://java.sun.com/j2se/1.5.0/docs/api/</links> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jxr-plugin</artifactId> + </plugin> + </plugins> + </reporting> + --> <dependencyManagement> <dependencies> <dependency> Added: trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/ConfigReader.java =================================================================== --- trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/ConfigReader.java (rev 0) +++ trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/ConfigReader.java 2006-10-14 17:49:55 UTC (rev 3017) @@ -0,0 +1,124 @@ +/** + * This file is part of the Uni-d project. + * $Id $ + * + * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF + * ANY KIND, either express or implied. See the License for the specific language governing rights and + * limitations under the License. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + */ + +package be.unid.wiki; + +import be.unid.wiki.renderer.WikiSubRenderer; +import be.unid.wiki.renderer.line.WikiLineHandlerContainer; +import be.unid.wiki.renderer.line.WikiLineHandler; + +import java.io.Reader; +import java.io.BufferedReader; +import java.lang.reflect.Constructor; + +/** + * Read the configuration settings for the renderer, specifically how to build the render pipeline. + * It basically expects a reader with a classname on each line. + * If the class needs a parameter, then this can be passed after a "|" seperator (one string parameter only, passed to the constructor). + * If the class is a WikiLineHandler, then it is added in the last preceding WikiLineHandlerContainer. + * All classes are expected to be either WikiSubRenderer or WikiLineHandler instances. + * + * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a> + * @version $Revision $ + */ +public class ConfigReader +{ + public WikiSubRenderer buildRenderPipeline( Reader sreader ) + throws WikiException + { + BufferedReader reader = new BufferedReader( sreader ); + WikiSubRenderer root = null; + WikiSubRenderer previous = null; + WikiLineHandlerContainer handlerContainer = null; + + try + { + String line, param, className; + int sepPos; + Class clazz; + Object instance; + Constructor constructor; + while ( ( line = reader.readLine() ) != null ) + { + sepPos = line.indexOf( '|' ); + if ( sepPos == -1 ) + { + className = line; + param = null; + } + else + { + className = line.substring( 0, sepPos ); + param = line.substring( sepPos + 1 ); + } + clazz = Thread.currentThread().getContextClassLoader().loadClass( className ); + if ( param == null ) + { + constructor = clazz.getConstructor(); + instance = constructor.newInstance(); + } + else + { + constructor = clazz.getConstructor( String.class ); + instance = constructor.newInstance( param ); + } + if ( instance instanceof WikiSubRenderer ) + { + WikiSubRenderer curr = (WikiSubRenderer) instance; + if ( root == null ) + { + root = curr; + previous = curr; + } + previous.setWikiSubRenderer( curr ); + if ( curr instanceof WikiLineHandlerContainer ) handlerContainer = (WikiLineHandlerContainer) curr; + previous = curr; + } + else if ( instance instanceof WikiLineHandler ) + { + if ( handlerContainer == null ) + { + throw new WikiException( "WikiLineHandler before first WikiLineHandlerContainer" ); + } + handlerContainer.addLineHandler( (WikiLineHandler) instance ); + } + else + { + throw new WikiException( "instance of unknown type " + instance + ", " + className + + " should be a WikiSubRenderer or WikiLineHandler" ); + } + } + return root; + } + catch ( WikiException we ) + { + throw we; + } + catch ( Exception ex ) + { + throw new WikiException( ex ); + } + } +} Modified: trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/WikiSubRenderer.java =================================================================== --- trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/WikiSubRenderer.java 2006-10-13 18:46:03 UTC (rev 3016) +++ trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/WikiSubRenderer.java 2006-10-14 17:49:55 UTC (rev 3017) @@ -36,7 +36,7 @@ public interface WikiSubRenderer { /** - * Render the input wiki string to the result html text + * Render the input wiki string to the result html text. * * @param result object to build result html string * @param input wiki string to render @@ -44,7 +44,7 @@ void render( TextBuilder result, CharSequence input ); /** - * Render the given input string using the subrenderer + * Render the given input string using the subrenderer. * * @param result object to build result html string * @param input wiki string to render @@ -52,9 +52,14 @@ void subRender( TextBuilder result, CharSequence input ); /** - * Set the subrenderer to be used + * Set the subrenderer to be used. * * @param sub subrenderer */ void setWikiSubRenderer( WikiSubRenderer sub ); + + /** + * Set the subrenderer (should not be needed, except for testing). + */ + WikiSubRenderer getWikiSubRenderer(); } Modified: trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/WikiSubRendererAdapter.java =================================================================== --- trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/WikiSubRendererAdapter.java 2006-10-13 18:46:03 UTC (rev 3016) +++ trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/WikiSubRendererAdapter.java 2006-10-14 17:49:55 UTC (rev 3017) @@ -54,4 +54,10 @@ { subRenderer = sub; } + + + public WikiSubRenderer getWikiSubRenderer() + { + return subRenderer; + } } Modified: trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/line/LineRenderer.java =================================================================== --- trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/line/LineRenderer.java 2006-10-13 18:46:03 UTC (rev 3016) +++ trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/line/LineRenderer.java 2006-10-14 17:49:55 UTC (rev 3017) @@ -44,6 +44,11 @@ private ArrayList<WikiLineHandler> lineHandlers = new ArrayList<WikiLineHandler>(); + public ArrayList<WikiLineHandler> getLineHandlers() + { + return lineHandlers; + } + public void addLineHandler( WikiLineHandler wlh ) { lineHandlers.add( wlh ); Modified: trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/simple/SurroundMarkupRenderer.java =================================================================== --- trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/simple/SurroundMarkupRenderer.java 2006-10-13 18:46:03 UTC (rev 3016) +++ trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/simple/SurroundMarkupRenderer.java 2006-10-14 17:49:55 UTC (rev 3017) @@ -116,4 +116,20 @@ } return true; } + + + public String getMarkup() + { + return markup.toString(); + } + + public String getStyleEnd() + { + return styleEnd; + } + + public String getStyleStart() + { + return styleStart; + } } Added: trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/ConfigReaderTest.java =================================================================== --- trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/ConfigReaderTest.java (rev 0) +++ trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/ConfigReaderTest.java 2006-10-14 17:49:55 UTC (rev 3017) @@ -0,0 +1,84 @@ +/** + * This file is part of the Uni-d project. + * $Id $ + * + * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF + * ANY KIND, either express or implied. See the License for the specific language governing rights and + * limitations under the License. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + */ + +package be.unid.wiki; + +import junit.framework.TestCase; + +import java.io.StringReader; +import java.io.Reader; +import java.util.ArrayList; + +import be.unid.wiki.renderer.WikiSubRenderer; +import be.unid.wiki.renderer.simple.SurroundMarkupRenderer; +import be.unid.wiki.renderer.simple.EscapeUnescapeRenderer; +import be.unid.wiki.renderer.line.LineRenderer; +import be.unid.wiki.renderer.line.WikiLineHandler; +import be.unid.wiki.renderer.line.ParagraphLineHandler; + +/** + * Verify that the ConfigReader works properly. + * + * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a> + * @version $Revision $ + */ +public class ConfigReaderTest + extends TestCase +{ + public void testBuildRenderPipeline() throws Exception + { + String test = "be.unid.wiki.renderer.line.LineRenderer\n" + + "be.unid.wiki.renderer.line.ParagraphLineHandler\n" + + "be.unid.wiki.renderer.simple.SurroundMarkupRenderer|*|<b>|</b>\n" + + "be.unid.wiki.renderer.simple.SurroundMarkupRenderer|_|<em>|</em>\n" + + "be.unid.wiki.renderer.simple.EscapeUnescapeRenderer"; + Reader reader = new StringReader(test); + ConfigReader cr = new ConfigReader(); + WikiSubRenderer wsr = cr.buildRenderPipeline( reader ); + + assertTrue( wsr instanceof LineRenderer ); + + ArrayList<WikiLineHandler> lh = ((LineRenderer)wsr).getLineHandlers(); + assertTrue( lh.get( 0 ) instanceof ParagraphLineHandler ); + + SurroundMarkupRenderer smr; + wsr=wsr.getWikiSubRenderer(); + assertTrue( wsr instanceof SurroundMarkupRenderer ); + smr = (SurroundMarkupRenderer)wsr; + assertEquals( "*", smr.getMarkup() ); + assertEquals( "<b>", smr.getStyleStart() ); + assertEquals( "</b>", smr.getStyleEnd() ); + + wsr=wsr.getWikiSubRenderer(); + assertTrue( wsr instanceof SurroundMarkupRenderer ); + smr = (SurroundMarkupRenderer)wsr; + assertEquals( "_", smr.getMarkup() ); + assertEquals( "<em>", smr.getStyleStart() ); + assertEquals( "</em>", smr.getStyleEnd() ); + + wsr=wsr.getWikiSubRenderer(); + assertTrue( wsr instanceof EscapeUnescapeRenderer ); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tri...@us...> - 2006-10-14 21:19:31
|
Revision: 3019 http://svn.sourceforge.net/uni-d/?rev=3019&view=rev Author: triathlon98 Date: 2006-10-14 14:19:10 -0700 (Sat, 14 Oct 2006) Log Message: ----------- add some extra reports in site small changes and extra tests to increase code coverage Modified Paths: -------------- trunk/Uni-d/pom.xml trunk/Uni-d/uni-d-wiki/pom.xml trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/macro/DefaultMacroSplitter.java trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/line/LineSplitter.java trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/simple/SurroundMarkupRenderer.java trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/ConfigReaderTest.java trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/DefaultMacroSplitterTest.java trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/renderer/line/LineSplitterTest.java trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/renderer/simple/SurroundMarkupRendererTest.java Modified: trunk/Uni-d/pom.xml =================================================================== --- trunk/Uni-d/pom.xml 2006-10-14 20:24:22 UTC (rev 3018) +++ trunk/Uni-d/pom.xml 2006-10-14 21:19:10 UTC (rev 3019) @@ -87,7 +87,6 @@ </plugin> </plugins> </build> - <!-- <reporting> <plugins> <plugin> @@ -98,16 +97,28 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <configuration> - <links>http://java.sun.com/j2se/1.5.0/docs/api/</links> + <links> + <link>http://java.sun.com/j2se/1.5.0/docs/api/</link> + </links> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jxr-plugin</artifactId> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <configuration> + <configLocation>config/maven_checks.xml</configLocation> + </configuration> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>cobertura-maven-plugin</artifactId> + </plugin> </plugins> </reporting> - --> <dependencyManagement> <dependencies> <dependency> Modified: trunk/Uni-d/uni-d-wiki/pom.xml =================================================================== --- trunk/Uni-d/uni-d-wiki/pom.xml 2006-10-14 20:24:22 UTC (rev 3018) +++ trunk/Uni-d/uni-d-wiki/pom.xml 2006-10-14 21:19:10 UTC (rev 3019) @@ -11,7 +11,10 @@ <packaging>jar</packaging> <version>0.8-SNAPSHOT</version> <name>Uni-d-wiki</name> - <url>http://unid.sf.net</url> + <description> + General wiki rendering code, he defaults render wiki content with markup similar to Confluence. + However, the system can be configured at will to render different wiki styles. + </description> <build> <resources> <resource> Modified: trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/macro/DefaultMacroSplitter.java =================================================================== --- trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/macro/DefaultMacroSplitter.java 2006-10-14 20:24:22 UTC (rev 3018) +++ trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/macro/DefaultMacroSplitter.java 2006-10-14 21:19:10 UTC (rev 3019) @@ -267,7 +267,7 @@ public void remove() { - // not supported + throw new UnsupportedOperationException(); } public Iterator<MacroPart> iterator() Modified: trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/line/LineSplitter.java =================================================================== --- trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/line/LineSplitter.java 2006-10-14 20:24:22 UTC (rev 3018) +++ trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/line/LineSplitter.java 2006-10-14 21:19:10 UTC (rev 3019) @@ -84,7 +84,7 @@ public void remove() { - // not supported + throw new UnsupportedOperationException(); } public Iterator<CharSequence> iterator() Modified: trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/simple/SurroundMarkupRenderer.java =================================================================== --- trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/simple/SurroundMarkupRenderer.java 2006-10-14 20:24:22 UTC (rev 3018) +++ trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/renderer/simple/SurroundMarkupRenderer.java 2006-10-14 21:19:10 UTC (rev 3019) @@ -47,7 +47,7 @@ /** * Construct the renderer, needs a parameter like "*|<b>|</b>" or "??|<cite>|</cite>" * - * @param param + * @param param how to render */ public SurroundMarkupRenderer( String param ) { Modified: trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/ConfigReaderTest.java =================================================================== --- trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/ConfigReaderTest.java 2006-10-14 20:24:22 UTC (rev 3018) +++ trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/ConfigReaderTest.java 2006-10-14 21:19:10 UTC (rev 3019) @@ -47,38 +47,87 @@ public class ConfigReaderTest extends TestCase { - public void testBuildRenderPipeline() throws Exception + public void testBuildRenderPipeline() + throws Exception { String test = "be.unid.wiki.renderer.line.LineRenderer\n" + "be.unid.wiki.renderer.line.ParagraphLineHandler\n" + "be.unid.wiki.renderer.simple.SurroundMarkupRenderer|*|<b>|</b>\n" + "be.unid.wiki.renderer.simple.SurroundMarkupRenderer|_|<em>|</em>\n" + "be.unid.wiki.renderer.simple.EscapeUnescapeRenderer"; - Reader reader = new StringReader(test); + Reader reader = new StringReader( test ); ConfigReader cr = new ConfigReader(); WikiSubRenderer wsr = cr.buildRenderPipeline( reader ); assertTrue( wsr instanceof LineRenderer ); - ArrayList<WikiLineHandler> lh = ((LineRenderer)wsr).getLineHandlers(); + ArrayList<WikiLineHandler> lh = ( (LineRenderer) wsr ).getLineHandlers(); assertTrue( lh.get( 0 ) instanceof ParagraphLineHandler ); SurroundMarkupRenderer smr; - wsr=wsr.getWikiSubRenderer(); + wsr = wsr.getWikiSubRenderer(); assertTrue( wsr instanceof SurroundMarkupRenderer ); - smr = (SurroundMarkupRenderer)wsr; + smr = (SurroundMarkupRenderer) wsr; assertEquals( "*", smr.getMarkup() ); assertEquals( "<b>", smr.getStyleStart() ); assertEquals( "</b>", smr.getStyleEnd() ); - wsr=wsr.getWikiSubRenderer(); + wsr = wsr.getWikiSubRenderer(); assertTrue( wsr instanceof SurroundMarkupRenderer ); - smr = (SurroundMarkupRenderer)wsr; + smr = (SurroundMarkupRenderer) wsr; assertEquals( "_", smr.getMarkup() ); assertEquals( "<em>", smr.getStyleStart() ); assertEquals( "</em>", smr.getStyleEnd() ); - wsr=wsr.getWikiSubRenderer(); + wsr = wsr.getWikiSubRenderer(); assertTrue( wsr instanceof EscapeUnescapeRenderer ); } + + public void testInvalid() + throws Exception + { + String test = "bla.WrongClassName"; + Reader reader = new StringReader( test ); + ConfigReader cr = new ConfigReader(); + try + { + cr.buildRenderPipeline( reader ); + fail( "exceptio should have been thrown" ); + } + catch ( WikiException we ) + { + // ok, failure was reported + } + } + public void testWrongType() + throws Exception + { + String test = "java.lang.String"; + Reader reader = new StringReader( test ); + ConfigReader cr = new ConfigReader(); + try + { + cr.buildRenderPipeline( reader ); + fail( "exceptio should have been thrown" ); + } + catch ( WikiException we ) + { + // ok, failure was reported + } + } + public void testWrongOrder() + throws Exception + { + String test = "be.unid.wiki.renderer.line.ParagraphLineHandler\n" + + "be.unid.wiki.renderer.line.LineRenderer"; + Reader reader = new StringReader( test ); + ConfigReader cr = new ConfigReader(); + try + { + cr.buildRenderPipeline( reader ); + fail( "exceptio should have been thrown" ); + } + catch ( WikiException we ) + { /* OK */ } + } } Modified: trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/DefaultMacroSplitterTest.java =================================================================== --- trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/DefaultMacroSplitterTest.java 2006-10-14 20:24:22 UTC (rev 3018) +++ trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/DefaultMacroSplitterTest.java 2006-10-14 21:19:10 UTC (rev 3019) @@ -315,4 +315,17 @@ } ); simpleTest( context, test ); } + + public void testRemove() + throws Exception + { + MacroSplitter ms = new DefaultMacroSplitter( context, "test" ); + try + { + ms.remove(); + fail( "remove should fail" ); + } + catch ( UnsupportedOperationException uoe ) + { /*OK*/ } + } } Modified: trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/renderer/line/LineSplitterTest.java =================================================================== --- trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/renderer/line/LineSplitterTest.java 2006-10-14 20:24:22 UTC (rev 3018) +++ trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/renderer/line/LineSplitterTest.java 2006-10-14 21:19:10 UTC (rev 3019) @@ -93,4 +93,29 @@ assertEquals( line2, ls.next().toString() ); assertFalse( ls.hasNext() ); } + + public void testRemove() + throws Exception + { + LineSplitter ls = new LineSplitter( "test" ); + try + { + ls.remove(); + fail( "remove should fail" ); + } + catch ( UnsupportedOperationException uoe ) + { /*OK*/ } + } + + public void testForeach() + throws Exception + { + String line1 = "first line"; + String line2 = "and some more text "; + LineSplitter ls = new LineSplitter( line1 + '\r' + line2 ); + for ( CharSequence line : ls ) + { + assertNotNull( line ); + } + } } Modified: trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/renderer/simple/SurroundMarkupRendererTest.java =================================================================== --- trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/renderer/simple/SurroundMarkupRendererTest.java 2006-10-14 20:24:22 UTC (rev 3018) +++ trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/renderer/simple/SurroundMarkupRendererTest.java 2006-10-14 21:19:10 UTC (rev 3019) @@ -46,6 +46,15 @@ assertEquals( test, tb.toString() ); } + public void testEmpty() + { + SurroundMarkupRenderer smr = new SurroundMarkupRenderer( "|<b>|</b>" ); + TextBuilder tb = TextBuilder.newInstance(); + String test = "nothing to change"; + smr.render( tb, test ); + assertEquals( test, tb.toString() ); + } + public void testSimpleHalf() { SurroundMarkupRenderer smr = new SurroundMarkupRenderer( "*|<b>|</b>" ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tri...@us...> - 2006-10-19 22:19:09
|
Revision: 3024 http://svn.sourceforge.net/uni-d/?rev=3024&view=rev Author: triathlon98 Date: 2006-10-19 15:19:00 -0700 (Thu, 19 Oct 2006) Log Message: ----------- make sure version is only mentioned in main pom Modified Paths: -------------- trunk/Uni-d/pom.xml trunk/Uni-d/tool/pom.xml Modified: trunk/Uni-d/pom.xml =================================================================== --- trunk/Uni-d/pom.xml 2006-10-19 11:05:21 UTC (rev 3023) +++ trunk/Uni-d/pom.xml 2006-10-19 22:19:00 UTC (rev 3024) @@ -307,6 +307,11 @@ <artifactId>jcalendar</artifactId> <version>1.3.2</version> </dependency> + <dependency> + <groupId>javax.mail</groupId> + <artifactId>mail</artifactId> + <version>1.4</version> + </dependency> </dependencies> </dependencyManagement> <repositories> Modified: trunk/Uni-d/tool/pom.xml =================================================================== --- trunk/Uni-d/tool/pom.xml 2006-10-19 11:05:21 UTC (rev 3023) +++ trunk/Uni-d/tool/pom.xml 2006-10-19 22:19:00 UTC (rev 3024) @@ -37,7 +37,6 @@ <dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> - <version>1.4</version> </dependency> </dependencies> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tri...@us...> - 2006-10-22 22:20:12
|
Revision: 3027 http://svn.sourceforge.net/uni-d/?rev=3027&view=rev Author: triathlon98 Date: 2006-10-22 15:19:50 -0700 (Sun, 22 Oct 2006) Log Message: ----------- increase code coverage for wiki, remove checkstyle report until we use the proper configuration Modified Paths: -------------- trunk/Uni-d/pom.xml trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/DefaultWikiRenderer.java trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/WikiFactoryTest.java Added Paths: ----------- trunk/Uni-d/uni-d-wiki/src/main/macro/be/unid/wiki/macro/nowiki.properties trunk/Uni-d/uni-d-wiki/src/main/macro/be/unid/wiki/template/nowiki.vm Modified: trunk/Uni-d/pom.xml =================================================================== --- trunk/Uni-d/pom.xml 2006-10-22 21:55:57 UTC (rev 3026) +++ trunk/Uni-d/pom.xml 2006-10-22 22:19:50 UTC (rev 3027) @@ -106,6 +106,7 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jxr-plugin</artifactId> </plugin> + <!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> @@ -113,6 +114,7 @@ <configLocation>config/maven_checks.xml</configLocation> </configuration> </plugin> + --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> Modified: trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/DefaultWikiRenderer.java =================================================================== --- trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/DefaultWikiRenderer.java 2006-10-22 21:55:57 UTC (rev 3026) +++ trunk/Uni-d/uni-d-wiki/src/main/java/be/unid/wiki/DefaultWikiRenderer.java 2006-10-22 22:19:50 UTC (rev 3027) @@ -57,14 +57,7 @@ // render the pre-wiki template macro = context.getMacroLoader().load( "WIKI-PREFIX" ); - if ( macro != null ) - { - macroPart = new MacroPart(); - macroPart.setMacro( macro ); - macroPart.setBody( "" ); - macroPart.setCanContainMacros( false ); - renderer.render( context, macroPart, writer ); - } + renderPrePost( renderer, macro, writer ); // render the actual wiki content macroPart = new MacroPart(); @@ -74,9 +67,15 @@ // render the post-wiki template macro = context.getMacroLoader().load( "WIKI-SUFFIX" ); + renderPrePost( renderer, macro, writer ); + } + + private void renderPrePost( MacroPartRenderer renderer, WikiMacro macro, Writer writer ) + throws WikiException, IOException + { if ( macro != null ) { - macroPart = new MacroPart(); + MacroPart macroPart = new MacroPart(); macroPart.setMacro( macro ); macroPart.setBody( "" ); macroPart.setCanContainMacros( false ); Added: trunk/Uni-d/uni-d-wiki/src/main/macro/be/unid/wiki/macro/nowiki.properties =================================================================== --- trunk/Uni-d/uni-d-wiki/src/main/macro/be/unid/wiki/macro/nowiki.properties (rev 0) +++ trunk/Uni-d/uni-d-wiki/src/main/macro/be/unid/wiki/macro/nowiki.properties 2006-10-22 22:19:50 UTC (rev 3027) @@ -0,0 +1,2 @@ +hasBody=true +template=nowiki Added: trunk/Uni-d/uni-d-wiki/src/main/macro/be/unid/wiki/template/nowiki.vm =================================================================== --- trunk/Uni-d/uni-d-wiki/src/main/macro/be/unid/wiki/template/nowiki.vm (rev 0) +++ trunk/Uni-d/uni-d-wiki/src/main/macro/be/unid/wiki/template/nowiki.vm 2006-10-22 22:19:50 UTC (rev 3027) @@ -0,0 +1 @@ +$macro \ No newline at end of file Modified: trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/WikiFactoryTest.java =================================================================== --- trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/WikiFactoryTest.java 2006-10-22 21:55:57 UTC (rev 3026) +++ trunk/Uni-d/uni-d-wiki/src/test/java/be/unid/wiki/WikiFactoryTest.java 2006-10-22 22:19:50 UTC (rev 3027) @@ -43,10 +43,12 @@ "that my wiki *code* works\n" + "_as expected_ {quote}as it should{quote}\n" + "\n" + + "{nowiki}with a *nowiki* macro in it{nowiki}\n" + "I hope it works."; String result = "<div class=\"wiki\"><p>I want some simple text to verify<br />" + "that my wiki <b>code</b> works<br />" + "<em>as expected</em> <blockquote><p>as it should</p></blockquote></p>" + + "with a *nowiki* macro in it" + "<p>I hope it works.</p></div>"; WikiRenderer wr = WikiFactory.getWikiRenderer(); assertEquals( result, wr.render( test ) ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tri...@us...> - 2006-10-23 14:01:24
|
Revision: 3028 http://svn.sourceforge.net/uni-d/?rev=3028&view=rev Author: triathlon98 Date: 2006-10-23 07:01:09 -0700 (Mon, 23 Oct 2006) Log Message: ----------- document mail import settings, make timeout is s instead of ms Modified Paths: -------------- trunk/Uni-d/docs/src/wiki/Import.wiki trunk/Uni-d/tool/src/main/java/be/unid/tool/ymport/ImportWorker.java trunk/Uni-d/tool/src/main/java/be/unid/tool/ymport/configuration/ImportSectionMail.java trunk/Uni-d/tool/tool.ini Modified: trunk/Uni-d/docs/src/wiki/Import.wiki =================================================================== --- trunk/Uni-d/docs/src/wiki/Import.wiki 2006-10-22 22:19:50 UTC (rev 3027) +++ trunk/Uni-d/docs/src/wiki/Import.wiki 2006-10-23 14:01:09 UTC (rev 3028) @@ -1,4 +1,4 @@ -!Import tool +h1. Import tool This is a tool which can be used to easy importing data into a Uni-d application. The program scans a directory for import files to appear (very configurable) and imports them using [ImportServlet]. @@ -9,7 +9,7 @@ (one-way synchronization, use the [Export] tool for the other direction). -!Usage +h2. Usage The import tool can either scan directories for import files to appear, or can run scripts which produce the import file (probably by reading data from a proprietary system). @@ -17,7 +17,7 @@ The file format for importing is [ImportFileFormat]. -!General configuration +h2. General configuration The tool (class be.unid.tool.ymport.ImportClient) accepts one optional parameter, the name of an .ini file which is used for the configuration. @@ -33,6 +33,16 @@ search=local importURL=http://192.168.0.252:8080/admin/import/import + [mail] + server=mail.paragon-software.ro + port=110 + user=te...@pa... + password=testtest + directory=/data/ + accept=fl...@pa...;kun...@ya... + connectionTimeout=30 + socketTimeout=30 + [scan] dir1=c:\import input1=*.txt @@ -56,33 +66,45 @@ This has the following meaning -- General section --- scanPeriod : time in seconds between attempts to pick up files to import or attempt to run the import scripts. Defaults to 60s. --- outputExtension : extension for output (error) files. The extension of the input file is replaced, or the extension is added if the input file had no extension. --- window : indicates whether a window needs to be displayed or not (values "display" or "hidden"). --- search : indicates whether the program should only scan in the scan directories, or also in subsidrectories. Possible values are: "deep" and "local". +h3. general section +- scanPeriod : time in seconds between attempts to pick up files to import or attempt to run the import scripts. Defaults to 60s. +- outputExtension : extension for output (error) files. The extension of the input file is replaced, or the extension is added if the input file had no extension. +- window : indicates whether a window needs to be displayed or not (values "display" or "hidden"). +- search : indicates whether the program should only scan in the scan directories, or also in subsidrectories. Possible values are: "deep" and "local". -- Scan section --- This can contain the directories which have to be scanned for input files (scanX with X a number) and a regular expression (inputX) indicating the files which need to be imported (default is *), for the directory with the same number --- It may also contain the charset to be used for the files from the matching directory. When charset is not set, the system default is used. --- For each level, an import script file can be specified. The "build(string filename)" function is called in this script to allow conversion from other types of files. +h3. mail section +This allows mails to be read which can then be imported. The attachments will be placed in the chosen location for further processing (scanning). Only mails from the list of allowed senders are accepted (slight security measure as anyboy could send mails to the designated mailbox. + {warning} + Accepting data to be imported from mails is always a security risc as sender addresses are very easy to forge. Once somebody knows the mail address and sender address top use, they can inject and overwrite anything in the database. + {warning} +- _server_ : mail server to get mails from +- _user_ : user to get mails for +- _password_ : password for the user +- _accept_ : senders for which the emails are accepted +- _directory_ : location where the attachments need to be saved +- _connectionTimeout_, _socketTimeout_ : timeouts for connection, in seconds, default is 30 -- Script section --- debug : can be "true" or "false". Normally the data which is built is immediately sent to the import servlet. However, when debug is "true", then the data is not imported but simply written to an output file in the current directory. --- scriptX (with X a number) : name of a script file which builds the data to be imported. +h3. scan section +- This can contain the directories which have to be scanned for input files (scanX with X a number) and a regular expression (inputX) indicating the files which need to be imported (default is *), for the directory with the same number +- It may also contain the charset to be used for the files from the matching directory. When charset is not set, the system default is used. +- For each level, an import script file can be specified. The "build(string filename)" function is called in this script to allow conversion from other types of files. +h3. script section +- debug : can be "true" or "false". Normally the data which is built is immediately sent to the import servlet. However, when debug is "true", then the data is not imported but simply written to an output file in the current directory. +- scriptX (with X a number) : name of a script file which builds the data to be imported. + - database section --- As with script and scan, the names need to end with a number to indicate what belongs together. Counting starts at one and should be continuous. The database section is only relevant for import scripts. --- name : name for the database, as used in "Dbset(var[,name])" --- driver : JDBC driver class --- location : database url for connection with the database --- user, password : username and password for the connection +- As with script and scan, the names need to end with a number to indicate what belongs together. Counting starts at one and should be continuous. The database section is only relevant for import scripts. +- name : name for the database, as used in "Dbset(var[,name])" +- driver : JDBC driver class +- location : database url for connection with the database +- user, password : username and password for the connection -- config section --- In the config section extra kay/value pairs can be put which can be retrieved in the scripts using "config(key)". +h3. config section +- In the config section extra kay/value pairs can be put which can be retrieved in the scripts using "config(key)". -!Program functioning +h2. Program functioning The import itself starts by computing the name of the error file (the extension (everything after the last dot, if any) is replaced by "outputExtension"). @@ -94,7 +116,7 @@ If the import failed, the return message from the servlet is written in the error file. -!Script handling +h2. Script handling The program accepts [FScript] (see http://fscript.sourceforge.net/index.html) scripts to build the data to be imported. The script should have the following structure : Modified: trunk/Uni-d/tool/src/main/java/be/unid/tool/ymport/ImportWorker.java =================================================================== --- trunk/Uni-d/tool/src/main/java/be/unid/tool/ymport/ImportWorker.java 2006-10-22 22:19:50 UTC (rev 3027) +++ trunk/Uni-d/tool/src/main/java/be/unid/tool/ymport/ImportWorker.java 2006-10-23 14:01:09 UTC (rev 3028) @@ -417,8 +417,8 @@ throws ToolException { Properties props = System.getProperties(); - props.setProperty( "mail.pop3.connectiontimeout", Integer.toString( connectionTimeout ) ); - props.setProperty( "mail.pop3.timeout", Integer.toString( socketTimeout ) ); + props.setProperty( "mail.pop3.connectiontimeout", Integer.toString( connectionTimeout * 1000 ) ); + props.setProperty( "mail.pop3.timeout", Integer.toString( socketTimeout * 1000 ) ); props.setProperty( "mail.pop3.port", Integer.toString( port ) ); Session session = Session.getDefaultInstance( props ); ToolException saveException = null; Modified: trunk/Uni-d/tool/src/main/java/be/unid/tool/ymport/configuration/ImportSectionMail.java =================================================================== --- trunk/Uni-d/tool/src/main/java/be/unid/tool/ymport/configuration/ImportSectionMail.java 2006-10-22 22:19:50 UTC (rev 3027) +++ trunk/Uni-d/tool/src/main/java/be/unid/tool/ymport/configuration/ImportSectionMail.java 2006-10-23 14:01:09 UTC (rev 3028) @@ -58,8 +58,8 @@ public static final String INI_MAIL_SECTION_ATTRIBUTE_SOCKET_TIMEOUT = "socketTimeout"; public static int DEFAULT_PORT = 110; - public static int DEFAULT_CONNECTION_TIMEOUT = 10000; - public static int DEFAULT_SOCKET_TIMEOUT = 10000; + public static int DEFAULT_CONNECTION_TIMEOUT = 30; + public static int DEFAULT_SOCKET_TIMEOUT = 30; private String server; private int port; @@ -97,7 +97,7 @@ if ( value != null ) port = Integer.parseInt( value ); } catch ( Exception ignore ) - {} + {/*ignore*/} user = section.get( INI_MAIL_SECTION_ATTRIBUTE_USER ); password = section.get( INI_MAIL_SECTION_ATTRIBUTE_PASSWORD ); @@ -110,7 +110,7 @@ if ( value != null ) connectionTimeout = Integer.parseInt( value ); } catch ( Exception ignore ) - {} + {/*ignore*/} value = section.get( INI_MAIL_SECTION_ATTRIBUTE_SOCKET_TIMEOUT ); try @@ -118,7 +118,7 @@ if ( value != null ) socketTimeout = Integer.parseInt( value ); } catch ( Exception ignore ) - {} + {/*ignore*/} } Modified: trunk/Uni-d/tool/tool.ini =================================================================== --- trunk/Uni-d/tool/tool.ini 2006-10-22 22:19:50 UTC (rev 3027) +++ trunk/Uni-d/tool/tool.ini 2006-10-23 14:01:09 UTC (rev 3028) @@ -57,8 +57,8 @@ password=testtest directory=/data/ accept=fl...@pa...;kun...@ya... -connectionTimeout=10000 -socketTimeout=10000 +connectionTimeout=30 +socketTimeout=30 ;;;;;;;;;;;;;;;;;;;;;;;;;; Export Section ;;;;;;;;;;;;;;;;;;;;;;; [export,settings] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2006-10-26 15:03:57
|
Revision: 3031 http://svn.sourceforge.net/uni-d/?rev=3031&view=rev Author: max_brod Date: 2006-10-26 08:03:14 -0700 (Thu, 26 Oct 2006) Log Message: ----------- [UNI-337] Added texts and links to split the sections fields/actions/selects. Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/userAdmin/table/tableRights/TableRights.java trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/components/userAdmin/table/tableRights/TableRights.html trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed.properties trunk/Uni-d/test/src/etc/site_tapestry/site.war/css/Uni-d.css Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/userAdmin/table/tableRights/TableRights.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/userAdmin/table/tableRights/TableRights.java 2006-10-23 15:08:58 UTC (rev 3030) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/userAdmin/table/tableRights/TableRights.java 2006-10-26 15:03:14 UTC (rev 3031) @@ -248,4 +248,15 @@ } public void formSubmit() {} + + public boolean hasActions() + { + return getTableDescription().getActions().size() > 0; + } + + public boolean hasSelects() + { + return getTableDescription().getSelects().size() > 0; + } + } \ No newline at end of file Modified: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/components/userAdmin/table/tableRights/TableRights.html =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/components/userAdmin/table/tableRights/TableRights.html 2006-10-23 15:08:58 UTC (rev 3030) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/components/userAdmin/table/tableRights/TableRights.html 2006-10-26 15:03:14 UTC (rev 3031) @@ -40,7 +40,20 @@ clientValidationEnabled="ognl:true" enctype="multipart/form-data" focus="ognl:false"> + <a href="#fieldsSection"><span jwcid="@Insert" value="message:FieldsSection" class="tableRightsSection"/></a> + <p/> + <span jwcid="@If" condition="ognl:hasActions()"> + <a href="#actionsSection"><span jwcid="@Insert" value="message:ActionsSection" class="tableRightsSection"/></a> + <p/> + </span> + + <span jwcid="@If" condition="ognl:hasSelects()"> + <a href="#selectsSection"><span jwcid="@Insert" value="message:SelectsSection" class="tableRightsSection"/></a> + <p/> + </span> + + <table><center> <tr><td> <label jwcid="@FieldLabel" field="prop:roleChoice" prerender="ognl:false"/> @@ -49,12 +62,22 @@ </td></tr> </center></table> <p/> + <a name="fieldsSection"><span jwcid="@Insert" value="message:FieldsSection" class="tableRightsSection"/></a> <span jwcid="unidTable"/> + + <span jwcid="@If" condition="ognl:hasActions()"> + <a name="actionsSection"><span jwcid="@Insert" value="message:ActionsSection" class="tableRightsSection"/></a> + <p/> + <span jwcid="actionRights"/> + </span> + + <span jwcid="@If" condition="ognl:hasSelects()"> + <a name="selectsSection"><span jwcid="@Insert" value="message:SelectsSection" class="tableRightsSection"/></a> + <p/> + <span jwcid="selectRights"/> + </span> + <p/> - <span jwcid="actionRights"/> - <p/> - <span jwcid="selectRights"/> - <p/> <center> <span jwcid="@LinkSubmit" action="listener:load"> <span jwcid="@Insert" value="message:Load"/> Modified: trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed.properties =================================================================== --- trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed.properties 2006-10-23 15:08:58 UTC (rev 3030) +++ trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed.properties 2006-10-26 15:03:14 UTC (rev 3031) @@ -1,4 +1,5 @@ Action=Action +ActionsSection=Actions Add=Add Back=Back BackToEdit=Back to edit @@ -15,6 +16,7 @@ Edit=Edit EnterNewPassword=Enter new password Field=Field +FieldsSection=Fields Find=Find Group=Group Index=Index @@ -46,6 +48,7 @@ Save=Save Select=Select SelectAll=Select all +SelectsSection=Selects SetAllToFullRights=Set all to full rights SetAllToNoRights=Set all to no rights StartPageConfig=Configure start page for GUI Modified: trunk/Uni-d/test/src/etc/site_tapestry/site.war/css/Uni-d.css =================================================================== --- trunk/Uni-d/test/src/etc/site_tapestry/site.war/css/Uni-d.css 2006-10-23 15:08:58 UTC (rev 3030) +++ trunk/Uni-d/test/src/etc/site_tapestry/site.war/css/Uni-d.css 2006-10-26 15:03:14 UTC (rev 3031) @@ -63,10 +63,14 @@ .displayError { background-color: red; color: black; - } .buttonGroup { text-align: center; display: block; } + +.tableRightsSection { + font-size: 10px; + text-align: center; +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pus...@us...> - 2006-10-27 17:05:39
|
Revision: 3038 http://svn.sourceforge.net/uni-d/?rev=3038&view=rev Author: pushkutza Date: 2006-10-27 10:05:17 -0700 (Fri, 27 Oct 2006) Log Message: ----------- ICT-667 : fix the return page bug Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/unidSelectResults/UnidSelectResults.java trunk/Uni-d/util/src/main/java/be/unid/util/swing/ScreenButton.java Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/unidSelectResults/UnidSelectResults.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/unidSelectResults/UnidSelectResults.java 2006-10-27 16:57:34 UTC (rev 3037) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/unidSelectResults/UnidSelectResults.java 2006-10-27 17:05:17 UTC (rev 3038) @@ -125,7 +125,6 @@ public abstract int getIndex(); - public abstract int getSize(); public abstract void setSize( int size ); @@ -278,7 +277,7 @@ log.debug( "UnidSelectResults.find - start index = " + indexStart + " end index = " + indexEnd ); List<UnidProxy> resultList = new ArrayList<UnidProxy>( indexEnd - indexStart ); - for ( int i = indexStart; i < indexEnd; i++ ) resultList.add( allList.get( i ) ); + for ( int i = indexStart; i < indexEnd ; i++ ) resultList.add( allList.get( i ) ); // make sorting if ( getSortField() != null ) { @@ -331,8 +330,9 @@ public void edit( String uoid ) throws Exception { + boolean isThisTheReturnPage = !getNavigationManager().hasReturnPage( getNavPage() ) || !hasSelect(); EditPage page = - (EditPage) getNavigationManager().getForwardPage( getNavPage(), "EditPage", true, true ); + (EditPage) getNavigationManager().getForwardPage( getNavPage(), "EditPage", true, isThisTheReturnPage ); page.getPageParameters().setTableName( getTableName() ); page.getPageParameters().setProxy( UnidProxyAccessor.findUoid( getTableName(), uoid ) ); page.getPageParameters().setShowSelect( hasSelect() ); @@ -348,8 +348,9 @@ public void viewLink( String uoid, String tableName ) throws Exception { + boolean isThisTheReturnPage = !getNavigationManager().hasReturnPage( getNavPage() ) || !hasSelect(); ViewPage page = - (ViewPage) getNavigationManager().getForwardPage( getNavPage(), "ViewPage", true, true ); + (ViewPage) getNavigationManager().getForwardPage( getNavPage(), "ViewPage", true, isThisTheReturnPage ); page.getPageParameters().setTableName( tableName ); page.getPageParameters().setProxy( UnidProxyAccessor.findUoid( tableName, uoid ) ); page.getPageParameters().setShowSelect( hasSelect() ); @@ -369,7 +370,7 @@ float[] percents = new float[fields.size()]; int noPercentFields = 0; int percentLeft = 100; - for ( int i = 0; i < fields.size(); i++ ) + for ( int i = 0; i < fields.size() ; i++ ) { float percent = getSessionUserAdmin().getReportPercentage( fields.get( i ).getId() ); if ( percent == 0 ) @@ -387,7 +388,7 @@ // just to make sure we dont divide by 0 if ( percentLeft <= 0 ) percentLeft = 1; int percentForEachField = percentLeft / noPercentFields; - for ( int i = 0; i < fields.size(); i++ ) + for ( int i = 0; i < fields.size() ; i++ ) { if ( percents[ i ] == 0 ) percents[ i ] = percentForEachField; } @@ -748,7 +749,7 @@ { enum Type { - UOID,UNID_TYPE,VIEW,EDIT,REMOVE,SELECT + UOID, UNID_TYPE, VIEW, EDIT, REMOVE, SELECT } Type type; Modified: trunk/Uni-d/util/src/main/java/be/unid/util/swing/ScreenButton.java =================================================================== --- trunk/Uni-d/util/src/main/java/be/unid/util/swing/ScreenButton.java 2006-10-27 16:57:34 UTC (rev 3037) +++ trunk/Uni-d/util/src/main/java/be/unid/util/swing/ScreenButton.java 2006-10-27 17:05:17 UTC (rev 3038) @@ -26,6 +26,7 @@ package be.unid.util.swing; import javax.swing.*; +import java.awt.*; /** * ScreenButton used by the ScreenButtonContainer This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2006-10-27 18:34:57
|
Revision: 3039 http://svn.sourceforge.net/uni-d/?rev=3039&view=rev Author: max_brod Date: 2006-10-27 11:34:17 -0700 (Fri, 27 Oct 2006) Log Message: ----------- [UNI-335] Added a new page (TapestryHome) which redirects to either a Default home or the user's preffered start page. Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/resources/Uni-d-tapestry.library trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/test/test.application Added Paths: ----------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/DefaultHome.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/TapestryHome.java trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/DefaultHome.html trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/TapestryHome.html trunk/Uni-d/test/src/uni-d/xejb/Article.table Removed Paths: ------------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/Home.java trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/Home.html trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/Home.properties Added: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/DefaultHome.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/DefaultHome.java (rev 0) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/DefaultHome.java 2006-10-27 18:34:17 UTC (rev 3039) @@ -0,0 +1,47 @@ +/** + * This file is part of the Uni-d project. + * $Id$ + * + * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF + * ANY KIND, either express or implied. See the License for the specific language governing rights and + * limitations under the License. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + */ + +package be.unid.tapestry.pages; + +import be.unid.tapestry.navigation.NavigationablePageImpl; +import org.apache.tapestry.event.PageBeginRenderListener; + + +/** + * Default home page + * + * @author NetRom team + * @version $Revision$ + */ +public abstract class DefaultHome + extends NavigationablePageImpl + implements PageBeginRenderListener +{ + + public String getTitle() + { + return getMessages().getMessage( "title" ); + } +} Property changes on: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/DefaultHome.java ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Deleted: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/Home.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/Home.java 2006-10-27 17:05:17 UTC (rev 3038) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/Home.java 2006-10-27 18:34:17 UTC (rev 3039) @@ -1,107 +0,0 @@ -/** - * This file is part of the Uni-d project. - * $Id$ - * - * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF - * ANY KIND, either express or implied. See the License for the specific language governing rights and - * limitations under the License. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - */ - -package be.unid.tapestry.pages; - -import be.unid.persistence.om.UnidProxy; -import be.unid.tapestry.navigation.NavigationablePageImpl; -import be.unid.tapestry.parser.border.Parser; -import be.unid.tapestry.util.UnidProxyAccessor; -import org.apache.tapestry.RedirectException; -import org.apache.tapestry.event.PageBeginRenderListener; -import org.apache.tapestry.event.PageEvent; - -import java.lang.reflect.InvocationTargetException; -import java.util.List; - - -/** - * Default home page - * - * @author NetRom team - * @version $Revision$ - */ -public abstract class Home - extends NavigationablePageImpl - implements PageBeginRenderListener -{ - private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger( Home.class ); - - @Override - public void pageBeginRender( PageEvent pageEvent ) - { - super.pageBeginRender( pageEvent ); - try - { - UnidProxy user; - List<UnidProxy> results = UnidProxyAccessor.find( "UnidUser", "UserName", new Class[]{ String.class }, - new String[]{ getSessionUserAdmin().getUserName() } ); - - if ( results == null || results.size() == 0 ) - { - return; - } - user = results.get( 0 ); - String startPage = (String) UnidProxyAccessor.getField( user, "StartPage" ); - if ( startPage == null ) - { - return; - } - List<Parser.ItemDescription> items = getVisitObject().getBorderItems(); - for ( Parser.ItemDescription item : items ) - { - if ( startPage.equals( item.getKey() ) ) - { - throw new RedirectException( item.getPage() ); - } - } - } - catch ( NoSuchMethodException nsme ) - { - log.error( nsme, nsme ); - } - catch ( IllegalAccessException iae ) - { - log.error( iae, iae ); - } - catch ( InvocationTargetException ite ) - { - log.error( ite, ite ); - } - catch ( InstantiationException ie ) - { - log.error( ie, ie ); - } - catch ( ClassNotFoundException cnfe ) - { - log.error( cnfe, cnfe ); - } - } - - public String getTitle() - { - return getMessages().getMessage( "title" ); - } -} Added: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/TapestryHome.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/TapestryHome.java (rev 0) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/TapestryHome.java 2006-10-27 18:34:17 UTC (rev 3039) @@ -0,0 +1,100 @@ +/** + * This file is part of the Uni-d project. + * $Id$ + * + * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF + * ANY KIND, either express or implied. See the License for the specific language governing rights and + * limitations under the License. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + */ + +package be.unid.tapestry.pages; + +import be.unid.persistence.om.UnidProxy; +import be.unid.tapestry.parser.border.Parser; +import be.unid.tapestry.util.UnidProxyAccessor; +import org.apache.tapestry.RedirectException; +import org.apache.tapestry.event.PageBeginRenderListener; +import org.apache.tapestry.event.PageEvent; + +import java.lang.reflect.InvocationTargetException; +import java.util.List; + + +/** + * Home page for Tapestry - will redirect to user's home page or a default home page + * + * @author NetRom team + * @version $Revision$ + */ +public abstract class TapestryHome + extends UnidBasePage + implements PageBeginRenderListener +{ + private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger( TapestryHome.class ); + + public void pageBeginRender( PageEvent pageEvent ) + { + try + { + UnidProxy user; + List<UnidProxy> results = UnidProxyAccessor.find( "UnidUser", "UserName", new Class[]{ String.class }, + new String[]{ getSessionUserAdmin().getUserName() } ); + + if ( results == null || results.size() == 0 ) + { + throw new RedirectException( "app?service=page&page=DefaultHome"); + } + user = results.get( 0 ); + String startPage = (String) UnidProxyAccessor.getField( user, "StartPage" ); + if ( startPage == null ) + { + throw new RedirectException( "app?service=page&page=DefaultHome"); + } + List<Parser.ItemDescription> items = getVisitObject().getBorderItems(); + for ( Parser.ItemDescription item : items ) + { + if ( startPage.equals( item.getKey() ) ) + { + throw new RedirectException( item.getPage() ); + } + } + throw new RedirectException( "app?service=page&page=DefaultHome"); + } + catch ( NoSuchMethodException nsme ) + { + log.error( nsme, nsme ); + } + catch ( IllegalAccessException iae ) + { + log.error( iae, iae ); + } + catch ( InvocationTargetException ite ) + { + log.error( ite, ite ); + } + catch ( InstantiationException ie ) + { + log.error( ie, ie ); + } + catch ( ClassNotFoundException cnfe ) + { + log.error( cnfe, cnfe ); + } + } +} Property changes on: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/TapestryHome.java ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Modified: trunk/Uni-d/tapestry/src/main/resources/Uni-d-tapestry.library =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/Uni-d-tapestry.library 2006-10-27 17:05:17 UTC (rev 3038) +++ trunk/Uni-d/tapestry/src/main/resources/Uni-d-tapestry.library 2006-10-27 18:34:17 UTC (rev 3039) @@ -10,8 +10,7 @@ <library id="tacos" specification-path="/net/sf/tacos/Tacos.library"/> <meta key="org.apache.tapestry.visit-class" value="be.unid.tapestry.util.Visit"/> - <meta key="org.apache.tapestry.page" value="Home"/> - + <!-- limit accepted locales --> <meta key="org.apache.tapestry.accepted-locales" value="en,nl"/> Added: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/DefaultHome.html =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/DefaultHome.html (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/DefaultHome.html 2006-10-27 18:34:17 UTC (rev 3039) @@ -0,0 +1,5 @@ +<border jwcid="@Border" internationalizedTitle="prop:title"> + +<span jwcid="keepAlive"/> + +</border> Property changes on: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/DefaultHome.html ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Deleted: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/Home.html =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/Home.html 2006-10-27 17:05:17 UTC (rev 3038) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/Home.html 2006-10-27 18:34:17 UTC (rev 3039) @@ -1,5 +0,0 @@ -<border jwcid="@Border" internationalizedTitle="prop:title"> - -<span jwcid="keepAlive"/> - -</border> Deleted: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/Home.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/Home.properties 2006-10-27 17:05:17 UTC (rev 3038) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/Home.properties 2006-10-27 18:34:17 UTC (rev 3039) @@ -1 +0,0 @@ -title=Home \ No newline at end of file Added: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/TapestryHome.html =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/TapestryHome.html (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/TapestryHome.html 2006-10-27 18:34:17 UTC (rev 3039) @@ -0,0 +1,5 @@ +<html> + <body> + This page should never be loaded, just redirects to other pages. + </body> +</html> \ No newline at end of file Property changes on: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/TapestryHome.html ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Modified: trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/test/test.application =================================================================== --- trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/test/test.application 2006-10-27 17:05:17 UTC (rev 3038) +++ trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/test/test.application 2006-10-27 18:34:17 UTC (rev 3039) @@ -6,7 +6,7 @@ <application name="test"> <meta key="org.apache.tapestry.visit-class" value="be.unid.tapestry.util.Visit"/> - <meta key="org.apache.tapestry.page" value="Home"/> + <meta key="org.apache.tapestry.page" value="TapestryHome"/> <!-- limit accepted locales --> <meta key="org.apache.tapestry.accepted-locales" value="en,nl,fr"/> Added: trunk/Uni-d/test/src/uni-d/xejb/Article.table =================================================================== --- trunk/Uni-d/test/src/uni-d/xejb/Article.table (rev 0) +++ trunk/Uni-d/test/src/uni-d/xejb/Article.table 2006-10-27 18:34:17 UTC (rev 3039) @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE table SYSTEM "uni-d.dtd"> + +<table name="Article" expected-amount="medium" category="tables.Main"> + + <description> + Article information. + </description> + + <security-role-remove>LocalAdmin</security-role-remove> + + <page name="ALL"> + + <field name="Reference" type="string" length="30"> + <description> + Internal article reference. Could be a GTIN as defined by EAN. + </description> + <constraints> + <unique/> + <immutable/> + <required/> + </constraints> + <display/> + </field> + + <field name="Description" length="50"> + <description> + Description for article. This is the default name for documents and labels. + </description> + <display/> + + <indexed/> + </field> + + <field name="OtherImmutable" length="50"> + <constraints> + <immutable/> + </constraints> + </field> + </page> + + + <select name="Article" type="single"> + <description>Find an article by Reference.</description> + <selection field="Reference"/> + </select> + + +</table> \ No newline at end of file Property changes on: trunk/Uni-d/test/src/uni-d/xejb/Article.table ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2006-10-28 11:56:38
|
Revision: 3040 http://svn.sourceforge.net/uni-d/?rev=3040&view=rev Author: max_brod Date: 2006-10-28 04:56:17 -0700 (Sat, 28 Oct 2006) Log Message: ----------- [UNI-335] Force a refresh of the page if the language setting still didn't took effect. Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/Border.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/DefaultHome.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/UnidBasePage.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/util/Visit.java trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/Border.html Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/Border.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/Border.java 2006-10-27 18:34:17 UTC (rev 3039) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/Border.java 2006-10-28 11:56:17 UTC (rev 3040) @@ -195,4 +195,21 @@ return !getSessionUserAdmin().isLoggedIn() || !( (Visit) getPage().getVisit() ).isMenuVisible(); } + /** + * The language setting (cycle.setLocale) does not always take effect immediately + * Do a refresh of the page in this case + * + * + * @return + */ + public boolean needsRefresh() + { + String language=((Visit)getPage().getVisit()).getLanguage(); + if (language==null) return false; + if (!language.equals(getPage().getLocale().getLanguage())) + { + return true; + } + return false; + } } \ No newline at end of file Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/DefaultHome.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/DefaultHome.java 2006-10-27 18:34:17 UTC (rev 3039) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/DefaultHome.java 2006-10-28 11:56:17 UTC (rev 3040) @@ -26,9 +26,7 @@ package be.unid.tapestry.pages; import be.unid.tapestry.navigation.NavigationablePageImpl; -import org.apache.tapestry.event.PageBeginRenderListener; - /** * Default home page * @@ -37,9 +35,7 @@ */ public abstract class DefaultHome extends NavigationablePageImpl - implements PageBeginRenderListener { - public String getTitle() { return getMessages().getMessage( "title" ); Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/UnidBasePage.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/UnidBasePage.java 2006-10-27 18:34:17 UTC (rev 3039) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/UnidBasePage.java 2006-10-28 11:56:17 UTC (rev 3040) @@ -146,7 +146,12 @@ Set roles = jsm.getUserRoles( new SimplePrincipal( info.getUserName() ) ); sessionUserAdmin.setRoles( roles != null ? roles : new ArrayList() ); String language = info.getLanguage(); - if ( language != null ) getRequestCycle().getEngine().setLocale( new Locale( language ) ); + // save the language here, to test the setting realy took effect + ( (Visit) getVisit() ).setLanguage( language ); + if ( language != null ) + { + getRequestCycle().getEngine().setLocale( new Locale( language ) ); + } } catch ( Exception ex ) { @@ -189,7 +194,7 @@ if ( injectedParameters != null && injectedParameters.length > 0 ) { - for ( int i = 0; i < injectedParameters.length; i++ ) + for ( int i = 0; i < injectedParameters.length ; i++ ) { String needTranslationParam = "$$" + ( i + 1 ); if ( message.contains( needTranslationParam ) ) Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/util/Visit.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/util/Visit.java 2006-10-27 18:34:17 UTC (rev 3039) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/util/Visit.java 2006-10-28 11:56:17 UTC (rev 3040) @@ -47,6 +47,7 @@ private transient Parser borderParser; private transient ReportDescription currentReport; private transient boolean menuVisible = true; + private transient String language; // save the user language here, to test the setting realy took effect public ReportDescription getCurrentReport() { @@ -99,4 +100,14 @@ { menuVisible = !menuVisible; } + + public String getLanguage() + { + return language; + } + + public void setLanguage( String language ) + { + this.language = language; + } } Modified: trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/Border.html =================================================================== --- trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/Border.html 2006-10-27 18:34:17 UTC (rev 3039) +++ trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/Border.html 2006-10-28 11:56:17 UTC (rev 3040) @@ -28,6 +28,15 @@ <script type="text/javascript" src="CaseConversionScript.js"></script> </head> <body jwcid="@Body"> + + <span jwcid="@If" condition="ognl:needsRefresh()"> + <script language="JavaScript"> + <!-- + window.location.reload( false ); + --> + </script> + </span> + <span jwcid="@If" condition="ognl:getFormScript()"> <script language="JavaScript" src="FormScript.js"> </script> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pus...@us...> - 2006-10-28 12:48:55
|
Revision: 3042 http://svn.sourceforge.net/uni-d/?rev=3042&view=rev Author: pushkutza Date: 2006-10-28 05:47:26 -0700 (Sat, 28 Oct 2006) Log Message: ----------- ICT-669 : romanian translations Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/Import.properties trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginPage/LoginPage.properties trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/tablePreferencesPage/TablePreferencesPage.properties Added Paths: ----------- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/Import_ro.properties trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminBorderConfig/AdminBorderConfig_ro.properties trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminMenu/AdminMenu_ro.properties trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminReportsConfig/AdminReportsConfig_ro.properties trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminTablesConfig/AdminTablesConfig_ro.properties trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginErrorPage/LoginErrorPage_ro.properties trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginMenu/LoginMenu_ro.properties trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginPage/LoginPage_ro.properties trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/tablePreferencesPage/TablePreferencesPage_ro.properties trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/tableRightsPage/TableRightsPage_ro.properties trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userBorderConfig/UserBorderConfig_ro.properties trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userMenu/UserMenu_ro.properties trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userReportsConfig/UserReportsConfig_ro.properties trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userTablesConfig/UserTablesConfig_ro.properties trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/viewNavigationStack/ViewNavigationStack_ro.properties trunk/Uni-d/template/src/main/resources/site/WEB-INF/MasterDetailPage_ro.properties trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-exceptions_ro.properties trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed_ro.properties trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/Uni-d-skin_ro.properties Modified: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/Import.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/Import.properties 2006-10-28 11:58:24 UTC (rev 3041) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/Import.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -1,2 +1,2 @@ -title=Test Import -import.result.OK=OK \ No newline at end of file +import.result.OK=OK +title=Test Import \ No newline at end of file Added: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/Import_ro.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/Import_ro.properties (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/Import_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1,2 @@ +import.result.OK=OK +title=Test Import \ No newline at end of file Property changes on: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/Import_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Added: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminBorderConfig/AdminBorderConfig_ro.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminBorderConfig/AdminBorderConfig_ro.properties (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminBorderConfig/AdminBorderConfig_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1 @@ +title=Configurare Border Property changes on: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminBorderConfig/AdminBorderConfig_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Added: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminMenu/AdminMenu_ro.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminMenu/AdminMenu_ro.properties (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminMenu/AdminMenu_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1 @@ +title=Meniu Administrator \ No newline at end of file Property changes on: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminMenu/AdminMenu_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Added: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminReportsConfig/AdminReportsConfig_ro.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminReportsConfig/AdminReportsConfig_ro.properties (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminReportsConfig/AdminReportsConfig_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1 @@ +title=Configurareza lista de rapoarte Property changes on: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminReportsConfig/AdminReportsConfig_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Added: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminTablesConfig/AdminTablesConfig_ro.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminTablesConfig/AdminTablesConfig_ro.properties (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminTablesConfig/AdminTablesConfig_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1 @@ +title=Configurare lista tabele \ No newline at end of file Property changes on: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/adminTablesConfig/AdminTablesConfig_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Added: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginErrorPage/LoginErrorPage_ro.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginErrorPage/LoginErrorPage_ro.properties (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginErrorPage/LoginErrorPage_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1,2 @@ +title=LOGIN +Error=Probleme la autentificare!!! Property changes on: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginErrorPage/LoginErrorPage_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Added: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginMenu/LoginMenu_ro.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginMenu/LoginMenu_ro.properties (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginMenu/LoginMenu_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1 @@ +title=Meniu Login \ No newline at end of file Property changes on: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginMenu/LoginMenu_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Modified: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginPage/LoginPage.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginPage/LoginPage.properties 2006-10-28 11:58:24 UTC (rev 3041) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginPage/LoginPage.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -1,5 +1,5 @@ -title=LOGIN ErrorHttps=Error! HTTPS not supported! +ErrorInvalidAppUserPassword=Invalid user name or password for application server for this user ErrorInvalidUserPassword=Invalid user name and password ErrorNullAppUserPassword=Null user name or password for application server for this user -ErrorInvalidAppUserPassword=Invalid user name or password for application server for this user \ No newline at end of file +title=LOGIN \ No newline at end of file Added: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginPage/LoginPage_ro.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginPage/LoginPage_ro.properties (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginPage/LoginPage_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1,5 @@ +ErrorHttps=Eroare! HTTPS nu este suportat! +ErrorInvalidAppUserPassword=Utilizator/parola invalide pentru server-ul de aplicatii!!! +ErrorInvalidUserPassword=Utilizator/parola incorecte !!! +ErrorNullAppUserPassword=Utilizator/parola goala(null) pentru server-ul de aplicatii!!! +title=LOGIN \ No newline at end of file Property changes on: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/login/loginPage/LoginPage_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Modified: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/tablePreferencesPage/TablePreferencesPage.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/tablePreferencesPage/TablePreferencesPage.properties 2006-10-28 11:58:24 UTC (rev 3041) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/tablePreferencesPage/TablePreferencesPage.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -1,8 +1,8 @@ -title=Preferences for details=Details +report=Report +reportSetAll=All visible in Report +reportResetAll=All invisible in Report select=Select -report=Report selectSetAll=All visible in Select selectResetAll=All invisible in Select -reportSetAll=All visible in Report -reportResetAll=All invisible in Report +title=Preferences for Added: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/tablePreferencesPage/TablePreferencesPage_ro.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/tablePreferencesPage/TablePreferencesPage_ro.properties (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/tablePreferencesPage/TablePreferencesPage_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1,8 @@ +details=Detalii +report=Raport +reportSetAll=Totul vizibil pt rapoarte +reportResetAll=Totul invizibil pt rapoarte +select=Selectie +selectSetAll=Totul vizibil pt selectie +selectResetAll=Totul invizibil pt selectie +title=Preferinte pentru Property changes on: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/tablePreferencesPage/TablePreferencesPage_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Added: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/tableRightsPage/TableRightsPage_ro.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/tableRightsPage/TableRightsPage_ro.properties (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/tableRightsPage/TableRightsPage_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1 @@ +title=Depturi pentru Property changes on: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/tableRightsPage/TableRightsPage_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Added: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userBorderConfig/UserBorderConfig_ro.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userBorderConfig/UserBorderConfig_ro.properties (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userBorderConfig/UserBorderConfig_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1 @@ +title=Configurare Border Property changes on: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userBorderConfig/UserBorderConfig_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Added: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userMenu/UserMenu_ro.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userMenu/UserMenu_ro.properties (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userMenu/UserMenu_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1 @@ +title=Meniu Utilizator \ No newline at end of file Property changes on: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userMenu/UserMenu_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Added: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userReportsConfig/UserReportsConfig_ro.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userReportsConfig/UserReportsConfig_ro.properties (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userReportsConfig/UserReportsConfig_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1 @@ +title=Configurare lista de rapoarte Property changes on: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userReportsConfig/UserReportsConfig_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Added: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userTablesConfig/UserTablesConfig_ro.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userTablesConfig/UserTablesConfig_ro.properties (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userTablesConfig/UserTablesConfig_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1 @@ +title=Configurare lista de tabele \ No newline at end of file Property changes on: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/userAdmin/userTablesConfig/UserTablesConfig_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Added: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/viewNavigationStack/ViewNavigationStack_ro.properties =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/viewNavigationStack/ViewNavigationStack_ro.properties (rev 0) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/viewNavigationStack/ViewNavigationStack_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1 @@ +title=Afisarea navigator \ No newline at end of file Property changes on: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/pages/viewNavigationStack/ViewNavigationStack_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Added: trunk/Uni-d/template/src/main/resources/site/WEB-INF/MasterDetailPage_ro.properties =================================================================== --- trunk/Uni-d/template/src/main/resources/site/WEB-INF/MasterDetailPage_ro.properties (rev 0) +++ trunk/Uni-d/template/src/main/resources/site/WEB-INF/MasterDetailPage_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1,39 @@ +detail.fieldset.label = Linii de detalii + +masterDetail.button.create.label=Creaza +masterDetail.button.create.accesskey=R +masterDetail.button.create.caption=Creaza o noua inregistrare, dupa care reseteaza toate campurile + +masterDetail.button.save.label=Salveaza +masterDetail.button.save.accesskey=S +masterDetail.button.save.caption=Salveaza modificarile curente + +masterDetail.button.createContinue.label=Creaza/Continua +masterDetail.button.createContinue.accesskey=N +masterDetail.button.createContinue.caption=Creaza o noua inregistrare folosind aceasta inregistrare ca sablon + +masterDetail.button.createTemplate.label=CreazaDupaSablon +masterDetail.button.createTemplate.accesskey=K +masterDetail.button.createTemplate.caption=Creaza o noua inregistrare folosind aceasta inregistrare ca sablon + +masterDetail.button.cancel.label=Anulare +masterDetail.button.cancel.accesskey=E +masterDetail.button.cancel.caption=Anulare + +masterDetail.button.stop.label=Stop +masterDetail.button.stop.accesskey=X +masterDetail.button.stop.caption=Inapoi + +masterDetail.button.back.label=Inapoi +masterDetail.button.back.accesskey=B +masterDetail.button.back.caption=Inapoi + +detail.button.addlines.label=AdaugaLinii +detail.button.addlines.accesskey=A +detail.button.addlines.caption=Adauga una sau mai multe linii + +detail.button.removeLine.label=Sterge +detail.button.removeLine.title=Sterge Linie + +detail.button.insertLine.label=Insereaza +detail.button.insertLine.title=Insereaza o noua linie \ No newline at end of file Property changes on: trunk/Uni-d/template/src/main/resources/site/WEB-INF/MasterDetailPage_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Added: trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-exceptions_ro.properties =================================================================== --- trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-exceptions_ro.properties (rev 0) +++ trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-exceptions_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1,33 @@ +90000=Exceptie de persistenta +90001=Nu se poate crea obiectul +90002=Obiectul nu a fost gasit +90003=Valuarea nu a fost modificata +90004=Incercare de a modifica un obiect care are UOID-ul null +90005=Nu se poate crea colectia intermediara +90006=Verificare esuata pt Cascade-keep +90007=UOID-ul nu are voie sa fie gol sau null +90008=UOID-ul $1 nu a fost gasit pentru un obiect de tipul $2 +90009=Nu se poate seta un camp auto $$1 +90010=Nu se poate sterge un proxy care nu a fost salvat +90011=Bean-ul nu se poate initializa + +91001=Nu se poate testa alegerea $1 pentru campul $$2 folosind clasa $3 +91002=Valoare $1 nu este una dintre optiunii $$2 +91003=Constrangerea de comparare $1 nu a fost valida pentru campul $$2 prin valoare $3 +91004=Campul $$1 este imutabil atunci cand campul $$2 este setat +91005=Nu se poate adauga null la un camp multiplu $$1 +91006=$$1 este necesar +91007=$$1 este unic +91008=Include-value pentru campul $$1 are tipul gresit +91009=Eroare la crearea valorii included-value pentru campul $$1 +91010=Eroare interna la crearea valorii +91011=Incalcarea cnstrangerilor pt campul $$1 +91012=Eroare la salvarea valorii modificate +91013=eroare la downCast- nu se poate face downCast la radacina +91014=downCast eroare la cautare +91015=downCast eroare la creare +91017=Tipul de tabla este invalid $$1 pentru tabela $$2 + +92001=Datele au fost deja modificate + +93001=Operatia nu este permisa Property changes on: trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-exceptions_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Added: trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed_ro.properties =================================================================== --- trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed_ro.properties (rev 0) +++ trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1,62 @@ +Action=Actiune +ActionsSection=Sectiunea pt. Actiune +Add=Adauga +Back=Inapoi +BackToEdit=Inapoi la editare +BorderConfig=Configurare Border +CaseMixed=Combinat +CaseLower=Minuscule +CaseUpper=Majuscule +Category=Categorie +ChangePassword=Schimba parola +Clone=Cloneaza +Close=Inchide +CurrentUserNotInTable=Logare cu user temporar (nu este adaugat in baza de date) +Detail=Detaili +Edit=Editeaza +EnterNewPassword=Introduceti noua parola +Field=Camp +FieldsSection=Campuri +Find=Cauta +Group=Grup +Index=Index +Insert=Insereaza +InvalidDate=Valuare invalida pt data +InvalidDouble=Valoare invalida pt numar zecimal +InvalidInteger=Valoare invalida pt numar intreg +InvalidUserPassword=Utilizator/parola invalida +IsRequired=Valuarea este necesara +LinkedSelects=Link-uri inverse +List=Lista +Load=Incarca +Logout=Logout +MoreLinkedSelects=Alte linkuri inverse +NoResults=Nu exista rezultate. +OldPassword=Parola veche +OK=OK +Page=Pagina +Parameter=Parametru +Print=Tiparire +PrintLandscape=Tiparire orizontala +PrintPortrait=Tiparire verticala +ReenterNewPassword=Reintroduceti noua parola +Remove=Sterge +Report=Raport +ReportsConfig=Configurarea listei de rapoarte +Result=Rezultate +Role=Rol +Save=Salveaza +Select=Selecteaza +SelectAll=Selecteaza tot +SelectsSection=Sectiunea pt cautare +SetAllToFullRights=Acorda drepturi totale +SetAllToNoRights=Nu acorda nici un drept +StartPageConfig=Configurarea paginii de start +StartPage=Pagina de start +Table=Tabela +TablesConfig=Configurarea listei de tabele +TableType=Tipul inregistrarii +UOID=UOID +UnselectAll=Deselecteaza tot +UserName=Numele Utilizatorului +View=Vizualizeaza Property changes on: trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Added: trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/Uni-d-skin_ro.properties =================================================================== --- trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/Uni-d-skin_ro.properties (rev 0) +++ trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/Uni-d-skin_ro.properties 2006-10-28 12:47:26 UTC (rev 3042) @@ -0,0 +1,6 @@ +menu.gui.label=GUI +menu.reports.label=Rapoarte +menu.import.label=Import +menu.useradmin.label=Administrator +AllTables=Lista de tabele +CurrentTable=Tabela curenta \ No newline at end of file Property changes on: trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/Uni-d-skin_ro.properties ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2006-10-29 12:09:41
|
Revision: 3045 http://svn.sourceforge.net/uni-d/?rev=3045&view=rev Author: max_brod Date: 2006-10-29 04:09:26 -0800 (Sun, 29 Oct 2006) Log Message: ----------- Small improvements (have the button texts translated). Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.java trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed.properties trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed_ro.properties Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.java 2006-10-29 11:39:25 UTC (rev 3044) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.java 2006-10-29 12:09:26 UTC (rev 3045) @@ -179,19 +179,19 @@ switch ( getCurrentEvent() ) { case EVENT_EDIT: - return "Edit"; + return getMessage("Edit"); case EVENT_BACK: - return "Back"; + return getMessage("Back"); case EVENT_CLONE: - return isView() ? "Clone" : "Clone(Save)"; + return isView() ? getMessage("Clone") : getMessage("Clone-Save"); case EVENT_REMOVE: - return "Remove(Back)"; + return getMessage("Remove-Back"); case EVENT_SAVE: - return isAdd() ? "Add(View)" : "Save(View)"; + return isAdd() ? getMessage("Add-View") : getMessage("Save-View"); case EVENT_SELECT: - if ( isAdd() ) return "Add(Select)"; - if ( isEdit() ) return "Save(Select)"; - return "Select"; + if ( isAdd() ) return getMessage("Add-Select"); + if ( isEdit() ) return getMessage("Save-Select"); + return getMessage("Select"); default: return null; } Modified: trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed.properties =================================================================== --- trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed.properties 2006-10-29 11:39:25 UTC (rev 3044) +++ trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed.properties 2006-10-29 12:09:26 UTC (rev 3045) @@ -1,6 +1,8 @@ Action=Action ActionsSection=Actions Add=Add +Add-View=Add (View) +Add-Select=Add (Select) Back=Back BackToEdit=Back to edit BorderConfig=Configure Border @@ -10,6 +12,7 @@ Category=Category ChangePassword=Change password Clone=Clone +Clone-Save=Clone (Save) Close=Close CurrentUserNotInTable=Logged in with temporary user (not in users table) Detail=Detail @@ -41,11 +44,14 @@ PrintPortrait=Print portrait ReenterNewPassword=Reenter new password Remove=Remove +Remove-Back=Remove (Back) Report=Report ReportsConfig=Configure list of reports Result=Result Role=Role Save=Save +Save-Select=Save (Select) +Save-View=Save (View) Select=Select SelectAll=Select all SelectsSection=Selects Modified: trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed_ro.properties =================================================================== --- trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed_ro.properties 2006-10-29 11:39:25 UTC (rev 3044) +++ trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed_ro.properties 2006-10-29 12:09:26 UTC (rev 3045) @@ -1,6 +1,8 @@ Action=Actiune ActionsSection=Sectiunea pt. Actiune Add=Adauga +Add-View=Adauga (Vizualizare) +Add-Select=Adauga (Selecteaza) Back=Inapoi BackToEdit=Inapoi la editare BorderConfig=Configurare Border @@ -10,6 +12,7 @@ Category=Categorie ChangePassword=Schimba parola Clone=Cloneaza +Clone-Save=Cloneaza (Salvare) Close=Inchide CurrentUserNotInTable=Logare cu user temporar (nu este adaugat in baza de date) Detail=Detaili @@ -41,11 +44,14 @@ PrintPortrait=Tiparire verticala ReenterNewPassword=Reintroduceti noua parola Remove=Sterge +Remove-Back=Sterge (Inapoi) Report=Raport ReportsConfig=Configurarea listei de rapoarte Result=Rezultate Role=Rol Save=Salveaza +Save-Select=Salveaza (Selecteaza) +Save-View=Salveaza (Vizualizare) Select=Selecteaza SelectAll=Selecteaza tot SelectsSection=Sectiunea pt cautare This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2006-10-29 12:38:14
|
Revision: 3046 http://svn.sourceforge.net/uni-d/?rev=3046&view=rev Author: max_brod Date: 2006-10-29 04:37:58 -0800 (Sun, 29 Oct 2006) Log Message: ----------- Added language Romanian as an option. Modified Paths: -------------- trunk/Uni-d/generate/src/main/resources/be/unid/useradmin/UnidUser.table trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/test/test.application Modified: trunk/Uni-d/generate/src/main/resources/be/unid/useradmin/UnidUser.table =================================================================== --- trunk/Uni-d/generate/src/main/resources/be/unid/useradmin/UnidUser.table 2006-10-29 12:09:26 UTC (rev 3045) +++ trunk/Uni-d/generate/src/main/resources/be/unid/useradmin/UnidUser.table 2006-10-29 12:37:58 UTC (rev 3046) @@ -28,6 +28,7 @@ <choice name="LANGUAGE_ENGLISH" value="en"/> <choice name="LANGUAGE_FRENCH" value="fr"/> <choice name="LANGUAGE_DUTCH" value="nl"/> + <choice name="LANGUAGE_ROMANIAN" value="ro"/> </field> <field name="TablesPreferences" type="UnidRight"> Modified: trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/test/test.application =================================================================== --- trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/test/test.application 2006-10-29 12:09:26 UTC (rev 3045) +++ trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/test/test.application 2006-10-29 12:37:58 UTC (rev 3046) @@ -8,7 +8,7 @@ <meta key="org.apache.tapestry.visit-class" value="be.unid.tapestry.util.Visit"/> <meta key="org.apache.tapestry.page" value="TapestryHome"/> <!-- limit accepted locales --> - <meta key="org.apache.tapestry.accepted-locales" value="en,nl,fr"/> + <meta key="org.apache.tapestry.accepted-locales" value="en,nl,fr,ro"/> <meta key="org.apache.tapestry.messages-encoding" value="ISO-8859-1"/> <meta key="org.apache.tapestry.messages-encoding_fr" value="ISO-8859-1"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2006-10-29 15:48:08
|
Revision: 3049 http://svn.sourceforge.net/uni-d/?rev=3049&view=rev Author: max_brod Date: 2006-10-29 07:47:46 -0800 (Sun, 29 Oct 2006) Log Message: ----------- [UNI-339] Added button Add-Continue. Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageListener.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/shared/AddViewEditManipulation.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/shared/AddViewEditUsageMenuListener.java trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed.properties trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed_ro.properties Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageListener.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageListener.java 2006-10-29 14:24:28 UTC (rev 3048) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageListener.java 2006-10-29 15:47:46 UTC (rev 3049) @@ -42,6 +42,7 @@ EVENT_REMOVE( "remove" ), EVENT_CLONE( "clone" ), EVENT_SAVE( "save" ), + EVENT_ADD_CONTINUE( "add_continue" ), EVENT_BACK( "back" ); private String type; Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.java 2006-10-29 14:24:28 UTC (rev 3048) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.java 2006-10-29 15:47:46 UTC (rev 3049) @@ -168,6 +168,10 @@ { list.add( EntityUsageListener.EntityUsageEvent.EVENT_SAVE ); } + if (isAdd() && !isShowSelect) + { + list.add( EntityUsageListener.EntityUsageEvent.EVENT_ADD_CONTINUE ); + } if ( isShowClone ) list.add( EntityUsageListener.EntityUsageEvent.EVENT_CLONE ); if ( isShowRemove ) list.add( EntityUsageListener.EntityUsageEvent.EVENT_REMOVE ); if ( isShowBack ) list.add( EntityUsageListener.EntityUsageEvent.EVENT_BACK ); @@ -179,19 +183,21 @@ switch ( getCurrentEvent() ) { case EVENT_EDIT: - return getMessage("Edit"); + return getMessage( "Edit" ); case EVENT_BACK: - return getMessage("Back"); + return getMessage( "Back" ); case EVENT_CLONE: - return isView() ? getMessage("Clone") : getMessage("Clone-Save"); + return isView() ? getMessage( "Clone" ) : getMessage( "Clone-Save" ); case EVENT_REMOVE: - return getMessage("Remove-Back"); + return getMessage( "Remove-Back" ); case EVENT_SAVE: - return isAdd() ? getMessage("Add-View") : getMessage("Save-View"); + return isAdd() ? getMessage( "Add-View" ) : getMessage( "Save-View" ); + case EVENT_ADD_CONTINUE: + return getMessage( "Add-Continue" ); case EVENT_SELECT: - if ( isAdd() ) return getMessage("Add-Select"); - if ( isEdit() ) return getMessage("Save-Select"); - return getMessage("Select"); + if ( isAdd() ) return getMessage( "Add-Select" ); + if ( isEdit() ) return getMessage( "Save-Select" ); + return getMessage( "Select" ); default: return null; } @@ -211,6 +217,8 @@ return "BUTTON_REMOVE_BACK"; case EVENT_SAVE: return isAdd() ? "BUTTON_ADD_VIEW" : "BUTTON_SAVE_VIEW"; + case EVENT_ADD_CONTINUE: + return "BUTTON_ADD_CONTINUE"; case EVENT_SELECT: if ( isAdd() ) return "BUTTON_ADD_SELECT"; if ( isEdit() ) return "BUTTON_SAVE_SELECT"; Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/shared/AddViewEditManipulation.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/shared/AddViewEditManipulation.java 2006-10-29 14:24:28 UTC (rev 3048) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/shared/AddViewEditManipulation.java 2006-10-29 15:47:46 UTC (rev 3049) @@ -4,6 +4,7 @@ import be.unid.tapestry.navigation.*; import be.unid.tapestry.pages.edit.EditPage; import be.unid.tapestry.pages.view.ViewPage; +import be.unid.tapestry.pages.add.AddPage; import be.unid.tapestry.util.UnidProxyAccessor; /** @@ -53,6 +54,24 @@ gotoView( navPage, null, null, true ); } + public static synchronized void addContinue( NavigationablePage navPage ) + throws Exception + { + UnidProxy proxy; + String tableName; + HasProxyParameter pageParams = (HasProxyParameter) navPage.getPageParameters(); + proxy = pageParams.getProxy(); + tableName = pageParams.getTableName(); + // shouldn't happen + if ( proxy == null || tableName == null ) return; + + // update proxy + proxy.unidUpdate( true ); + + // stay in the same page but clean the proxy + ( (HasProxyParameter) navPage.getPageParameters() ).setProxy( null ); + } + public static synchronized void gotoView( NavigationablePage navPage, UnidProxy proxy, String tablenName, boolean save ) throws Exception Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/shared/AddViewEditUsageMenuListener.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/shared/AddViewEditUsageMenuListener.java 2006-10-29 14:24:28 UTC (rev 3048) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/shared/AddViewEditUsageMenuListener.java 2006-10-29 15:47:46 UTC (rev 3049) @@ -32,6 +32,9 @@ case EVENT_SAVE: AddViewEditManipulation.save( page ); break; + case EVENT_ADD_CONTINUE: + AddViewEditManipulation.addContinue( page ); + break; case EVENT_SELECT: AddViewEditManipulation.select( page, null, null, isSubmitDone ); break; Modified: trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed.properties =================================================================== --- trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed.properties 2006-10-29 14:24:28 UTC (rev 3048) +++ trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed.properties 2006-10-29 15:47:46 UTC (rev 3049) @@ -1,6 +1,7 @@ Action=Action ActionsSection=Actions Add=Add +Add-Continue=Add (Continue) Add-View=Add (View) Add-Select=Add (Select) Back=Back Modified: trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed_ro.properties =================================================================== --- trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed_ro.properties 2006-10-29 14:24:28 UTC (rev 3048) +++ trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed_ro.properties 2006-10-29 15:47:46 UTC (rev 3049) @@ -1,6 +1,7 @@ Action=Actiune ActionsSection=Sectiunea pt. Actiune Add=Adauga +Add-Continue=Adauga (Continua) Add-View=Adauga (Vizualizare) Add-Select=Adauga (Selecteaza) Back=Inapoi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tri...@us...> - 2006-10-29 16:54:22
|
Revision: 3050 http://svn.sourceforge.net/uni-d/?rev=3050&view=rev Author: triathlon98 Date: 2006-10-29 08:54:05 -0800 (Sun, 29 Oct 2006) Log Message: ----------- add maven plugin for Uni-d source generation Modified Paths: -------------- trunk/Uni-d/pom.xml Added Paths: ----------- trunk/Uni-d/Uni-d-maven-plugin/ trunk/Uni-d/Uni-d-maven-plugin/pom.xml trunk/Uni-d/Uni-d-maven-plugin/src/ trunk/Uni-d/Uni-d-maven-plugin/src/main/ trunk/Uni-d/Uni-d-maven-plugin/src/main/java/ trunk/Uni-d/Uni-d-maven-plugin/src/main/java/be/ trunk/Uni-d/Uni-d-maven-plugin/src/main/java/be/unid/ trunk/Uni-d/Uni-d-maven-plugin/src/main/java/be/unid/plugin/ trunk/Uni-d/Uni-d-maven-plugin/src/main/java/be/unid/plugin/GeneratePlugin.java trunk/Uni-d/Uni-d-maven-plugin/src/test/ trunk/Uni-d/Uni-d-maven-plugin/src/test/java/ trunk/Uni-d/Uni-d-maven-plugin/src/test/java/be/ trunk/Uni-d/Uni-d-maven-plugin/src/test/java/be/unid/ Added: trunk/Uni-d/Uni-d-maven-plugin/pom.xml =================================================================== --- trunk/Uni-d/Uni-d-maven-plugin/pom.xml (rev 0) +++ trunk/Uni-d/Uni-d-maven-plugin/pom.xml 2006-10-29 16:54:05 UTC (rev 3050) @@ -0,0 +1,38 @@ +<?xml version="1.0"?> +<project> + <parent> + <artifactId>Uni-d</artifactId> + <groupId>be.unid</groupId> + <version>0.8-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>be.unid</groupId> + <artifactId>Uni-d-maven-plugin</artifactId> + <packaging>maven-plugin</packaging> + <version>0.8-SNAPSHOT</version> + <name>Uni-d-maven-plugin</name> + <description> + Provide a maven plugin to the Uni-d generate functionality. + </description> + <url>http://unid.be</url> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-plugin-api</artifactId> + </dependency> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-project</artifactId> + </dependency> + <dependency> + <groupId>be.unid</groupId> + <artifactId>Uni-d-generate</artifactId> + </dependency> + </dependencies> +</project> Added: trunk/Uni-d/Uni-d-maven-plugin/src/main/java/be/unid/plugin/GeneratePlugin.java =================================================================== --- trunk/Uni-d/Uni-d-maven-plugin/src/main/java/be/unid/plugin/GeneratePlugin.java (rev 0) +++ trunk/Uni-d/Uni-d-maven-plugin/src/main/java/be/unid/plugin/GeneratePlugin.java 2006-10-29 16:54:05 UTC (rev 3050) @@ -0,0 +1,115 @@ +/** + * This file is part of the Uni-d project. + * $Id $ + * + * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF + * ANY KIND, either express or implied. See the License for the specific language governing rights and + * limitations under the License. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + */ + +package be.unid.plugin; + +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.project.MavenProject; + +import java.io.File; +import java.io.IOException; + +import be.unid.generate.Generator; +import be.unid.util.INIFile; + +/** + * Maven plugin for Uni-d code generation. + * + * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a> + * @version $Revision $ + * @goal generate + * @phase generate-sources + * @description Antlr plugin + */ +public class GeneratePlugin + extends AbstractMojo +{ + /** + * @parameter expression="${basedir}/src/main/om" + * @required + */ + private String sourceDirectory; + + /** + * @parameter expression="om.ini" + * @required + */ + private String configurationFile; + + /** + * @parameter template="" + * @required + */ + private String template; + + /** + * @parameter expression="${project.build.directory}/generated-sources/unid" + * @required + */ + private String outputDirectory; + + /** + * @parameter expression="${project.build.directory}/src/main/java" + * @required + */ + private String altOutputDirectory; + + /** + * @parameter expression="${project}" + * @required + */ + private MavenProject project; + + public void execute() + throws MojoExecutionException + { + INIFile ini; + String iniName = sourceDirectory + File.pathSeparator + configurationFile; + try + { + ini = new INIFile( iniName ); + } + catch ( IOException ioe ) + { + throw new MojoExecutionException( "Could not read configuration file", ioe ); + } + ini.addValue( "config", "outputdir", outputDirectory ); + ini.addValue( "config", "altoutputdir", altOutputDirectory ); + ini.addValue( "config", "template", template ); + + Generator generator = new Generator( ini, sourceDirectory ); + generator.generate(); + if ( generator.getFailed() ) + { + throw new MojoExecutionException( "Uni-d generation failed" ); + } + + if ( project != null ) + { + project.addCompileSourceRoot( outputDirectory ); + } + } +} Modified: trunk/Uni-d/pom.xml =================================================================== --- trunk/Uni-d/pom.xml 2006-10-29 15:47:46 UTC (rev 3049) +++ trunk/Uni-d/pom.xml 2006-10-29 16:54:05 UTC (rev 3050) @@ -1,337 +1,349 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>be.unid</groupId> - <artifactId>Uni-d</artifactId> - <packaging>pom</packaging> - - <version>0.8-SNAPSHOT</version> - - <name>Uni-d</name> - <description> - Uni-d is an tool to generate a J2EE application based on a XML description of the data and interactions. - It is both useful for the generation of the (ejb3) beans to access the data (which is stored in a database), - and to generate the graphical user interface. - Apart from that it contains a lot of utility code which is useful for business applications. - </description> - <modules> - <module>util</module> - <module>tool</module> - <module>template</module> - <module>tapestry</module> - <module>client</module> - <module>server</module> - <module>generate</module> - <module>uni-d-wiki</module> - </modules> - <licenses> - <license> - <name>MPL</name> - <url>http://www.mozilla.org/MPL/MPL-1.1.html</url> - <comments>v1.1 or higher</comments> - </license> - <license> - <name>GPL</name> - <url>http://www.fsf.org/licenses/gpl.html</url> - <comments>v2 or higher</comments> - </license> - <license> - <name>LGPL</name> - <url>http://www.fsf.org/licenses/lgpl.html</url> - <comments>v2.1 or higher</comments> - </license> - </licenses> - <url>http://unid.be</url> - - <developers> - <developer> - <name>Joachim Van der Auwera</name> - <id>triathlon98</id> - <email>tri...@us...</email> - <timezone>+1</timezone> - <roles> - <role>project lead</role> - <role>architect</role> - <role>developer</role> - </roles> - </developer> - <developer> - <name>Andrei Chiritescu</name> - <id>pushkutza</id> - <email>pus...@us...</email> - <timezone>+2</timezone> - <roles> - <role>developer</role> - </roles> - </developer> - <developer> - <name>Florin Niculescu</name> - <id>max_brod</id> - <email>max...@us...</email> - <timezone>+2</timezone> - <roles> - <role>developer</role> - </roles> - </developer> - </developers> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.5</source> - <target>1.5</target> - </configuration> - </plugin> - </plugins> - </build> - <reporting> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-report-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <configuration> - <links> - <link>http://java.sun.com/j2se/1.5.0/docs/api/</link> - </links> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jxr-plugin</artifactId> - </plugin> - <!-- - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-checkstyle-plugin</artifactId> - <configuration> - <configLocation>config/maven_checks.xml</configLocation> - </configuration> - </plugin> - --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>cobertura-maven-plugin</artifactId> - </plugin> - </plugins> - </reporting> - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.javolution</groupId> - <artifactId>javolution</artifactId> - <version>3.7.10</version> - </dependency> - <dependency> - <groupId>be.unid</groupId> - <artifactId>Uni-d-util</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>be.unid</groupId> - <artifactId>Uni-d-client</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>be.unid</groupId> - <artifactId>Uni-d-server</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>be.unid</groupId> - <artifactId>Uni-d-generate</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>be.unid</groupId> - <artifactId>Uni-d-tapestry</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>be.unid</groupId> - <artifactId>Uni-d-template</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>be.unid</groupId> - <artifactId>Uni-d-tool</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>be.unid</groupId> - <artifactId>Uni-d-wiki</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.1</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.8</version> - </dependency> - <dependency> - <groupId>tapestry</groupId> - <artifactId>tapestry</artifactId> - <version>4.0.2</version> - </dependency> - <dependency> - <groupId>tapestry</groupId> - <artifactId>tapestry-annotations</artifactId> - <version>4.0.2</version> - </dependency> - <dependency> - <groupId>tapestry</groupId> - <artifactId>tapestry-contrib</artifactId> - <version>4.0.2</version> - </dependency> - <dependency> - <groupId>tapestry</groupId> - <artifactId>tacos</artifactId> - <version>4beta2</version> - </dependency> - <dependency> - <groupId>net.sf.fscript</groupId> - <artifactId>fscript</artifactId> - <version>1.17</version> - </dependency> - <dependency> - <groupId>velocity</groupId> - <artifactId>velocity-dep</artifactId> - <version>1.4</version> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.4</version> - </dependency> - <dependency> - <groupId>commons-httpclient</groupId> - <artifactId>commons-httpclient</artifactId> - <version>2.0.2</version> - </dependency> - <dependency> - <groupId>org.jboss</groupId> - <artifactId>jboss-serialization</artifactId> - <version>1.0.1</version> - </dependency> - <dependency> - <groupId>org.jboss</groupId> - <artifactId>jboss-j2ee</artifactId> - <version>4.0.4</version> - </dependency> - <dependency> - <groupId>org.jboss</groupId> - <artifactId>jbosssx-client</artifactId> - <version>4.0.4</version> - </dependency> - <dependency> - <groupId>org.jboss</groupId> - <artifactId>jbosssx</artifactId> - <version>4.0.4</version> - </dependency> - <dependency> - <groupId>org.jboss</groupId> - <artifactId>jboss-annotations-ejb3</artifactId> - <version>4.0.4</version> - </dependency> - <dependency> - <groupId>org.jboss</groupId> - <artifactId>jboss-common-jdbc-wrapper</artifactId> - <version>4.0.4</version> - </dependency> - <dependency> - <groupId>org.jboss</groupId> - <artifactId>jboss-ejb3x</artifactId> - <version>4.0.4</version> - </dependency> - <dependency> - <groupId>org.jboss</groupId> - <artifactId>jboss-aop-jdk50</artifactId> - <version>4.0.4</version> - </dependency> - <dependency> - <groupId>org.jboss</groupId> - <artifactId>jboss-system</artifactId> - <version>4.0.4</version> - </dependency> - <dependency> - <groupId>org.jboss</groupId> - <artifactId>jboss-jmx</artifactId> - <version>4.0.4</version> - </dependency> - <dependency> - <groupId>org.jboss</groupId> - <artifactId>jboss-cache</artifactId> - <version>4.0.4</version> - </dependency> - <dependency> - <groupId>org.jboss</groupId> - <artifactId>jboss-common</artifactId> - <version>4.0.4</version> - </dependency> - <dependency> - <groupId>jasperreports</groupId> - <artifactId>jasperreports</artifactId> - <version>1.2.4</version> - </dependency> - <dependency> - <groupId>ant</groupId> - <artifactId>ant</artifactId> - <version>1.6.5</version> - </dependency> - <dependency> - <groupId>jalopy</groupId> - <artifactId>jalopy</artifactId> - <version>1.5rc3</version> - </dependency> - <dependency> - <groupId>xerces</groupId> - <artifactId>xercesImpl</artifactId> - <version>2.4.0</version> - </dependency> - <dependency> - <groupId>commons-httpclient</groupId> - <artifactId>commons-httpclient</artifactId> - <version>2.0.2</version> - </dependency> - <dependency> - <groupId>com.toedter</groupId> - <artifactId>jcalendar</artifactId> - <version>1.3.2</version> - </dependency> - <dependency> - <groupId>javax.mail</groupId> - <artifactId>mail</artifactId> - <version>1.4</version> - </dependency> - </dependencies> - </dependencyManagement> - <repositories> - <repository> - <id>uni-d</id> - <url>http://uni-d.sourceforge.net/m2repo/</url> - </repository> - </repositories> - <distributionManagement> - <snapshotRepository> - <id>snapshotrepo</id> - <name>Repository Name</name> - <url>scp://shell.sf.net/home/groups/u/un/uni-d/htdocs/m2repo</url> - </snapshotRepository> - <site> - <id>website</id> - <url>scp://shell.sf.net/home/groups/u/un/uni-d/htdocs/</url> - </site> - </distributionManagement> - -</project> +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>be.unid</groupId> + <artifactId>Uni-d</artifactId> + <packaging>pom</packaging> + + <version>0.8-SNAPSHOT</version> + + <name>Uni-d</name> + <description> + Uni-d is an tool to generate a J2EE application based on a XML description of the data and interactions. + It is both useful for the generation of the (ejb3) beans to access the data (which is stored in a database), + and to generate the graphical user interface. + Apart from that it contains a lot of utility code which is useful for business applications. + </description> + <modules> + <module>util</module> + <module>tool</module> + <module>template</module> + <module>tapestry</module> + <module>client</module> + <module>server</module> + <module>generate</module> + <module>uni-d-wiki</module> + <module>Uni-d-maven-plugin</module> + </modules> + <licenses> + <license> + <name>MPL</name> + <url>http://www.mozilla.org/MPL/MPL-1.1.html</url> + <comments>v1.1 or higher</comments> + </license> + <license> + <name>GPL</name> + <url>http://www.fsf.org/licenses/gpl.html</url> + <comments>v2 or higher</comments> + </license> + <license> + <name>LGPL</name> + <url>http://www.fsf.org/licenses/lgpl.html</url> + <comments>v2.1 or higher</comments> + </license> + </licenses> + <url>http://unid.be</url> + + <developers> + <developer> + <name>Joachim Van der Auwera</name> + <id>triathlon98</id> + <email>tri...@us...</email> + <timezone>+1</timezone> + <roles> + <role>project lead</role> + <role>architect</role> + <role>developer</role> + </roles> + </developer> + <developer> + <name>Andrei Chiritescu</name> + <id>pushkutza</id> + <email>pus...@us...</email> + <timezone>+2</timezone> + <roles> + <role>developer</role> + </roles> + </developer> + <developer> + <name>Florin Niculescu</name> + <id>max_brod</id> + <email>max...@us...</email> + <timezone>+2</timezone> + <roles> + <role>developer</role> + </roles> + </developer> + </developers> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + </plugins> + </build> + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-report-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <configuration> + <links> + <link>http://java.sun.com/j2se/1.5.0/docs/api/</link> + </links> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jxr-plugin</artifactId> + </plugin> + <!-- + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <configuration> + <configLocation>config/maven_checks.xml</configLocation> + </configuration> + </plugin> + --> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>cobertura-maven-plugin</artifactId> + </plugin> + </plugins> + </reporting> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.javolution</groupId> + <artifactId>javolution</artifactId> + <version>3.7.10</version> + </dependency> + <dependency> + <groupId>be.unid</groupId> + <artifactId>Uni-d-util</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>be.unid</groupId> + <artifactId>Uni-d-client</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>be.unid</groupId> + <artifactId>Uni-d-server</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>be.unid</groupId> + <artifactId>Uni-d-generate</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>be.unid</groupId> + <artifactId>Uni-d-tapestry</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>be.unid</groupId> + <artifactId>Uni-d-template</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>be.unid</groupId> + <artifactId>Uni-d-tool</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>be.unid</groupId> + <artifactId>Uni-d-wiki</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.8</version> + </dependency> + <dependency> + <groupId>tapestry</groupId> + <artifactId>tapestry</artifactId> + <version>4.0.2</version> + </dependency> + <dependency> + <groupId>tapestry</groupId> + <artifactId>tapestry-annotations</artifactId> + <version>4.0.2</version> + </dependency> + <dependency> + <groupId>tapestry</groupId> + <artifactId>tapestry-contrib</artifactId> + <version>4.0.2</version> + </dependency> + <dependency> + <groupId>tapestry</groupId> + <artifactId>tacos</artifactId> + <version>4beta2</version> + </dependency> + <dependency> + <groupId>net.sf.fscript</groupId> + <artifactId>fscript</artifactId> + <version>1.17</version> + </dependency> + <dependency> + <groupId>velocity</groupId> + <artifactId>velocity-dep</artifactId> + <version>1.4</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.4</version> + </dependency> + <dependency> + <groupId>commons-httpclient</groupId> + <artifactId>commons-httpclient</artifactId> + <version>2.0.2</version> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-serialization</artifactId> + <version>1.0.1</version> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-j2ee</artifactId> + <version>4.0.4</version> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jbosssx-client</artifactId> + <version>4.0.4</version> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jbosssx</artifactId> + <version>4.0.4</version> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-annotations-ejb3</artifactId> + <version>4.0.4</version> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-common-jdbc-wrapper</artifactId> + <version>4.0.4</version> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-ejb3x</artifactId> + <version>4.0.4</version> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-aop-jdk50</artifactId> + <version>4.0.4</version> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-system</artifactId> + <version>4.0.4</version> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-jmx</artifactId> + <version>4.0.4</version> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-cache</artifactId> + <version>4.0.4</version> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-common</artifactId> + <version>4.0.4</version> + </dependency> + <dependency> + <groupId>jasperreports</groupId> + <artifactId>jasperreports</artifactId> + <version>1.2.4</version> + </dependency> + <dependency> + <groupId>ant</groupId> + <artifactId>ant</artifactId> + <version>1.6.5</version> + </dependency> + <dependency> + <groupId>jalopy</groupId> + <artifactId>jalopy</artifactId> + <version>1.5rc3</version> + </dependency> + <dependency> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + <version>2.4.0</version> + </dependency> + <dependency> + <groupId>commons-httpclient</groupId> + <artifactId>commons-httpclient</artifactId> + <version>2.0.2</version> + </dependency> + <dependency> + <groupId>com.toedter</groupId> + <artifactId>jcalendar</artifactId> + <version>1.3.2</version> + </dependency> + <dependency> + <groupId>javax.mail</groupId> + <artifactId>mail</artifactId> + <version>1.4</version> + </dependency> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-plugin-api</artifactId> + <version>2.0.4</version> + </dependency> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-project</artifactId> + <version>2.0.4</version> + </dependency> + </dependencies> + </dependencyManagement> + <repositories> + <repository> + <id>uni-d</id> + <url>http://uni-d.sourceforge.net/m2repo/</url> + </repository> + </repositories> + <distributionManagement> + <snapshotRepository> + <id>snapshotrepo</id> + <name>Repository Name</name> + <url>scp://shell.sf.net/home/groups/u/un/uni-d/htdocs/m2repo</url> + </snapshotRepository> + <site> + <id>website</id> + <url>scp://shell.sf.net/home/groups/u/un/uni-d/htdocs/</url> + </site> + </distributionManagement> + +</project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <max...@us...> - 2006-10-30 10:02:03
|
Revision: 3054 http://svn.sourceforge.net/uni-d/?rev=3054&view=rev Author: max_brod Date: 2006-10-30 02:01:38 -0800 (Mon, 30 Oct 2006) Log Message: ----------- [UNI-339] Added access keys for all buttons (Add/Edit/Select etc.). Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.java trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.html trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed.properties Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.java 2006-10-29 23:04:46 UTC (rev 3053) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.java 2006-10-30 10:01:38 UTC (rev 3054) @@ -203,6 +203,34 @@ } } + public String getAccessKey() + { + switch ( getCurrentEvent() ) + { + case EVENT_EDIT: + return getMessage( "accesskey.edit" ); + case EVENT_BACK: + return getMessage( "accesskey.back" ); + case EVENT_CLONE: + return getMessage( "accesskey.clone" ); + case EVENT_REMOVE: + return getMessage( "accesskey.remove" ); + case EVENT_SAVE: + return getMessage( "accesskey.save" ); + case EVENT_ADD_CONTINUE: + return getMessage( "accesskey.add-continue" ); + case EVENT_SELECT: + return getMessage( "accesskey.select" ); + default: + return null; + } + } + + public String getTitle() + { + return getDisplay()+" [ALT "+getAccessKey()+"]"; + } + public String getGeneratedId() { switch ( getCurrentEvent() ) Modified: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.html =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.html 2006-10-29 23:04:46 UTC (rev 3053) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/components/navigation/entityUsageMenu/EntityUsageMenu.html 2006-10-30 10:01:38 UTC (rev 3054) @@ -38,7 +38,7 @@ <span jwcid="@If" condition="ognl:isSubmitButton()"> <span class="prop:classStr" jwcid="@Submit" listener="listener:callSubmitListener" action="listener:callSubmitAction" - parameters="prop:currentEventType" value="prop:display" id="prop:generatedId"> + parameters="prop:currentEventType" value="prop:display" id="prop:generatedId" accesskey="prop:accessKey" title="prop:title"> </span> </span> @@ -48,7 +48,7 @@ parameters="prop:currentEventType"> <span jwcid="@Insert" value="prop:display"/> </span> - <input type="button" jwcid="@Any" value="prop:display" onclick="window.location=this.parentNode.getElementsByTagName('A')[0].href; " id="prop:generatedId"/> + <input type="button" jwcid="@Any" value="prop:display" onclick="window.location=this.parentNode.getElementsByTagName('A')[0].href; " id="prop:generatedId" accesskey="prop:accessKey" title="prop:title"/> </span> </span> Modified: trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed.properties =================================================================== --- trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed.properties 2006-10-29 23:04:46 UTC (rev 3053) +++ trunk/Uni-d/template/src/main/resources/site/WEB-INF/Uni-d-fixed.properties 2006-10-30 10:01:38 UTC (rev 3054) @@ -1,3 +1,10 @@ +accesskey.edit=E +accesskey.back=B +accesskey.clone=C +accesskey.remove=R +accesskey.save=A +accesskey.add-continue=K +accesskey.select=S Action=Action ActionsSection=Actions Add=Add This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pus...@us...> - 2006-10-30 20:22:12
|
Revision: 3055 http://svn.sourceforge.net/uni-d/?rev=3055&view=rev Author: pushkutza Date: 2006-10-30 12:20:15 -0800 (Mon, 30 Oct 2006) Log Message: ----------- UNI-343 : replace the timeout with a standby screen Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/Border.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/shared/ConfigurationKeys.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationablePageImpl.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/UnidBasePage.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/useradmin/SessionUserAdmin.java trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/Border.html trunk/Uni-d/test/src/etc/site_tapestry/site.war/config.properties Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/Border.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/Border.java 2006-10-30 10:01:38 UTC (rev 3054) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/Border.java 2006-10-30 20:20:15 UTC (rev 3055) @@ -27,14 +27,18 @@ import be.unid.reporting.parser.ReportParameter; import be.unid.tapestry.navigation.NavigationablePage; +import be.unid.tapestry.navigation.NavigationablePageImpl; import be.unid.tapestry.pages.Report; import be.unid.tapestry.pages.UnidBasePage; import be.unid.tapestry.pages.reportsCategoryIndex.ReportsCategoryIndex; import be.unid.tapestry.pages.tableManager.TableManagerPage; import be.unid.tapestry.pages.tablesCategoryIndex.TablesCategoryIndex; +import be.unid.tapestry.useradmin.SessionUserAdmin; import be.unid.tapestry.util.Visit; import org.apache.tapestry.IMarkupWriter; import org.apache.tapestry.IRequestCycle; +import org.apache.tapestry.annotations.Component; +import org.apache.tapestry.contrib.ajax.XTile; /** * Border component, used for skinning @@ -76,6 +80,38 @@ public abstract void setHiddenField2( String value ); + @Component( type = "contrib:XTile", id = "standby", + bindings = { + "receiveName = 'standbyResponse'", + "sendName = 'standbyAlive'", + "listener = listener:standby", + "disableCaching = 'true'" + } ) + public abstract XTile getStandbyComponent(); + + @Component( type = "contrib:XTile", id = "resumesb", + bindings = { + "receiveName = 'resumesbResponse'", + "sendName = 'resumesbSend'", + "listener = listener:resumesb", + "disableCaching = 'true'" + } ) + public abstract XTile getResumesbComponent(); + + public void standby( IRequestCycle cycle ) + { + SessionUserAdmin sessionUserAdmin = getSessionUserAdmin(); + if ( sessionUserAdmin.isUserTimmedOut() ) + { + cycle.setServiceParameters( new String[]{ String.valueOf( sessionUserAdmin.getPassword() ) } ); + } + } + + public void resumesb( IRequestCycle cycle ) + { + getSessionUserAdmin().setLastAccess( System.currentTimeMillis() ); + } + public boolean hasTitle() { return getTitle() != null; @@ -153,6 +189,7 @@ // add the javascript timeout function if ( getPage() instanceof NavigationablePage ) { + SessionUserAdmin sessionUserAdmin = getSessionUserAdmin(); String js = "\n<script language=\"javascript\" type=\"text/javascript\">" + "\n<!--" + "\n function stackKeepAliveTimeout() {" + @@ -169,16 +206,37 @@ "\n stackKeepAliveResponse();" + "\n stackKeepAliveTimeout();" + "\n// -->\n" + + "\n</script>" + + + "\n<script language=\"javascript\" type=\"text/javascript\">" + + "\n<!--" + + "\n function standbyTimeout() {" + + " var ok = false;" + + " while(!ok){ " + + " try{" + + " if (window.standbyAlive) {standbyAlive();}" + + " ok = true;" + + " }catch( ex ){}" + + " } " + + " } " + + "\n function standbyResponse(arg) { \n setTimeout(\"standbyTimeout();\", " + + ( sessionUserAdmin.getTimeout() /*+ 30000 */ ) + // 30 sec past config timeout + "); \n if ( arg && arg.length>0 ) callstandby(arg[0]); \n }" + + "\n standbyTimeout();" + + "\nfunction resumesbResponse(arg) {}" + + "\n// -->\n" + "\n</script>"; writer.printRaw( js ); } super.renderBody( writer, cycle ); } + public boolean isNavPage() {return getPage() instanceof NavigationablePageImpl;} + /** * Function to reduce usage of ognl in Border.html * - * @return + * @return if the user is logged in */ public boolean isLoggedIn() { Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/shared/ConfigurationKeys.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/shared/ConfigurationKeys.java 2006-10-30 10:01:38 UTC (rev 3054) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/shared/ConfigurationKeys.java 2006-10-30 20:20:15 UTC (rev 3055) @@ -37,6 +37,7 @@ public static final String MAXIMUM_LINKS_IN_COMBO = "maximum_links_in_combobox"; public static final String GUI_SELECT_PAGE_SIZE = "gui-select-page-size"; public static final String KEEP_ALIVE_REFRESH_TIME = "keep-alive-refresh-time"; + public static final String TIMEOUT_SEC = "timeout-sec"; public static final String FINDER_LIMIT = "finder-limit"; public static final String LOGO_FILE = "logo-file"; } Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationablePageImpl.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationablePageImpl.java 2006-10-30 10:01:38 UTC (rev 3054) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationablePageImpl.java 2006-10-30 20:20:15 UTC (rev 3055) @@ -15,7 +15,7 @@ * @author <a href="mailto:an...@pa...">Andrei Chiritescu</a> * @version $Revision$ */ -public abstract class NavigationablePageImpl<PP extends PageParametersImpl,NS extends NavigationStackImpl<PP>> +public abstract class NavigationablePageImpl<PP extends PageParametersImpl, NS extends NavigationStackImpl<PP>> extends UnidBasePage implements NavigationablePage<PP, NS>, PageBeginRenderListener { Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/UnidBasePage.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/UnidBasePage.java 2006-10-30 10:01:38 UTC (rev 3054) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/UnidBasePage.java 2006-10-30 20:20:15 UTC (rev 3055) @@ -162,6 +162,7 @@ return; } } + if ( !sessionUserAdmin.isUserTimmedOut() ) sessionUserAdmin.setLastAccess( System.currentTimeMillis() ); super.validate( cycle ); } Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/useradmin/SessionUserAdmin.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/useradmin/SessionUserAdmin.java 2006-10-30 10:01:38 UTC (rev 3054) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/useradmin/SessionUserAdmin.java 2006-10-30 20:20:15 UTC (rev 3055) @@ -1,9 +1,11 @@ package be.unid.tapestry.useradmin; +import be.unid.tapestry.components.shared.ConfigurationKeys; import be.unid.tapestry.model.GMTable; import be.unid.tapestry.rights.AccessRight; import be.unid.tapestry.useradmin.cache.LoaderType; import be.unid.tapestry.util.DisplayMode; +import be.unid.tapestry.util.ResourceUtil; import org.jboss.security.SimplePrincipal; import java.util.Collection; @@ -25,6 +27,20 @@ private transient boolean userAdministrator; // current user is administrator private transient Collection<SimplePrincipal> roles;// roles for the logged in user + private transient long lastAccess; + private transient long timeout; + + public SessionUserAdmin() + { + try + { + timeout = ResourceUtil.getConfigInt( ConfigurationKeys.TIMEOUT_SEC ); + } + catch ( Exception e ) {/*ignore*/} + if ( timeout <= 0 ) timeout = 3600; + timeout *= 1000; + } + public boolean isTableRemoveable( GMTable table ) { if ( table.getSecurityRoleRemove() == null ) return false; @@ -198,4 +214,24 @@ { this.roles = roles; } + + public long getLastAccess() + { + return lastAccess; + } + + public void setLastAccess( long lastAccess ) + { + this.lastAccess = lastAccess; + } + + public boolean isUserTimmedOut() + { + return lastAccess > 0 && ( System.currentTimeMillis() - lastAccess > timeout ); + } + + public long getTimeout() + { + return timeout; + } } Modified: trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/Border.html =================================================================== --- trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/Border.html 2006-10-30 10:01:38 UTC (rev 3054) +++ trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/Border.html 2006-10-30 20:20:15 UTC (rev 3055) @@ -20,11 +20,11 @@ <script type="text/javascript" src="ThemeOffice/theme.js"></script> <script type="text/javascript" src="dojo/dojo.js"></script> - <script type="text/javascript"> - dojo.require("dojo.event.*"); - dojo.require("dojo.io.*"); - </script> - + <script type="text/javascript"> + dojo.require("dojo.event.*"); + dojo.require("dojo.io.*"); + </script> + <script type="text/javascript" src="CaseConversionScript.js"></script> </head> <body jwcid="@Body"> @@ -34,9 +34,69 @@ <!-- window.location.reload( false ); --> - </script> + </script> </span> + <span jwcid="@If" condition="ognl:isNavPage()"> + <span jwcid="standby"/> + <span jwcid="resumesb"/> + <img src="/images/example.jpg" style="filter:alpha(opacity=50); -moz-opacity:0.5" name="stai" width="0" + height="0" border="0" vspace="0" hspace="0"/> + <form name="lform" id="lform" style="display:none"> + <p> + Password + <input type="password" id="sb_password" name="sb_password"/> + </p> + <p align="center"> + <input type="button" id="sb_resume" name="resume" value="Resume" + class="submitButton" onclick="callstandbyHide()"/> + <input type="button" id="sb_login" name="login" value="Login" + onclick="document.location='app?service=restart'"/> + </p> + </form> + </span> + <script language="JavaScript"> + <!-- + var standbypass; + function callstandby(pass) + { + standbypass = pass; + if (standbypass=="null" || standbypass==null) standbypass="local"; + + var stai = document.getElementsByName('stai')[0]; + var lform = document.getElementsByName('lform')[0]; + var p = document.getElementsByName('sb_password')[0]; + + stai.style.display = "block"; + lform.style.display = "block"; + + stai.style.border = "0px"; + stai.style.width = screen.width + "px"; + stai.style.height = screen.height + "px"; + stai.style.position = "absolute"; + + lform.style.position = "absolute"; + lform.style.top = (screen.width/5) + "px"; + lform.style.left = (screen.height/2) + "px"; + + p.value=""; + p.focus(); + } + function callstandbyHide() + { + var p = document.getElementsByName('sb_password')[0]; + if (p && p != "" && p.value==standbypass) + { + var stai = document.getElementsByName('stai')[0]; + var lform = document.getElementsByName('lform')[0]; + stai.style.display = "none"; + lform.style.display = "none"; + resumesbSend(); + } + } + --> + </script> + <span jwcid="@If" condition="ognl:getFormScript()"> <script language="JavaScript" src="FormScript.js"> </script> @@ -45,12 +105,11 @@ <table border="0" cellpadding="4" callspacing="0" width="100%"> <tr> <td align="left"> - <img src="/images/example.jpg" width="100" height="31" border="0" vspace="0" - hspace="0"/> + <img src="/images/example.jpg" width="100" height="31" border="0" vspace="0" hspace="0"/> </td> <td align="right"> <span jwcid="@UserAdminQuickAccess"/> - </td> + </td> </tr> </table> <span jwcid="@If" condition="ognl:isLoggedIn()"> @@ -89,76 +148,53 @@ <center> <span jwcid="@NavigationHelper"/> <b> - <span jwcid="@If" condition="ognl:hasTitle()"> - <span jwcid="@Insert" value="prop:title"/> - </span> + <span jwcid="@If" condition="ognl:hasTitle()"> + <span jwcid="@Insert" value="prop:title"/> + </span> - <span jwcid="@If" condition="ognl:hasInternationalizedTitle()"> - <span jwcid="@Insert" value="prop:internationalizedTitle"/> - </span> + <span jwcid="@If" condition="ognl:hasInternationalizedTitle()"> + <span jwcid="@Insert" value="prop:internationalizedTitle"/> + </span> - - <!-- let nbsp; here; otherwise, this bar is not drawn if there is no title--> - </b></center> + + <!-- let nbsp; here; otherwise, this bar is not drawn if there is no title--> + </b> + </center> </div> </span> <span jwcid="@If" condition="ognl:formCentered"> <script language="JavaScript"> - <!-- - //at login or when menu is hidden, display the form in the center - - var menu=document.getElementById("menuID"); - if (menu!=null) menu.style.display="none"; - var main=document.getElementById("mainID"); - main.style.width="100%"; - - --> - </script> - </span> - <span jwcid="@If" condition="ognl:isLoggedIn()"> - <script language="JavaScript"> <!-- - // time until automatically logout session - var unidExpireTime = 6000000; + //at login or when menu is hidden, display the form in the center - function expireTimeout() - { - var now = new Date(); - if ( lastKeyTime && ( now - lastKeyTime < unidExpireTime ) ) - { - setTimeout( "expireTimeout();", unidExpireTime - ( now - lastKeyTime ) ); - } - else - { - window.location='app?service=restart'; - } - } + var menu=document.getElementById("menuID"); + if (menu!=null) menu.style.display="none"; + var main=document.getElementById("mainID"); + main.style.width="100%"; - setTimeout( "expireTimeout();", unidExpireTime ); - --> </script> - </span> + </span> - <center> + <center> <span jwcid="@RenderBody"/> - </center> - <script language="JavaScript" src="AutoFocus.js"> - </script> + </center> + <script language="JavaScript" src="AutoFocus.js"> + </script> <script language="JavaScript" src="FixNumberTranslators.js"> </script> - <span jwcid="@If" condition="ognl:isLoggedIn()"> - <form jwcid="@Form" id="hiddenFormID" listener="listener:hiddenFormSubmit" - enctype="multipart/form-data" focus="ognl:false" style="display:none"> - <input jwcid="@TextField" value="prop:hiddenField1" id="borderHiddenField1Id"/> - <input jwcid="@TextField" value="prop:hiddenField2" id="borderHiddenField2Id"/> + <span jwcid="@If" condition="ognl:isLoggedIn()"> + <form jwcid="@Form" id="hiddenFormID" listener="listener:hiddenFormSubmit" + enctype="multipart/form-data" focus="ognl:false" style="display:none"> + <input jwcid="@TextField" value="prop:hiddenField1" id="borderHiddenField1Id"/> + <input jwcid="@TextField" value="prop:hiddenField2" id="borderHiddenField2Id"/> </form> - </span> + </span> - <span jwcid="@contrib:XTile" sendName="sendRequestToggleMenu" receiveName="receiveToggleMenu" - listener="listener:handlerAjaxToggleMenu"/> - </div> - </body> + <span jwcid="@contrib:XTile" sendName="sendRequestToggleMenu" receiveName="receiveToggleMenu" + listener="listener:handlerAjaxToggleMenu"/> + </div> + </body> </html> \ No newline at end of file Modified: trunk/Uni-d/test/src/etc/site_tapestry/site.war/config.properties =================================================================== --- trunk/Uni-d/test/src/etc/site_tapestry/site.war/config.properties 2006-10-30 10:01:38 UTC (rev 3054) +++ trunk/Uni-d/test/src/etc/site_tapestry/site.war/config.properties 2006-10-30 20:20:15 UTC (rev 3055) @@ -6,4 +6,5 @@ maximum_links_in_combobox=3 gui-select-page-size=2 keep-alive-refresh-time=300000 -show-stack-items=4 \ No newline at end of file +show-stack-items=4 +timeout-sec=20 \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tri...@us...> - 2006-10-31 23:36:25
|
Revision: 3061 http://svn.sourceforge.net/uni-d/?rev=3061&view=rev Author: triathlon98 Date: 2006-10-31 15:16:23 -0800 (Tue, 31 Oct 2006) Log Message: ----------- move LoginInfo to avoid unneeded dependencies on tapestry module Modified Paths: -------------- trunk/Uni-d/generate/src/main/velocity/login/LoginModule.java.vm trunk/Uni-d/generate/src/main/velocity/login/bean/LoginBean.java.vm trunk/Uni-d/generate/src/main/velocity/login/bean/LoginEJBLocal.java.vm trunk/Uni-d/server/pom.xml trunk/Uni-d/tapestry/pom.xml trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/UnidBasePage.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/util/LoginResolver.java Added Paths: ----------- trunk/Uni-d/server/src/main/java/be/unid/login/ trunk/Uni-d/server/src/main/java/be/unid/login/LoginInfo.java Removed Paths: ------------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/util/LoginInfo.java Modified: trunk/Uni-d/generate/src/main/velocity/login/LoginModule.java.vm =================================================================== --- trunk/Uni-d/generate/src/main/velocity/login/LoginModule.java.vm 2006-10-31 22:44:38 UTC (rev 3060) +++ trunk/Uni-d/generate/src/main/velocity/login/LoginModule.java.vm 2006-10-31 23:16:23 UTC (rev 3061) @@ -28,7 +28,7 @@ package ${package}; -import be.unid.tapestry.util.LoginInfo; +import be.unid.login.LoginInfo; import org.jboss.security.auth.spi.UsersRolesLoginModule; import org.jboss.security.SimpleGroup; Modified: trunk/Uni-d/generate/src/main/velocity/login/bean/LoginBean.java.vm =================================================================== --- trunk/Uni-d/generate/src/main/velocity/login/bean/LoginBean.java.vm 2006-10-31 22:44:38 UTC (rev 3060) +++ trunk/Uni-d/generate/src/main/velocity/login/bean/LoginBean.java.vm 2006-10-31 23:16:23 UTC (rev 3061) @@ -28,7 +28,7 @@ package ${package}; -import be.unid.tapestry.util.LoginInfo; +import be.unid.login.LoginInfo; #set( $ejbPackage=${engine.getConfig("ejb-package")} ) import ${ejbPackage}.server.pm.DMUnidUserBean; import ${ejbPackage}.server.pm.DMUnidUserFinder; Modified: trunk/Uni-d/generate/src/main/velocity/login/bean/LoginEJBLocal.java.vm =================================================================== --- trunk/Uni-d/generate/src/main/velocity/login/bean/LoginEJBLocal.java.vm 2006-10-31 22:44:38 UTC (rev 3060) +++ trunk/Uni-d/generate/src/main/velocity/login/bean/LoginEJBLocal.java.vm 2006-10-31 23:16:23 UTC (rev 3061) @@ -28,7 +28,7 @@ package ${package}; -import be.unid.tapestry.util.LoginInfo; +import be.unid.login.LoginInfo; import javax.ejb.Local; Modified: trunk/Uni-d/server/pom.xml =================================================================== --- trunk/Uni-d/server/pom.xml 2006-10-31 22:44:38 UTC (rev 3060) +++ trunk/Uni-d/server/pom.xml 2006-10-31 23:16:23 UTC (rev 3061) @@ -46,5 +46,9 @@ <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jbosssx</artifactId> + </dependency> </dependencies> </project> Added: trunk/Uni-d/server/src/main/java/be/unid/login/LoginInfo.java =================================================================== --- trunk/Uni-d/server/src/main/java/be/unid/login/LoginInfo.java (rev 0) +++ trunk/Uni-d/server/src/main/java/be/unid/login/LoginInfo.java 2006-10-31 23:16:23 UTC (rev 3061) @@ -0,0 +1,140 @@ +/** + * This file is part of the Uni-d project. + * $Id: LoginInfo.java 2771 2006-08-02 10:30:27 +0200 (Wed, 02 Aug 2006) pushkutza $ + * + * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF + * ANY KIND, either express or implied. See the License for the specific language governing rights and + * limitations under the License. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + */ + +package be.unid.login; + +import java.util.List; + +/** + * Information from the UnidUser table: + * -application server userName + * -application server password + * -is administrator? if so, the border will differ, other menus would be available + * + * @author NetRom team + * @version $Revision: 2771 $ + */ +public class LoginInfo +{ + boolean administrator; + String userName; + String password; + String language; + List<String> roles; + long deadline; + + public LoginInfo(){} + + public LoginInfo( boolean administrator, String userName, String password ) + { + this.administrator = administrator; + this.userName = userName; + this.password = password; + } + + public LoginInfo( boolean administrator, String userName, String password, String language ) + { + this( administrator, userName, password ); + this.language = language; + } + + public LoginInfo( boolean administrator, String userName, String password, String language, List<String> roles ) + { + this( administrator, userName, password, language ); + setRoles( roles ); + } + + public boolean isAdministrator() + { + return administrator; + } + + public void setAdministrator( boolean administrator ) + { + this.administrator = administrator; + } + + public String getUserName() + { + return userName; + } + + public void setUserName( String userName ) + { + this.userName = userName; + } + + public String getPassword() + { + return password; + } + + public void setPassword( String password ) + { + this.password = password; + } + + public String getLanguage() + { + return this.language; + } + + public void setLanguage( String language ) + { + this.language = language; + } + + public List<String> getRoles() + { + return roles; + } + + public void setRoles( List<String> roles ) + { + this.roles = roles; + } + + /** + * Get validity deadline for this record. + * Can be used to aid in caching LoginInfo objects. + * + * @return time in ms for deadline + */ + public long getDeadline() + { + return deadline; + } + + /** + * Set validity deadline for this record. + * Can be used to aid in caching LoginInfo objects. + * + * @param deadline time in ms for deadline + */ + public void setDeadline( long deadline ) + { + this.deadline = deadline; + } +} Modified: trunk/Uni-d/tapestry/pom.xml =================================================================== --- trunk/Uni-d/tapestry/pom.xml 2006-10-31 22:44:38 UTC (rev 3060) +++ trunk/Uni-d/tapestry/pom.xml 2006-10-31 23:16:23 UTC (rev 3061) @@ -36,10 +36,6 @@ </dependency> <dependency> <groupId>org.jboss</groupId> - <artifactId>jbosssx</artifactId> - </dependency> - <dependency> - <groupId>org.jboss</groupId> <artifactId>jboss-jmx</artifactId> </dependency> <dependency> Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/UnidBasePage.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/UnidBasePage.java 2006-10-31 22:44:38 UTC (rev 3060) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/UnidBasePage.java 2006-10-31 23:16:23 UTC (rev 3061) @@ -25,6 +25,7 @@ package be.unid.tapestry.pages; +import be.unid.login.LoginInfo; import be.unid.persistence.om.UnidPersistenceException; import be.unid.tapestry.messages.MessagesGroup; import be.unid.tapestry.messages.ReportMessagesGroup; @@ -32,7 +33,6 @@ import be.unid.tapestry.pages.userAdmin.login.loginErrorPage.LoginErrorPage; import be.unid.tapestry.useradmin.GlobalUserAdmin; import be.unid.tapestry.useradmin.SessionUserAdmin; -import be.unid.tapestry.util.LoginInfo; import be.unid.tapestry.util.LoginResolver; import be.unid.tapestry.util.Visit; import org.apache.log4j.Logger; @@ -84,7 +84,7 @@ @InjectObject( "service:tapestry.globals.ServletContext" ) public abstract ServletContext getServletContext(); - /** + /* * !!!!OK!!!! this should not be here ... nothing to do with all pages ... but I had to place them in some common class * and ... to create one just for this .... */ @@ -109,7 +109,7 @@ /** * If no authentication was done (form based, custom), go to the login page * - * @param cycle + * @param cycle request cycle */ public void validate( IRequestCycle cycle ) { @@ -142,8 +142,8 @@ sessionUserAdmin.setUserName( info.getUserName() ); sessionUserAdmin.setPassword( info.getPassword() ); sessionUserAdmin.setUserAdministrator( info.isAdministrator() ); - Set roles = jsm.getUserRoles( new SimplePrincipal( info.getUserName() ) ); - sessionUserAdmin.setRoles( roles != null ? roles : new ArrayList() ); + Set<SimplePrincipal> roles = jsm.getUserRoles( new SimplePrincipal( info.getUserName() ) ); + sessionUserAdmin.setRoles( roles != null ? roles : new ArrayList<SimplePrincipal>() ); String language = info.getLanguage(); // save the language here, to test the setting realy took effect ( (Visit) getVisit() ).setLanguage( language ); Deleted: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/util/LoginInfo.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/util/LoginInfo.java 2006-10-31 22:44:38 UTC (rev 3060) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/util/LoginInfo.java 2006-10-31 23:16:23 UTC (rev 3061) @@ -1,140 +0,0 @@ -/** - * This file is part of the Uni-d project. - * $Id$ - * - * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF - * ANY KIND, either express or implied. See the License for the specific language governing rights and - * limitations under the License. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - */ - -package be.unid.tapestry.util; - -import java.util.List; - -/** - * Information from the UnidUser table: - * -application server userName - * -application server password - * -is administrator? if so, the border will differ, other menus would be available - * - * @author NetRom team - * @version $Revision$ - */ -public class LoginInfo -{ - boolean administrator; - String userName; - String password; - String language; - List<String> roles; - long deadline; - - public LoginInfo(){} - - public LoginInfo( boolean administrator, String userName, String password ) - { - this.administrator = administrator; - this.userName = userName; - this.password = password; - } - - public LoginInfo( boolean administrator, String userName, String password, String language ) - { - this( administrator, userName, password ); - this.language = language; - } - - public LoginInfo( boolean administrator, String userName, String password, String language, List<String> roles ) - { - this( administrator, userName, password, language ); - setRoles( roles ); - } - - public boolean isAdministrator() - { - return administrator; - } - - public void setAdministrator( boolean administrator ) - { - this.administrator = administrator; - } - - public String getUserName() - { - return userName; - } - - public void setUserName( String userName ) - { - this.userName = userName; - } - - public String getPassword() - { - return password; - } - - public void setPassword( String password ) - { - this.password = password; - } - - public String getLanguage() - { - return this.language; - } - - public void setLanguage( String language ) - { - this.language = language; - } - - public List<String> getRoles() - { - return roles; - } - - public void setRoles( List<String> roles ) - { - this.roles = roles; - } - - /** - * Get validity deadline for this record. - * Can be used to aid in caching LoginInfo objects. - * - * @return time in ms for deadline - */ - public long getDeadline() - { - return deadline; - } - - /** - * Set validity deadline for this record. - * Can be used to aid in caching LoginInfo objects. - * - * @param deadline time in ms for deadline - */ - public void setDeadline( long deadline ) - { - this.deadline = deadline; - } -} Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/util/LoginResolver.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/util/LoginResolver.java 2006-10-31 22:44:38 UTC (rev 3060) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/util/LoginResolver.java 2006-10-31 23:16:23 UTC (rev 3061) @@ -26,6 +26,7 @@ package be.unid.tapestry.util; import be.unid.persistence.om.UnidProxy; +import be.unid.login.LoginInfo; import java.util.List; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pus...@us...> - 2006-11-03 15:29:02
|
Revision: 3075 http://svn.sourceforge.net/uni-d/?rev=3075&view=rev Author: pushkutza Date: 2006-11-03 07:28:36 -0800 (Fri, 03 Nov 2006) Log Message: ----------- small fixes Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/Border.java trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/Border.html Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/Border.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/Border.java 2006-11-03 15:02:15 UTC (rev 3074) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/Border.java 2006-11-03 15:28:36 UTC (rev 3075) @@ -222,7 +222,6 @@ "\n function standbyResponse(arg) { \n setTimeout(\"standbyTimeout();\", " + ( sessionUserAdmin.getTimeout() /*+ 30000 */ ) + // 30 sec past config timeout "); \n if ( arg && arg.length>0 ) callstandby(arg[0]); \n }" + - "\n standbyTimeout();" + "\nfunction resumesbResponse(arg) {}" + "\n// -->\n" + "\n</script>"; Modified: trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/Border.html =================================================================== --- trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/Border.html 2006-11-03 15:02:15 UTC (rev 3074) +++ trunk/Uni-d/test/src/etc/site_tapestry/site.war/WEB-INF/Border.html 2006-11-03 15:28:36 UTC (rev 3075) @@ -149,52 +149,54 @@ onclick="document.location='app?service=restart'"/> </p> </form> - </span> - <script language="JavaScript"> - <!-- - var standbypass; - function callstandby(pass) - { - standbypass = pass; - if (standbypass=="null" || standbypass==null) standbypass="local"; - var stai = document.getElementsByName('stai')[0]; - var lform = document.getElementsByName('lform')[0]; - var p = document.getElementsByName('sb_password')[0]; + <script language="JavaScript"> + <!-- + var standbypass; + function callstandby(pass) + { + standbypass = pass; + if (standbypass=="null" || standbypass==null) standbypass="local"; - stai.style.display = "block"; - lform.style.display = "block"; + var stai = document.getElementsByName('stai')[0]; + var lform = document.getElementsByName('lform')[0]; + var p = document.getElementsByName('sb_password')[0]; - stai.style.position = "absolute"; - stai.style.border = "0px"; - stai.style.top = "0px"; - stai.style.left = "0px"; - stai.style.zIndex = "10"; - stai.style.width = screen.width + "px"; - stai.style.height = screen.height + "px"; + stai.style.display = "block"; + lform.style.display = "block"; - lform.style.position = "absolute"; - lform.style.zIndex = "11"; - lform.style.top = (screen.width/5) + "px"; - lform.style.left = (screen.height/2) + "px"; + stai.style.position = "absolute"; + stai.style.border = "0px"; + stai.style.top = "0px"; + stai.style.left = "0px"; + stai.style.zIndex = "10"; + stai.style.width = screen.width + "px"; + stai.style.height = screen.height + "px"; - p.value=""; - p.focus(); - } - function callstandbyHide() - { - var p = document.getElementsByName('sb_password')[0]; - if (p && p != "" && p.value==standbypass) + lform.style.position = "absolute"; + lform.style.zIndex = "11"; + lform.style.top = (screen.width/5) + "px"; + lform.style.left = (screen.height/2) + "px"; + + p.value=""; + p.focus(); + } + function callstandbyHide() { - var stai = document.getElementsByName('stai')[0]; - var lform = document.getElementsByName('lform')[0]; - stai.style.display = "none"; - lform.style.display = "none"; - resumesbSend(); + var p = document.getElementsByName('sb_password')[0]; + if (p && p != "" && p.value==standbypass) + { + var stai = document.getElementsByName('stai')[0]; + var lform = document.getElementsByName('lform')[0]; + stai.style.display = "none"; + lform.style.display = "none"; + resumesbSend(); + } } - } - --> - </script> + standbyTimeout(); + --> + </script> + </span> <span jwcid="@contrib:XTile" sendName="sendRequestToggleMenu" receiveName="receiveToggleMenu" listener="listener:handlerAjaxToggleMenu"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tri...@us...> - 2006-11-07 00:51:20
|
Revision: 3088 http://svn.sourceforge.net/uni-d/?rev=3088&view=rev Author: triathlon98 Date: 2006-11-06 16:51:01 -0800 (Mon, 06 Nov 2006) Log Message: ----------- set correct scopes on libraries Modified Paths: -------------- trunk/Uni-d/client/pom.xml trunk/Uni-d/generate/pom.xml trunk/Uni-d/pom.xml trunk/Uni-d/server/pom.xml trunk/Uni-d/tapestry/pom.xml trunk/Uni-d/tool/pom.xml trunk/Uni-d/util/pom.xml Modified: trunk/Uni-d/client/pom.xml =================================================================== --- trunk/Uni-d/client/pom.xml 2006-11-06 17:53:28 UTC (rev 3087) +++ trunk/Uni-d/client/pom.xml 2006-11-07 00:51:01 UTC (rev 3088) @@ -33,6 +33,7 @@ <dependency> <groupId>org.jboss</groupId> <artifactId>jboss-ejb3x</artifactId> + <scope>provided</scope> </dependency> </dependencies> </project> Modified: trunk/Uni-d/generate/pom.xml =================================================================== --- trunk/Uni-d/generate/pom.xml 2006-11-06 17:53:28 UTC (rev 3087) +++ trunk/Uni-d/generate/pom.xml 2006-11-07 00:51:01 UTC (rev 3088) @@ -35,10 +35,12 @@ <dependency> <groupId>ant</groupId> <artifactId>ant</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>velocity</groupId> Modified: trunk/Uni-d/pom.xml =================================================================== --- trunk/Uni-d/pom.xml 2006-11-06 17:53:28 UTC (rev 3087) +++ trunk/Uni-d/pom.xml 2006-11-07 00:51:01 UTC (rev 3088) @@ -325,7 +325,7 @@ <groupId>org.apache.maven</groupId> <artifactId>maven-project</artifactId> <version>2.0.4</version> - </dependency> + </dependency> </dependencies> </dependencyManagement> <repositories> Modified: trunk/Uni-d/server/pom.xml =================================================================== --- trunk/Uni-d/server/pom.xml 2006-11-06 17:53:28 UTC (rev 3087) +++ trunk/Uni-d/server/pom.xml 2006-11-07 00:51:01 UTC (rev 3088) @@ -25,6 +25,7 @@ <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>jasperreports</groupId> @@ -41,14 +42,27 @@ <dependency> <groupId>org.jboss</groupId> <artifactId>jboss-serialization</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>org.jboss</groupId> <artifactId>jbosssx</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-j2ee</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-ejb3x</artifactId> + <scope>provided</scope> </dependency> </dependencies> </project> Modified: trunk/Uni-d/tapestry/pom.xml =================================================================== --- trunk/Uni-d/tapestry/pom.xml 2006-11-06 17:53:28 UTC (rev 3087) +++ trunk/Uni-d/tapestry/pom.xml 2006-11-07 00:51:01 UTC (rev 3088) @@ -37,18 +37,37 @@ <dependency> <groupId>org.jboss</groupId> <artifactId>jboss-jmx</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>org.jboss</groupId> <artifactId>jboss-system</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>org.jboss</groupId> <artifactId>jboss-common</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>org.jboss</groupId> <artifactId>jboss-cache</artifactId> + <scope>provided</scope> </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-j2ee</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-ejb3x</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jbosssx</artifactId> + <scope>provided</scope> + </dependency> </dependencies> </project> Modified: trunk/Uni-d/tool/pom.xml =================================================================== --- trunk/Uni-d/tool/pom.xml 2006-11-06 17:53:28 UTC (rev 3087) +++ trunk/Uni-d/tool/pom.xml 2006-11-07 00:51:01 UTC (rev 3088) @@ -37,6 +37,17 @@ <dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> + <scope>provided</scope> </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-j2ee</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.jboss</groupId> + <artifactId>jboss-ejb3x</artifactId> + <scope>provided</scope> + </dependency> </dependencies> </project> Modified: trunk/Uni-d/util/pom.xml =================================================================== --- trunk/Uni-d/util/pom.xml 2006-11-06 17:53:28 UTC (rev 3087) +++ trunk/Uni-d/util/pom.xml 2006-11-07 00:51:01 UTC (rev 3088) @@ -33,14 +33,17 @@ <dependency> <groupId>org.jboss</groupId> <artifactId>jboss-j2ee</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>org.jboss</groupId> <artifactId>jbosssx-client</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>org.jboss</groupId> <artifactId>jboss-common-jdbc-wrapper</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>com.toedter</groupId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pus...@us...> - 2006-11-07 18:23:58
|
Revision: 3089 http://svn.sourceforge.net/uni-d/?rev=3089&view=rev Author: pushkutza Date: 2006-11-07 10:23:10 -0800 (Tue, 07 Nov 2006) Log Message: ----------- ICT-667 : fixes to the user admin rights page Modified Paths: -------------- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/userAdmin/table/tableRights/TableRights.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/userAdmin/tableRightsPage/TableRightsPage.java trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/components/userAdmin/table/tableRights/TableRights.html trunk/Uni-d/template/src/main/resources/WEB-INF/Uni-d-fixed.properties trunk/Uni-d/template/src/main/resources/WEB-INF/Uni-d-fixed_ro.properties trunk/Uni-d/test/src/etc/site_tapestry/site.war/css/Uni-d.css Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/userAdmin/table/tableRights/TableRights.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/userAdmin/table/tableRights/TableRights.java 2006-11-07 00:51:01 UTC (rev 3088) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/userAdmin/table/tableRights/TableRights.java 2006-11-07 18:23:10 UTC (rev 3089) @@ -131,7 +131,8 @@ public String getRoleDisplayName() { return "role"; } - public abstract void setSkipLoad(boolean skip); + public abstract void setSkipLoad( boolean skip ); + public abstract boolean getSkipLoad(); @Override @@ -140,21 +141,88 @@ super.prepareForRender( cycle ); if ( !getSkipLoad() ) { - RoleSelectionModel model = getRoleSelectionModel(); - String uoid = null; - if ( model.getOptionCount() > 0 ) uoid = (String) model.getOption( 0 ); - if ( uoid != null ) + TableRightsPageParameters pp = ( (TableRightsPage) getNavPage() ).getPageParameters(); + if ( pp.getRoleUoid() == null ) { - ( (TableRightsPage) getNavPage() ).getPageParameters().setRoleUoid( uoid ); - load(); + RoleSelectionModel model = getRoleSelectionModel(); + String uoid = null; + if ( model.getOptionCount() > 0 ) uoid = (String) model.getOption( 0 ); + if ( uoid != null ) + { + pp.setRoleUoid( uoid ); + } } + load(); } - setSkipLoad( false) ; + setSkipLoad( false ); } + public void editToAllFields() + { + TableRightsPageParameters params = ( (TableRightsPage) getNavPage() ).getPageParameters(); + GMTable table = DescriptionFactory.getTableDescription( params.getTableName() ); + Map<String, String> rights = params.getFieldRights(); + for ( GMField f : table.getFields() ) rights.put( f.getId(), AccessRight.EDITABLE_ACCESS_EDIT.getId() ); + setSkipLoad( true ); + } + + public void viewToAllFields() + { + TableRightsPageParameters params = ( (TableRightsPage) getNavPage() ).getPageParameters(); + GMTable table = DescriptionFactory.getTableDescription( params.getTableName() ); + Map<String, String> rights = params.getFieldRights(); + for ( GMField f : table.getFields() ) rights.put( f.getId(), AccessRight.EDITABLE_ACCESS_VIEW.getId() ); + setSkipLoad( true ); + } + + public void noneToAllFields() + { + TableRightsPageParameters params = ( (TableRightsPage) getNavPage() ).getPageParameters(); + GMTable table = DescriptionFactory.getTableDescription( params.getTableName() ); + Map<String, String> rights = params.getFieldRights(); + for ( GMField f : table.getFields() ) rights.put( f.getId(), AccessRight.EDITABLE_ACCESS_NONE.getId() ); + setSkipLoad( true ); + } + + public void runToAllActions() + { + TableRightsPageParameters params = ( (TableRightsPage) getNavPage() ).getPageParameters(); + GMTable table = DescriptionFactory.getTableDescription( params.getTableName() ); + Map<String, String> rights = params.getFieldRights(); + for ( GMAction a : table.getActions() ) rights.put( a.getId(), AccessRight.RUNNABLE_ACCESS_RUN.getId() ); + setSkipLoad( true ); + } + + public void blockToAllActions() + { + TableRightsPageParameters params = ( (TableRightsPage) getNavPage() ).getPageParameters(); + GMTable table = DescriptionFactory.getTableDescription( params.getTableName() ); + Map<String, String> rights = params.getFieldRights(); + for ( GMAction a : table.getActions() ) rights.put( a.getId(), AccessRight.RUNNABLE_ACCESS_NONE.getId() ); + setSkipLoad( true ); + } + + public void runToAllSelects() + { + TableRightsPageParameters params = ( (TableRightsPage) getNavPage() ).getPageParameters(); + GMTable table = DescriptionFactory.getTableDescription( params.getTableName() ); + Map<String, String> rights = params.getFieldRights(); + for ( GMSelect s : table.getSelects() ) rights.put( s.getId(), AccessRight.RUNNABLE_ACCESS_RUN.getId() ); + setSkipLoad( true ); + } + + public void blockToAllSelects() + { + TableRightsPageParameters params = ( (TableRightsPage) getNavPage() ).getPageParameters(); + GMTable table = DescriptionFactory.getTableDescription( params.getTableName() ); + Map<String, String> rights = params.getFieldRights(); + for ( GMSelect s : table.getSelects() ) rights.put( s.getId(), AccessRight.RUNNABLE_ACCESS_NONE.getId() ); + setSkipLoad( true ); + } + public void save() { - setSkipLoad (true); + setSkipLoad( true ); try { saveFieldRights(); @@ -170,7 +238,7 @@ { try { - loadFieldRights(); + if ( ( (TableRightsPage) getNavPage() ).getPageParameters().getRoleUoid() != null ) loadFieldRights(); } catch ( Exception e ) { Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/userAdmin/tableRightsPage/TableRightsPage.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/userAdmin/tableRightsPage/TableRightsPage.java 2006-11-07 00:51:01 UTC (rev 3088) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/userAdmin/tableRightsPage/TableRightsPage.java 2006-11-07 18:23:10 UTC (rev 3089) @@ -69,6 +69,6 @@ public String getTitle() { return getMessages().getMessage( "title" ) + ' ' + - getMessages().getMessage( "table." + getPageParameters().getTableName() + ".label" ); //todo + getMessages().getMessage( "table." + getPageParameters().getTableName() + ".label" ); } } \ No newline at end of file Modified: trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/components/userAdmin/table/tableRights/TableRights.html =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/components/userAdmin/table/tableRights/TableRights.html 2006-11-07 00:51:01 UTC (rev 3088) +++ trunk/Uni-d/tapestry/src/main/resources/html/be/unid/tapestry/components/userAdmin/table/tableRights/TableRights.html 2006-11-07 18:23:10 UTC (rev 3089) @@ -35,57 +35,119 @@ <span class="displayError" jwcid="error"/> <form jwcid="EnityForm@Form" - listener="listener:formSubmit" - delegate="bean:validationDelegate" - clientValidationEnabled="ognl:true" - enctype="multipart/form-data" focus="ognl:false"> + listener="listener:formSubmit" + delegate="bean:validationDelegate" + clientValidationEnabled="ognl:true" + enctype="multipart/form-data" focus="ognl:false"> - <a href="#fieldsSection"><span jwcid="@Insert" value="message:FieldsSection" class="tableRightsSection"/></a> - - <p/> - <span jwcid="@If" condition="ognl:hasActions()"> - <a href="#actionsSection"><span jwcid="@Insert" value="message:ActionsSection" class="tableRightsSection"/></a> - <p/> +<center> + <span class="useradminButtonGroup"> + <span class="useradminButtonSubGroup"> + <span class="useradminButton"><a href="#fieldsSection"><span jwcid="@Insert" value="message:FieldsSection" + class="useradminSectionLinks"/></a></span> + <span class="useradminButton"><span jwcid="@Submit" action="listener:editToAllFields" + value="message:UserAdminEditToAllFields"></span></span> + <span class="useradminButton"><span jwcid="@Submit" action="listener:viewToAllFields" + value="message:UserAdminViewToAllFields"></span></span> + <span class="useradminButton"><span jwcid="@Submit" action="listener:noneToAllFields" + value="message:UserAdminNoneToAllFields"></span></span> + </span> + <span jwcid="@If" condition="ognl:hasActions()"> + <span class="useradminButtonSubGroup"> + <span class="useradminButton"><a href="#actionsSection"><span jwcid="@Insert" + value="message:ActionsSection" + class="useradminSectionLinks"/></a></span> + <span class="useradminButton"><span jwcid="@Submit" action="listener:runToAllActions" + value="message:UserAdminRunToAllActions"></span></span> + <span class="useradminButton"><span jwcid="@Submit" action="listener:blockToAllActions" + value="message:UserAdminBlockToAllActions"></span></span> + </span> + </span> + <span jwcid="@If" condition="ognl:hasSelects()"> + <span class="useradminButtonSubGroup"> + <span class="useradminButton"><a href="#selectsSection"><span jwcid="@Insert" + value="message:SelectsSection" + class="useradminSectionLinks"/></a></span> + <span class="useradminButton"><span jwcid="@Submit" action="listener:runToAllSelects" + value="message:UserAdminRunToAllSelects"></span></span> + <span class="useradminButton"><span jwcid="@Submit" action="listener:blockToAllSelects" + value="message:UserAdminBlockToAllSelects"></span></span> + </span> + </span> </span> - - <span jwcid="@If" condition="ognl:hasSelects()"> - <a href="#selectsSection"><span jwcid="@Insert" value="message:SelectsSection" class="tableRightsSection"/></a> - <p/> + <span class="useradminButtonGroup"> + <span class="useradminButtonSubGroup"> + <span class="useradminButton"><span jwcid="@Submit" action="listener:load" + value="message:Load"></span></span> + <span class="useradminButton"><span jwcid="@Submit" class="submitButton" action="listener:save" + value="message:Save"></span></span> + </span> </span> +</center> +<table> + <center> + <tr> + <td> + <label jwcid="@FieldLabel" field="prop:roleChoice" prerender="ognl:false"/> + </td> + <td> + <input jwcid="roleChoice"/> + </td> + </tr> + </center> +</table> +<p/> +<span class="useradminSection"><a name="fieldsSection"><span jwcid="@Insert" value="message:FieldsSection"/></a></span> +<span jwcid="unidTable"/> - <table><center> - <tr><td> - <label jwcid="@FieldLabel" field="prop:roleChoice" prerender="ognl:false"/> - </td><td> - <input jwcid="roleChoice"/> - </td></tr> - </center></table> - <p/> - <a name="fieldsSection"><span jwcid="@Insert" value="message:FieldsSection" class="tableRightsSection"/></a> - <span jwcid="unidTable"/> +<table width="100%"> + <center> + <tr> + <td align="center" valign="top"> + <span jwcid="@If" condition="ognl:hasActions()"> + <p/> + <span class="useradminSection"> + <a name="actionsSection"><span jwcid="@Insert" value="message:ActionsSection"></span></a></span> + <span jwcid="actionRights"></span> + </span> + </td> + <td align="center" valign="top"> + <span jwcid="@If" condition="ognl:hasSelects()"> + <p/> + <span class="useradminSection"> + <a name="selectsSection"><span jwcid="@Insert" value="message:SelectsSection"></span></a></span> + <span jwcid="selectRights"></span> + </span> + </td> + </tr> + </center> +</table> +<p/> +<a href="#fieldsSection"><span jwcid="@Insert" value="message:FieldsSection" class="useradminSectionLinks"/></a> + <span jwcid="@If" condition="ognl:hasActions()"> - <a name="actionsSection"><span jwcid="@Insert" value="message:ActionsSection" class="tableRightsSection"/></a> - <p/> - <span jwcid="actionRights"/> + <a href="#actionsSection"><span jwcid="@Insert" value="message:ActionsSection" + class="useradminSectionLinks"/></a> + </span> - <span jwcid="@If" condition="ognl:hasSelects()"> - <a name="selectsSection"><span jwcid="@Insert" value="message:SelectsSection" class="tableRightsSection"/></a> - <p/> - <span jwcid="selectRights"/> + <a href="#selectsSection"><span jwcid="@Insert" value="message:SelectsSection" + class="useradminSectionLinks"/></a> + </span> - <p/> - <center> - <span jwcid="@LinkSubmit" action="listener:load"> - <span jwcid="@Insert" value="message:Load"/> +<p/> +<center> + <span class="useradminButtonGroup"> + <span class="useradminButtonSubGroup"> + <span class="useradminButton"><span jwcid="@Submit" action="listener:load" + value="message:Load"></span></span> + <span class="useradminButton"><span jwcid="@Submit" class="submitButton" action="listener:save" + value="message:Save"></span></span> </span> - - <span jwcid="@LinkSubmit" action="listener:save"> - <span jwcid="@Insert" value="message:Save"/> - </span> - </center> + </span> +</center> </form> \ No newline at end of file Modified: trunk/Uni-d/template/src/main/resources/WEB-INF/Uni-d-fixed.properties =================================================================== --- trunk/Uni-d/template/src/main/resources/WEB-INF/Uni-d-fixed.properties 2006-11-07 00:51:01 UTC (rev 3088) +++ trunk/Uni-d/template/src/main/resources/WEB-INF/Uni-d-fixed.properties 2006-11-07 18:23:10 UTC (rev 3089) @@ -72,5 +72,12 @@ TableType=Record type UOID=UOID UnselectAll=Unselect all +UserAdminBlockToAllActions=Set all actions to 'Block' +UserAdminBlockToAllSelects=Set all selects to 'Block' +UserAdminEditToAllFields=Set all fields to 'Edit' +UserAdminNoneToAllFields=Set all fields to 'None' +UserAdminRunToAllActions=Set all actions to 'Run' +UserAdminRunToAllSelects=Set all selects to 'Run' +UserAdminViewToAllFields=Set all fields to 'View' UserName=User name View=View Modified: trunk/Uni-d/template/src/main/resources/WEB-INF/Uni-d-fixed_ro.properties =================================================================== --- trunk/Uni-d/template/src/main/resources/WEB-INF/Uni-d-fixed_ro.properties 2006-11-07 00:51:01 UTC (rev 3088) +++ trunk/Uni-d/template/src/main/resources/WEB-INF/Uni-d-fixed_ro.properties 2006-11-07 18:23:10 UTC (rev 3089) @@ -65,6 +65,13 @@ TableType=Tipul inregistrarii UOID=UOID UnselectAll=Deselecteaza tot +UserAdminBlockToAllActions=Seteaza toate actiunile pe 'Block' +UserAdminBlockToAllSelects=Seteaza toate cautarile pe 'Block' +UserAdminEditToAllFields=Seteaza toate campurile pe 'Edit' +UserAdminNoneToAllFields=Seteaza toate campurile pe 'None' +UserAdminRunToAllActions=Seteaza toate actiunile pe 'Run' +UserAdminRunToAllSelects=Seteaza toate cautarile pe 'Run' +UserAdminViewToAllFields=Seteaza toate campurile pe 'View' UserName=Numele Utilizatorului View=Vizualizeaza accesskey.edit=E Modified: trunk/Uni-d/test/src/etc/site_tapestry/site.war/css/Uni-d.css =================================================================== --- trunk/Uni-d/test/src/etc/site_tapestry/site.war/css/Uni-d.css 2006-11-07 00:51:01 UTC (rev 3088) +++ trunk/Uni-d/test/src/etc/site_tapestry/site.war/css/Uni-d.css 2006-11-07 18:23:10 UTC (rev 3089) @@ -70,7 +70,30 @@ display: block; } -.tableRightsSection { - font-size: 10px; +.useradminButtonGroup { text-align: center; + display: table; +} + +.useradminButtonSubGroup { + text-align: center; + display: table-row; +} + +.useradminButton { + height: 15px; + font-size: 13px; + text-align: left; + display: table-cell; +} + +.useradminSection { + font-size: 15px; + font-weight: bold; + text-align: left; +} + +.useradminSectionLinks { + font-size: 13px; + text-align: left; } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pus...@us...> - 2006-11-08 15:10:26
|
Revision: 3091 http://svn.sourceforge.net/uni-d/?rev=3091&view=rev Author: pushkutza Date: 2006-11-08 07:10:08 -0800 (Wed, 08 Nov 2006) Log Message: ----------- ICT-667 :added transactions to improve saving time Modified Paths: -------------- trunk/Uni-d/generate/src/main/velocity/gui-descriptors/Action.xml.vm trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/model/GMParameter.java Modified: trunk/Uni-d/generate/src/main/velocity/gui-descriptors/Action.xml.vm =================================================================== --- trunk/Uni-d/generate/src/main/velocity/gui-descriptors/Action.xml.vm 2006-11-07 18:43:07 UTC (rev 3090) +++ trunk/Uni-d/generate/src/main/velocity/gui-descriptors/Action.xml.vm 2006-11-08 15:10:08 UTC (rev 3091) @@ -52,6 +52,14 @@ #set( $node=$parameter ) #parse( "Case.xml.vm" ) +#foreach( $choice in $parameter.Suggest.Field.Choices ) +#if( $choice.isFromClass() ) + <choice class="$choice.Name"/> +#else + <choice name="$choice.Name" value="$choice.Value"/> +#end +#end + #if( $parameter.hasSuggest() ) #set( $node=$parameter ) #parse( "Suggest.xml.vm" ) Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/model/GMParameter.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/model/GMParameter.java 2006-11-07 18:43:07 UTC (rev 3090) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/model/GMParameter.java 2006-11-08 15:10:08 UTC (rev 3091) @@ -23,7 +23,6 @@ * the terms of any one of the MPL, the GPL or the LGPL. */ - package be.unid.tapestry.model; import be.unid.tapestry.util.FieldType; @@ -36,7 +35,7 @@ * @version $Revision$ */ public class GMParameter - extends Input + extends FieldInput { String name; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tri...@us...> - 2006-11-13 10:06:36
|
Revision: 3099 http://svn.sourceforge.net/uni-d/?rev=3099&view=rev Author: triathlon98 Date: 2006-11-13 02:06:20 -0800 (Mon, 13 Nov 2006) Log Message: ----------- remove duplicate hivemodule (don't know why this did not cause problems earlier), improve dependency handling Modified Paths: -------------- trunk/Uni-d/server/pom.xml trunk/Uni-d/tapestry/pom.xml trunk/Uni-d/tapestry/src/main/resources/META-INF/hivemodule.xml Removed Paths: ------------- trunk/Uni-d/template/src/main/webapp/WEB-INF/hivemodule.xml Modified: trunk/Uni-d/server/pom.xml =================================================================== --- trunk/Uni-d/server/pom.xml 2006-11-13 09:04:45 UTC (rev 3098) +++ trunk/Uni-d/server/pom.xml 2006-11-13 10:06:20 UTC (rev 3099) @@ -30,14 +30,17 @@ <dependency> <groupId>jasperreports</groupId> <artifactId>jasperreports</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>tapestry</groupId> <artifactId>tapestry</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>ant</groupId> <artifactId>ant</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>org.jboss</groupId> Modified: trunk/Uni-d/tapestry/pom.xml =================================================================== --- trunk/Uni-d/tapestry/pom.xml 2006-11-13 09:04:45 UTC (rev 3098) +++ trunk/Uni-d/tapestry/pom.xml 2006-11-13 10:06:20 UTC (rev 3099) @@ -23,7 +23,15 @@ <artifactId>Uni-d-server</artifactId> </dependency> <dependency> + <groupId>jasperreports</groupId> + <artifactId>jasperreports</artifactId> + </dependency> + <dependency> <groupId>tapestry</groupId> + <artifactId>tapestry</artifactId> + </dependency> + <dependency> + <groupId>tapestry</groupId> <artifactId>tapestry-annotations</artifactId> </dependency> <dependency> Modified: trunk/Uni-d/tapestry/src/main/resources/META-INF/hivemodule.xml =================================================================== --- trunk/Uni-d/tapestry/src/main/resources/META-INF/hivemodule.xml 2006-11-13 09:04:45 UTC (rev 3098) +++ trunk/Uni-d/tapestry/src/main/resources/META-INF/hivemodule.xml 2006-11-13 10:06:20 UTC (rev 3099) @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<module id="unid" version="1.0.0"> +<module id="be.unid.tapestry" version="1.0.0"> <service-point id="page" interface="org.apache.tapestry.engine.IEngineService"> <invoke-factory> Deleted: trunk/Uni-d/template/src/main/webapp/WEB-INF/hivemodule.xml =================================================================== --- trunk/Uni-d/template/src/main/webapp/WEB-INF/hivemodule.xml 2006-11-13 09:04:45 UTC (rev 3098) +++ trunk/Uni-d/template/src/main/webapp/WEB-INF/hivemodule.xml 2006-11-13 10:06:20 UTC (rev 3099) @@ -1,99 +0,0 @@ -<?xml version="1.0"?> -<module id="test" version="1.0.0"> - - <service-point id="page" interface="org.apache.tapestry.engine.IEngineService"> - <invoke-factory> - <construct class="org.apache.tapestry.engine.PageService"> - <set-object property="responseRenderer" value="infrastructure:responseRenderer"/> - <set-object property="linkFactory" value="infrastructure:linkFactory"/> - </construct> - </invoke-factory> - </service-point> - - <service-point id="restart" interface="org.apache.tapestry.engine.IEngineService"> - <invoke-factory> - <construct class="RestartEngine"> - <set-object property="responseRenderer" value="infrastructure:responseRenderer"/> - <set-object property="linkFactory" value="infrastructure:linkFactory"/> - <set-object property="pageName" value="app-property:org.apache.tapestry.page"/> - </construct> - </invoke-factory> - </service-point> - - <service-point id="home" interface="org.apache.tapestry.engine.IEngineService"> - <invoke-factory> - <construct class="org.apache.tapestry.engine.HomeService"> - <set-object property="responseRenderer" value="infrastructure:responseRenderer"/> - <set-object property="linkFactory" value="infrastructure:linkFactory"/> - <set-object property="pageName" value="app-property:org.apache.tapestry.page"/> - </construct> - </invoke-factory> - </service-point> - - <contribution configuration-id="tapestry.services.ApplicationServices"> - <service name="home" object="service:home"/> - <service name="page" object="service:page"/> - </contribution> - - <implementation service-id="tapestry.ComponentMessagesSource"> - <invoke-factory> - <construct class="be.unid.tapestry.messages.UnidComponentMessagesSourceImpl"> - <event-listener service-id="tapestry.ResetEventHub"/> - <set-object property="componentPropertySource" value="infrastructure:componentPropertySource"/> - <set-object property="servletContext" value="service:tapestry.globals.ServletContext"/> - </construct> - </invoke-factory> - </implementation> - - <implementation service-id="tapestry.page.SpecificationResolverDelegate"> - <invoke-factory> - <construct class="be.unid.tapestry.util.UnidSpecificationResolverDelegate"> - <set property="templateExtension" value=".html"/> - <set property="unidNamespace" value="unid"/> - </construct> - </invoke-factory> - </implementation> - - <service-point id="userAdminCache" interface="be.unid.tapestry.useradmin.cache.UserAdminCache"> - <invoke-factory> - <construct class="be.unid.tapestry.useradmin.cache.UserAdminCache"> - <set property="cacheServiceName" value="jboss.cache:service=UnidCacheService"/> - </construct> - </invoke-factory> - </service-point> - - <service-point id="GlobalUserAdminFactory" interface="org.apache.tapestry.engine.state.StateObjectFactory"> - <invoke-factory> - <construct class="be.unid.tapestry.useradmin.GlobalUserAdminFactory"> - <set-object property="userAdminCache" value="service:userAdminCache"/> - </construct> - </invoke-factory> - </service-point> - - <service-point id="SessionUserAdminFactory" interface="org.apache.tapestry.engine.state.StateObjectFactory"> - <invoke-factory> - <construct class="be.unid.tapestry.useradmin.SessionUserAdminFactory"> - <set-object property="applicationStateManager" value="infrastructure:applicationStateManager"/> - </construct> - </invoke-factory> - </service-point> - - <contribution configuration-id="tapestry.state.ApplicationObjects"> - - <state-object name="navigationManager" scope="session"> - <create-instance class="be.unid.tapestry.navigation.NavigationManager"/> - </state-object> - - <state-object name="global-user-admin" scope="application"> - <invoke-factory object="service:GlobalUserAdminFactory"> - </invoke-factory> - </state-object> - - <state-object name="session-user-admin" scope="session"> - <invoke-factory object="service:SessionUserAdminFactory"> - </invoke-factory> - </state-object> - - </contribution> - -</module> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tri...@us...> - 2006-11-13 12:04:44
|
Revision: 3104 http://svn.sourceforge.net/uni-d/?rev=3104&view=rev Author: triathlon98 Date: 2006-11-13 04:03:46 -0800 (Mon, 13 Nov 2006) Log Message: ----------- make sure debug logging is only ettempted when debug level is enabled (avoids a lot of unnecesary garbage creation (which is caused by string concatenation)) Modified Paths: -------------- trunk/Uni-d/generate/src/main/velocity/ejb3/ObjectBean.java.vm trunk/Uni-d/generate/src/main/velocity/login/LoginModule.java.vm trunk/Uni-d/server/src/main/java/be/unid/reporting/driver/UnidConnection.java trunk/Uni-d/server/src/main/java/be/unid/reporting/servlet/FileVirtualizer.java trunk/Uni-d/server/src/main/java/be/unid/reporting/servlet/ReportServlet.java trunk/Uni-d/server/src/main/java/be/unid/ymport/Servlet.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/binder/MultipleFieldBinderSource.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/binder/ProxyBinderSource.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/input/unidLinkInput/LinkInputBinderWrapper.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/input/unidLinkInput/actionHandler/LinkInputActionHandlerImpl.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/input/unidMultipleField/UnidMultipleField.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/navigationHelper/NavigationHelper.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/SelectObject.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/unidSelect/UnidSelect.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/unidSelectResults/UnidSelectResults.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/userAdmin/configList/ConfigList.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationManager.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationStackContainer.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationStackImpl.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationablePageImpl.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/ReturnHandlerField.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/masterDetail/TableMasterDetailPageParameters.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/tableManager/TableManagerPage.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/squeezeAdaptor/SelectObjectSqueezeAdaptor.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/squeezeAdaptor/UnidProxySqueezeAdaptor.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/useradmin/GlobalUserAdmin.java trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/useradmin/cache/UserAdminCacheLoader.java trunk/Uni-d/tool/src/main/java/be/unid/tool/all/ToolWorker.java trunk/Uni-d/tool/src/main/java/be/unid/tool/export/object/ObjectSelector.java trunk/Uni-d/tool/src/main/java/be/unid/tool/print/PrintWorker.java trunk/Uni-d/tool/src/main/java/be/unid/tool/print/Printer.java trunk/Uni-d/tool/src/main/java/be/unid/tool/shared/ui/ToolClientDisplay.java trunk/Uni-d/tool/src/main/java/be/unid/tool/shared/worker/Worker.java trunk/Uni-d/tool/src/main/java/be/unid/tool/ymport/ImportWorker.java Modified: trunk/Uni-d/generate/src/main/velocity/ejb3/ObjectBean.java.vm =================================================================== --- trunk/Uni-d/generate/src/main/velocity/ejb3/ObjectBean.java.vm 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/generate/src/main/velocity/ejb3/ObjectBean.java.vm 2006-11-13 12:03:46 UTC (rev 3104) @@ -988,7 +988,7 @@ if ($field.VarName==null) return 0; #end int count=DM${table.Name}Finder.count${field.Name}(entityManager, ${field.VarName}); - log.debug("uniqueness test count$field.Name "+$field.VarName+" "+count); + if ( log.isDebugEnabled() ) log.debug("uniqueness test count$field.Name "+$field.VarName+" "+count); return count; } #end Modified: trunk/Uni-d/generate/src/main/velocity/login/LoginModule.java.vm =================================================================== --- trunk/Uni-d/generate/src/main/velocity/login/LoginModule.java.vm 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/generate/src/main/velocity/login/LoginModule.java.vm 2006-11-13 12:03:46 UTC (rev 3104) @@ -56,7 +56,7 @@ protected Group[] getRoleSets() throws LoginException { - log.debug( "getRoleSets called" ); + if ( log.isDebugEnabled() ) log.debug( "getRoleSets called" ); String user = getUsername(); LoginInfo info = getLogin( user ); if ( info == null ) return super.getRoleSets(); @@ -89,7 +89,7 @@ protected String getUsersPassword() { - log.debug( "getUsersPassword called" ); + if ( log.isDebugEnabled() ) log.debug( "getUsersPassword called" ); String user = getUsername(); LoginInfo info = getLogin( user ); if ( info == null ) return super.getUsersPassword(); @@ -109,7 +109,7 @@ LoginInfo info = cache.get( user ); if ( info == null || info.getDeadline() < System.currentTimeMillis() ) { - log.debug( "not cached" ); + if ( log.isDebugEnabled() ) log.debug( "not cached" ); try { LoginEJBLocal local = LoginEJBUtil.getLocal(); Modified: trunk/Uni-d/server/src/main/java/be/unid/reporting/driver/UnidConnection.java =================================================================== --- trunk/Uni-d/server/src/main/java/be/unid/reporting/driver/UnidConnection.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/server/src/main/java/be/unid/reporting/driver/UnidConnection.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -80,7 +80,7 @@ public void close() throws SQLException { - log.debug( "closing connection" ); + if ( log.isDebugEnabled() ) log.debug( "closing connection" ); try { bean.close(); Modified: trunk/Uni-d/server/src/main/java/be/unid/reporting/servlet/FileVirtualizer.java =================================================================== --- trunk/Uni-d/server/src/main/java/be/unid/reporting/servlet/FileVirtualizer.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/server/src/main/java/be/unid/reporting/servlet/FileVirtualizer.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -77,12 +77,13 @@ */ public FileVirtualizer( int maxSize, String directory ) { - this.cache = new BoundCache<String, JRVirtualizable>( maxSize, null, new Cache.Purger<JRVirtualizable>(){ + this.cache = new BoundCache<String, JRVirtualizable>( maxSize, null, new Cache.Purger<JRVirtualizable>() + { public void purge( JRVirtualizable value ) { - virtualizeData(value); + virtualizeData( value ); } - }); + } ); this.serialized = new HashMap<String, JRVirtualizable>(); this.directory = directory; this.readOnly = false; @@ -100,7 +101,7 @@ public void registerObject( JRVirtualizable o ) { - if ( log.isDebugEnabled() ) log.debug( "register object "+o.getUID() ); + if ( log.isDebugEnabled() ) log.debug( "register object " + o.getUID() ); JRVirtualizable old = cache.put( o.getUID(), o ); if ( old != null ) { @@ -111,7 +112,7 @@ public void deregisterObject( JRVirtualizable o ) { - if ( log.isDebugEnabled() ) log.debug( "deregister object "+o.getUID() ); + if ( log.isDebugEnabled() ) log.debug( "deregister object " + o.getUID() ); String uid = o.getUID(); serialized.remove( uid ); // We don't really care if someone deregisters an object @@ -119,11 +120,12 @@ } public void touch( JRVirtualizable o ) - {} + { + } public void requestData( JRVirtualizable o ) { - if ( log.isDebugEnabled() ) log.debug( "request object "+o.getUID() ); + if ( log.isDebugEnabled() ) log.debug( "request object " + o.getUID() ); String uid = o.getUID(); if ( serialized.containsKey( uid ) ) { @@ -143,26 +145,26 @@ serialized.remove( uid ); cache.put( uid, o ); - log.debug("done"); + if ( log.isDebugEnabled() ) log.debug( "done" ); } } public void clearData( JRVirtualizable o ) { - if ( log.isDebugEnabled() ) log.debug( "clear object "+o.getUID() ); + if ( log.isDebugEnabled() ) log.debug( "clear object " + o.getUID() ); String uid = o.getUID(); if ( serialized.containsKey( uid ) ) { // remove virtual data fileDispose( o ); serialized.remove( uid ); - log.debug("done"); + if ( log.isDebugEnabled() ) log.debug( "done" ); } } public void virtualizeData( JRVirtualizable o ) { - if ( log.isDebugEnabled() ) log.debug( "virtualize object "+o.getUID() ); + if ( log.isDebugEnabled() ) log.debug( "virtualize object " + o.getUID() ); String uid = o.getUID(); if ( !serialized.containsKey( uid ) ) { @@ -170,7 +172,7 @@ { // virtualize fileSerialize( o ); - log.debug("done"); + if ( log.isDebugEnabled() ) log.debug( "done" ); } catch ( IOException ioe ) { @@ -246,12 +248,15 @@ FileInputStream fis = new FileInputStream( file ); ois = new JBossObjectInputStream( fis ); Object read = ois.readObject(); - if ( log.isDebugEnabled() ) log.debug( "id "+read); + if ( log.isDebugEnabled() ) log.debug( "id " + read ); o.setIdentityData( read ); read = ois.readObject(); - if ( log.isDebugEnabled() ) log.debug( "elements "+read); + if ( log.isDebugEnabled() ) log.debug( "elements " + read ); o.setVirtualData( read ); - if ( o instanceof JRVirtualPrintPage && log.isDebugEnabled() ) log.debug("vpage virtualizer "+((JRVirtualPrintPage)o).getVirtualizer()); + if ( o instanceof JRVirtualPrintPage && log.isDebugEnabled() ) + { + log.debug( "vpage virtualizer " + ( (JRVirtualPrintPage) o ).getVirtualizer() ); + } } finally { Modified: trunk/Uni-d/server/src/main/java/be/unid/reporting/servlet/ReportServlet.java =================================================================== --- trunk/Uni-d/server/src/main/java/be/unid/reporting/servlet/ReportServlet.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/server/src/main/java/be/unid/reporting/servlet/ReportServlet.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -181,7 +181,7 @@ type = req.getParameter( "type" ); username = req.getParameter( "username" ); password = req.getParameter( "password" ); - log.debug( "QUERY: " + req.getQueryString() ); + if ( log.isDebugEnabled() ) log.debug( "QUERY: " + req.getQueryString() ); } else { @@ -210,8 +210,7 @@ locale = new Locale( language ); username = decoder.getString( req, "username" ); password = decoder.getString( req, "password" ); - log.debug( - "MULTIPART: file=" + filename + " type=" + type + " username=" + username + " password=" + password ); + if ( log.isDebugEnabled() ) log.debug( "MULTIPART: file=" + filename + " type=" + type + " username=" + username + " / " + password ); } if ( username == null ) Modified: trunk/Uni-d/server/src/main/java/be/unid/ymport/Servlet.java =================================================================== --- trunk/Uni-d/server/src/main/java/be/unid/ymport/Servlet.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/server/src/main/java/be/unid/ymport/Servlet.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -180,25 +180,25 @@ } catch ( ImportHandlerException ihe ) { - log.debug( ihe, ihe ); + if ( log.isDebugEnabled() ) log.debug( ihe, ihe ); output = ImportServletUtil.failure( lineNumber, ihe.toString() ); try { tx.setRollbackOnly(); } catch ( Exception e ) - {} + {/*ignore*/} } catch ( Exception ex ) { - log.debug( ex, ex ); + if ( log.isDebugEnabled() ) log.debug( ex, ex ); output = ImportServletUtil.failure( lineNumber, "unexpected exception " + ex.toString() ); try { tx.setRollbackOnly(); } catch ( Exception e ) - {} + {/*ignore*/} } finally { Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/binder/MultipleFieldBinderSource.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/binder/MultipleFieldBinderSource.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/binder/MultipleFieldBinderSource.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -52,6 +52,6 @@ if ( index < 0 ) return; List list = (List) super.getValueFromSource(); list.set( index, value ); - log.debug( "set multiple value = " + value + " at index = " + index ); + if ( log.isDebugEnabled() ) log.debug( "set multiple value = " + value + " at index = " + index ); } } Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/binder/ProxyBinderSource.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/binder/ProxyBinderSource.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/binder/ProxyBinderSource.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -37,16 +37,22 @@ public Object getValueFromSource() throws Exception { - log.debug( " -- ProxyBinderSource.getValueFromSource -- name =" + getFieldName() + " value=" + - UnidProxyAccessor.getField( proxy, getFieldName() ) ); + if ( log.isDebugEnabled() ) + { + log.debug( " -- getValueFromSource -- name =" + getFieldName() + " value=" + + UnidProxyAccessor.getField( proxy, getFieldName() ) ); + } return UnidProxyAccessor.getField( proxy, getFieldName() ); } public void setValueToSource( Object value ) throws Exception { - log.debug( " -- ProxyBinderSource.setValueToSource -- name =" + getFieldName() + " class=" + - getFieldClass() + " value=" + value ); + if ( log.isDebugEnabled() ) + { + log.debug( + " -- setValueToSource -- name =" + getFieldName() + " class=" + getFieldClass() + " value=" + value ); + } UnidProxyAccessor.setField( proxy, getFieldName(), getFieldClass(), value ); } } Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/input/unidLinkInput/LinkInputBinderWrapper.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/input/unidLinkInput/LinkInputBinderWrapper.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/input/unidLinkInput/LinkInputBinderWrapper.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -49,9 +49,12 @@ { this.isFakeLink = binder.getFieldDescription().getUpdateField() != null; this.binder = binder; - log.debug( - "LinkInputBinderWrapper<init> - new link wrapper for field = " + binder.getFieldDescription().getName() + - " is fake = " + isFakeLink ); + if ( log.isDebugEnabled() ) + { + log.debug( + "LinkInputBinderWrapper<init> - new link wrapper for field = " + + binder.getFieldDescription().getName() + " is fake = " + isFakeLink ); + } } public String getUoid() @@ -65,9 +68,12 @@ } catch ( Exception e ) { - log.debug( - "LinkInputBinderWrapper.getUoid() - This error should be ignore - it is probably caused by trying to set a calculate/internal/auto field!!! ", - e ); + if ( log.isDebugEnabled() ) + { + log.debug( + "getUoid() - This error should be ignored - " + + "it is probably caused by trying to set a calculate/internal/auto field!!! ", e ); + } } if ( value != null ) { @@ -75,16 +81,22 @@ if ( proxy.getUOID() != null ) this.uoid = proxy.getUOID().getId(); } } - log.debug( "LinkInputBinderWrapper.getUoid() - name = " + binder.getFieldDescription().getName() + - " return uoid = " + uoid ); + if ( log.isDebugEnabled() ) + { + log.debug( "LinkInputBinderWrapper.getUoid() - name = " + + binder.getFieldDescription().getName() + " return uoid = " + uoid ); + } return uoid; } public void setUoid( String uoid_ ) { if ( uoid_ != null && uoid_.equals( "" ) ) uoid_ = null; - log.debug( "LinkInputBinderWrapper.setUoid() - name = " + binder.getFieldDescription().getName() + - " set uoid = " + uoid_ ); + if ( log.isDebugEnabled() ) + { + log.debug( "LinkInputBinderWrapper.setUoid() - name = " + + binder.getFieldDescription().getName() + " set uoid = " + uoid_ ); + } this.uoid = uoid_; UnidProxy proxy = null; if ( uoid != null ) @@ -117,16 +129,24 @@ { log.error( e, e ); } - log.debug( "LinkInputBinderWrapper.getInputBox() - name = " + binder.getFieldDescription().getName() + - " inputBox = " + value + " isFakeLink = " + isFakeLink ); + if ( log.isDebugEnabled() ) + { + log.debug( "LinkInputBinderWrapper.getInputBox() - name = " + + binder.getFieldDescription().getName() + " inputBox = " + value + + " isFakeLink = " + isFakeLink ); + } return value == null ? null : value.toString(); } public void setInputBox( String inputBox ) { this.inputBox = inputBox; - log.debug( "LinkInputBinderWrapper.setInputBox() - name = " + binder.getFieldDescription().getName() + - " inputBox = " + inputBox + " uoid = " + uoid + " isFakeLink = " + isFakeLink ); + if ( log.isDebugEnabled() ) + { + log.debug( "LinkInputBinderWrapper.setInputBox() - name = " + + binder.getFieldDescription().getName() + " inputBox = " + inputBox + + " uoid = " + uoid + " isFakeLink = " + isFakeLink ); + } if ( isFakeLink ) { try Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/input/unidLinkInput/UnidLinkInput.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -225,13 +225,13 @@ private void cleanWrapper() { - log.debug( "UnidLinkInput - clean wrapper " ); + if ( log.isDebugEnabled() ) log.debug( "clean wrapper" ); binderWrapper = null; } public LinkInputActionHandler getLinkInputActionHandler() { - log.debug( "UnidLinkInput - getLinkInputActionHandler : actionHandler = " + actionHandler ); + if ( log.isDebugEnabled() ) log.debug( "getLinkInputActionHandler : actionHandler = " + actionHandler ); if ( actionHandler == null ) { if ( getPage() instanceof LinkInputActionHandlerProvider ) @@ -245,7 +245,7 @@ private void cleanActionHandler() { - log.debug( "UnidLinkInput - clean action handler " ); + if ( log.isDebugEnabled() ) log.debug( "clean action handler" ); actionHandler = null; } @@ -259,7 +259,7 @@ public void finishLoad( IRequestCycle cycle, IPageLoader loader, IComponentSpecification specification ) { super.finishLoad( cycle, loader, specification ); - log.debug( "UnidLinkInput - finishLoad" ); + if ( log.isDebugEnabled() ) log.debug( "finishLoad" ); cleanActionHandler(); } Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/input/unidLinkInput/actionHandler/LinkInputActionHandlerImpl.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/input/unidLinkInput/actionHandler/LinkInputActionHandlerImpl.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/input/unidLinkInput/actionHandler/LinkInputActionHandlerImpl.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -168,7 +168,7 @@ public synchronized void prepareReturnHandler( UnidLinkInput component ) { - log.debug( "LinkInputActionHandlerImpl.prepareReturnHandler()" ); + if ( log.isDebugEnabled() ) log.debug( "prepareReturnHandler()" ); preparedStatement = new PreparedStatement(); preparedStatement.binder = component.getBinder(); preparedStatement.linkTableName = component.getLinkTableName(); @@ -179,7 +179,7 @@ public synchronized void runAdd( UnidLinkInput component ) { - log.debug( "LinkInputActionHandlerImpl.runAdd() " ); + if ( log.isDebugEnabled() ) log.debug( "runAdd() " ); PageParameters params = component.getNavPage().getPageParameters(); params.buildReturnHandler( preparedStatement.binder ); AddPage page = @@ -193,7 +193,7 @@ public synchronized void runSelect( UnidLinkInput component ) { - log.debug( "LinkInputActionHandlerImpl.runSelect() " ); + if ( log.isDebugEnabled() ) log.debug( "runSelect() " ); PageParameters params = component.getNavPage().getPageParameters(); params.buildReturnHandler( preparedStatement.binder ); TableManagerPage page = @@ -208,7 +208,7 @@ public synchronized void runView( UnidLinkInput component ) { - log.debug( "LinkInputActionHandlerImpl.runView() " ); + if ( log.isDebugEnabled() ) log.debug( "runView() " ); String tableName = preparedStatement.linkTableName; UnidProxy proxy = (UnidProxy) preparedStatement.binder.getValue(); component.getNavPage().getPageParameters().buildReturnHandler( preparedStatement.binder ); @@ -223,7 +223,7 @@ public synchronized void runDisabledView( UnidLinkInput component, String uoid, String tableName ) { - log.debug( "LinkInputActionHandlerImpl.runDisabledView() " ); + if ( log.isDebugEnabled() ) log.debug( "runDisabledView() " ); UnidProxy proxy = UnidProxyAccessor.findUoid( tableName, uoid ); component.getNavPage().getPageParameters().clearReturnHandler(); ViewPage page = (ViewPage) component.getNavigationManager() @@ -236,7 +236,7 @@ public synchronized void searchByReferenceStart( UnidLinkInput component ) { - log.debug( "LinkInputActionHandlerImpl.searchByReferenceStart() - value = " + preparedStatement.inputBox ); + if ( log.isDebugEnabled() ) log.debug( "searchByReferenceStart() - value = " + preparedStatement.inputBox ); String selectName = "Unid" + preparedStatement.referenceField + "Start"; String fieldName = preparedStatement.referenceField; String value = preparedStatement.inputBox.substring( 0, preparedStatement.inputBox.length() - 1 ); @@ -245,7 +245,7 @@ public synchronized void searchByDescriptionStart( UnidLinkInput component ) { - log.debug( "LinkInputActionHandlerImpl.searchByDescriptionStart() - value = " + preparedStatement.inputBox ); + if ( log.isDebugEnabled() ) log.debug( "searchByDescriptionStart() - value = " + preparedStatement.inputBox ); String selectName = "Unid" + preparedStatement.descriptionField + "Start"; String fieldName = preparedStatement.descriptionField; String value = preparedStatement.inputBox.substring( 0, preparedStatement.inputBox.length() - 2 ); @@ -254,7 +254,7 @@ public synchronized void searchByDescriptionPart( UnidLinkInput component ) { - log.debug( "LinkInputActionHandlerImpl.searchByDescriptionPart() - value = " + preparedStatement.inputBox ); + if ( log.isDebugEnabled() ) log.debug( "searchByDescriptionPart() - value = " + preparedStatement.inputBox ); String selectName = "Unid" + preparedStatement.descriptionField + "Part"; String fieldName = preparedStatement.descriptionField; String value = preparedStatement.inputBox.substring( 0, preparedStatement.inputBox.length() - 2 ); @@ -265,8 +265,11 @@ FieldType fieldType, String value ) { - log.debug( "LinkInputActionHandlerImpl.searchBy() - selectName = " + selectName + " fieldName = " + fieldName + - " tableName = " + preparedStatement.linkTableName + " value = " + value ); + if ( log.isDebugEnabled() ) + { + log.debug( "searchBy() - selectName = " + selectName + " fieldName = " + fieldName + + " tableName = " + preparedStatement.linkTableName + " value = " + value ); + } component.getNavPage().getPageParameters().buildReturnHandler( preparedStatement.binder ); SelectPage page = (SelectPage) component.getNavigationManager() .getForwardPage( component.getNavPage(), "SelectPage", true, true ); Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/input/unidMultipleField/UnidMultipleField.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/input/unidMultipleField/UnidMultipleField.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/input/unidMultipleField/UnidMultipleField.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -152,14 +152,14 @@ public void addMultipleValues( String fieldName ) { - log.debug( "add more multiple values no= " + getAddSize() ); + if ( log.isDebugEnabled() ) log.debug( "add more multiple values no= " + getAddSize() ); Collection list = getValues( fieldName ); for ( int i = 0; i < getAddSize(); i++ ) list.add( null ); } public void removeMultipleValues( String fieldName ) { - log.debug( "remove indexes " + getRemoveList() ); + if ( log.isDebugEnabled() ) log.debug( "remove indexes " + getRemoveList() ); // parse list string if ( getRemoveList() == null ) return; String str = getRemoveList().trim(); Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/navigationHelper/NavigationHelper.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/navigationHelper/NavigationHelper.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/navigation/navigationHelper/NavigationHelper.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -73,11 +73,18 @@ public void submitLinkBack( IRequestCycle iRequestCycle, String id, String destId ) { - log.debug( "--------------- NavigationHelper : on link submitLinkBack id = " + id + " destId = " + destId ); + if ( log.isDebugEnabled() ) + { + log.debug( "--------------- NavigationHelper : on link submitLinkBack id = " + id + " destId = " + destId ); + } NavigationablePageImpl page = (NavigationablePageImpl) getNavigationManager().back( iRequestCycle, destId, false ); - log.debug( - "--------------- NavigationHelper : on link submitLinkBack - will activate page = " + page.getPageName() ); + if ( log.isDebugEnabled() ) + { + log.debug( + "--------------- NavigationHelper : on link submitLinkBack - will activate page = " + + page.getPageName() ); + } iRequestCycle.activate( page ); } Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/SelectObject.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/SelectObject.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/SelectObject.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -62,7 +62,10 @@ public SelectObject( String tableName, String finderName ) { - log.debug( "new selector object for table = " + tableName + " finder = " + finderName ); + if ( log.isDebugEnabled() ) + { + log.debug( "new selector object for table = " + tableName + " finder = " + finderName ); + } this.tableName = tableName; this.finderName = finderName; this.selectDescription = DescriptionFactory.getSelectDescription( tableName, finderName ); @@ -86,7 +89,7 @@ throws IllegalAccessException, NoSuchMethodException, InvocationTargetException, ClassNotFoundException, InstantiationException { - log.debug( "call find" ); + if ( log.isDebugEnabled() ) log.debug( "call find" ); Class[] paramClass = getParameterClasses(); Object[] paramValues = getParameterValues(); return UnidProxyAccessor.find( tableName, finderName, paramClass, paramValues ); @@ -98,8 +101,11 @@ ArrayList<GMSelection> selections = selectDescription.getSelections(); for ( GMSelection selection : selections ) { - log.debug( " ---- get value for find name = " + selection.getName() + " - value =" + - getParameterValue( selection.getName(), UnidProxyAccessor.getFieldType( selection ) ) ); + if ( log.isDebugEnabled() ) + { + log.debug( " ---- get value for find name = " + selection.getName() + " - value =" + + getParameterValue( selection.getName(), UnidProxyAccessor.getFieldType( selection ) ) ); + } Object value = getParameterValue( selection.getName(), UnidProxyAccessor.getFieldType( selection ) ); if ( selection.getFieldType().isStringBased() && value == null ) value = ""; values.add( value ); @@ -116,8 +122,11 @@ for ( GMSelection selection : selections ) { - log.debug( " ---- get class for find name = " + selection.getName() + " - class =" + - UnidProxyAccessor.getFieldClass( selection ) ); + if ( log.isDebugEnabled() ) + { + log.debug( " ---- get class for find name = " + selection.getName() + " - class =" + + UnidProxyAccessor.getFieldClass( selection ) ); + } classes.add( UnidProxyAccessor.getFieldClass( selection ) ); } if ( selectDescription.hasLimit() ) classes.add( int.class ); @@ -188,14 +197,20 @@ public Object getParameterValue( String paramName, FieldType type ) { - log.debug( "get find parameter value key = " + buildKey( paramName, type ) + " value = " + - parameters.get( buildKey( paramName, type ) ) ); + if ( log.isDebugEnabled() ) + { + log.debug( "get find parameter value key = " + buildKey( paramName, type ) + " value = " + + parameters.get( buildKey( paramName, type ) ) ); + } return parameters.get( buildKey( paramName, type ) ); } public void setParameterValue( String paramName, FieldType type, Object value ) { - log.debug( "set find parameter value key = " + buildKey( paramName, type ) + " value = " + value ); + if ( log.isDebugEnabled() ) + { + log.debug( "set find parameter value key = " + buildKey( paramName, type ) + " value = " + value ); + } parameters.put( buildKey( paramName, type ), value ); } Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/unidSelect/UnidSelect.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/unidSelect/UnidSelect.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/unidSelect/UnidSelect.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -120,7 +120,7 @@ public void runSelect( IRequestCycle cycle ) { - log.debug( "submit runSelect = " + getSelectObject().toString() ); + if ( log.isDebugEnabled() ) log.debug( "submit runSelect = " + getSelectObject().toString() ); setAutoRunSelect( true ); } Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/unidSelectResults/UnidSelectResults.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/unidSelectResults/UnidSelectResults.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/select/unidSelectResults/UnidSelectResults.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -275,7 +275,10 @@ // check page number if ( pageNumber < 0 ) pageNumber = 0; - log.debug( "UnidSelectResults.find - start index = " + indexStart + " end index = " + indexEnd ); + if ( log.isDebugEnabled() ) + { + log.debug( "UnidSelectResults.find - start index = " + indexStart + " end index = " + indexEnd ); + } List<UnidProxy> resultList = new ArrayList<UnidProxy>( indexEnd - indexStart ); for ( int i = indexStart; i < indexEnd ; i++ ) resultList.add( allList.get( i ) ); // make sorting @@ -300,13 +303,16 @@ public void changePage( int pageNumber ) { - log.debug( "UnidSelectResults.changePage - get page no = " + pageNumber ); + if ( log.isDebugEnabled() ) log.debug( "UnidSelectResults.changePage - get page no = " + pageNumber ); find( pageNumber ); } public void sortBy( String fieldName, boolean ascending ) { - log.debug( "UnidSelectResults.sortBy - sort by field = " + fieldName + " order ascending : " + ascending ); + if ( log.isDebugEnabled() ) + { + log.debug( "UnidSelectResults.sortBy - sort by field = " + fieldName + " order ascending : " + ascending ); + } setSortField( fieldName ); setSortAscending( ascending ); find( getDisplayedPageNumber() ); @@ -314,7 +320,7 @@ public void remove( String uoid ) { - log.debug( "UnidSelectResults.remove - remove proxy uoid = " + uoid ); + if ( log.isDebugEnabled() ) log.debug( "UnidSelectResults.remove - remove proxy uoid = " + uoid ); try { UnidProxyAccessor.findUoid( getTableName(), uoid ).removeEntityBean(); Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/userAdmin/configList/ConfigList.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/userAdmin/configList/ConfigList.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/components/userAdmin/configList/ConfigList.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -229,7 +229,7 @@ } catch ( Exception e ) { - log.debug( e, e ); + if ( log.isDebugEnabled() ) log.debug( e, e ); setError( getTranslatedExceptionMessage( e ) ); return null; } Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationManager.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationManager.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationManager.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -12,7 +12,7 @@ * @author <a href="mailto:an...@pa...">Andrei Chiritescu</a> * @version $Revision$ */ -public class NavigationManager<PP extends PageParameters, NS extends NavigationStack<PP> ,PAGE extends NavigationablePage<PP, NS>> +public class NavigationManager<PP extends PageParameters, NS extends NavigationStack<PP>, PAGE extends NavigationablePage<PP, NS>> { private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger( NavigationManager.class ); @@ -26,7 +26,9 @@ { keepAliveRefreshTime = ResourceUtil.getConfigInt( ConfigurationKeys.KEEP_ALIVE_REFRESH_TIME ); } - catch ( Exception e ) {} + catch ( Exception e ) + { + } keepAliveRefreshTime = Math.max( keepAliveRefreshTime, 30000 ); // at least 30 sec container = new NavigationStackContainer<PP, NS>( keepAliveRefreshTime ); @@ -53,11 +55,17 @@ private PP lookupReturnParam( NavigationablePage fromPage ) { - log.debug( " ---- hasReturnPage - look for return point for id : " + fromPage.getClientId() ); + if ( log.isDebugEnabled() ) + { + log.debug( " ---- hasReturnPage - look for return point for id : " + fromPage.getClientId() ); + } StackSearchResults<PP, NS> result = container.searchStack( fromPage.getClientId(), false ); - log.debug( " ---- hasReturnPage - look for return point result " + ( result == null ) + - " has return point = " + - ( ( result == null ) ? "false" : result.stack.peekReturnPoint() ) ); + if ( log.isDebugEnabled() ) + { + log.debug( " ---- hasReturnPage - look for return point result " + ( result == null ) + + " has return point = " + + ( ( result == null ) ? "false" : result.stack.peekReturnPoint() ) ); + } if ( result == null ) return null; return result.stack.peekReturnPoint(); } @@ -77,8 +85,11 @@ public void returnTo( NavigationablePage toPage, PageParameters fromParams ) { - log.debug( "---- returnTo fromPage=" + fromParams.getPageName() + " topage=" + - ( toPage == null ? "null" : toPage.getPageName() ) ); + if ( log.isDebugEnabled() ) + { + log.debug( "---- returnTo fromPage=" + fromParams.getPageName() + " topage=" + + ( toPage == null ? "null" : toPage.getPageName() ) ); + } if ( toPage == null ) return; // now handle the parameters if ( toPage.getPageParameters().getReturnHandler() != null ) @@ -93,8 +104,11 @@ public <T extends NavigationablePage> T getForwardPage( PAGE fromPage, String toPageName, boolean useSameStack, boolean returnPoint ) { - log.debug( "**** getForwardPage fromPage=" + fromPage.getPageName() + " topage=" + toPageName + - " isreturnPoint=" + returnPoint + " useSameStack=" + useSameStack ); + if ( log.isDebugEnabled() ) + { + log.debug( "**** getForwardPage fromPage=" + fromPage.getPageName() + " topage=" + toPageName + + " isreturnPoint=" + returnPoint + " useSameStack=" + useSameStack ); + } if ( returnPoint ) fromPage.markAsReturnPoint(); // save our page (this is done here because the forward page may be the same with the curent page) save( fromPage, true ); @@ -109,7 +123,7 @@ public void forward( NavigationablePage toPage ) { - log.debug( "---- forward topage=" + toPage.getPageName() ); + if ( log.isDebugEnabled() ) log.debug( "---- forward topage=" + toPage.getPageName() ); toPage.getRequestCycle().activate( toPage ); } @@ -131,13 +145,19 @@ protected PAGE load( IRequestCycle requestCycle, PAGE page, String id, boolean newStack, boolean returnAction, boolean peekLoad ) { - log.debug( "load - stack for id=" + id + " newStack=" + newStack + " returnAction=" + returnAction + - " peekLoad=" + peekLoad ); + if ( log.isDebugEnabled() ) + { + log.debug( "load - stack for id=" + id + " newStack=" + newStack + + " returnAction=" + returnAction + " peekLoad=" + peekLoad ); + } // look for stack StackSearchResults<PP, NS> result = container.searchStack( id, false ); if ( result == null ) { - log.debug( "NavigationManager.load() - Stack not found for id = " + id + " look deeper " ); + if ( log.isDebugEnabled() ) + { + log.debug( "NavigationManager.load() - Stack not found for id = " + id + " look deeper " ); + } result = container.searchStack( id, true ); if ( result == null ) { @@ -151,7 +171,7 @@ } } - log.debug( "load - found stack = " + result.stack ); + if ( log.isDebugEnabled() ) log.debug( "load - found stack = " + result.stack ); // clone stack // if required a new stack or // if the parameter the we want to load is not the top element(this may mean that its a back in stack action) but without beeing a returnAction @@ -169,12 +189,12 @@ List<PP> list = stack.values(); for ( int i = 0; i < list.size(); i++ ) list.get( i ).setClientId( id + i ); container.addStack( stack ); - log.debug( "load - cloned stack " ); + if ( log.isDebugEnabled() ) log.debug( "load - cloned stack " ); } else*/ if ( !result.isTopElem ) // if not top elem remove the extra stuff { - log.debug( "load - stack found but not top elem(remove all elems above) " ); + if ( log.isDebugEnabled() ) log.debug( "load - stack found but not top elem(remove all elems above) " ); container.removeStack( stack ); int removeNumber = stack.size() - 1 - result.index; while ( removeNumber > 0 ) @@ -185,7 +205,7 @@ container.addStack( stack ); } - log.debug( "load - stack in use:" + stack ); + if ( log.isDebugEnabled() ) log.debug( "load - stack in use:" + stack ); // ok ... now that we have the stack get the page for it's id(if necessary) if ( page == null ) page = (PAGE) requestCycle.getPage( stack.peek().getPageName() ); @@ -193,7 +213,7 @@ // now peek or pop (as required) // peek is to be used for pages that just want to load the parameters only for manipulation // (usualy links which want to restore the former params before doing any calculations/forward) - log.debug( "load - use peek : " + peekLoad ); + if ( log.isDebugEnabled() ) log.debug( "load - use peek : " + peekLoad ); PP pp = peekLoad ? stack.peek() : pop( stack ); // set page's clientId @@ -205,15 +225,21 @@ page.getPageParameters().setReturnPoint( false ); //if ( returnAction ) pp.setReturnPoint( false ); - log.debug( "end load - stack for page=" + page.getPageName() + " and id=" + page.getClientId() ); + if ( log.isDebugEnabled() ) + { + log.debug( "end load - stack for page=" + page.getPageName() + " and id=" + page.getClientId() ); + } return page; } public PAGE save( PAGE page, boolean overwrite ) { - log.debug( " save - stack for page=" + page.getPageName() + " and id=" + page.getClientId() - + " source stack : " + page.getSourceStackId() + " isforward =" + - page.isMarkedAsReturnPoint() ); + if ( log.isDebugEnabled() ) + { + log.debug( " save - stack for page=" + page.getPageName() + " and id=" + page.getClientId() + + " source stack : " + page.getSourceStackId() + " isforward =" + + page.isMarkedAsReturnPoint() ); + } boolean generateNewId = page.getClientId() == null; StackSearchResults<PP, NS> result = null; // first try to use the source stack @@ -229,14 +255,14 @@ NS stack; if ( result == null ) { - log.debug( " save - stack not found build new" ); + if ( log.isDebugEnabled() ) log.debug( " save - stack not found build new" ); stack = buildNewNavigationStack(); } else { stack = result.stack; boolean pop = overwrite && stack.size() > 0 && stack.peek().getClientId().equals( page.getClientId() ); - log.debug( " save - owner stack found - make pop " + pop ); + if ( log.isDebugEnabled() ) log.debug( " save - owner stack found - make pop " + pop ); // if overwrite do a pop (also before doing it make cetain the overwrite is correct) if ( pop ) { @@ -257,12 +283,15 @@ params.setPageTitle( ( (UnidBasePage) page ).getTitle() ); // set the new ids String newId = generateNewId ? generateNewId() : page.getClientId(); - if ( generateNewId ) log.debug( " generated new Id = " + newId ); + if ( generateNewId && log.isDebugEnabled() ) log.debug( " generated new Id = " + newId ); params.setClientId( newId ); page.setClientId( newId ); // push it push( stack, params ); - log.debug( " end save - stack for page=" + page.getPageName() + " and id=" + newId ); + if ( log.isDebugEnabled() ) + { + log.debug( " end save - stack for page=" + page.getPageName() + " and id=" + newId ); + } return page; } Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationStackContainer.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationStackContainer.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationStackContainer.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -115,7 +115,10 @@ { while ( !map.isEmpty() ) { - log.debug( "------------- StackGarbageCollector - another garbage check ------------- " ); + if ( log.isDebugEnabled() ) + { + log.debug( "------------- StackGarbageCollector - another garbage check ------------- " ); + } long expireTime = System.currentTimeMillis() - runningIntervalForGC; long nextCheck = runningIntervalForGC; @@ -126,8 +129,11 @@ if ( delta < 0 ) { int deleteCount = stack.incDeleteCount(); - log.debug( "------------- StackGarbageCollector - strike " + deleteCount + - " for stack ------------- " + stack ); + if ( log.isDebugEnabled() ) + { + log.debug( "------------- StackGarbageCollector - strike " + deleteCount + + " for stack ------------- " + stack ); + } // give the stack at least 4 chances to keep alive if ( deleteCount >= 4 ) removeList.add( stack ); } @@ -135,13 +141,20 @@ // remove the stacks for ( NS stack : removeList ) { - log.debug( "------------- StackGarbageCollector - remove stack : ------------- " + stack ); + if ( log.isDebugEnabled() ) + { + log.debug( "------------- StackGarbageCollector - remove stack : ------------- " + stack ); + } removeStack( stack ); } // next check should be at least 30 sec //nextCheck = Math.max( nextCheck, 30000 ); - log.debug( - "------------- StackGarbageCollector - now sleep for " + nextCheck / 1000 + " sec ------------- " ); + if ( log.isDebugEnabled() ) + { + log.debug( + "------------- StackGarbageCollector - now sleep for " + nextCheck / 1000 + + " sec ------------- " ); + } // now sleep until the next time while ( nextCheck > 0 ) { @@ -151,7 +164,7 @@ Thread.sleep( nextCheck ); } catch ( Exception e ) - {} + {/*ignore*/} finally { nextCheck -= ( System.currentTimeMillis() - time ); @@ -159,7 +172,10 @@ } } NavigationStackContainer.this.garbageCollector = null; //cleanup - log.debug( "------------- StackGarbageCollector - garbage check thread stopped ------------- " ); + if ( log.isDebugEnabled() ) + { + log.debug( "------------- StackGarbageCollector - garbage check thread stopped ------------- " ); + } } } } Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationStackImpl.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationStackImpl.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationStackImpl.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -59,19 +59,19 @@ public PP peekReturnPoint() { - for ( int i = size() - 1; i >= 0; i-- ) if ( stack.get( i ).isReturnPoint() ) return stack.get( i ); + for ( int i = size() - 1; i >= 0 ; i-- ) if ( stack.get( i ).isReturnPoint() ) return stack.get( i ); return null; } public int searchById( String id ) { - log.debug( "search by id = " + id ); - for ( int i = 0; i < stack.size(); i++ ) + if ( log.isDebugEnabled() ) log.debug( "search by id = " + id ); + for ( int i = 0; i < stack.size() ; i++ ) { PP param = stack.get( i ); if ( param.getClientId().equals( id ) ) return i; } - log.debug( "search not found for id = " + id ); + if ( log.isDebugEnabled() ) log.debug( "search not found for id = " + id ); return -1; } @@ -91,11 +91,11 @@ return ++deleteCount; } - public <T extends NavigationStack<PP>>T clone( T navStack, int endIndex ) + public <T extends NavigationStack<PP>> T clone( T navStack, int endIndex ) { if ( endIndex < 0 || endIndex >= size() ) endIndex = size() - 1; if ( navStack == null ) navStack = (T) newInstance(); - for ( int i = 0; i <= endIndex; i++ ) + for ( int i = 0; i <= endIndex ; i++ ) { PP param = stack.get( i ); navStack.push( (PP) param.clone( null ) ); Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationablePageImpl.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationablePageImpl.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/NavigationablePageImpl.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -64,7 +64,10 @@ public void attach( IEngine iEngine, IRequestCycle iRequestCycle ) { super.attach( iEngine, iRequestCycle ); - log.debug( "---- page attach - name = " + getPageName() + " - clientId = " + getClientId() ); + if ( log.isDebugEnabled() ) + { + log.debug( "---- page attach - name = " + getPageName() + " - clientId = " + getClientId() ); + } // init initNavigationablePage(); } @@ -72,7 +75,10 @@ @Override public void detach() { - log.debug( "---- page detach - name = " + getPageName() + " - clientId = " + getClientId() ); + if ( log.isDebugEnabled() ) + { + log.debug( "---- page detach - name = " + getPageName() + " - clientId = " + getClientId() ); + } super.detach(); // clean up cleanNavigationablePage(); @@ -80,7 +86,8 @@ public void initNavigationablePage() { - /*if ( pageParameters == null )*/ pageParameters = buildNewPageParameters(); + /*if ( pageParameters == null )*/ + pageParameters = buildNewPageParameters(); setClientId( null ); this.returnPoint = false; this.sourceStackId = null; @@ -106,7 +113,7 @@ if ( !iRequestCycle.isRewinding() ) getNavigationManager().save( this, true ); // render the page super.renderPage( iMarkupWriter, iRequestCycle ); - log.debug( "********Manager Status After Render Page : " + getNavigationManager() ); + if ( log.isDebugEnabled() ) log.debug( "********Manager Status After Render Page : " + getNavigationManager() ); } public void loadParameters( PP parameters ) @@ -133,7 +140,7 @@ { NS stack = getNavigationManager().searchStack( id, false ); if ( stack != null ) stack.keepAlive(); - log.debug( "++++++++++++++ keep alive id = " + id + " for stack : " + stack ); + if ( log.isDebugEnabled() ) log.debug( "++++++++++++++ keep alive id = " + id + " for stack : " + stack ); } public void back() Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/ReturnHandlerField.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/ReturnHandlerField.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/navigation/ReturnHandlerField.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -28,13 +28,13 @@ public void handleReturn( NavigationablePage toPage, PageParameters currentParmas, PageParameters fromParams ) { - log.debug( " --- handleReturn fromParams : " + fromParams ); + if ( log.isDebugEnabled() ) log.debug( " --- handleReturn fromParams : " + fromParams ); if ( fromParams instanceof HasProxyParameter ) { HasProxyParameter receivedParams = (HasProxyParameter) fromParams; if ( currentParmas instanceof HasProxyParameter && binder.getSource() instanceof ProxyBinderSource ) { - log.debug( " --- handleReturn for ProxyBinderSource " ); + if ( log.isDebugEnabled() ) log.debug( " --- handleReturn for ProxyBinderSource " ); ProxyBinderSource proxyBinderSource = (ProxyBinderSource) binder.getSource(); // save old proxy to set it back .. just in case UnidProxy proxyOld = proxyBinderSource.getProxy(); @@ -44,7 +44,7 @@ } else if ( currentParmas instanceof SelectPageParams && binder.getSource() instanceof SelectBinderSource ) { - log.debug( " --- handleReturn for SelectBinderSource " ); + if ( log.isDebugEnabled() ) log.debug( " --- handleReturn for SelectBinderSource " ); SelectBinderSource selectBinderSource = (SelectBinderSource) binder.getSource(); // save old SelectObject to set it back .. just in case SelectObject selectObjectOld = selectBinderSource.getSelectObject(); @@ -54,7 +54,7 @@ } else if ( currentParmas instanceof ActionPageParams && binder.getSource() instanceof ActionBinderSource ) { - log.debug( " --- handleReturn for ActionBinderSource " ); + if ( log.isDebugEnabled() ) log.debug( " --- handleReturn for ActionBinderSource " ); ActionBinderSource actionBinderSource = (ActionBinderSource) binder.getSource(); // save old ActionObject to set it back .. just in case ActionObject actionObjectOld = actionBinderSource.getActionObject(); @@ -64,7 +64,7 @@ } else { - log.debug( " --- handleReturn for any source source = " + toString( binder.getSource() ) ); + if ( log.isDebugEnabled() ) log.debug( " --- handleReturn for any source source = " + toString( binder.getSource() ) ); binder.setValue( receivedParams.getProxy() ); } } Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/masterDetail/TableMasterDetailPageParameters.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/masterDetail/TableMasterDetailPageParameters.java 2006-11-13 12:00:31 UTC (rev 3103) +++ trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/masterDetail/TableMasterDetailPageParameters.java 2006-11-13 12:03:46 UTC (rev 3104) @@ -84,14 +84,17 @@ @Override public void handleReturn( NavigationablePage toPage, PageParameters currentParmas, PageParameters fromParams ) { - log.debug( " --- handleReturn TableMasterDetailReturnHandler - fromParams : " + fromParams ); - log.debug( " --- handleReturn TableMasterDetailReturnHandler - currentParmas : " + currentParmas ); + if ( log.isDebugEnabled() ) + { + log.debug( " --- handleReturn TableMasterDetailReturnHandler - fromParams : " + fromParams ); + log.debug( " --- handleReturn TableMasterDetailReturnHandler - currentParmas : " + currentParmas ); + } if ( fromParams instanceof HasProxyParameter ) { HasProxyParameter receivedParams = (HasProxyParameter) fromParams; if ( binder.getSource() instanceof ProxyBinderSource ) { - log.debug( + if ( log.isDebugEnabled() ) log.debug( " --- handleReturn TableMasterDetailReturnHandler class = " + currentParmas.getClass() ); ProxyBinderSource proxyBinderSource = (ProxyBinderSource) binder.getSource(); UnidProxy newProxy = Modified: trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/tableManager/TableManagerPage.java =================================================================== --- trunk/Uni-d/tapestry/src/main/java/be/unid/tapestry/pages/tableManager/Ta... [truncated message content] |