A number of very minor fixes:

(1) when generating constructors, generate a reverence for the StylesHelper, as it is used in views we generate.
(2) when generating lists, don't layout columns whose contents are themselves lists.
This commit is contained in:
sb 2009-01-28 12:10:02 +00:00
parent 6ff5d773fa
commit ee4ae42fc4
2 changed files with 101 additions and 79 deletions

View file

@ -9,8 +9,8 @@
Transform ADL into (partial) controller classes
$Author: sb $
$Revision: 1.22 $
$Date: 2008-10-31 13:10:22 $
$Revision: 1.23 $
$Date: 2009-01-28 12:10:02 $
-->
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
@ -67,7 +67,7 @@
//
// Automatically generated abstract super class for controllers for the
// <xsl:value-of select="/adl:application/@name"/> application; generated using
// adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.22 $', 10)"/>
// adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.23 $', 10)"/>
//
// <xsl:value-of select="/adl:application/@revision"/>
//
@ -135,7 +135,7 @@
//
// Controller for auto-generated forms for editing <xsl:value-of select="@name"/>s
// Automatically generated from application description using
// adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.22 $', 10)"/>
// adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.23 $', 10)"/>
//
// This file is automatically generated; DO NOT EDIT IT.
//
@ -180,6 +180,7 @@
Rescue("<xsl:value-of select="$rescue-name"/>"),
</xsl:if>
ControllerDetails("<xsl:value-of select="@name"/>", Area = "<xsl:value-of select="$area-name"/>"),
Helper(typeof(StylesHelper), "StylesHelper"),
Helper(typeof(<xsl:value-of select="concat( @name, 'FieldHelper')"/>), "<xsl:value-of select="concat( @name, 'FieldHelper')"/>")
]
public partial class <xsl:value-of select="concat( @name, 'Controller')"/> : <xsl:value-of select="concat( 'Abstract', /adl:application/@name, 'Controller')"/> {

View file

@ -13,8 +13,8 @@
Transform ADL into velocity view templates
$Author: sb $
$Revision: 1.16 $
$Date: 2008-10-31 14:35:06 $
$Revision: 1.17 $
$Date: 2009-01-28 12:10:02 $
-->
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
Whitespace (or lack of it) is significant! -->
@ -124,7 +124,7 @@
Auto generated Velocity maybe-delete form for <xsl:value-of select="@name"/>,
generated from ADL.
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.16 $', 10)"/>
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.17 $', 10)"/>
</xsl:comment>
<xsl:call-template name="maybe-delete">
<xsl:with-param name="entity" select="."/>
@ -161,7 +161,7 @@
Auto generated Velocity maybe-delete form for <xsl:value-of select="@name"/>,
generated from ADL.
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.16 $', 10)"/>
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.17 $', 10)"/>
<xsl:value-of select="/adl:application/@revision"/>
</xsl:comment>
@ -244,7 +244,7 @@
Auto generated Velocity <xsl:value-of select="@name"/> form for <xsl:value-of select="ancestor::adl:entity/@name"/>,
generated from ADL.
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.16 $', 10)"/>
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.17 $', 10)"/>
<xsl:value-of select="/adl:application/@revision"/>
</xsl:comment>
@ -366,7 +366,7 @@
Auto generated Velocity form for <xsl:value-of select="ancestor::adl:entity/@name"/>,
generated from ADL.
Generated using adl2views.xsl <xsl:value-of select="substring( '$Revision: 1.16 $', 10)"/>
Generated using adl2views.xsl <xsl:value-of select="substring( '$Revision: 1.17 $', 10)"/>
<xsl:value-of select="/adl:application/@revision"/>
</xsl:comment>
@ -972,7 +972,7 @@
Auto generated Velocity list for <xsl:value-of select="@name"/>,
generated from ADL.
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.16 $', 10)"/>
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.17 $', 10)"/>
</xsl:comment>
#capturefor( title)
@ -1010,7 +1010,7 @@
Auto generated Velocity list for <xsl:value-of select="ancestor::adl:entity/@name"/>,
generated from ADL.
Generated using adl2listview.xsl <xsl:value-of select="substring( '$Revision: 1.16 $', 10)"/>
Generated using adl2listview.xsl <xsl:value-of select="substring( '$Revision: 1.17 $', 10)"/>
</xsl:comment>
<xsl:call-template name="install-scripts"/>
</head>
@ -1093,6 +1093,11 @@
<table>
<tr>
<xsl:for-each select="$fields">
<xsl:choose>
<xsl:when test="@type='list'">
<!-- suppress layout of columns which are themselves lists -->
</xsl:when>
<xsl:otherwise>
<th>
<xsl:call-template name="showprompt">
<xsl:with-param name="node" select="."/>
@ -1101,6 +1106,8 @@
<xsl:with-param name="locale" select="$locale"/>
</xsl:call-template>
</th>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:for-each select="$entity/adl:form">
<th>-</th>
@ -1109,6 +1116,11 @@
<xsl:if test="$can-search = 'true'">
<tr class="search">
<xsl:for-each select="$fields">
<xsl:choose>
<xsl:when test="@type='list'">
<!-- suppress layout of columns which are themselves lists -->
</xsl:when>
<xsl:otherwise>
<td class="search">
<xsl:variable name="pname" select="@property"/>
<xsl:variable name="property" select="$entity//adl:property[@name=$pname]"/>
@ -1145,6 +1157,8 @@
</input>
</xsl:if>
</td>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</tr>
</xsl:if>
@ -1158,6 +1172,11 @@
<xsl:for-each select="$fields">
<xsl:variable name="pname" select="@property"/>
<xsl:variable name="property" select="$entity//adl:property[@name=$pname]"/>
<xsl:choose>
<xsl:when test="@type='list'">
<!-- suppress layout of columns which are themselves lists -->
</xsl:when>
<xsl:otherwise>
<td>
<xsl:choose>
<xsl:when test="not( $property/@name)">
@ -1183,6 +1202,8 @@
</xsl:otherwise>
</xsl:choose>
</td>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:variable name="keys">
<!-- assemble keys in a Velocity-friendly format, then splice it into