Number of minor fixes, most significantly in the generation of auxiliary lists.
This commit is contained in:
parent
78964a814e
commit
b34706e25a
2 changed files with 51 additions and 17 deletions
|
|
@ -9,8 +9,8 @@
|
|||
Transform ADL into (partial) controller classes
|
||||
|
||||
$Author: sb $
|
||||
$Revision: 1.23 $
|
||||
$Date: 2009-01-28 12:10:02 $
|
||||
$Revision: 1.24 $
|
||||
$Date: 2009-01-29 16:39:32 $
|
||||
-->
|
||||
|
||||
<!-- 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.23 $', 10)"/>
|
||||
// adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.24 $', 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.23 $', 10)"/>
|
||||
// adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.24 $', 10)"/>
|
||||
//
|
||||
// This file is automatically generated; DO NOT EDIT IT.
|
||||
//
|
||||
|
|
@ -766,7 +766,7 @@
|
|||
throw new Exception( "<xsl:call-template name="i18n-command-not-found"/>");
|
||||
}
|
||||
else
|
||||
<xsl:for-each select=".//verb">
|
||||
<xsl:for-each select=".//adl:verb">
|
||||
if ( command.Equals( "<xsl:value-of select="@verb"/>"))
|
||||
{
|
||||
/* NOTE: You must write an implementation of this verb in a
|
||||
|
|
@ -806,16 +806,42 @@
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show the form named <xsl:value-of select="@name"/>, with no content
|
||||
/// Show the form named <xsl:value-of select="@name"/>, with no existing record
|
||||
/// </summary>
|
||||
[AccessibleThrough(Verb.Get)]
|
||||
public void <xsl:value-of select="@name"/>( )
|
||||
{
|
||||
AssertUserCanRead();
|
||||
<xsl:value-of select="ancestor::adl:entity/@name"/> record = null;
|
||||
|
||||
<xsl:value-of select="concat( 'this.', @name)"/>( (<xsl:value-of select="concat($entityns, '.', ancestor::adl:entity/@name)"/>)null);
|
||||
<xsl:value-of select="concat( 'this.', @name)"/>( record);
|
||||
}
|
||||
|
||||
<xsl:variable name="form" select="."/>
|
||||
<xsl:for-each select="ancestor::adl:entity/adl:property[ @type='entity']">
|
||||
/// <summary>
|
||||
/// Show the form named <xsl:value-of select="$form/@name"/>, for a new record, but with the
|
||||
/// value for <xsl:value-of select="@name"/> already predetermined
|
||||
/// </summary>
|
||||
[AccessibleThrough(Verb.Get)]
|
||||
public void <xsl:value-of select="concat($form/@name, 'With', @name)"/>( string <xsl:value-of select="@name"/>)
|
||||
{
|
||||
AssertUserCanRead();
|
||||
ISession hibernator =
|
||||
NHibernateHelper.GetCurrentSession( <xsl:if test="$authentication-layer = 'Database'">
|
||||
Session[ NHibernateHelper.USERTOKEN],
|
||||
Session[NHibernateHelper.PASSTOKEN]
|
||||
</xsl:if>);
|
||||
<xsl:value-of select="ancestor::adl:entity/@name"/> record = new <xsl:value-of select="ancestor::adl:entity/@name"/>();
|
||||
|
||||
record.<xsl:value-of select="@name"/> = <xsl:call-template name="fetch-property-instance">
|
||||
<xsl:with-param name="property" select="."/>
|
||||
<xsl:with-param name="value" select="@name"/>
|
||||
</xsl:call-template>;
|
||||
|
||||
<xsl:value-of select="concat( 'this.', $form/@name)"/>( record);
|
||||
}
|
||||
</xsl:for-each>
|
||||
|
||||
/// <summary>
|
||||
/// Show the form named <xsl:value-of select="@name"/>, containing the indicated record. As
|
||||
|
|
@ -865,6 +891,12 @@
|
|||
Session[NHibernateHelper.PASSTOKEN]
|
||||
</xsl:if>);
|
||||
|
||||
if ( record == null ){
|
||||
record = new <xsl:value-of select="concat($entityns, '.', ancestor::adl:entity/@name)"/>();
|
||||
|
||||
BindObjectInstance( record, ParamStore.Form, "instance");
|
||||
}
|
||||
|
||||
TypedPropertyBag = new {
|
||||
<xsl:if test="$authentication-layer = 'Database'">
|
||||
username = Session[ NHibernateHelper.USERTOKEN],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue