You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by gueclan <gu...@singnet.com.sg> on 2002/08/19 12:50:55 UTC

Action

Hi,

I'm using Velocity as the the template engine.

May I know is that a way to associate an action method with a html combo box? I wanted this action method to be different from the action method when a user clicks on the submit button. Any way to do it?

Any help will be greatly appreciated :)


Best Regards,
Andy

Re: Action

Posted by Matt Koranda <ma...@orkan.no>.
Sorry, I was a little unclear. Have you added a page to go to such as:


$link.setPage("MyPage").setAction("ActionClass").addPathInfo("eventsubmit_do
MyAction", true)

Also, to make sure I understand correctly, I'm, assuming you want to have
one form on a page that submits to another page/action and in that form you
have a combo box that whan selected will change info on the form (like
language or adding an additional field). Is that right?

hth,
Matt

----- Original Message -----
From: "gueclan" <gu...@singnet.com.sg>
To: "Jetspeed Users List" <je...@jakarta.apache.org>
Sent: Wednesday, August 21, 2002 4:24 PM
Subject: Re: Action


> Hi Matt,
>
> Thanks a lot for pointing me to the direction to go! From the website you
> recommended, I've managed to find out how to incorporate a 2nd form,
copied
> data from the original form and then submit to the server using
JavaScript.
>
> But I still have a question : what's the url to specified for the action
> field of the form? My class is UploadFileAction (extends
> VelocityPortletAction) and the method is doTest.
>
> I did the following:
> <form name="uploadFileHidden"
>
action="$link.setAction("UploadFileAction").addPathInfo("eventsubmit_doTest"
> , true)" method="post">
>
> And it does invoke doTest, but the problem is that although in doTest, I
did
> a context.put("resourceRec", resourceRec), the velocity template does not
> display the value for $resourceRec. What's wrong?
>
> Any help will be greatly appreciated :)
>
> Cheers,
> Andy
>
>
> ----- Original Message -----
> From: Matt Koranda <ma...@orkan.no>
> To: Jetspeed Users List <je...@jakarta.apache.org>
> Sent: Monday, August 19, 2002 7:23 PM
> Subject: Re: Action
>
>
> > You are going to have to add some javascript to the form. To save the
form
> > data to use agin you are going to have to submit the form from the
> > javascript a good place to find snippets is here:
> >
> > http://developer.irt.org/script/script.htm
> >
> > Beyond that it should be a matter of adding something like:
> >
> > $link.setAction("ActionClass").addPathInfo("eventsubmit_doMyAction",
true)
> >
> >
> > HTH,
> > Matt
> >
> > ----- Original Message -----
> > From: "gueclan" <gu...@singnet.com.sg>
> > To: "Jetspeed Users List" <je...@jakarta.apache.org>
> > Sent: Monday, August 19, 2002 12:50 PM
> > Subject: Action
> >
> >
> > Hi,
> >
> > I'm using Velocity as the the template engine.
> >
> > May I know is that a way to associate an action method with a html combo
> > box? I wanted this action method to be different from the action method
> when
> > a user clicks on the submit button. Any way to do it?
> >
> > Any help will be greatly appreciated :)
> >
> >
> > Best Regards,
> > Andy
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Action

Posted by gueclan <gu...@singnet.com.sg>.
Hi Matt,

Thanks a lot for pointing me to the direction to go! From the website you
recommended, I've managed to find out how to incorporate a 2nd form, copied
data from the original form and then submit to the server using JavaScript.

But I still have a question : what's the url to specified for the action
field of the form? My class is UploadFileAction (extends
VelocityPortletAction) and the method is doTest.

I did the following:
<form name="uploadFileHidden"
action="$link.setAction("UploadFileAction").addPathInfo("eventsubmit_doTest"
, true)" method="post">

And it does invoke doTest, but the problem is that although in doTest, I did
a context.put("resourceRec", resourceRec), the velocity template does not
display the value for $resourceRec. What's wrong?

Any help will be greatly appreciated :)

Cheers,
Andy


----- Original Message -----
From: Matt Koranda <ma...@orkan.no>
To: Jetspeed Users List <je...@jakarta.apache.org>
Sent: Monday, August 19, 2002 7:23 PM
Subject: Re: Action


> You are going to have to add some javascript to the form. To save the form
> data to use agin you are going to have to submit the form from the
> javascript a good place to find snippets is here:
>
> http://developer.irt.org/script/script.htm
>
> Beyond that it should be a matter of adding something like:
>
> $link.setAction("ActionClass").addPathInfo("eventsubmit_doMyAction", true)
>
>
> HTH,
> Matt
>
> ----- Original Message -----
> From: "gueclan" <gu...@singnet.com.sg>
> To: "Jetspeed Users List" <je...@jakarta.apache.org>
> Sent: Monday, August 19, 2002 12:50 PM
> Subject: Action
>
>
> Hi,
>
> I'm using Velocity as the the template engine.
>
> May I know is that a way to associate an action method with a html combo
> box? I wanted this action method to be different from the action method
when
> a user clicks on the submit button. Any way to do it?
>
> Any help will be greatly appreciated :)
>
>
> Best Regards,
> Andy
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Action

Posted by Matt Koranda <ma...@orkan.no>.
You are going to have to add some javascript to the form. To save the form
data to use agin you are going to have to submit the form from the
javascript a good place to find snippets is here:

http://developer.irt.org/script/script.htm

Beyond that it should be a matter of adding something like:

$link.setAction("ActionClass").addPathInfo("eventsubmit_doMyAction", true)


HTH,
Matt

----- Original Message -----
From: "gueclan" <gu...@singnet.com.sg>
To: "Jetspeed Users List" <je...@jakarta.apache.org>
Sent: Monday, August 19, 2002 12:50 PM
Subject: Action


Hi,

I'm using Velocity as the the template engine.

May I know is that a way to associate an action method with a html combo
box? I wanted this action method to be different from the action method when
a user clicks on the submit button. Any way to do it?

Any help will be greatly appreciated :)


Best Regards,
Andy



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>