Re: Woody textareas?

2003-07-01 Thread Marc Portier


Nathaniel Alfred wrote:
-Original Message-
From: Simon Price [mailto:[EMAIL PROTECTED]
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=[EMAIL PROTECTED]
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 Portierhttp://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
Read my weblog at  http://radio.weblogs.com/0116284/
[EMAIL PROTECTED]  [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Woody textareas?

2003-06-30 Thread Steven Noels
On 30/06/2003 18:58 Luke Penca wrote:

Are textareas implemented in Woody yet?  I cannot find anything in
the (oh so sparse) documentation.
Have you checked with http://wiki.cocoondev.org/Wiki.jsp?page=Woody ?

It's not fully up to date, but that  tracking CVS commit messages might
help you already.
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.
I jotted down already some of the background of Woody's genesis over
here: http://marc.theaimsgroup.com/?l=xml-cocoon-devm=105491414614553w=2
So its feature list is in active expansion, and it has been created to 
be extensively used and actively supported.

HTH,

/Steven
--
Steven Noelshttp://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
Read my weblog athttp://blogs.cocoondev.org/stevenn/
stevenn at outerthought.orgstevenn at apache.org
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Woody textareas?

2003-06-30 Thread Simon Price
Cocoon's form handling is (imho) it's weakest area at present although 
it is rapidly improving with the interplay between flow and xmlform.

Unless your app is simple, I'd recommend not wasting time on the simple 
form validator and db actions. Pure xmlforms where you end up writing 
java code for each form is elegant but time consuming. I've not looked 
in detail at woody.

However, I'd strongly recommend that you take a look at the petstore 
sample. This uses javascript as the interface to the persistence layer 
part of your model and (to my taste) a really easy to understand but 
flexible logic layer in a separate javascript file. The sample has 
switchable view layers that can be velocity/xslt/jxpath/jsomethingelse. 
The velocity vesion is very clean and easy to read (but there again, I 
used to be an assembler programmer!). Use is made of xmlform - with 
validation done in either schematron and/or javascript.

Cheers

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.

Thanks in advance,

Luke.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--

---
Simon Price
Institute for Learning and Research Technology
University of Bristol
8-10 Berkeley Square
Bristol BS8 1HH
United Kingdom
Direct: +44 (0)7071 226 720
Office: +44 (0)117 928 7193
Fax: +44 (0)117 928 7112
[EMAIL PROTECTED]
http://www.ilrt.bristol.ac.uk
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Woody textareas?

2003-06-30 Thread Nathaniel Alfred
 -Original Message-
 From: Simon Price [mailto:[EMAIL PROTECTED]
 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!

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

which is then transformed into HTML as:

xsl:template match=wi:field[wi:styling/xhtml:textarea]
  xhtml:textarea name=[EMAIL PROTECTED]
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.

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The senders company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the senders company. 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]