Hmmm...I think what you want to do could be done with a tiny bit of
javascript. I prefer to use http://dojotoolkit.org for event connection, but
you can do whatever you want.
Assumedly you have one particular parameter you want to change (I hope),
which is theoretically either a hidden input field or the "action" property
of the form. You can do something like this:
dojo.event.connect(dojo.byId("my forms unique id"), "onsubmit",
function(event) {
//do whatever you want here, if it's an input field it may be reachable
//(hopefully) via
var inputValue = dojo.byId("your hidden inputs id");
if (!inputValue) return;
var selectValue = dojo.byId("select list id");
if (selectValue.selected == "foo") inputValue.value = "doForFooo";
});
jesse
On 1/29/06, Cliff Zhao <[EMAIL PROTECTED]> wrote:
>
> I'm also wondering how to do a similar thing, but I do submit the form to
> my
> tapestry application.
>
> One of the query parameters is encoded into the URL because that parameter
> needs to be used in authorization. The value of the parameter is from an
> option list. When submiting the form, I need to modify the form's URL
> based
> on the option. How can I do it? I'm thinking of manipulating the URL with
> javascript. Will it work (modify the form action when option changes)?Any
> better way to do it?
>
> Thanks.
>
> On 1/28/06, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> >
> > The Any component is very useful for this kind of thing; it adapts to
> > whatever element you provide. So <form jwcid="@Any"> will output a
> > <form> with any attributes you specify. The attributes can be
> > literals or otherwise via binding prefixes. Thus you can use Tapestry
> > to build a form that is submitted to a non-Tapestry application, which
> > I believe is your use case.
> >
> > On 1/27/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> > > If you are not submitting your form to a tapestry servlet, then why
> > would
> > > you need to build the form using tapestry? You could as easily just
> use
> > > @Insert components to fill in a manual form's value with dynamic data
> > and
> > > then send it wherever you like.
> > >
> > > On 1/27/06, malm <[EMAIL PROTECTED]> wrote:
> > > >
> > > > I need to be able to modify the action URL that a Form component
> > > > generates.
> > > > We are developing an application for a telco and they control the
> > public
> > > > URL, which inturn calls our app server.
> > > > Example
> > > >
> > > > http://pub.telco.com/check/public-app ->
> > > > http://myserver.xxx.com/myapp/app
> > > >
> > > > The <form jwcid="@Form"> .... Generates the following HTML
> > > >
> > > > <form method="post" action="/myapp/app"> ....
> > > >
> > > > I need it to generate
> > > >
> > > > <form method="post" action="/check/public-app/app"> so that
> > any
> > > > form
> > > > submits will be routed through the telco's application gateway.
> > > >
> > > > I am using tapestry 4. Any help would be greatly
> appreciated.
> > > >
> > > > Thanks in Advance.
> > > >
> > > >
> > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> >
> >
> > --
> > Howard M. Lewis Ship
> > Independent J2EE / Open-Source Java Consultant
> > Creator, Jakarta Tapestry
> > Creator, Jakarta HiveMind
> >
> > Professional Tapestry training, mentoring, support
> > and project work. http://howardlewisship.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>