You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Charl Gerber <ch...@yahoo.com> on 2007/08/02 18:29:59 UTC

problem with html:cancel

Hi,

I've got this tag:

<html:cancel styleId="cancelButton"
styleClass="submitbutton" />

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

<html:cancel></html:cancel>

then it works. Looks like something with the generated
ID and CLASS attributes that's fishy. Its worth
mentioning that the styleId 'cancelButton' isn't
defined in my css (but class 'submitbutton' is), I
merely use it to get a handle on the button
(document.getElementById()) to disable/enabled it
using javascript.

Any ideas?

Thanks.


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


Re: problem with html:cancel

Posted by Charl Gerber <ch...@yahoo.com>.
server


--- Paul Benedict <pb...@apache.org> wrote:

> Is the problem with server or client validation?
> 
> On 8/2/07, Charl Gerber <ch...@yahoo.com>
> 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 <pb...@apache.org> wrote:
> >
> > > 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 <ch...@yahoo.com>
> > > wrote:
> > > >
> > > > <input type="submit"
> > > > name="org.apache.struts.taglib.html.CANCEL"
> > > > value="Cancel" onclick="bCancel=true;">
> > > >
> > > > <input type="submit"
> > > > name="org.apache.struts.taglib.html.CANCEL"
> > > > value="Cancel" onclick="bCancel=true;"
> > > > id="cancelButton" class="submitbutton">
> > > >
> > > >
> > > >
> > > > > Paste in the generated HTML for both cases
> > > please.
> > > > >
> > > > > Thanks,
> > > > > Paul
> > > > >
> > > > > On 8/2/07, Charl Gerber
> <ch...@yahoo.com>
> > > > > wrote:
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I've got this tag:
> > > > > >
> > > > > > <html:cancel styleId="cancelButton"
> > > > > > styleClass="submitbutton" />
> > > > > >
> > > > > > 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
> > > > > >
> > > > > > <html:cancel></html:cancel>
> > > > > >
> > > > > > then it works. Looks like something with
> the
> > > > > generated
> > > > > > ID and CLASS attributes that's fishy. Its
> > > worth
> > > > > > mentioning that the styleId 'cancelButton'
> > > isn't
> > > > > > defined in my css (but class
> 'submitbutton'
> > > is), I
> > > > > > merely use it to get a handle on the
> button
> > > > > > (document.getElementById()) to
> disable/enabled
> > > it
> > > > > > using javascript.
> > > > > >
> > > > > > Any ideas?
> > > > > >
> > > > > > Thanks.
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
> > > > > user-unsubscribe@struts.apache.org
> > > > > > For additional commands, e-mail:
> > > > > user-help@struts.apache.org
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail:
> > > user-help@struts.apache.org
> > > >
> > > >
> > >
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >
> 


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


Re: problem with html:cancel

Posted by Paul Benedict <pb...@apache.org>.
Is the problem with server or client validation?

On 8/2/07, Charl Gerber <ch...@yahoo.com> 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 <pb...@apache.org> wrote:
>
> > 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 <ch...@yahoo.com>
> > wrote:
> > >
> > > <input type="submit"
> > > name="org.apache.struts.taglib.html.CANCEL"
> > > value="Cancel" onclick="bCancel=true;">
> > >
> > > <input type="submit"
> > > name="org.apache.struts.taglib.html.CANCEL"
> > > value="Cancel" onclick="bCancel=true;"
> > > id="cancelButton" class="submitbutton">
> > >
> > >
> > >
> > > > Paste in the generated HTML for both cases
> > please.
> > > >
> > > > Thanks,
> > > > Paul
> > > >
> > > > On 8/2/07, Charl Gerber <ch...@yahoo.com>
> > > > wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > I've got this tag:
> > > > >
> > > > > <html:cancel styleId="cancelButton"
> > > > > styleClass="submitbutton" />
> > > > >
> > > > > 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
> > > > >
> > > > > <html:cancel></html:cancel>
> > > > >
> > > > > then it works. Looks like something with the
> > > > generated
> > > > > ID and CLASS attributes that's fishy. Its
> > worth
> > > > > mentioning that the styleId 'cancelButton'
> > isn't
> > > > > defined in my css (but class 'submitbutton'
> > is), I
> > > > > merely use it to get a handle on the button
> > > > > (document.getElementById()) to disable/enabled
> > it
> > > > > using javascript.
> > > > >
> > > > > Any ideas?
> > > > >
> > > > > Thanks.
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > user-unsubscribe@struts.apache.org
> > > > > For additional commands, e-mail:
> > > > user-help@struts.apache.org
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> > user-help@struts.apache.org
> > >
> > >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: problem with html:cancel

Posted by Charl Gerber <ch...@yahoo.com>.
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 <pb...@apache.org> wrote:

> 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 <ch...@yahoo.com>
> wrote:
> >
> > <input type="submit"
> > name="org.apache.struts.taglib.html.CANCEL"
> > value="Cancel" onclick="bCancel=true;">
> >
> > <input type="submit"
> > name="org.apache.struts.taglib.html.CANCEL"
> > value="Cancel" onclick="bCancel=true;"
> > id="cancelButton" class="submitbutton">
> >
> >
> >
> > > Paste in the generated HTML for both cases
> please.
> > >
> > > Thanks,
> > > Paul
> > >
> > > On 8/2/07, Charl Gerber <ch...@yahoo.com>
> > > wrote:
> > > >
> > > > Hi,
> > > >
> > > > I've got this tag:
> > > >
> > > > <html:cancel styleId="cancelButton"
> > > > styleClass="submitbutton" />
> > > >
> > > > 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
> > > >
> > > > <html:cancel></html:cancel>
> > > >
> > > > then it works. Looks like something with the
> > > generated
> > > > ID and CLASS attributes that's fishy. Its
> worth
> > > > mentioning that the styleId 'cancelButton'
> isn't
> > > > defined in my css (but class 'submitbutton'
> is), I
> > > > merely use it to get a handle on the button
> > > > (document.getElementById()) to disable/enabled
> it
> > > > using javascript.
> > > >
> > > > Any ideas?
> > > >
> > > > Thanks.
> > > >
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail:
> > > user-help@struts.apache.org
> > > >
> > > >
> > >
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >
> 


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


Re: problem with html:cancel

Posted by Charl Gerber <ch...@yahoo.com>.
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 <pb...@apache.org> wrote:

> 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 <ch...@yahoo.com>
> wrote:
> >
> > <input type="submit"
> > name="org.apache.struts.taglib.html.CANCEL"
> > value="Cancel" onclick="bCancel=true;">
> >
> > <input type="submit"
> > name="org.apache.struts.taglib.html.CANCEL"
> > value="Cancel" onclick="bCancel=true;"
> > id="cancelButton" class="submitbutton">
> >
> >
> >
> > > Paste in the generated HTML for both cases
> please.
> > >
> > > Thanks,
> > > Paul
> > >
> > > On 8/2/07, Charl Gerber <ch...@yahoo.com>
> > > wrote:
> > > >
> > > > Hi,
> > > >
> > > > I've got this tag:
> > > >
> > > > <html:cancel styleId="cancelButton"
> > > > styleClass="submitbutton" />
> > > >
> > > > 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
> > > >
> > > > <html:cancel></html:cancel>
> > > >
> > > > then it works. Looks like something with the
> > > generated
> > > > ID and CLASS attributes that's fishy. Its
> worth
> > > > mentioning that the styleId 'cancelButton'
> isn't
> > > > defined in my css (but class 'submitbutton'
> is), I
> > > > merely use it to get a handle on the button
> > > > (document.getElementById()) to disable/enabled
> it
> > > > using javascript.
> > > >
> > > > Any ideas?
> > > >
> > > > Thanks.
> > > >
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail:
> > > user-help@struts.apache.org
> > > >
> > > >
> > >
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >
> 


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


Re: problem with html:cancel

Posted by Paul Benedict <pb...@apache.org>.
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 <ch...@yahoo.com> wrote:
>
> <input type="submit"
> name="org.apache.struts.taglib.html.CANCEL"
> value="Cancel" onclick="bCancel=true;">
>
> <input type="submit"
> name="org.apache.struts.taglib.html.CANCEL"
> value="Cancel" onclick="bCancel=true;"
> id="cancelButton" class="submitbutton">
>
>
>
> > Paste in the generated HTML for both cases please.
> >
> > Thanks,
> > Paul
> >
> > On 8/2/07, Charl Gerber <ch...@yahoo.com>
> > wrote:
> > >
> > > Hi,
> > >
> > > I've got this tag:
> > >
> > > <html:cancel styleId="cancelButton"
> > > styleClass="submitbutton" />
> > >
> > > 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
> > >
> > > <html:cancel></html:cancel>
> > >
> > > then it works. Looks like something with the
> > generated
> > > ID and CLASS attributes that's fishy. Its worth
> > > mentioning that the styleId 'cancelButton' isn't
> > > defined in my css (but class 'submitbutton' is), I
> > > merely use it to get a handle on the button
> > > (document.getElementById()) to disable/enabled it
> > > using javascript.
> > >
> > > Any ideas?
> > >
> > > Thanks.
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> > user-help@struts.apache.org
> > >
> > >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: problem with html:cancel

Posted by Charl Gerber <ch...@yahoo.com>.
<input type="submit"
name="org.apache.struts.taglib.html.CANCEL"
value="Cancel" onclick="bCancel=true;">

<input type="submit"
name="org.apache.struts.taglib.html.CANCEL"
value="Cancel" onclick="bCancel=true;"
id="cancelButton" class="submitbutton">



> Paste in the generated HTML for both cases please.
> 
> Thanks,
> Paul
> 
> On 8/2/07, Charl Gerber <ch...@yahoo.com>
> wrote:
> >
> > Hi,
> >
> > I've got this tag:
> >
> > <html:cancel styleId="cancelButton"
> > styleClass="submitbutton" />
> >
> > 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
> >
> > <html:cancel></html:cancel>
> >
> > then it works. Looks like something with the
> generated
> > ID and CLASS attributes that's fishy. Its worth
> > mentioning that the styleId 'cancelButton' isn't
> > defined in my css (but class 'submitbutton' is), I
> > merely use it to get a handle on the button
> > (document.getElementById()) to disable/enabled it
> > using javascript.
> >
> > Any ideas?
> >
> > Thanks.
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >
> 


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


Re: problem with html:cancel

Posted by Paul Benedict <pb...@apache.org>.
Paste in the generated HTML for both cases please.

Thanks,
Paul

On 8/2/07, Charl Gerber <ch...@yahoo.com> wrote:
>
> Hi,
>
> I've got this tag:
>
> <html:cancel styleId="cancelButton"
> styleClass="submitbutton" />
>
> 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
>
> <html:cancel></html:cancel>
>
> then it works. Looks like something with the generated
> ID and CLASS attributes that's fishy. Its worth
> mentioning that the styleId 'cancelButton' isn't
> defined in my css (but class 'submitbutton' is), I
> merely use it to get a handle on the button
> (document.getElementById()) to disable/enabled it
> using javascript.
>
> Any ideas?
>
> Thanks.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>