You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jörg Maurer <jo...@ucpmorgen.com> on 2003/03/01 17:21:07 UTC

Question using transactional tokens

Dear struts people ! 

What am i doing wrong - must be some sort of double submit, but why ?

Let me sketch my problem to you - using for the first time transactional
tokens, i have the following setup :
1. in my jsp :
<html:form action="/parameter">
.....
<html:link page='' onclick="submitSelect('save')" transaction='true'
styleClass="button">
           <bean:message key="label.buttons.WF.submit"/>
</html:link>
...
</html:form>

2. where submitSelect is a javascript function:
function submitSelect(method) {
    document.forms[0].method.value = method;
    document.forms[0].submit();
}

3. and in my action class subclassing dispatch action there is method
save(....).

Following strange behaviour (to me) occurs : 

1.) having beakpoint inside save(...) method in action class shows it
hit the right method and is working.
2.) but after "return mapping.findForward("WF_PARAMETER_CHOOSE");" from
my action, struts complains with status 404 :

	message Request[/parameter] does not contain handler parameter
named method

	description The request sent by the client was syntactically
incorrect (Request[/parameter] does not contain handler parameter named
method).

3.)it worked before deciding to use transactional tokens with :

                            <html:link
href="javascript:submitSelect('save')" styleClass="button">
                                <bean:message
key="label.buttons.WF.save"/>
                            </html:link> 

So your help is appreciated, thanks Jörg






---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Question using transactional tokens

Posted by Ray Madigan <ra...@madigans.org>.
I had a problem where if i declared a hidden field like:

<html:hidden name="foo" ...

and in java script i write a function

function tryit ( foo ) {
    document.forms[0].foo.value = foo;

the value of foo would be an object that represents the
hidden field foo, not the value passed in in the argument

I fixed it by rewriting the function
function tryit ( bar ) {
    document.forms[0].foo.value = bar;

im not sure - but this could be a problem for you.



-----Original Message-----
From: Jörg Maurer [mailto:joerg.maurer@ucpmorgen.com]
Sent: Saturday, March 01, 2003 8:21 AM
To: Struts Users Mailing List (E-mail)
Subject: Question using transactional tokens


Dear struts people !

What am i doing wrong - must be some sort of double submit, but why ?

Let me sketch my problem to you - using for the first time transactional
tokens, i have the following setup :
1. in my jsp :
<html:form action="/parameter">
.....
<html:link page='' onclick="submitSelect('save')" transaction='true'
styleClass="button">
           <bean:message key="label.buttons.WF.submit"/>
</html:link>
...
</html:form>

2. where submitSelect is a javascript function:
function submitSelect(method) {
    document.forms[0].method.value = method;
    document.forms[0].submit();
}

3. and in my action class subclassing dispatch action there is method
save(....).

Following strange behaviour (to me) occurs :

1.) having beakpoint inside save(...) method in action class shows it
hit the right method and is working.
2.) but after "return mapping.findForward("WF_PARAMETER_CHOOSE");" from
my action, struts complains with status 404 :

	message Request[/parameter] does not contain handler parameter
named method

	description The request sent by the client was syntactically
incorrect (Request[/parameter] does not contain handler parameter named
method).

3.)it worked before deciding to use transactional tokens with :

                            <html:link
href="javascript:submitSelect('save')" styleClass="button">
                                <bean:message
key="label.buttons.WF.save"/>
                            </html:link>

So your help is appreciated, thanks Jörg






---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org