Number of minor fixes, most significantly in the generation of auxiliary lists.
This commit is contained in:
parent
78964a814e
commit
b34706e25a
|
@ -9,8 +9,8 @@
|
||||||
Transform ADL into (partial) controller classes
|
Transform ADL into (partial) controller classes
|
||||||
|
|
||||||
$Author: sb $
|
$Author: sb $
|
||||||
$Revision: 1.23 $
|
$Revision: 1.24 $
|
||||||
$Date: 2009-01-28 12:10:02 $
|
$Date: 2009-01-29 16:39:32 $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
|
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
//
|
//
|
||||||
// Automatically generated abstract super class for controllers for the
|
// Automatically generated abstract super class for controllers for the
|
||||||
// <xsl:value-of select="/adl:application/@name"/> application; generated using
|
// <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"/>
|
// <xsl:value-of select="/adl:application/@revision"/>
|
||||||
//
|
//
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
//
|
//
|
||||||
// Controller for auto-generated forms for editing <xsl:value-of select="@name"/>s
|
// Controller for auto-generated forms for editing <xsl:value-of select="@name"/>s
|
||||||
// Automatically generated from application description using
|
// 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.
|
// This file is automatically generated; DO NOT EDIT IT.
|
||||||
//
|
//
|
||||||
|
@ -766,7 +766,7 @@
|
||||||
throw new Exception( "<xsl:call-template name="i18n-command-not-found"/>");
|
throw new Exception( "<xsl:call-template name="i18n-command-not-found"/>");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
<xsl:for-each select=".//verb">
|
<xsl:for-each select=".//adl:verb">
|
||||||
if ( command.Equals( "<xsl:value-of select="@verb"/>"))
|
if ( command.Equals( "<xsl:value-of select="@verb"/>"))
|
||||||
{
|
{
|
||||||
/* NOTE: You must write an implementation of this verb in a
|
/* NOTE: You must write an implementation of this verb in a
|
||||||
|
@ -806,16 +806,42 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
[AccessibleThrough(Verb.Get)]
|
[AccessibleThrough(Verb.Get)]
|
||||||
public void <xsl:value-of select="@name"/>( )
|
public void <xsl:value-of select="@name"/>( )
|
||||||
{
|
{
|
||||||
AssertUserCanRead();
|
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>
|
/// <summary>
|
||||||
/// Show the form named <xsl:value-of select="@name"/>, containing the indicated record. As
|
/// Show the form named <xsl:value-of select="@name"/>, containing the indicated record. As
|
||||||
|
@ -865,6 +891,12 @@
|
||||||
Session[NHibernateHelper.PASSTOKEN]
|
Session[NHibernateHelper.PASSTOKEN]
|
||||||
</xsl:if>);
|
</xsl:if>);
|
||||||
|
|
||||||
|
if ( record == null ){
|
||||||
|
record = new <xsl:value-of select="concat($entityns, '.', ancestor::adl:entity/@name)"/>();
|
||||||
|
|
||||||
|
BindObjectInstance( record, ParamStore.Form, "instance");
|
||||||
|
}
|
||||||
|
|
||||||
TypedPropertyBag = new {
|
TypedPropertyBag = new {
|
||||||
<xsl:if test="$authentication-layer = 'Database'">
|
<xsl:if test="$authentication-layer = 'Database'">
|
||||||
username = Session[ NHibernateHelper.USERTOKEN],
|
username = Session[ NHibernateHelper.USERTOKEN],
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
Transform ADL into velocity view templates
|
Transform ADL into velocity view templates
|
||||||
|
|
||||||
$Author: sb $
|
$Author: sb $
|
||||||
$Revision: 1.18 $
|
$Revision: 1.19 $
|
||||||
$Date: 2009-01-28 18:03:43 $
|
$Date: 2009-01-29 16:39:32 $
|
||||||
-->
|
-->
|
||||||
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
|
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
|
||||||
Whitespace (or lack of it) is significant! -->
|
Whitespace (or lack of it) is significant! -->
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
Auto generated Velocity maybe-delete form for <xsl:value-of select="@name"/>,
|
Auto generated Velocity maybe-delete form for <xsl:value-of select="@name"/>,
|
||||||
generated from ADL.
|
generated from ADL.
|
||||||
|
|
||||||
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.18 $', 10)"/>
|
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.19 $', 10)"/>
|
||||||
</xsl:comment>
|
</xsl:comment>
|
||||||
<xsl:call-template name="maybe-delete">
|
<xsl:call-template name="maybe-delete">
|
||||||
<xsl:with-param name="entity" select="."/>
|
<xsl:with-param name="entity" select="."/>
|
||||||
|
@ -161,7 +161,7 @@
|
||||||
Auto generated Velocity maybe-delete form for <xsl:value-of select="@name"/>,
|
Auto generated Velocity maybe-delete form for <xsl:value-of select="@name"/>,
|
||||||
generated from ADL.
|
generated from ADL.
|
||||||
|
|
||||||
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.18 $', 10)"/>
|
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.19 $', 10)"/>
|
||||||
|
|
||||||
<xsl:value-of select="/adl:application/@revision"/>
|
<xsl:value-of select="/adl:application/@revision"/>
|
||||||
</xsl:comment>
|
</xsl:comment>
|
||||||
|
@ -244,7 +244,7 @@
|
||||||
Auto generated Velocity <xsl:value-of select="@name"/> form for <xsl:value-of select="ancestor::adl:entity/@name"/>,
|
Auto generated Velocity <xsl:value-of select="@name"/> form for <xsl:value-of select="ancestor::adl:entity/@name"/>,
|
||||||
generated from ADL.
|
generated from ADL.
|
||||||
|
|
||||||
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.18 $', 10)"/>
|
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.19 $', 10)"/>
|
||||||
|
|
||||||
<xsl:value-of select="/adl:application/@revision"/>
|
<xsl:value-of select="/adl:application/@revision"/>
|
||||||
</xsl:comment>
|
</xsl:comment>
|
||||||
|
@ -366,7 +366,7 @@
|
||||||
Auto generated Velocity form for <xsl:value-of select="ancestor::adl:entity/@name"/>,
|
Auto generated Velocity form for <xsl:value-of select="ancestor::adl:entity/@name"/>,
|
||||||
generated from ADL.
|
generated from ADL.
|
||||||
|
|
||||||
Generated using adl2views.xsl <xsl:value-of select="substring( '$Revision: 1.18 $', 10)"/>
|
Generated using adl2views.xsl <xsl:value-of select="substring( '$Revision: 1.19 $', 10)"/>
|
||||||
|
|
||||||
<xsl:value-of select="/adl:application/@revision"/>
|
<xsl:value-of select="/adl:application/@revision"/>
|
||||||
</xsl:comment>
|
</xsl:comment>
|
||||||
|
@ -495,8 +495,10 @@
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<!-- create a hidden widget for the natural primary key -->
|
<!-- create a hidden widget for the natural primary key -->
|
||||||
#if ( $instance)
|
#if ( $instance)
|
||||||
|
#if ( ! ( $instance.IsNew))
|
||||||
${FormHelper.HiddenField( "instance.<xsl:value-of select="$keyname"/>")}
|
${FormHelper.HiddenField( "instance.<xsl:value-of select="$keyname"/>")}
|
||||||
#end
|
#end
|
||||||
|
#end
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
|
@ -607,7 +609,7 @@
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<a>
|
<a>
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
<xsl:value-of select="concat( $action, '.rails?', $farkey, '=$instance.', $nearkey)"/>
|
<xsl:value-of select="concat( $action, 'With', $farkey, '.rails?', $farkey, '=$instance.', $nearkey)"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:call-template name="i18n-add-a-new">
|
<xsl:call-template name="i18n-add-a-new">
|
||||||
<xsl:with-param name="entity-name" select="$farent"/>
|
<xsl:with-param name="entity-name" select="$farent"/>
|
||||||
|
@ -972,7 +974,7 @@
|
||||||
Auto generated Velocity list for <xsl:value-of select="@name"/>,
|
Auto generated Velocity list for <xsl:value-of select="@name"/>,
|
||||||
generated from ADL.
|
generated from ADL.
|
||||||
|
|
||||||
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.18 $', 10)"/>
|
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.19 $', 10)"/>
|
||||||
</xsl:comment>
|
</xsl:comment>
|
||||||
|
|
||||||
#capturefor( title)
|
#capturefor( title)
|
||||||
|
@ -1010,7 +1012,7 @@
|
||||||
Auto generated Velocity list for <xsl:value-of select="ancestor::adl:entity/@name"/>,
|
Auto generated Velocity list for <xsl:value-of select="ancestor::adl:entity/@name"/>,
|
||||||
generated from ADL.
|
generated from ADL.
|
||||||
|
|
||||||
Generated using adl2listview.xsl <xsl:value-of select="substring( '$Revision: 1.18 $', 10)"/>
|
Generated using adl2listview.xsl <xsl:value-of select="substring( '$Revision: 1.19 $', 10)"/>
|
||||||
</xsl:comment>
|
</xsl:comment>
|
||||||
<xsl:call-template name="install-scripts"/>
|
<xsl:call-template name="install-scripts"/>
|
||||||
</head>
|
</head>
|
||||||
|
@ -1353,7 +1355,7 @@
|
||||||
<td>
|
<td>
|
||||||
<a>
|
<a>
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
<xsl:value-of select="concat( @name, '.rails', $keys)"/>
|
<xsl:value-of select="concat( '../', $entity/@name, '/', @name, '.rails', $keys)"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:value-of select="@name"/>!
|
<xsl:value-of select="@name"/>!
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in a new issue