1. #1
    nathan.modrzewski
    Guest

    Default [FIXED] CheckBox Readonly Doesn't Work

    [FIXED] CheckBox Readonly Doesn't Work


    When the readonly value is set to "true" in a checkbox or on a checkboxgroup, you can still check or uncheck the box with the mouse or space bar.

  2. #2
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    Read only does not disable the check or radio, it just stops its value from being changed. You need to call disable() to stop user interaction. disable and enable was not being passed to the children when called on the group, this had been fixed. Change is in SVN.

  3. #3
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    4
    gslender is on a distinguished road

      0  

    Default


    Darrell,

    I think, for a checkbox, I'd expect the same behaviour as a textfield - which is that the user can "try" to modify the value but the UI does not change it... disabled is a completely different UI state and should indicate that the label & field is completely unavailable - ie grayed etc

    Currently what you are proposing is confusing and worth either updating docs to reflect this inconsisentcy with textfield, or align textfield to do the same (ie allow the visual text field to be changed but the underlying value to remain static).

    I'd prefer you change the checkbox to behave in a read-only manner -which means the check cannot be changed even though the control is not disabled (ie not grayed).

  4. #4
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    All the read only method did was add the "READONLY" attribute to the HTML input element which does not cause the radio and check from being toggled. I have fixed this to stop the change by stopping the click event if the field is read only. Setting the field to read only will now stop the user from changing the value, although the user might be confused as the fields look enabled . Change is in SVN.

  5. #5
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    4
    gslender is on a distinguished road

      0  

    Default


    Quote Originally Posted by darrellmeyer View Post
    read only will now stop the user from changing the value, although the user might be confused as the fields look enabled
    If I understand you correctly, this will be ok - read only does as it should - ie field cannot be changed but looks enabled - disabled will be visually disabled plus read-only (state not changable). I think this would be a correct UI representation.

    The developer now has choice over if he wants the field read-only or fully disabled.

Thread Participants: 2