cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: fi:booleanfield[fi:styling/@type='output']
Date Mon, 26 Apr 2004 21:40:12 GMT
On 26.04.2004 22:58, Bruno Dumon wrote:
> I saw the following template in forms-field-styling.xsl:
> 
>   <!--+
>       | fi:booleanfield with @type 'output' : rendered as text
>       +-->
>   <xsl:template match="fi:booleanfield[fi:styling/@type='output']">
>     <xsl:choose>
>       <xsl:when test="fi:value = 'true'">
>         yes
>       </xsl:when>
>       <xsl:otherwise>
>         no
>       </xsl:otherwise>
>     </xsl:choose>
>   </xsl:template>
> 
> And was wondering what people are using this for? Or how this can
> possibly do something meaningful?
> 
> The problem I see is that if a booleanfield is not present on the
> request, it will always be reset to false. So I'd rather remove this
> template then giving people the false impression this might work.

The same is true for

<!--+
     | fi:field with a selection list and @type 'output'
     +-->
<xsl:template 
match="fi:field[fi:selection-list][fi:styling/@type='output']" priority="3">

(line 210) and also for

<!--+
     | fi:field with @type 'output' and fi:output are both rendered as text
     +-->
<xsl:template match="fi:output | fi:field[fi:styling/@type='output']" 
priority="2">

(line 240)

They would also be reset after request.

These stylings make only sense if the form widget values are not 
evaluated. I can imagine a confirmation page, where just the submit 
widget (ok vs. cancel) is evaluated.

Joerg

Mime
View raw message