On Tue, 21 Dec 2010 21:36:54 -0200, Rich M <rich...@moremagic.com> wrote:
writing it as a Component works. Not sure what the problem with the Page
class was.
Most probably your div was generated before the HTML tag. Your scenario
really needed to be implemented as a component.
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.
See method triggerEvent(String eventType, Object[] contextValues,
ComponentEventCallback callback) in ComponentResources (inherited from
ComponentResourcesCommon. Searching the mailing lists and JumpStart will
probably give you some hints.
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.
There's no way of doing it. You need to declare components (at least their
t:id) in a template.
I'm not clear on how a plain HTML form can trigger a Component method,
Just use an URL created from ComponentResources.createEventLink() as the
action.
is there a Tapestry Javascript method to leverage this?
No need of JavaScript for that (but you can use it if you want)
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?
MarkupWriter.element() inside a component render event method. You can
also change what was already written manipulating the Element instances
got from MarkupWriter.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org