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 Georg Filios <ge...@filios.de> on 2004/04/02 12:21:05 UTC
JSP: How to Href to a PortletAction
Hi,
I was walking through the mail archive, but couldnt find a solution
(shame on me, using the wrong search words??)!
Anyway here is my problem, i havent found solved in a jsp-template.
I wrote a portlet, which shows some data. I Extended the
JSPActionPortlet class for this.
It has some welldefined actions, like "doUpdate(...)"
Calling these actions from within a form workes fine (using a submit
button with the value "eventSubmit_doUpdate").
So far ok.
Now I want to call a PortletAction from a link.
something like <a href="XXXX?action=eventSubmit_doUpdate")!
The Problem is, how do I fill the XXXX with the correct values? (i.e.
jspeid etc.)!
Thanx for help
cheers,
georg
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
Re: How to Href to a PortletAction
Posted by Georg Filios <ge...@filios.de>.
Hi,
sorry couldnt live with javascript. So I found the solution for
accessing jsp action from a link.
Perhaps this might be interesting for other people.
So if you have a working Action-class and a form like this:
<FORM NAME="myform" METHOD="POST">
<INPUT TYPE="hidden" NAME="js_peid" VALUE="<%=jspeid%>"/>
<table>
<tr>
<td align="center">
<INPUT TYPE="SUBMIT" NAME="eventSubmit_doModusedit" VALUE="Edit" />
</td>
</tr>
</table>
</form>
But you want to access this from a link (without a post, bo javascript):
then do the following (or better wrap it in a taglib):
....
RunData data = (RunData) request.getAttribute("rundata");
String jspeid = (String) request.getAttribute("js_peid");
JetspeedLink link = JetspeedLinkFactory.getInstance(data);
DynamicURI duri = link.getAction("CompanyProfilAction", jspeid);
String outLink=duri.toString()+"&js_peid=" + jspeid +
"&eventSubmit_doModusedit=Edit";
%>
<a href="<%=outLink%>">Edit</a><br>
Regards,
Georg
Am 02.04.2004 um 13:22 schrieb Georg Filios:
> Thanks Jain,
>
> for the tip.
>
> At least I do have a workaround.
>
> But since I do not fancy javascript very much,
> is there a better solution using jetspeed-java-functionality ...
>
> Regards,
>
> Georg
>
> Am 02.04.2004 um 12:42 schrieb Pramod Jain:
>
>> Georg:
>>
>> You can call a javascript function where you do the submit:
>>
>> function linkSubmit()
>> {
>> frm = document.forms[0]; // whatever
>> frm.action=whatever;
>> ....
>> frm.submit();
>> }
>>
>> Hope this helps
>>
>>
>>
>> -----Original Message-----
>> From: Georg Filios [mailto:georg@filios.de]
>> Sent: Friday, April 02, 2004 5:21 AM
>> To: Jetspeed Users List
>> Subject: JSP: How to Href to a PortletAction
>>
>>
>> Hi,
>>
>> I was walking through the mail archive, but couldnt find a solution
>> (shame on me, using the wrong search words??)!
>>
>> Anyway here is my problem, i havent found solved in a jsp-template.
>>
>> I wrote a portlet, which shows some data. I Extended the
>> JSPActionPortlet class for this.
>> It has some welldefined actions, like "doUpdate(...)"
>> Calling these actions from within a form workes fine (using a submit
>> button with the value "eventSubmit_doUpdate").
>>
>> So far ok.
>>
>> Now I want to call a PortletAction from a link.
>> something like <a href="XXXX?action=eventSubmit_doUpdate")!
>>
>> The Problem is, how do I fill the XXXX with the correct values? (i.e.
>> jspeid etc.)!
>>
>> Thanx for help
>>
>> cheers,
>>
>> georg
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>
>>
> cheers,
>
> georg
>
> -----------------------------------------------------------------------
> --------------------------
> Degerstrasse 24
> 40235 Düsseldorf
>
> Tel Privat: +49 211 6182006
> Tel Mobil: +49 160 94439860
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
cheers,
georg
------------------------------------------------------------------------
-------------------------
Degerstrasse 24
40235 Düsseldorf
Tel Privat: +49 211 6182006
Tel Mobil: +49 160 94439860
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
Re: How to Href to a PortletAction
Posted by Georg Filios <ge...@filios.de>.
Thanks Jain,
for the tip.
At least I do have a workaround.
But since I do not fancy javascript very much,
is there a better solution using jetspeed-java-functionality ...
Regards,
Georg
Am 02.04.2004 um 12:42 schrieb Pramod Jain:
> Georg:
>
> You can call a javascript function where you do the submit:
>
> function linkSubmit()
> {
> frm = document.forms[0]; // whatever
> frm.action=whatever;
> ....
> frm.submit();
> }
>
> Hope this helps
>
>
>
> -----Original Message-----
> From: Georg Filios [mailto:georg@filios.de]
> Sent: Friday, April 02, 2004 5:21 AM
> To: Jetspeed Users List
> Subject: JSP: How to Href to a PortletAction
>
>
> Hi,
>
> I was walking through the mail archive, but couldnt find a solution
> (shame on me, using the wrong search words??)!
>
> Anyway here is my problem, i havent found solved in a jsp-template.
>
> I wrote a portlet, which shows some data. I Extended the
> JSPActionPortlet class for this.
> It has some welldefined actions, like "doUpdate(...)"
> Calling these actions from within a form workes fine (using a submit
> button with the value "eventSubmit_doUpdate").
>
> So far ok.
>
> Now I want to call a PortletAction from a link.
> something like <a href="XXXX?action=eventSubmit_doUpdate")!
>
> The Problem is, how do I fill the XXXX with the correct values? (i.e.
> jspeid etc.)!
>
> Thanx for help
>
> cheers,
>
> georg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
cheers,
georg
------------------------------------------------------------------------
-------------------------
Degerstrasse 24
40235 Düsseldorf
Tel Privat: +49 211 6182006
Tel Mobil: +49 160 94439860
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
RE: How to Href to a PortletAction
Posted by Pramod Jain <pr...@indent.org>.
Georg:
You can call a javascript function where you do the submit:
function linkSubmit()
{
frm = document.forms[0]; // whatever
frm.action=whatever;
....
frm.submit();
}
Hope this helps
-----Original Message-----
From: Georg Filios [mailto:georg@filios.de]
Sent: Friday, April 02, 2004 5:21 AM
To: Jetspeed Users List
Subject: JSP: How to Href to a PortletAction
Hi,
I was walking through the mail archive, but couldnt find a solution
(shame on me, using the wrong search words??)!
Anyway here is my problem, i havent found solved in a jsp-template.
I wrote a portlet, which shows some data. I Extended the
JSPActionPortlet class for this.
It has some welldefined actions, like "doUpdate(...)"
Calling these actions from within a form workes fine (using a submit
button with the value "eventSubmit_doUpdate").
So far ok.
Now I want to call a PortletAction from a link.
something like <a href="XXXX?action=eventSubmit_doUpdate")!
The Problem is, how do I fill the XXXX with the correct values? (i.e.
jspeid etc.)!
Thanx for help
cheers,
georg
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org