Yes

Mark Stang wrote:

mb,
Are the t-deli components all under Apache 2.0 license?

thanks,

Mark

-----Original Message-----
From: Mind Bridge [mailto:[EMAIL PROTECTED]
Sent: Wed 8/17/2005 2:34 PM
To: Tapestry users
Subject: Re: Newbie Foreach/form problem

Do you happen to have Conditional in your form? If so, this is likely the problem.

If you use 4.0, please replace Conditional and Foreach in your code with 'If' and 'For'. Those store their state if they are in a form, and similar problems do not occur. Conditional and Foreach have been deprecated.

If you use 3.0, please relace Conditional with contrib:FormConditional when in a form. In the long run you may also download the Base library from http://www.t-deli.com and use base:If and base:For instead of Conditional and Foreach.

Hope this helps...
-mb

Scott Wadden wrote:

Actually, I'm getting the same behavior with the ListEdit.

This seems to work if messageBody is a parameter rather than a regular
property, and I'll do that if I need to, but in this case the
TextArea's value isn't of interest outside the component.  Is there
any way to fix this without exposing the TextArea's value?

On 8/17/05, Scott Wadden <[EMAIL PROTECTED]> wrote:


You're a useful fellow Jesse  :)

Now that you mention it, I specifically remember reading something
like that in Tapestry in Action.  I'll try it with a ListEdit.  Thanks
a lot.

On 8/17/05, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
You might try using a ListEdit component instead, I think Foreach
loops aren't safe inside forms, because they don't interact with the
hidden form input fields that keep track of which components to
expect...

jesse
On 8/17/05, Scott Wadden <[EMAIL PROTECTED]> wrote:
Hey folks.  I'm really new to Tapestry, but it's definitely been a
pleasure to use thus far.  I'm a fairly experienced ASP.NET developer
who's recently converted to Java, but I felt like I was stepping back
into the dark ages with Struts and JSP.  I find myself missing .NET
less and less the more I use Tapestry however.

Most of the stuff I've done so far has been pretty simple.  Fairly
static forms, and a couple of read only lists.  However, I've recently
run into problems trying to put form fields in a component that's
contained in a Foreach loop.  Basically, all the components seem to
given the state of the last component rendered.

I've created a very simple demo that illustrates my problem.  It
consists of a component that contains a TextArea, and a property to
hold the TextArea's value.  My page simply outputs a bunch of these
inside of a loop.  First the component, TestList.jwc, with the doctype
removed:

<component-specification>
  <property-specification name="messageBody" persistent="yes"/>
  <component id="newComp" type="TextArea">
      <binding name="value" expression="messageBody"/>
  </component>
</component-specification>

Now the component's template, TestList.html:

<span jwcid="newComp" />

And finally the page template, Home.html:

<html>
      <body>
          <form jwcid="@Form">
                      <div jwcid="@Foreach" source="ognl:{1, 2, 3, 4, 5}">
                              <span jwcid="@TestList" />
                      </div>
              <input type="submit" jwcid="@Submit" value="Submit form" />
          </form>
      </body>
</html>

I tried this in 3.03 and 4.0b4 (with the appropriate changes of
course) and get exactly the same behavior. Whatever is in the final
text area gets put into the other 4 whenever I submit the form.  What
do I have to do to get my component to maintain its own state in this
sort of situation?

Thank you very much,

Scott

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


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


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





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




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

Reply via email to