AW: AW: [Wicket-user] Link#setEnabled( false ) does not disable button element

2006-12-13 Thread Korbinian Bachl
Hmmm.. seems im outdated here.

Thanks for the info,

Regards
 

> -Ursprüngliche Nachricht-
> Von: Erik van Oosten [mailto:[EMAIL PROTECTED] 
> Gesendet: Mittwoch, 13. Dezember 2006 11:26
> An: wicket-dev@incubator.apache.org
> Betreff: Re: AW: [Wicket-user] Link#setEnabled( false ) does 
> not disable button element
> 
> Actually you can disable a button (I believe starting with HTML 4.0). 
> For example:
> 
> 
> This even works well for a css styled button.
> 
> Regards,
>  Erik.
> 
> Korbinian Bachl schreef:
> > You know that HTML does not provide a "disabled" button?- 
> so what do 
> > you expect? in case of link its easy as its just underlined 
> text, but 
> > what do you want in case of button? - img wont work, as usually CSS 
> > styles it, text isnt a button so the options are gone
> >
> > Regards
> >  
> >
> >   
> >> -Ursprüngliche Nachricht-
> >> Von: Paolo Di Tommaso [mailto:[EMAIL PROTECTED]
> >> Gesendet: Mittwoch, 13. Dezember 2006 08:33
> >> An: wicket-dev@incubator.apache.org
> >> Betreff: Re: [Wicket-user] Link#setEnabled( false ) does 
> not disable 
> >> button element
> >>
> >> I disagree about that.
> >>
> >> Methods semantics for components should be uniform, this 
> is the most 
> >> important rule for API simplicity and coherence.
> >>
> >> If Button#setEnabled( false ) is rendering a  button in disabled 
> >> state, I will expect that Link#setEnabled( false ) attached to a 
> >>  >> />  tag will do the same.
> >>
> >> I know that this is a very little thing, but great stuff 
> are made of 
> >> little things also.
> >>
> >> Thanks,
> >>
> >> - Paolo
> >>
> >>
> >>
> >> On 12/12/06, Erik van Oosten <[EMAIL PROTECTED]> wrote:
> >> 
> >>> Well, a Link can be attached to any HTML element so I think
> >>>   
> >> it can not
> >> 
> >>> know (in general) how to render the element disabled. A Button 
> >>> component can only be attached to an html button; for an
> >>>   
> >> html button
> >> 
> >>> it is known what to do.
> >>> One could argue that the Link component can see what type
> >>>   
> >> of element
> >> 
> >>> it is attached to and do something appropriate. But that
> >>>   
> >> would blow up
> >> 
> >>> the implementation of Link which is probably not a good thing.
> >>>
> >>> Regards,
> >>>  Erik.
> >>>
> >>> Paolo Di Tommaso schreef:
> >>>   
> >>>> Invoking the Link#setEnabled( false ) on a  >>>> 
> >> type="button" />
> >> 
> >>>> element will not disable the component.
> >>>>
> >>>> The onclick handler will not be invoked (disabled) but it
> >>>> 
> >> does not
> >> 
> >>>> apper as a disabled component.
> >>>>
> >>>> Instead invoking Button#setEnabled( false ) will render
> >>>> 
> >> the button
> >> 
> >>>> disabled.
> >>>>
> >>>>
> >>>> I think it would be simpler if it will be rendered
> >>>> 
> >> disabled in both
> >> 
> >>>> cases. Won't be?
> >>>>
> >>>>
> >>>>
> >>>> - Paolo
> >>>> 
> >>> --
> >>> Erik van Oosten
> >>> http://www.day-to-day-stuff.blogspot.com/
> >>>
> >>>
> >>>
> >>>   
> >
> >   
> 
> --
> Erik van Oosten
> http://www.day-to-day-stuff.blogspot.com/
> 
> 



Re: [Wicket-user] Link#setEnabled( false ) does not disable button element

2006-12-13 Thread Eelco Hillenius

On 12/13/06, Erik van Oosten <[EMAIL PROTECTED]> wrote:

True.
To make it rock solid, I think it should be adaptable and/or extendable.
IMHO it is not fair to expect that the change you propose is done
perfectly from the start and maybe not even ever.


Oh, common', what fun is playing fair? ;)


If you go for slightly less rock solid, one can write code for every
component known in the html specification (and perhaps some more).
Anyway, supporting buttons is a great first step.


Yeah, agreed.

Eelco


Re: AW: [Wicket-user] Link#setEnabled( false ) does not disable button element

2006-12-13 Thread Erik van Oosten
Actually you can disable a button (I believe starting with HTML 4.0). 
For example:

   

This even works well for a css styled button.

Regards,
Erik.

Korbinian Bachl schreef:

You know that HTML does not provide a "disabled" button?- so what do you
expect? in case of link its easy as its just underlined text, but what do
you want in case of button? - img wont work, as usually CSS styles it, text
isnt a button so the options are gone

Regards
 

  

-Ursprüngliche Nachricht-
Von: Paolo Di Tommaso [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 13. Dezember 2006 08:33

An: wicket-dev@incubator.apache.org
Betreff: Re: [Wicket-user] Link#setEnabled( false ) does not 
disable button element


I disagree about that.

Methods semantics for components should be uniform, this is 
the most important rule for API simplicity and coherence.


If Button#setEnabled( false ) is rendering a  button in 
disabled state, I will expect that Link#setEnabled( false ) 
attached to a 
/>  tag will do the same.

I know that this is a very little thing, but great stuff are 
made of little things also.


Thanks,

- Paolo



On 12/12/06, Erik van Oosten <[EMAIL PROTECTED]> wrote:

Well, a Link can be attached to any HTML element so I think 
  
it can not 

know (in general) how to render the element disabled. A Button 
component can only be attached to an html button; for an 
  
html button 


it is known what to do.
One could argue that the Link component can see what type 
  
of element 

it is attached to and do something appropriate. But that 
  
would blow up 


the implementation of Link which is probably not a good thing.

Regards,
 Erik.

Paolo Di Tommaso schreef:
  
Invoking the Link#setEnabled( false ) on a 
type="button" /> 


element will not disable the component.

The onclick handler will not be invoked (disabled) but it 

does not 


apper as a disabled component.

Instead invoking Button#setEnabled( false ) will render 

the button 


disabled.


I think it would be simpler if it will be rendered 

disabled in both 


cases. Won't be?



- Paolo


--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/



  


  


--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/



AW: [Wicket-user] Link#setEnabled( false ) does not disable button element

2006-12-13 Thread Korbinian Bachl
You know that HTML does not provide a "disabled" button?- so what do you
expect? in case of link its easy as its just underlined text, but what do
you want in case of button? - img wont work, as usually CSS styles it, text
isnt a button so the options are gone

Regards
 

> -Ursprüngliche Nachricht-
> Von: Paolo Di Tommaso [mailto:[EMAIL PROTECTED] 
> Gesendet: Mittwoch, 13. Dezember 2006 08:33
> An: wicket-dev@incubator.apache.org
> Betreff: Re: [Wicket-user] Link#setEnabled( false ) does not 
> disable button element
> 
> I disagree about that.
> 
> Methods semantics for components should be uniform, this is 
> the most important rule for API simplicity and coherence.
> 
> If Button#setEnabled( false ) is rendering a  button in 
> disabled state, I will expect that Link#setEnabled( false ) 
> attached to a  />  tag will do the same.
> 
> I know that this is a very little thing, but great stuff are 
> made of little things also.
> 
> Thanks,
> 
> - Paolo
> 
> 
> 
> On 12/12/06, Erik van Oosten <[EMAIL PROTECTED]> wrote:
> >
> > Well, a Link can be attached to any HTML element so I think 
> it can not 
> > know (in general) how to render the element disabled. A Button 
> > component can only be attached to an html button; for an 
> html button 
> > it is known what to do.
> > One could argue that the Link component can see what type 
> of element 
> > it is attached to and do something appropriate. But that 
> would blow up 
> > the implementation of Link which is probably not a good thing.
> >
> > Regards,
> >  Erik.
> >
> > Paolo Di Tommaso schreef:
> > >
> > > Invoking the Link#setEnabled( false ) on a  type="button" /> 
> > > element will not disable the component.
> > >
> > > The onclick handler will not be invoked (disabled) but it 
> does not 
> > > apper as a disabled component.
> > >
> > > Instead invoking Button#setEnabled( false ) will render 
> the button 
> > > disabled.
> > >
> > >
> > > I think it would be simpler if it will be rendered 
> disabled in both 
> > > cases. Won't be?
> > >
> > >
> > >
> > > - Paolo
> >
> > --
> > Erik van Oosten
> > http://www.day-to-day-stuff.blogspot.com/
> >
> >
> >
> 



Re: [Wicket-user] Link#setEnabled( false ) does not disable button element

2006-12-13 Thread Erik van Oosten

True.
To make it rock solid, I think it should be adaptable and/or extendable. 
IMHO it is not fair to expect that the change you propose is done 
perfectly from the start and maybe not even ever.


If you go for slightly less rock solid, one can write code for every 
component known in the html specification (and perhaps some more). 
Anyway, supporting buttons is a great first step.


Regards,
Erik.


Eelco Hillenius wrote:

You're right of course. It would blow up link quite some, but that's
just code; nothing that would hurt your runtime system. Can anyone
(you?) provide a rock-solid patch for this and/ or open up an issue at
JIRA?

Eelco 


--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/



Re: [Wicket-user] Link#setEnabled( false ) does not disable button element

2006-12-13 Thread Erik van Oosten

Hi Paolo,


Actually, everything is uniform at this moment. The contract for 
Component#setEnabled says:
* Sets whether this component is enabled. Specific components may 
decide to

* implement special behavior that uses this property, like web form
* components that add a disabled='disabled' attribute when enabled is
* false. If it is not enabled, it will not be allowed to call any 
listener
* method on it (e.g. Link.onClick) and the model object will be 
protected

* (for the common use cases, not for programmer's misuse)

Both Link and Button adhere to this contract.
Furthermore Link and Button do not have an extends relation, otherwise 
the contract could be tightened by one of them.



But I understand your point. Once you expect a component to render 
differently when it is not enabled, you would like all components to do so.


I know that this is a very little thing, but great stuff are made of 
little

things also.

I like that statement :)

Regards,
Erik.


Paolo Di Tommaso schreef:

I disagree about that.

Methods semantics for components should be uniform, this is the most
important rule for API simplicity and coherence.

If Button#setEnabled( false ) is rendering a  button in disabled state, I
will expect that Link#setEnabled( false ) attached to a type="button"

/>  tag will do the same.

I know that this is a very little thing, but great stuff are made of 
little

things also.

Thanks,

- Paolo



--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/



Re: [Wicket-user] Link#setEnabled( false ) does not disable button element

2006-12-13 Thread Eelco Hillenius

That would be great, thanks.

Eelco


On 12/13/06, Paolo Di Tommaso <[EMAIL PROTECTED]> wrote:

I will start opening an issue.

On free time I will try to provide a patch .. :)

Thanks, Paolo


On 12/13/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
>
> You're right of course. It would blow up link quite some, but that's
> just code; nothing that would hurt your runtime system. Can anyone
> (you?) provide a rock-solid patch for this and/ or open up an issue at
> JIRA?
>
> Eelco
>
> On 12/12/06, Paolo Di Tommaso <[EMAIL PROTECTED]> wrote:
> > I disagree about that.
> >
> > Methods semantics for components should be uniform, this is the most
> > important rule for API simplicity and coherence.
> >
> > If Button#setEnabled( false ) is rendering a  button in disabled state,
> I
> > will expect that Link#setEnabled( false ) attached to a  type="button"
> > />  tag will do the same.
> >
> > I know that this is a very little thing, but great stuff are made of
> little
> > things also.
> >
> > Thanks,
> >
> > - Paolo
> >
> >




Re: [Wicket-user] Link#setEnabled( false ) does not disable button element

2006-12-13 Thread Paolo Di Tommaso

I will start opening an issue.

On free time I will try to provide a patch .. :)

Thanks, Paolo


On 12/13/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:


You're right of course. It would blow up link quite some, but that's
just code; nothing that would hurt your runtime system. Can anyone
(you?) provide a rock-solid patch for this and/ or open up an issue at
JIRA?

Eelco

On 12/12/06, Paolo Di Tommaso <[EMAIL PROTECTED]> wrote:
> I disagree about that.
>
> Methods semantics for components should be uniform, this is the most
> important rule for API simplicity and coherence.
>
> If Button#setEnabled( false ) is rendering a  button in disabled state,
I
> will expect that Link#setEnabled( false ) attached to a  />  tag will do the same.
>
> I know that this is a very little thing, but great stuff are made of
little
> things also.
>
> Thanks,
>
> - Paolo
>
>


Re: [Wicket-user] Link#setEnabled( false ) does not disable button element

2006-12-12 Thread Eelco Hillenius

You're right of course. It would blow up link quite some, but that's
just code; nothing that would hurt your runtime system. Can anyone
(you?) provide a rock-solid patch for this and/ or open up an issue at
JIRA?

Eelco

On 12/12/06, Paolo Di Tommaso <[EMAIL PROTECTED]> wrote:

I disagree about that.

Methods semantics for components should be uniform, this is the most
important rule for API simplicity and coherence.

If Button#setEnabled( false ) is rendering a  button in disabled state, I
will expect that Link#setEnabled( false ) attached to a   tag will do the same.

I know that this is a very little thing, but great stuff are made of little
things also.

Thanks,

- Paolo



On 12/12/06, Erik van Oosten <[EMAIL PROTECTED]> wrote:
>
> Well, a Link can be attached to any HTML element so I think it can not
> know (in general) how to render the element disabled. A Button component
> can only be attached to an html button; for an html button it is known
> what to do.
> One could argue that the Link component can see what type of element it
> is attached to and do something appropriate. But that would blow up the
> implementation of Link which is probably not a good thing.
>
> Regards,
>  Erik.
>
> Paolo Di Tommaso schreef:
> >
> > Invoking the Link#setEnabled( false ) on a 
> > element will not disable the component.
> >
> > The onclick handler will not be invoked (disabled) but it does not
> > apper as a disabled component.
> >
> > Instead invoking Button#setEnabled( false ) will render the button
> > disabled.
> >
> >
> > I think it would be simpler if it will be rendered disabled in both
> > cases. Won't be?
> >
> >
> >
> > - Paolo
>
> --
> Erik van Oosten
> http://www.day-to-day-stuff.blogspot.com/
>
>
>




Re: [Wicket-user] Link#setEnabled( false ) does not disable button element

2006-12-12 Thread Paolo Di Tommaso

I disagree about that.

Methods semantics for components should be uniform, this is the most
important rule for API simplicity and coherence.

If Button#setEnabled( false ) is rendering a  button in disabled state, I
will expect that Link#setEnabled( false ) attached to a   tag will do the same.

I know that this is a very little thing, but great stuff are made of little
things also.

Thanks,

- Paolo



On 12/12/06, Erik van Oosten <[EMAIL PROTECTED]> wrote:


Well, a Link can be attached to any HTML element so I think it can not
know (in general) how to render the element disabled. A Button component
can only be attached to an html button; for an html button it is known
what to do.
One could argue that the Link component can see what type of element it
is attached to and do something appropriate. But that would blow up the
implementation of Link which is probably not a good thing.

Regards,
 Erik.

Paolo Di Tommaso schreef:
>
> Invoking the Link#setEnabled( false ) on a 
> element will not disable the component.
>
> The onclick handler will not be invoked (disabled) but it does not
> apper as a disabled component.
>
> Instead invoking Button#setEnabled( false ) will render the button
> disabled.
>
>
> I think it would be simpler if it will be rendered disabled in both
> cases. Won't be?
>
>
>
> - Paolo

--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/