On Wed, 2004-04-28 at 20:55, Vadim Gritsenko wrote: > 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. > > > > It worked just fine for all those pages were you just need to output > value of the widget and don't need to read it.
In other words, for those things for which you don't need a widget at all ;-) Though I understand you do it this way if the data is logically part of the form. > Also, this template works > in combination with i18n: > > <i18n:text>foo.bar.<wt:widget id="myboolean"><wi:styling > type="output" /></wt:widget></i:text> > > > Vadim -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED]