Hi! I'm fairly new to Tapestry and i'm working on a project at the moment. >From what I have found so far, it's fantastic and I am really enjoying using it for my work. I've come a little stuck on something in particular though which I'm sure will have come up many times before, but I can't seem to find an answer for.
I have a component at the moment, aptly named "HelloComponent". The component has a void renderMessage method in it. The method uses a parameter which is passed to the component which it uses create an object (All of the possible objects inherit from the same interface), which is then uses to get a form. The form is then returned as a string and is written out using the writer.write method. The intention is that the form shows on the page where the component is - and this work. Now actual problem is when the form is submitted. I created an "Object onSuccess()" method in the component, and it seemed to not be called. Ok, so I then created the same method in the page class rather than the component class, again that was not called. I then put an id on the form (t:id="foo"), and created a method in the component class called onSubmitFromFoo() and then got the error "Method com.syn.ama.components.tools.HelloComponent.onSubmitFromFoo() references component id 'Foo' which does not exist." So.. my next thing to try was to put this method in the page class (Seems odd to me). Then I got this error which was fairly expected: "Method com.syn.ama.pages.addassignment.Step2.onSubmitFromFoo() references component id 'Foo' which does not exist. So, my question is, if I write a form using the renderMessage method inside a component, which method does that trigger and in which class (Page class or component)? The reason I am doing it this way is because the intention is to have many different forms (Depending on which object needs setting up). The form is meant to come from the object itself (The interface has a method getConfigurationForm which makes it) and passes it to the component. The component when the data is submitted will put that into the object (or that is the idea). There is a good chance i'm doing something very wrong here, but I can't see why it's not working, or what a better way is. Thanks, I really appreciate any help. If my message is confusing in places, please do ask and I can hopefully explain some more. Steve (Tapestry noob for now, but hopefully not for long). P.S, sorry for posting this in the wrong topic originally, I now see how the mailing list works - sorry for that. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org