You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by mclev <ma...@idahotech.com> on 2007/11/16 18:06:47 UTC

Readonly checkbox

I have a case where I'm using a checkbox to show boolean data in a table.
However I want the data to be readonly.

Is there any way to make the CheckBox component readonly such that a user
could not change it from being checked to unchecked or vise versa?

matt clevenger
-- 
View this message in context: http://www.nabble.com/Readonly-checkbox-tf4822650.html#a13797345
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Readonly checkbox

Posted by Gabor Szokoli <sz...@gmail.com>.
On Nov 16, 2007 6:06 PM, mclev <ma...@idahotech.com> wrote:
>
> I have a case where I'm using a checkbox to show boolean data in a table.
> However I want the data to be readonly.

Try setEnabled(false), works on any Component.


Szocske

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


Re: Readonly checkbox

Posted by Martijn Dashorst <ma...@gmail.com>.
not 100% sure, but you could try:
<input type="checkbox" onclick="return false;" readonly="readonly" />

On Nov 17, 2007 2:28 AM, mclev <ma...@idahotech.com> wrote:

>
>
>
> Nick Heudecker wrote:
> >
> >
> > For textareas and textfields I always do "onfocus='this.blur();'".  It
> > might
> > work for checkboxes as well.
> >
> >
>
> Nick, tried this, didn't work. Also tried the readonly property and it
> didn't work. Thought about using the setEditable=false, but it doesn't
> look
> right.
>
> Think I will probably end up overriding the newCell method in the
> PropertyRenderableColumn class to return a special icon depending on the
> true/false value of my property.
>
> matt clevenger.
> --
> View this message in context:
> http://www.nabble.com/Readonly-checkbox-tf4822650.html#a13805025
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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-rc1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/

Re: Readonly checkbox

Posted by mclev <ma...@idahotech.com>.


Nick Heudecker wrote:
> 
> 
> For textareas and textfields I always do "onfocus='this.blur();'".  It
> might
> work for checkboxes as well.
> 
> 

Nick, tried this, didn't work. Also tried the readonly property and it
didn't work. Thought about using the setEditable=false, but it doesn't look
right.   

Think I will probably end up overriding the newCell method in the
PropertyRenderableColumn class to return a special icon depending on the
true/false value of my property.

matt clevenger.
-- 
View this message in context: http://www.nabble.com/Readonly-checkbox-tf4822650.html#a13805025
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Readonly checkbox

Posted by Nick Heudecker <nh...@gmail.com>.
For textareas and textfields I always do "onfocus='this.blur();'".  It might
work for checkboxes as well.

On Nov 16, 2007 11:06 AM, mclev <ma...@idahotech.com> wrote:

>
> I have a case where I'm using a checkbox to show boolean data in a table.
> However I want the data to be readonly.
>
> Is there any way to make the CheckBox component readonly such that a user
> could not change it from being checked to unchecked or vise versa?
>
> matt clevenger
> --
> View this message in context:
> http://www.nabble.com/Readonly-checkbox-tf4822650.html#a13797345
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Nick Heudecker
Professional Wicket Training & Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com