Happy new year to you too :).

I changed example.jsp in showcase to this:

<s:set var="id" value="%{'exampleSubmit'}" />
<s:form action="%{id}!execute">

and the output html is (right):

<form id="exampleSubmit" name="exampleSubmit"
action="/struts2-showcase/tags/ui/exampleSubmit!execute.action"
method="post">

Could you set a breakpoint in ServletUrlRenderer.renderFormUrl() and
debug? The action name and method are parsed, depending on whether
"allowDynamicMethodCalls" is true, and there is some logic around the
action being found or not, so a few things can go wrong there.

thanks
musachy


On Thu, Jan 1, 2009 at 4:39 AM, Al Sutton <a...@funkyandroid.com> wrote:
> Happy new year all.
>
>
> I think I've found a couple of problems, one form based, and one rest plugin
> based (and these are reproducable :)).
>
> 1) In the JSP I have a form which uploads a file, the s:form tag is;
>
> <s:form    action="/releases/%{id}!createStage2"
>           method="POST"
>           onsubmit="document.getElementById('submit_button').disabled = 1;"
>           enctype="multipart/form-data">
>
> But when is sent to the browser it's become;
>
> <form id="7661" onsubmit="document.getElementById('submit_button').disabled
> = 1;" action="/AndroidPhoneApplications/releases/7661" method="POST"
> enctype="multipart/form-data">
>
> Which means the !createStage2 has been dropped.
>
> (This causes problems because the rest plugin uses !xxxx to specify the
> method to call in the action class).
>
>
> 2) With the !createStage2 dropped the rest plugin should be calling the
> create() method in the action class (as per the docs at
>  http://struts.apache.org/2.x/docs/rest-plugin.html), but it doesn't, it
> calls the execute() method instead.
>
> Al.
>
> --
> ======
> Funky Android Limited is registered in England & Wales with the company
> number  6741909. The registered head office is Kemp House, 152-160 City
> Road, London,  EC1V 2NX, UK.
> The views expressed in this email are those of the author and not
> necessarily those of Funky Android Limited, it's associates, or it's
> subsidiaries.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
> For additional commands, e-mail: dev-h...@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to