Beginning of work to allow uploadable files
This commit is contained in:
parent
0547747aec
commit
d2d9af3cfc
|
@ -13,7 +13,7 @@
|
|||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
||||
|
||||
<!--
|
||||
$Revision: 1.4 $
|
||||
$Revision: 1.5 $
|
||||
-->
|
||||
|
||||
<!-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
||||
|
@ -83,22 +83,27 @@ that we can allow HTML block level entities within content elements -->
|
|||
data types which can be used in a typedef to provide validation -
|
||||
e.g. a string can be used with a regexp or a scalar can be used with
|
||||
min and max values
|
||||
string: varchar java.sql.Types.VARCHAR
|
||||
integer: int java.sql.Types.INTEGER
|
||||
real: double java.sql.Types.DOUBLE
|
||||
money: money java.sql.Types.INTEGER
|
||||
date: date java.sql.Types.DATE
|
||||
time: time java.sql.Types.TIME
|
||||
string: varchar java.sql.Types.VARCHAR
|
||||
integer: int java.sql.Types.INTEGER
|
||||
real: double java.sql.Types.DOUBLE
|
||||
money: money java.sql.Types.INTEGER
|
||||
date: date java.sql.Types.DATE
|
||||
time: time java.sql.Types.TIME
|
||||
timestamp: timestamp java.sql.Types.TIMESTAMP
|
||||
uploadable: varchar java.sql.Types.VARCHAR
|
||||
image: varchar java.sql.Types.VARCHAR
|
||||
|
||||
uploadable is as string but points to an uploaded file; image is as
|
||||
uploadable but points to an uploadable graphical image file
|
||||
-->
|
||||
<!ENTITY % DefinableDataTypes "string|integer|real|money|date|time|timestamp" >
|
||||
<!ENTITY % DefinableDataTypes "string|integer|real|money|date|time|timestamp|uploadable" >
|
||||
|
||||
<!--
|
||||
data types which are fairly straightforward translations of JDBC data types
|
||||
boolean: boolean or java.sql.Types.BIT
|
||||
char(1) java.sql.Types.CHAR
|
||||
text: text or java.sql.Types.LONGVARCHAR
|
||||
memo java.sql.Types.CLOB
|
||||
char(1) java.sql.Types.CHAR
|
||||
text: text or java.sql.Types.LONGVARCHAR
|
||||
memo java.sql.Types.CLOB
|
||||
-->
|
||||
<!ENTITY % SimpleDataTypes "%DefinableDataTypes;|boolean|text" >
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
Transform ADL into velocity view templates
|
||||
|
||||
$Author: sb $
|
||||
$Revision: 1.29 $
|
||||
$Date: 2009-02-19 17:37:05 $
|
||||
$Revision: 1.30 $
|
||||
$Date: 2009-02-20 10:31:03 $
|
||||
-->
|
||||
<!-- 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.29 $', 10)"/>
|
||||
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.30 $', 10)"/>
|
||||
</xsl:comment>
|
||||
<xsl:call-template name="maybe-delete">
|
||||
<xsl:with-param name="entity" select="."/>
|
||||
|
@ -161,7 +161,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.29 $', 10)"/>
|
||||
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.30 $', 10)"/>
|
||||
|
||||
<xsl:value-of select="/adl:application/@revision"/>
|
||||
</xsl:comment>
|
||||
|
@ -244,7 +244,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.29 $', 10)"/>
|
||||
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.30 $', 10)"/>
|
||||
Generation parameters were:
|
||||
locale: <xsl:value-of select="$locale"/>
|
||||
generate-site-navigation: <xsl:value-of select="$generate-site-navigation"/>
|
||||
|
@ -320,7 +320,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.29 $', 10)"/>
|
||||
Generated using adl2views.xsl <xsl:value-of select="substring( '$Revision: 1.30 $', 10)"/>
|
||||
Generation parameters were:
|
||||
locale: <xsl:value-of select="$locale"/>
|
||||
generate-site-navigation: <xsl:value-of select="$generate-site-navigation"/>
|
||||
|
@ -401,6 +401,19 @@
|
|||
<xsl:attribute name="id">
|
||||
<xsl:value-of select="$form/@name"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="enctype">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$form/ancestor::adl:entity//adl:property[@type='uploadable']">
|
||||
<xsl:value-of select="multipart/form-data"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$form/ancestor::adl:entity//adl:property[@type='image']">
|
||||
<xsl:value-of select="multipart/form-data"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="'application/x-www-form-urlencoded'"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<input type="hidden" name="currentpane" value="$!currentpane" />
|
||||
<xsl:for-each select="$form/ancestor::adl:entity/adl:key/adl:property">
|
||||
<xsl:variable name="keyname" select="@name"/>
|
||||
|
@ -900,7 +913,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.29 $', 10)"/>
|
||||
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.30 $', 10)"/>
|
||||
Generation parameters were:
|
||||
locale: <xsl:value-of select="$locale"/>
|
||||
generate-site-navigation: <xsl:value-of select="$generate-site-navigation"/>
|
||||
|
@ -963,7 +976,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.29 $', 10)"/>
|
||||
Generated using adl2listview.xsl <xsl:value-of select="substring( '$Revision: 1.30 $', 10)"/>
|
||||
Generation parameters were:
|
||||
locale: <xsl:value-of select="$locale"/>
|
||||
generate-site-navigation: <xsl:value-of select="$generate-site-navigation"/>
|
||||
|
|
Loading…
Reference in a new issue