diff --git a/RELEASENOTES.txt b/RELEASENOTES.txt new file mode 100755 index 0000000..ea8aef6 --- /dev/null +++ b/RELEASENOTES.txt @@ -0,0 +1,2 @@ +Release 1.4 adds an 'order' element as a possible child of the 'list' element, in order to specify +the default order of lists. Otherwise unchanged from 1.3. \ No newline at end of file diff --git a/schemas/adl-1.4.dtd b/schemas/adl-1.4.dtd index 3602c78..868d1cc 100755 --- a/schemas/adl-1.4.dtd +++ b/schemas/adl-1.4.dtd @@ -1,6 +1,6 @@ - + @@ -13,7 +13,7 @@ @@ -477,7 +477,7 @@ that we can allow HTML block level entities within content elements --> - + diff --git a/transforms/adl2canonical.xslt b/transforms/adl2canonical.xslt index 1dca531..d7482e0 100755 --- a/transforms/adl2canonical.xslt +++ b/transforms/adl2canonical.xslt @@ -20,13 +20,13 @@ explicitly state the permission, even if it is 'none'. $Author: sb $ - $Revision: 1.8 $ - $Date: 2009-04-30 17:04:00 $ + $Revision: 1.9 $ + $Date: 2010-01-12 17:20:17 $ --> @@ -74,7 +74,7 @@ * THIS FILE IS AUTOMATICALLY GENERATED AND SHOULD NOT * BE MANUALLY EDITED. * - * Generated using adl2canonical.xslt + * Generated using adl2canonical.xslt * *************************************************************************** diff --git a/transforms/adl2controllerclasses.xslt b/transforms/adl2controllerclasses.xslt index 88ccfc0..b5eb1d7 100755 --- a/transforms/adl2controllerclasses.xslt +++ b/transforms/adl2controllerclasses.xslt @@ -9,15 +9,15 @@ Transform ADL into (partial) controller classes $Author: sb $ - $Revision: 1.43 $ - $Date: 2009-05-12 15:43:18 $ + $Revision: 1.44 $ + $Date: 2010-01-12 17:20:17 $ --> @@ -72,7 +72,7 @@ // // Automatically generated abstract super class for controllers for the // application; generated using - // adl2controllerclasses.xslt version + // adl2controllerclasses.xslt version // // // @@ -182,7 +182,7 @@ // // Controller for auto-generated forms for editing s // Automatically generated from application description using - // adl2controllerclasses.xslt version + // adl2controllerclasses.xslt version // // This file is automatically generated; DO NOT EDIT IT. // @@ -677,10 +677,8 @@ } /* if ( ! HasNoErrors()) */ ( record); } - - - + /// <summary> /// Actually delete the selected record /// </summary> @@ -726,77 +724,9 @@ } + - - - - /// <summary> - /// list all instances of this entity to allow the user to select one for editing - /// this method invokes the default list view - which is probably what you want unless - /// you've a special reason for doing something different - /// </summary> - public void InternalShowList() - { - InternalShowList( ""); - } - - /// <summary> - /// list all instances of this entity to allow the user to select one for editing - /// </summary> - /// <param name="view">The name of the list view to show</param> - public void InternalShowList( String view) - { - AssertUserCanRead(); - ISession hibernator = GetDBSession(); - - ICriteria search = - hibernator.CreateCriteria(typeof()); - Boolean withSearchCriteria = false; - - - - - - - - - - - - - if ( ! String.IsNullOrEmpty( Params[ ""])) { - search - - Params[""] - ; - PropertyBag[""] = Params[ ""]; - withSearchCriteria = true; - } - - - - - search.AddOrder(); - - - IList<> instances = search.List<>(); - - /* bug 2921: suppress pagination when searching, as we can't fold the search params into the pagination */ - /* if no instances, set showRecords to one else we get a division by zero error */ - int showRecords = instances.Count > 0? instances.Count: 1; - - if ( ! withSearchCriteria) { - showRecords = ; - } - - PropertyBag["instances"] = - PaginationHelper.CreatePagination( this, instances, showRecords); - - RenderViewWithFailover(view + ".vm", view + ".auto.vm"); - } - - - /// <summary> + /// <summary> /// Check whether values for all my keys are available in the form fields /// </summary> protected bool AllKeys() { @@ -1015,11 +945,80 @@ /// this method invokes the named view. /// </summary> public void () - { - InternalShowList( ""); - } + { + AssertUserCanRead(); + + string view = ""; + ISession hibernator = GetDBSession(); + ICriteria search = + hibernator.CreateCriteria(typeof()); + Boolean withSearchCriteria = false; - + + + + + + + + + /* */ + + + + + + if ( ! String.IsNullOrEmpty( Params[ ""])) { + search + + + Params[""] + + ; + PropertyBag[""] = Params[ ""]; + withSearchCriteria = true; + } + + + + + + + /* explicit ordering */ + + + + /* no explicit ordering */ + + search.AddOrder(); + + + + + IList<> instances = search.List<>(); + + /* if no instances, set showRecords to one else we get a division by zero error */ + int showRecords = instances.Count > 0? instances.Count: 1; + + if ( ! withSearchCriteria) { + showRecords = ; + } + + PropertyBag["instances"] = + PaginationHelper.CreatePagination( this, instances, showRecords); + + RenderViewWithFailover(view + ".vm", view + ".auto.vm"); + } + + + + + search.AddOrder( new Order( "", + + false + true + )); + /* */ @@ -1102,22 +1101,22 @@ - - /* produce a list of to populate the select for */ + + /* produce a list of to populate the select for */ - + - - /* produce a list of to populate the LHS of the shuffle for */ + + /* produce a list of to populate the LHS of the shuffle for */ - + - - /* produce a list of to populate the multi-select for */ + + /* produce a list of to populate the multi-select for */ - + @@ -1133,11 +1132,8 @@ /* there's no way I can find of producing a set of just those entities * we'll need menus for. So we set up variables for all the menus we might * need, and then only instantiate those we do need. */ - - - + + @@ -1278,7 +1274,7 @@ ADL: Error: properties of type cannot yet be used in equality tests - + ) @@ -1294,11 +1290,11 @@ - Expression.Like( "", "%"++"%") + Expression.Like( "", "%"++"%") /* match to four significant places */ - Expression.Between( "", + Expression.Between( "", Double.Parse( ) * 1.0001, Double.Parse( ) * 0.9999) diff --git a/transforms/adl2documentation.xslt b/transforms/adl2documentation.xslt index 31da60d..454e113 100755 --- a/transforms/adl2documentation.xslt +++ b/transforms/adl2documentation.xslt @@ -1,8 +1,8 @@ diff --git a/transforms/adl2entityclasses.xslt b/transforms/adl2entityclasses.xslt index 5effa92..dc522f9 100755 --- a/transforms/adl2entityclasses.xslt +++ b/transforms/adl2entityclasses.xslt @@ -8,8 +8,8 @@ Transform ADL into C# entity classes $Author: sb $ - $Revision: 1.26 $ - $Date: 2009-05-08 16:27:24 $ + $Revision: 1.27 $ + $Date: 2010-01-12 17:20:17 $ --> @@ -138,7 +138,7 @@ * * * - * Generated using adl2hibernate.xslt revision + * Generated using adl2hibernate.xslt revision * *************************************************************************** diff --git a/transforms/adl2mssql.xslt b/transforms/adl2mssql.xslt index 6586742..80d3257 100755 --- a/transforms/adl2mssql.xslt +++ b/transforms/adl2mssql.xslt @@ -1,7 +1,7 @@ @@ -112,7 +112,7 @@ -- -- -- Database for application version - -- Generated for MS-SQL 2000+ using adl2mssql.xslt + -- Generated for MS-SQL 2000+ using adl2mssql.xslt -- THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT IT. -- -- diff --git a/transforms/adl2views.xslt b/transforms/adl2views.xslt index 2c27b37..ae0d729 100755 --- a/transforms/adl2views.xslt +++ b/transforms/adl2views.xslt @@ -1,7 +1,7 @@ @@ -1075,7 +1075,7 @@ || ) - Suppressing pagination in favour of search + (Suppressing pagination in favour of search) #else #if($instances.HasFirst) @@ -1137,7 +1137,7 @@ ought to be replaced with a single template, but that template proves to be extremely hard to get right --> - +
@@ -1151,11 +1151,11 @@ - + - +
--