To follow up,

writing it as a Component works. Not sure what the problem with the Page class was.

Seem to have hit an additional complication. Since this component is generating everything with the MarkupWriter, I'm struggling to understand how I can feed values back to the Component into an Event method. Mailing list searches and documentation searching haven't turned up anything too promosing for me yet.

I haven't seen a way to write a Tapestry component like Form with the MarkupWriter, so I don't think I can use a Tapestry Form. I'm not clear on how a plain HTML form can trigger a Component method, is there a Tapestry Javascript method to leverage this? Alternately, is there a way to feed MarkupWriter content into a TML template, as in to write out HTML elements inside a <t:form> element?

Thanks,
Rich

On 12/21/2010 05:08 PM, Rich M wrote:
A quick check, yes the @BeforeRenderTemplate method does get called. A log message displays, but the html elements don't render anywhere according to inspecting of the page source.

I have not tried in a component yet for this. I am in the process. I actually think a component will be a better idea anyway, because I will need to re-use a chunk of the logic for this page and it is pretty intense both on the rendering and javascript sides.

Essentially the component in this case needs to update some DB entities, and then the page needs to handle redirection/additional logic based on the results of the component form.

If I use " @OnEvent(value = EventConstants.SUCCESS) " in the page class, will I be able to capture the firing of a form in the component class? If so that would allow me to trigger logic in the page class, and then to access information from the component (private fields with getter methods) I could use @InjectComponent to have a reference to the component in the Page class?

Let me know if my assumptions there are in line with the truth.

Thanks,
Rich

On 12/21/2010 04:56 PM, Josh Canfield wrote:
Does your event handler get called? Have you tried the same thing in a
page and a component?

On Tue, Dec 21, 2010 at 7:59 AM, Rich M<rich...@moremagic.com>  wrote:
No luck, same result. No<div id="tabContent">  or<h2>  elements in the
generated HTML.

On 12/20/2010 06:23 PM, Thiago H. de Paula Figueiredo wrote:
On Mon, 20 Dec 2010 20:48:39 -0200, Rich M<rich...@moremagic.com> wrote:

So that seems to narrow it down to some issue in my approach then, as I am not able to see anything written from my MarkupWriter in the @BeginRender
phase.
Try @BeforeRenderTemplate


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to