bug 1943: many details changes in the right direction, but not there yet.
This commit is contained in:
parent
a393b3b0e7
commit
5b09885eb8
|
@ -9,8 +9,8 @@
|
|||
Transform ADL into (partial) controller classes
|
||||
|
||||
$Author: sb $
|
||||
$Revision: 1.7 $
|
||||
$Date: 2008-06-03 14:38:15 $
|
||||
$Revision: 1.8 $
|
||||
$Date: 2008-06-03 16:09:07 $
|
||||
-->
|
||||
|
||||
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
|
||||
|
@ -72,7 +72,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.7 $', 10)"/>
|
||||
// adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.8 $', 10)"/>
|
||||
//
|
||||
// This file is automatically generated; DO NOT EDIT IT.
|
||||
//
|
||||
|
@ -135,7 +135,7 @@ namespace <xsl:value-of select="$controllerns"/> {
|
|||
//
|
||||
// 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.7 $', 10)"/>
|
||||
// adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.8 $', 10)"/>
|
||||
//
|
||||
// This file is automatically generated; DO NOT EDIT IT.
|
||||
//
|
||||
|
@ -666,6 +666,9 @@ namespace <xsl:value-of select="$controllerns"/> {
|
|||
<xsl:when test="$basetype='integer'">
|
||||
Int32.Parse( Form[ "<xsl:value-of select="concat( 'instance.', @name)"/>"])
|
||||
</xsl:when>
|
||||
<xsl:when test="$basetype='string'">
|
||||
Form[ "<xsl:value-of select="concat( 'instance.', @name)"/>"]
|
||||
</xsl:when>
|
||||
<xsl:when test="$basetype='entity'">
|
||||
<!-- Maybe TODO: this doesn't work recursively - if an entity has a key which is an entity
|
||||
and the key of that entity is an entity, you're on your own, mate! -->
|
||||
|
@ -675,16 +678,19 @@ namespace <xsl:value-of select="$controllerns"/> {
|
|||
<xsl:with-param name="entity" select="//adl:entity[@name=$keyentity]"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
hibernator.CreateCriteria( typeof( <xsl:value-of select="$keyenttype"/>))
|
||||
hibernator.CreateCriteria( typeof( <xsl:value-of select="concat( $entityns, '.', $keyentity)"/>))
|
||||
.Add(Expression.Eq( "<xsl:value-of select="//adl:entity[@name=$keyentity]/adl:key/adl:property[position()=1]/@name"/>",<xsl:choose>
|
||||
<xsl:when test="$keyenttype = 'int'">
|
||||
Int32.Parse( Form[ "<xsl:value-of select="concat( 'instance.', @name)"/>"])
|
||||
</xsl:when>
|
||||
<xsl:when test="$keyenttype='String'">
|
||||
Form[ "<xsl:value-of select="concat( 'instance.', @name)"/>"]
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
Form[ "<xsl:value-of select="concat( 'instance.', @name)"/>"]
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>))
|
||||
.UniqueResult<<xsl:value-of select="$keyenttype"/>>()
|
||||
.UniqueResult<<xsl:value-of select="concat( $entityns, '.', $keyentity)"/>>()
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
Form[ "<xsl:value-of select="concat( 'instance.', @name)"/>"]
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
Transform ADL into velocity view templates
|
||||
|
||||
$Author: sb $
|
||||
$Revision: 1.4 $
|
||||
$Date: 2008-06-03 14:38:15 $
|
||||
$Revision: 1.5 $
|
||||
$Date: 2008-06-03 16:09:11 $
|
||||
-->
|
||||
<!-- 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.4 $', 10)"/>
|
||||
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.5 $', 10)"/>
|
||||
</xsl:comment>
|
||||
<xsl:call-template name="maybe-delete">
|
||||
<xsl:with-param name="entity" select="."/>
|
||||
|
@ -162,7 +162,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.4 $', 10)"/>
|
||||
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.5 $', 10)"/>
|
||||
</xsl:comment>
|
||||
<xsl:call-template name="install-scripts"/>
|
||||
</head>
|
||||
|
@ -243,7 +243,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.4 $', 10)"/>
|
||||
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.5 $', 10)"/>
|
||||
</xsl:comment>
|
||||
#capturefor( title)
|
||||
#if ( $instance)
|
||||
|
@ -354,7 +354,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.4 $', 10)"/>
|
||||
Generated using adl2views.xsl <xsl:value-of select="substring( '$Revision: 1.5 $', 10)"/>
|
||||
</xsl:comment>
|
||||
<xsl:call-template name="install-scripts"/>
|
||||
<script type='text/javascript' language='JavaScript1.2'>
|
||||
|
@ -462,7 +462,6 @@
|
|||
#end
|
||||
</xsl:if>
|
||||
<form method="post" onsubmit="invokeSubmitHandlers( this)" class="tabbed">
|
||||
<input type="hidden" name="currentpane" value="$!currentpane" />
|
||||
<xsl:attribute name="action">
|
||||
<xsl:value-of select="concat( $formname, 'SubmitHandler.rails')"/>
|
||||
</xsl:attribute>
|
||||
|
@ -472,6 +471,7 @@
|
|||
<xsl:attribute name="id">
|
||||
<xsl:value-of select="$formname"/>
|
||||
</xsl:attribute>
|
||||
<input type="hidden" name="currentpane" value="$!currentpane" />
|
||||
<xsl:for-each select="$form/ancestor::adl:entity/adl:key/adl:property">
|
||||
<xsl:variable name="keyname" select="@name"/>
|
||||
<xsl:choose>
|
||||
|
@ -749,7 +749,7 @@
|
|||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="adl:property[@type='link']">
|
||||
<xsl:template match="adl:property[@type='link'or @type='list']">
|
||||
<!-- note! this template is only intended to match properties in the context of a form:
|
||||
it may be we need to add a mode to indicate this! -->
|
||||
<!-- for links we implement a shuffle widget, which extends over both columns -->
|
||||
|
@ -966,7 +966,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.4 $', 10)"/>
|
||||
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.5 $', 10)"/>
|
||||
</xsl:comment>
|
||||
|
||||
#capturefor( title)
|
||||
|
@ -1005,7 +1005,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.4 $', 10)"/>
|
||||
Generated using adl2listview.xsl <xsl:value-of select="substring( '$Revision: 1.5 $', 10)"/>
|
||||
</xsl:comment>
|
||||
<xsl:call-template name="install-scripts"/>
|
||||
</head>
|
||||
|
|
Loading…
Reference in a new issue