You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Stanczak Group <ju...@stanczakgroup.com> on 2007/10/04 20:14:54 UTC

A button that does NOT submit form?

I don't want the cancel button to submit the form, is this the best 
method? I'm not sure I see how to do this. Is there examples?
@Override
        protected void delegateSubmit(IFormSubmittingComponent component) {
        }

-- 
Justin Stanczak
Stanczak Group
812-735-3600

"All that is necessary for the triumph of evil is that good men do nothing."
Edmund Burke


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: A button that does NOT submit form?

Posted by Stanczak Group <ju...@stanczakgroup.com>.
Ah, yes. Link-O-Matic. Use the docs, that's what they're there for. Sorry.

Stanczak Group wrote:
> Really new, but do you mean use the new Link() and <input... ? Like this:
>
> in code:
> add(new Link("cancel"){...});
>
> in html:
> <input type="button" wicket:id="cancel"...
>
> Like that?
>
> Igor Vaynberg wrote:
>> best method is to add a Link to <input type="button"
>>
>> -igor
>>
>>
>> On 10/4/07, Stanczak Group <ju...@stanczakgroup.com> wrote:
>>  
>>> I don't want the cancel button to submit the form, is this the best
>>> method? I'm not sure I see how to do this. Is there examples?
>>> @Override
>>>         protected void delegateSubmit(IFormSubmittingComponent 
>>> component) {
>>>         }
>>>
>>> -- 
>>> Justin Stanczak
>>> Stanczak Group
>>> 812-735-3600
>>>
>>> "All that is necessary for the triumph of evil is that good men do 
>>> nothing."
>>> Edmund Burke
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>     
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>   
>

-- 
Justin Stanczak
Stanczak Group
812-735-3600

"All that is necessary for the triumph of evil is that good men do nothing."
Edmund Burke


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: A button that does NOT submit form?

Posted by Martijn Dashorst <ma...@gmail.com>.
Yep! Not so new after all :)

Martijn

On 10/4/07, Stanczak Group <ju...@stanczakgroup.com> wrote:
> Really new, but do you mean use the new Link() and <input... ? Like this:
>
> in code:
> add(new Link("cancel"){...});
>
> in html:
> <input type="button" wicket:id="cancel"...
>
> Like that?
>
> Igor Vaynberg wrote:
> > best method is to add a Link to <input type="button"
> >
> > -igor
> >
> >
> > On 10/4/07, Stanczak Group <ju...@stanczakgroup.com> wrote:
> >
> >> I don't want the cancel button to submit the form, is this the best
> >> method? I'm not sure I see how to do this. Is there examples?
> >> @Override
> >>         protected void delegateSubmit(IFormSubmittingComponent component) {
> >>         }
> >>
> >> --
> >> Justin Stanczak
> >> Stanczak Group
> >> 812-735-3600
> >>
> >> "All that is necessary for the triumph of evil is that good men do nothing."
> >> Edmund Burke
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
>
> --
> Justin Stanczak
> Stanczak Group
> 812-735-3600
>
> "All that is necessary for the triumph of evil is that good men do nothing."
> Edmund Burke
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: A button that does NOT submit form?

Posted by Stanczak Group <ju...@stanczakgroup.com>.
Really new, but do you mean use the new Link() and <input... ? Like this:

in code:
add(new Link("cancel"){...});

in html:
<input type="button" wicket:id="cancel"...

Like that?

Igor Vaynberg wrote:
> best method is to add a Link to <input type="button"
>
> -igor
>
>
> On 10/4/07, Stanczak Group <ju...@stanczakgroup.com> wrote:
>   
>> I don't want the cancel button to submit the form, is this the best
>> method? I'm not sure I see how to do this. Is there examples?
>> @Override
>>         protected void delegateSubmit(IFormSubmittingComponent component) {
>>         }
>>
>> --
>> Justin Stanczak
>> Stanczak Group
>> 812-735-3600
>>
>> "All that is necessary for the triumph of evil is that good men do nothing."
>> Edmund Burke
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>   

-- 
Justin Stanczak
Stanczak Group
812-735-3600

"All that is necessary for the triumph of evil is that good men do nothing."
Edmund Burke


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: A button that does NOT submit form?

Posted by Igor Vaynberg <ig...@gmail.com>.
best method is to add a Link to <input type="button"

-igor


On 10/4/07, Stanczak Group <ju...@stanczakgroup.com> wrote:
> I don't want the cancel button to submit the form, is this the best
> method? I'm not sure I see how to do this. Is there examples?
> @Override
>         protected void delegateSubmit(IFormSubmittingComponent component) {
>         }
>
> --
> Justin Stanczak
> Stanczak Group
> 812-735-3600
>
> "All that is necessary for the triumph of evil is that good men do nothing."
> Edmund Burke
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: A button that does NOT submit form?

Posted by Matthijs Wensveen <m....@func.nl>.
Most (if not all) browsers, whether text-based or graphically, support 
submitting of forms, regardless of what the server does with the 
submitted information. On the other hand, not all browsers (fully) 
support javascript. So in my opinion a button that submits a form but 
does nothing with that data is better that a button that uses javascript 
to emulate a link.  I did not say *anything* about using a real link, 
that is, <a href= etc.

So if you want a *button* that does what the original poster wants, use 
setDefaultFormProcessing(false), but you might want to consider using a 
link proper.

And yes, let's talk accessibility, it's very important for some people. 
When it's possible to make an app that works for both groups with a 
little bit of extra effort, do so. Provided, of course, there is time 
(and money) to do so.

Matthijs.

BTW: Do we like top-posting or bottom-posting? I really don't care, but 
if there is a convention (as some mailing lists have), I'll conform to that.

Igor Vaynberg wrote:
> if you are going to start talking accessibility then that link should
> be an anchor period, not a button. buttons are bad if you do not need
> a form-submit :)
>
> -igor
>
>
> On 10/7/07, Matthijs Wensveen <m....@func.nl> wrote:
>   
>> Al Maw wrote:
>>     
>>> Stanczak Group wrote:
>>>       
>>>> I don't want the cancel button to submit the form, is this the best
>>>> method? I'm not sure I see how to do this. Is there examples?
>>>> @Override
>>>>        protected void delegateSubmit(IFormSubmittingComponent
>>>> component) {
>>>>        }
>>>>
>>>>         
>>> Also have a look at Button#setDefaultFormProcessing(false);
>>>
>>> Regards,
>>>
>>> Al
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>       
>> Button.setDefaultFormProcessing does submit the form (in the HTTP sense)
>> but the form's model is not updated. I think this is a better solution
>> because it doesn't require javascript (a Link on a <input> element
>> generates onclick), and thus more accessible.
>>
>> Matthijs
>>
>> --
>> Matthijs Wensveen
>> Func. Internet Integration
>> W http://www.func.nl
>> T +31 20 4230000
>> F +31 20 4223500
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>   


-- 
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 4230000
F +31 20 4223500 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: A button that does NOT submit form?

Posted by Igor Vaynberg <ig...@gmail.com>.
if you are going to start talking accessibility then that link should
be an anchor period, not a button. buttons are bad if you do not need
a form-submit :)

-igor


On 10/7/07, Matthijs Wensveen <m....@func.nl> wrote:
> Al Maw wrote:
> > Stanczak Group wrote:
> >> I don't want the cancel button to submit the form, is this the best
> >> method? I'm not sure I see how to do this. Is there examples?
> >> @Override
> >>        protected void delegateSubmit(IFormSubmittingComponent
> >> component) {
> >>        }
> >>
> >
> > Also have a look at Button#setDefaultFormProcessing(false);
> >
> > Regards,
> >
> > Al
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> Button.setDefaultFormProcessing does submit the form (in the HTTP sense)
> but the form's model is not updated. I think this is a better solution
> because it doesn't require javascript (a Link on a <input> element
> generates onclick), and thus more accessible.
>
> Matthijs
>
> --
> Matthijs Wensveen
> Func. Internet Integration
> W http://www.func.nl
> T +31 20 4230000
> F +31 20 4223500
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: A button that does NOT submit form?

Posted by Matthijs Wensveen <m....@func.nl>.
Al Maw wrote:
> Stanczak Group wrote:
>> I don't want the cancel button to submit the form, is this the best 
>> method? I'm not sure I see how to do this. Is there examples?
>> @Override
>>        protected void delegateSubmit(IFormSubmittingComponent 
>> component) {
>>        }
>>
>
> Also have a look at Button#setDefaultFormProcessing(false);
>
> Regards,
>
> Al
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
Button.setDefaultFormProcessing does submit the form (in the HTTP sense) 
but the form's model is not updated. I think this is a better solution 
because it doesn't require javascript (a Link on a <input> element 
generates onclick), and thus more accessible.

Matthijs

-- 
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 4230000
F +31 20 4223500 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: A button that does NOT submit form?

Posted by Al Maw <wi...@almaw.com>.
Stanczak Group wrote:
> I don't want the cancel button to submit the form, is this the best 
> method? I'm not sure I see how to do this. Is there examples?
> @Override
>        protected void delegateSubmit(IFormSubmittingComponent component) {
>        }
> 

Also have a look at Button#setDefaultFormProcessing(false);

Regards,

Al

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org