Charl Gerber wrote:
OK, I think I found the problem. So if someone can
come up with a feasible workaround, please! Its
nothing struts related, btw. Javascript.
I have a form onSubmit function which disabled all the
input buttons to prevent users from clicking buttons
twice or clicking another bu
You need to submit a form field -- could be anything -- with the name of the
cancel button Struts expects. Take a look at your generated HTML again to
get the name of the button. That needs to be in the submission for the
isCancelled() method to detect cancellation.
On 8/3/07, Charl Gerber <[EMAIL
OK, I think I found the problem. So if someone can
come up with a feasible workaround, please! Its
nothing struts related, btw. Javascript.
I have a form onSubmit function which disabled all the
input buttons to prevent users from clicking buttons
twice or clicking another button (the actions take
server
--- Paul Benedict <[EMAIL PROTECTED]> wrote:
> Is the problem with server or client validation?
>
> On 8/2/07, Charl Gerber <[EMAIL PROTECTED]>
> wrote:
> >
> > OK, more info if I remove the styleId
> attribute,
> > then it works. Maybe something to do with the
> actual
> > style id
Is the problem with server or client validation?
On 8/2/07, Charl Gerber <[EMAIL PROTECTED]> wrote:
>
> OK, more info if I remove the styleId attribute,
> then it works. Maybe something to do with the actual
> style id (#submitButton) not being declared in the
> .css?
>
>
>
> --- Paul Benedict
OK, more info if I remove the styleId attribute,
then it works. Maybe something to do with the actual
style id (#submitButton) not being declared in the
.css?
--- Paul Benedict <[EMAIL PROTECTED]> wrote:
> This is interesting. The name isn't changing so I
> don't know what is going
> on. Ca
You mean check in my action class?
Why should the name change? Its the same for both
"cancel" buttons, one works, the other not just
the id and class extras that "breaks" it.
--- Paul Benedict <[EMAIL PROTECTED]> wrote:
> This is interesting. The name isn't changing so I
> don't know what i
This is interesting. The name isn't changing so I don't know what is going
on. Can you debug into the Controller and tell me what you see when it tries
to detect when the cancel flag?
On 8/2/07, Charl Gerber <[EMAIL PROTECTED]> wrote:
>
> name="org.apache.struts.taglib.html.CANCEL"
> value="Cance
> Paste in the generated HTML for both cases please.
>
> Thanks,
> Paul
>
> On 8/2/07, Charl Gerber <[EMAIL PROTECTED]>
> wrote:
> >
> > Hi,
> >
> > I've got this tag:
> >
> > > styleClass="submitbutton" />
> >
> > But the isCancelled() in the action then always
> return
> > false, even if
Paste in the generated HTML for both cases please.
Thanks,
Paul
On 8/2/07, Charl Gerber <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I've got this tag:
>
> styleClass="submitbutton" />
>
> But the isCancelled() in the action then always return
> false, even if I hit the cancel button.
>
> If I replace
Hi,
I've got this tag:
But the isCancelled() in the action then always return
false, even if I hit the cancel button.
If I replace the tag with a default
then it works. Looks like something with the generated
ID and CLASS attributes that's fishy. Its worth
mentioning that the styleId 'cance
d setter for String
"jvType".
All in all, the page shows a blank page when submitted, no errors etc
Thanks in advance.
Regards,
Amit
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Thursday, March 15, 2007 12:08 PM
To: user@struts.apache.org
[EMAIL PROTECTED] wrote:
Hi,
I have a navigation page which takes me to pageA.jsp throw an
PageA.jsp has a textbox, a submit button and a cancel button.
If I navigate through the index.jsp navigation menu to goto PageA.jsp,
the cancel and submit requests don't work - they both return a blank
pa
Hi,
I have a navigation page which takes me to pageA.jsp throw an
PageA.jsp has a textbox, a submit button and a cancel button.
If I navigate through the index.jsp navigation menu to goto PageA.jsp,
the cancel and submit requests don't work - they both return a blank
page - no cancel is captured
I wanted to reply with same, but wanted to verify it first. Turns out,
that many (all?) Struts tags allow text content. I did not know that.
Actually, some tags mention this, most do not. Should one assume, that
"value" attribute can always be substituted with text content (I can
look in the code,
I believe you can specify the value in the body of the tag...
Niall
- Original Message -
From: "Durham David R Jr Ctr 805 CSPTS/SCE" <[EMAIL PROTECTED]>
Sent: Wednesday, May 04, 2005 10:54 PM
Hmm, I'll have to look at this. My reason for not using
is that I need to spe
You can specify the "value" attribute with
>> Try using
>>
>>
>
> Hmm, I'll have to look at this. My reason for not using
> is that I need to specify the "value" as a message resources property.
>
>> " onclick="bCancel=true;" type="submit">
>
> Thanks.
>
> - Dave
>
> --
> tag submits "org.apache.struts.taglib.html.CANCEL"
> as request parameter. Then RequestProcessor checks for
> "org.apache.struts.taglib.html.CANCEL" request key and sets
> "org.apache.struts.action.CANCEL" (that is, Globals.CANCEL_KEY)
> attribute, which is checked by Action.isCancelled()
Ah,
> Try using
>
>
Hmm, I'll have to look at this. My reason for not using
is that I need to specify the "value" as a message resources property.
> " onclick="bCancel=true;" type="submit">
Thanks.
- Dave
-
To unsubscribe, e-m
Try using
or
" onclick="bCancel=true;" type="submit">
> I've got a jsp chunk like this:
>
> value="">
>
>
> And this code in an action:
>
> if (isCancelled(request)) {
> // do something
> }
>
> When I click cancel, isCancelled(request) returns false. Checking the
Why don't you just use instead of setting name manually
into generic input element?
tag submits "org.apache.struts.taglib.html.CANCEL" as
request parameter. Then RequestProcessor checks for
"org.apache.struts.taglib.html.CANCEL" request key and sets
"org.apache.struts.action.CANCEL" (that is, Gl
I've got a jsp chunk like this:
">
And this code in an action:
if (isCancelled(request)) {
// do something
}
When I click cancel, isCancelled(request) returns false. Checking the
Action.isCancelled() method reveals that it looks for a request
attribute not a request parame
Hi all,
Is there a way to use html:link in a way that it acts like html:cancel, in
other words automatically skip validation?
This seems to work but I wonder if there is a better way?
Cancel
Thanks,
Abdullah
Eddie Bush wrote the following on 4/12/2005 12:42 AM:
I personally handle this by having a javascript variable called
"isCancelled" which I initialize to false. The onclick handler for my
cancel button sets it to true. In my validation JavaScript, I check
for this value first thing off the bat.
W
ransaction tokens
> (built into Struts) and a processing/wait page. This keeps users busy
> watching instead of wondering why the page hasn't changed.
>
> --Kevin
>
> -Original Message-
> From: Derrick Koes [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 1
onday, April 11, 2005 1:42 PM
To: [EMAIL PROTECTED]
Subject: html:cancel question
I have a function to disable buttons onsubmit because I don't want the
user to keep clicking, especially for long running actions. However,
this seems to interfere when the button is an html:cancel, which is a
type
-Original Message-
From: Derrick Koes [mailto:[EMAIL PROTECTED]
Sent: Monday, April 11, 2005 10:42 PM
To: [EMAIL PROTECTED]
Subject: html:cancel question
I have a function to disable buttons onsubmit because I don't want the user
to keep clicking, especially for long running actions. However,
I have a function to disable buttons onsubmit because I don't want the user to
keep clicking, especially for long running actions. However, this seems to
interfere when the button is an html:cancel, which is a type of submit. It
seems to ignore the correct behavior of cancelling and att
ver, this seems to
interfere when the button is an html:cancel, which is a type of submit. It
seems to ignore the correct behavior of cancelling and attempts to do a
validated submit. What do I need to do to disable buttons AND get cancel to
work properly?
function disable(form)
{
I have a function to disable buttons onsubmit because I don't want the user to
keep clicking, especially for long running actions. However, this seems to
interfere when the button is an html:cancel, which is a type of submit. It
seems to ignore the correct behavior of cancelling and att
er@struts.apache.org
Subject: LookupDispatchAction : Cancel Button : html:cancel
It appears that extending LookupDispatchAction does *not* cause
validation to be bypassed when the following tag is used in a JSP:
Two Questions
1) Are we incorrect in our observation?
2) Does anyone have a
It appears that extending LookupDispatchAction does *not* cause
validation to be bypassed when the following tag is used in a JSP:
Two Questions
1) Are we incorrect in our observation?
2) Does anyone have a better solution than the attached?
// Message for cancel button.
publi
Hi,
I have two almost identical jsp pages with cancel buttons.
I'm using dispatch action so method "cancel" in my action just does a forward
to some other page.
In the documentation it's said that cancel "...causes the action servlet to
bypass calling the associated form bean validate() meth
andy wix wrote the following on 9/14/2004 6:27 AM:
I have tried all the other suggestions in every combination but can't
get anything more elegant to work. This works but I'm not looking
forward to the code review!
Just one more reason that I really like calling the validation manually
from my
Hi,
Just for the record, I have contrived a particularly nasty work-around for
this problem and share it in case anyone ever ends up as desperate as me!
To recap, I have 3 buttons on a form including a cancel button for which
there should be no validation.
Because I have implemented a LookupDis
andy wix wrote:
Hi,
Sorry to harp on about this but I am sure html:cancel must work, as it
is fundamental to the way sites flow!
It says the following about the html:cancel 'property' attribute in the
Html Tag Developer Guide:
"WARNING - If you set this attribute to a value
Hi,
Sorry to harp on about this but I am sure html:cancel must work, as it is
fundamental to the way sites flow!
It says the following about the html:cancel 'property' attribute in the Html
Tag Developer Guide:
"WARNING - If you set this attribute to a value other than the defa
What I usually do is check for isCancelled() in my Action (or
BaseAction) before anything else so I can forward to the appropriate
place if cancel was clicked.
As for the validation, I had to put my validation in a private method
in the Action instead of using the one in the ActionForm.
On Wed, 0
Hi,
Has anyone else had a problem with this?
I am using Struts 1.1 but presume it has worked in this and previous
versions as it must come up in almost every project.
I cannot switch validation to false as my submit button does require
validation.
I suppose I could put the cancel and submit butto
I believe the validation still happens because the validation step
occurs before the appropriate method in the action class in
determined. I got around this by turning off automatic validation.
On Tue, 07 Sep 2004 16:59:48 +, andy wix <[EMAIL PROTECTED]> wrote:
> Hi,
>
> When using the foll
PROTECTED]
Sent: Tuesday, September 07, 2004 10:00 AM
To: [EMAIL PROTECTED]
Subject: html:cancel usage
Hi,
When using the following tag, my form still gets validated when I click the
cancel button.
The cancel method gets called correctly in my LookupDispatchAction class.
The tag is within an
Hi,
When using the following tag, my form still gets validated when I click the
cancel button.
The cancel method gets called correctly in my LookupDispatchAction class.
The tag is within an html:form tag as I believe it should be.
Does anyone have a working example of this tag or know of a d
Hi,
Sorry, my heading was a little mis-leading. The problem is that I get
validation carried out when I click the html:cancel button and I don't want
validation carried out in this case.
Thanks,
Andy
_
Express yourself with
Andy,
Why would you want to validate on cancel?
If you really want to do that, use html:submit instead and just label
the button Cancel and process accordingly in your action (forward?)
Dean Hoover
andy wix wrote:
Hi,
I have a form with 2 buttons (one html:submit, the other html:cancel)
and have
Hi,
I have a form with 2 buttons (one html:submit, the other html:cancel) and
have implemented a LookupDispatchAction class to handle them.
The 'save' button needs to validate the user entry and the 'cancel' button
does not.
From reading the html:cancel tag's API,
45 matches
Mail list logo