This does not work, but...

I'm halfway through refactoring adl2controllerclasses, and about to make an even more radical change. This is a way back in case it goes horribly wrong.
This commit is contained in:
sb 2008-06-06 08:46:27 +00:00
parent f9fd11c101
commit f5b524e5c7
2 changed files with 196 additions and 150 deletions

View file

@ -13,8 +13,8 @@
Transform ADL into velocity view templates
$Author: sb $
$Revision: 1.6 $
$Date: 2008-06-04 16:17:39 $
$Revision: 1.7 $
$Date: 2008-06-06 08:46:27 $
-->
<!-- 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.6 $', 10)"/>
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.7 $', 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.6 $', 10)"/>
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.7 $', 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.6 $', 10)"/>
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.7 $', 10)"/>
</xsl:comment>
#capturefor( title)
#if ( $instance)
@ -364,7 +364,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.6 $', 10)"/>
Generated using adl2views.xsl <xsl:value-of select="substring( '$Revision: 1.7 $', 10)"/>
</xsl:comment>
<xsl:call-template name="install-scripts"/>
<script type='text/javascript' language='JavaScript1.2'>
@ -737,7 +737,7 @@
<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 -->
<!-- for links and lists we implement a shuffle widget, which extends over both columns -->
<!-- TODO: Permissions! -->
<xsl:param name="oddness" select="odd"/>
<tr>
@ -764,7 +764,19 @@
</input>
</td>
<td class="widget" rowspan="2">
${ShuffleWidgetHelper.SelectedOptions( "<xsl:value-of select="@name"/>", $instance.<xsl:value-of select="@name"/>)}
<xsl:variable name="entityname" select="@entity"/>
<xsl:variable name="foreignkey" select="@farkey"/>
<xsl:variable name="allow-shuffle-back">
<xsl:choose>
<xsl:when test="@type='list' and //adl:entity[@name=$entityname]//adl:property[@name=$foreignkey and @required='true']">
<xsl:value-of select="'false'"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'true'"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
${ShuffleWidgetHelper.SelectedOptions( "<xsl:value-of select="@name"/>", $instance.<xsl:value-of select="@name"/>, <xsl:value-of select="$allow-shuffle-back"/>)}
</td>
</tr>
<tr>
@ -951,7 +963,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.6 $', 10)"/>
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.7 $', 10)"/>
</xsl:comment>
#capturefor( title)
@ -990,7 +1002,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.6 $', 10)"/>
Generated using adl2listview.xsl <xsl:value-of select="substring( '$Revision: 1.7 $', 10)"/>
</xsl:comment>
<xsl:call-template name="install-scripts"/>
</head>