You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Torsten Eberl <ne...@vstar.de> on 2001/04/11 17:34:22 UTC
Redirections with submit
Hello,
I have problems redirecting from a form.
I couldn't find another way to link with a submit-button than this:
HTML
<FORM method="post"
action="$link.setPage("Template_x.vm").setAction("TemplateRedirect")">
...
<TD><INPUT TYPE="submit" NAME="eventSubmit_doTemplate_a" VALUE="A"></TD>
<TD><INPUT TYPE="submit" NAME="eventSubmit_doTemplate_b" VALUE="B"></TD>
...
Java
public class TemplateRedirect extends VelocityAction
{
public void doTemplate_a(RunData data, Context context) throws
Exception
{
data.setScreenTemplate("Template_a.vm");
}
public void doTemplate_b(RunData data, Context context) throws
Exception
{
data.setScreenTemplate("Template_b.vm");
}
}
Is there a more elegant way to solve this problem, without the designer
needing the Programmer?
My second problem with this redirection is:
Template_a should be accessed with an ssl connection (https:...) and
Template_b should be accessed normaly.
Has anyone an idea which Object i have to use for that?
Thanks
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org