... or of course you can manually call Tapestry.fireObservedChange() at the end of your listener...

Regards,
Norbi

Norbert Sándor wrote:
You CAN embed For in Form. Actually For supports Form more closely by the "volatile" parameter.

"Could not find a strategy instance for class Foo.": maybe your Foo is not serializable, so it cannot be stored in the session? (And you haven't provided a custom squeezer.)

Set, Map or other collections cannot be stored in the session properly by default. The problem is that Tapestry does not realize when you modify the collection, so it won't be updated in the session. I've solved this by creating a thin wrapper implementation of Set, Map & List, which calls Tapestry.fireObservedChange() in the modifier methods (like add(), remove(), clear(), etc.).

I hope this helps to solve your problem (maybe by seeing your real source code would help more).

Regards,
Norbi

Todd Orr wrote:
Problem solved. Looks like I cannot embed the For in the Form element.
Thanks again.

On 4/22/06, Todd Orr <[EMAIL PROTECTED]> wrote:
Also, there is a For component on the page the attempts to display all
the Foos that have been created thus far. I think this is where the
problem is. If I remove the For, it works, but now my user has no idea
how many/which Foos she's already created.

Thanks.

On 4/22/06, Todd Orr <[EMAIL PROTECTED]> wrote:
I've got a form page that creates new foos, one after another. You
input foo data and each time a new foo will be added to the persistent
foo set. I am doing this in an attempt to collect multiple foos for
bulk processing on subsequent pages. The page has the method:

@Persist
public abstract Set<Foo> getFoos();
public abstract void setFoos(Set<Foo> foos);

The template has a submit that call the addAnotherFoo listener. The
addAnotherFoo method looks like:

public IPage addAnotherOfficer() {

        getFoos().add(getFoo());

        for (Foo o : getFoos())

                System.out.println(o.getId());

        return this;

}

After setting a breakpoint, I can see that there are no errors.
However, when the addAnotherFoo listener gets called I get the
following Tapestry Exception:

Could not find a strategy instance for class Foo.

etc.

What is Tapestry trying to do? Are there better approaches to what I
am trying to do? Thanks in advance.

T


---------------------------------------------------------------------
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