cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <...@outerthought.org>
Subject Re: Woody textareas?
Date Tue, 01 Jul 2003 06:23:14 GMT


Nathaniel Alfred wrote:
>>-----Original Message-----
>>From: Simon Price [mailto:simon.price@bristol.ac.uk]
>>Sent: Montag, 30. Juni 2003 20:04
> 
> ...
> 
>>Cocoon's form handling is (imho) it's weakest area at present 
>>although 
>>it is rapidly improving with the interplay between flow and xmlform.
> 
> ...
> 
>>Simon
>>
>>Luke Penca wrote:
>>
>>>Are textareas implemented in Woody yet?  I cannot find 
>>
>>anything in the (oh so sparse) documentation.
>>
>>>Furthermore, has anyone used Woody extensively yet?  (I 
>>
>>know, I know, it's alpha at this point but I need some 
>>serious forms handling.)  Should I be considering Xforms 
>>instead?  Who got some experience getting their hands 
>>bloodied with forms in Cocoon?  I'm ever anxious to find out.
> 
> ...
> 
>>>Luke.....
> 
> 
> I've just started prototyping with Woody and I think it is a
> diamond in the raw.  Finally a form handling package that does
> not require you to write a bean class or Cocoon action for
> every little form!
> 

I think it can even get better: just made a posting on cocoon-dev 
on how we could have it working for binding to a bean class as 
well :-)

> Coming to the original question:  There is no special textarea widget
> but you can emulate it easily by a field widget with styling:
> 
>                     <wt:widget id="question">
>                       <xhtml:textarea rows="5" cols="30"
> wrap="physical"/>
>                     </wt:widget>
> 

yep.

> which is then transformed into HTML as:
> 
>     <xsl:template match="wi:field[wi:styling/xhtml:textarea]">
>       <xhtml:textarea name="{@id}">
>         <xsl:apply-templates select="wi:styling/xhtml:textarea/@*"/>
>         <xsl:choose>
>           <xsl:when test="wi:value != ''">
>             <xsl:value-of select="wi:value"/>
>           </xsl:when>
>           <xsl:otherwise>
>             <xsl:value-of select="'&#160;'"/>
>           </xsl:otherwise>
>         </xsl:choose>
>       </xhtml:textarea>
>     </xsl:template>
> 
> HTH, ALfred.

nice angle of attack,
(you might want to add a call-template to add the 'wi:validation' 
section to the show)

care to share this as a patch?
(it's the surest way to start cutting the diamond out of the raw 
stone :-))

regards,
-marc=
-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at              http://radio.weblogs.com/0116284/
mpo@outerthought.org                              mpo@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message