There is new foms support underway for cocoon using an XForms related syntax. FormvalidatorAction will stay but large additions might not be worthwile....
On 14.May.2002 -- 08:59 PM, Paul Pattison wrote: > I'm trying to find a way to get the if-else if statements out of the page > and put them into the action instead. Here's what I came up with. I tried > to put the needed error message into the descriptor file. The formval logicsheet features "on-XYZ" tags, which are evaluated only, if condition XYZ is true. > I haven't tried writing the action yet, I thought I'd see what people > thought of this way of doing it. I've included code below. Is it possible > this way? Is it a good way of doing it? Internationalization would be more difficult to achieve this way. Besides, I like to use the formval logicsheet as a building block for my own custom logicsheet. E.g. I like red stars behind a field that is required or does not conform with the expected format. For this I use <dvs-form:input type="checkbox" name="os" value="macosX"/> MacOS X<br/> and <xsl:template match="dvs-form:input"> <input> <xsl:for-each select="@*"> <xsl:copy> <xsl:apply-templates/> </xsl:copy> </xsl:for-each> <xsp:attribute name="value"> <xsp-request:get-parameter> <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> <xsl:attribute name="default"><xsl:value-of select="@default"/></xsl:attribute> </xsp-request:get-parameter> </xsp:attribute> </input> <xsp-formval:on-error> <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> <font color="red">*</font> </xsp-formval:on-error> </xsl:template> HTH Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>