Thanks. That fixed the problem. What I actually ended up doing was this:
<component jsfid="myTextarea" extends="inputTextarea" id="myTextarea"
allowBody="false" />
<component jsfid="textAreaTest" extends="myTextarea" id="textAreaTest">
<attributes>
<set name="value" value="Test was successful." />
</attributes>
</component>
This allows me to reuse the "de-bodified" textarea without any additional work.
I'm not quite sure why this isn't the default behavior for inputTextarea,
though. What possible reason could there be for someone to want to use the
current default behavior (i.e., to have the body contents rendered AFTER the
</textarea>, such that it becomes regular text when rendered, whereas it is the
contents of a textarea field during mockup)? If someone really wanted that to
happen, they could write it that way in their original HTML. It seems like it
would save a lot of people some extra work if inputTextArea were defined with
allowBody="false" set by default (still allowing allowBody="true" to be
manually set by those weirdos that really want that behavior).
Anyway, thanks for your help! :-)
Rich Eggert
Member of Technical Staff
Proteus Technologies, LLC
http://www.proteus-technologies.com
-----Original Message-----
From: Gary VanMatre [mailto:[EMAIL PROTECTED]
Sent: Mon 2/12/2007 11:28 AM
To: [email protected]
Subject: RE: Strange Behavior with inputTextarea component
>From: <[EMAIL PROTECTED]>
>Hi
>The magic is a missing attribute: allowBody
> <form>
> <textarea jsfid="textAreaTest" allowBody="false" >This
> is a mockup.</textarea>
> </form>
>
>
>You can also use another Clay functionality
>
Or, you can put this attribute in the XML config.
<component jsfid="textAreaTest" extends="inputTextarea" id="textAreaTest"
allowBody="false">
<attributes>
<set name="value" value="Test was successful." />
</attributes>
</component>
This was David Geary's idea originally. I guess Tapestry has a similar
concept.
In the future, I'd like to provide a annotation replacement for this XML stuff.
After all, we need to keep up with Tapestry 5.
>
><form>
> <textarea jsfid="textAreaTest">
> <!-- ### clay:remove ### -->
> This is a mockup.
> <!-- ### /clay:remove ### -->
> </textarea>
> </form>
>
>Hermod
<snippet/>
>From: Richard Eggert [mailto:[EMAIL PROTECTED]
>Sent: Monday, February 12, 2007 3:55 AM
>To: [email protected]
>Subject: Strange Behavior with inputTextarea component
>
>
>I've been trying to teach myself how to use Clay (despite the atrocious lack
>of
>available documentation).
Well, I've been lobbying for some time for David to do some more writing on
Clay. The top half of the Clay site documentation was written by David. I
guess he's busy making money or something?
Anyway, *hopefully* the new Shale in Action book will have some material on
Clay.
>In the process of doing this, I put together a very
>simple "hello world" style application. However, the behavior is not as
>expected, and I'm not sure whether I'm doing something wrong or there's an
>actual bug in Clay.
BTW, Hermod, thanks for all your help!
Gary