On Jun 3, 2005, at 8:25 AM, Scott F. Walter wrote:
Is is possible to have a Velocity template perform an http "post"
operation to a Tapestry Page?
The answer is "yes", but what you're after needs to be clarified a
bit more. Do you want the template to post or the template to
generate a <form> that can be posted by the browser?
Looking at one of generated sources of
one of my pages I noticed this:
<form method="post" name="Form0" action="/yoursite/app">
<input type="hidden" name="service" value="direct/1/Category/$Form"/>
<input type="hidden" name="sp" value="S0"/>
<input type="hidden" name="Form0" value="categoryField,$Submit,
$Submit$0"/>
My question is how does Tapestry associate "$Submit$0" to a
particular listener method? Also what is that hideen field "sp"
used for?
I recommend you not try to tinker with this sort of thing, but rather
post into a clean URL (perhaps an ExternalLink one) and scrape the
request in activateExternalPage for what you're after. The hidden
fields that Tapestry generates rely on the order in the template and
if you start generating this sort of thing from Velocity you could
end up out of sync. Tapestry associates the listener by doing a
rewind on the template when the form is posted - in other words the
listener is specified on the server-side and the browser cannot
control nor does it know the listener when it comes to a DirectLink
situation like shown.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]