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:[EMAIL PROTECTED]
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


cheers,

georg

----------------------------------------------------------------------- --------------------------
Degerstrasse 24
40235 D�sseldorf


Tel Privat: +49 211 6182006
Tel Mobil: +49 160 94439860


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


cheers,

georg

------------------------------------------------------------------------ -------------------------
Degerstrasse 24
40235 D�sseldorf


Tel Privat: +49 211 6182006
Tel Mobil: +49 160 94439860


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to