bug 1943: many details changes in the right direction, but not there yet.
This commit is contained in:
parent
a393b3b0e7
commit
5b09885eb8
2 changed files with 22 additions and 16 deletions
|
|
@ -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)"/>"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue