bug 2310 : If no values passed in from a shuffle widget, was not clearing the old values.

This commit is contained in:
sb 2008-10-31 13:10:22 +00:00
parent c904067f80
commit 5c099c6503

View file

@ -9,8 +9,8 @@
Transform ADL into (partial) controller classes Transform ADL into (partial) controller classes
$Author: sb $ $Author: sb $
$Revision: 1.21 $ $Revision: 1.22 $
$Date: 2008-10-09 16:12:21 $ $Date: 2008-10-31 13:10:22 $
--> -->
<!-- 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.21 $', 10)"/> // adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.22 $', 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.21 $', 10)"/> // adl2controllerclasses.xslt version <xsl:value-of select="substring( '$Revision: 1.22 $', 10)"/>
// //
// This file is automatically generated; DO NOT EDIT IT. // This file is automatically generated; DO NOT EDIT IT.
// //
@ -426,8 +426,6 @@
string[] <xsl:value-of select="concat(@name, 'Values')"/> = Form.GetValues( "<xsl:value-of select="concat( 'instance.', @name)"/>"); string[] <xsl:value-of select="concat(@name, 'Values')"/> = Form.GetValues( "<xsl:value-of select="concat( 'instance.', @name)"/>");
if ( <xsl:value-of select="concat(@name, 'Values')"/> != null)
{
/* update the linking table for my <xsl:value-of select="@name"/>; first smash the old values */ /* update the linking table for my <xsl:value-of select="@name"/>; first smash the old values */
if ( <xsl:value-of select="concat( 'record.', @name)"/> != null) if ( <xsl:value-of select="concat( 'record.', @name)"/> != null)
{ {
@ -438,6 +436,8 @@
<xsl:value-of select="concat( 'record.', @name)"/> = new HashedSet&lt;<xsl:value-of select="concat( $entityns, '.', @entity)"/>&gt;(); <xsl:value-of select="concat( 'record.', @name)"/> = new HashedSet&lt;<xsl:value-of select="concat( $entityns, '.', @entity)"/>&gt;();
} }
if ( <xsl:value-of select="concat(@name, 'Values')"/> != null)
{
/* then reinstate the values from the indexes passed */ /* then reinstate the values from the indexes passed */
foreach ( string index in <xsl:value-of select="concat(@name, 'Values')"/>) foreach ( string index in <xsl:value-of select="concat(@name, 'Values')"/>)
{ {