You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> on 2008/10/06 09:16:33 UTC
PortletAction & Namespaces - s:url works, s:submit not
Hi,
I want to use the namespace feature of struts2 actions in a portal/portlet
environment.
Using s:url like this works (like shown in the struts2 delivered testcases):
<s:form action="MasterControl" method="POST">
<a href="<s:url portletUrlType="action" namespace="mw" action="/mvc/stopWork"
></s:url>">Test</a>
</s:form>
Using Buttons to Submit the form, i am unable to get it working. Can anyone
give my some hint what i am doing wrong (the s:submit tag got no
portletUrlType or namespace attribute like s:url Tag):
<s:form action="MasterControl" method="POST" namespace="mw">
<s:submit name="smaster" value="Start Master" action="/mvc/stopWork"
title="Test" type="button" />
</s:form>
Any help appreciated. thx.
--
Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html
Really, I'm not out to destroy Microsoft. That will just be a
completely unintentional side effect."
-- Linus Torvalds
Re: PortletAction & Namespaces - s:url works, s:submit not
Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
Am Montag, 6. Oktober 2008 10:38:36 schrieben Sie:
> Can you store the url with an id an use it as an expression in the
> action attribute of the submit tag?
This works using a html link with s:url and %{myactionurl}.
However the form does only work in this form (like it should):
<s:form action="/mvc/startMaster" method="POST" namespace="mw">
<s:submit name="smaster" value="Start Master" title="Start Master"
type="button" />
</s:form>
One action url at form level and the button submits.
Using more than one button - which should invoke another action specified at
s:submit level does not work. Using action="%{myactionurl}" results in "no
action found for ...." exception.
Some other ideas? It seems to me the action attribute at s:submit is useless,
is it?
--
Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html
Really, I'm not out to destroy Microsoft. That will just be a
completely unintentional side effect."
-- Linus Torvalds
Re: PortletAction & Namespaces - s:url works, s:submit not
Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
Can you store the url with an id an use it as an expression in the
action attribute of the submit tag?
Nils-H
On Mon, Oct 6, 2008 at 9:16 AM, Torsten Krah
<tk...@fachschaft.imn.htwk-leipzig.de> wrote:
> Hi,
>
> I want to use the namespace feature of struts2 actions in a portal/portlet
> environment.
> Using s:url like this works (like shown in the struts2 delivered testcases):
>
> <s:form action="MasterControl" method="POST">
> <a href="<s:url portletUrlType="action" namespace="mw" action="/mvc/stopWork"
>></s:url>">Test</a>
> </s:form>
>
> Using Buttons to Submit the form, i am unable to get it working. Can anyone
> give my some hint what i am doing wrong (the s:submit tag got no
> portletUrlType or namespace attribute like s:url Tag):
>
> <s:form action="MasterControl" method="POST" namespace="mw">
> <s:submit name="smaster" value="Start Master" action="/mvc/stopWork"
> title="Test" type="button" />
> </s:form>
>
> Any help appreciated. thx.
>
> --
> Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
> Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html
>
> Really, I'm not out to destroy Microsoft. That will just be a
> completely unintentional side effect."
> -- Linus Torvalds
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org