ICEfaces
  1. ICEfaces
  2. ICE-5798

create checkbox sparkle component

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta1
    • Fix Version/s: None
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      jsf2.0, ICEfaces-2.0
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial

      Description

      Although Art created this initially, that was before Adnan developed the harness for spakrle components and the sparkle css/sprites were generated by Art. Rework for new sparkle components plan and add aria functionality

        Issue Links

          Activity

          Hide
          Judy Guglielmin added a comment -

          spent some time reworking this example to follow harness Adnan showed with slider, but found problem in that true takes 2 clicks on the button. Went back to Art's version and it is behaving the same.

          Show
          Judy Guglielmin added a comment - spent some time reworking this example to follow harness Adnan showed with slider, but found problem in that true takes 2 clicks on the button. Went back to Art's version and it is behaving the same.
          Hide
          Judy Guglielmin added a comment -

          this component requires a hidden field now where singleSubmit = false means hidden field is updated on the form but nothing is submitted to server. singleSubmit=true means the component submits only itself. For the form to be submitted, an action component must be used.

          Show
          Judy Guglielmin added a comment - this component requires a hidden field now where singleSubmit = false means hidden field is updated on the form but nothing is submitted to server. singleSubmit=true means the component submits only itself. For the form to be submitted, an action component must be used.
          Hide
          Judy Guglielmin added a comment -

          rev 21604 shows hidden field which stores state of button if singleSubmit=false doesn't go through to server).

          If singleSubmit=true, then the button only submits itself

          Show
          Judy Guglielmin added a comment - rev 21604 shows hidden field which stores state of button if singleSubmit=false doesn't go through to server). If singleSubmit=true, then the button only submits itself
          Hide
          Ken Fyten added a comment -

          Action items from component review:

          • Need to adopt the now std. comp. hierarchy:

          <div id=compId>
          <span id=xxx>
          <script> xxx </script>
          </span>
          <div id=xx>
          ... comp. elements ...
          </div>
          </div>

          • No need to wire up the key events to the button push ourselves, since we are relying on the native HTML button widget underneath, the browsers will already support the keyboard shortcuts as required.
          • ARIA state changes should be done in the OnPush event handler directly, so they take affect regardless of how the button is invoked.
          • Checkbox checked value should be stored in the hidden form field and not transmitted as a parameter at all. So the renderering renders out the current state to the hidden form field value, the JS that inits the comp. on the client examines the hidden field value to set the comp. state, and if the comp. state is changed, then the hidden field is updated to reflect new value, which is then submitted to the server at the next submit.
          Show
          Ken Fyten added a comment - Action items from component review: Need to adopt the now std. comp. hierarchy: <div id=compId> <span id=xxx> <script> xxx </script> </span> <div id=xx> ... comp. elements ... </div> </div> No need to wire up the key events to the button push ourselves, since we are relying on the native HTML button widget underneath, the browsers will already support the keyboard shortcuts as required. ARIA state changes should be done in the OnPush event handler directly, so they take affect regardless of how the button is invoked. Checkbox checked value should be stored in the hidden form field and not transmitted as a parameter at all. So the renderering renders out the current state to the hidden form field value, the JS that inits the comp. on the client examines the hidden field value to set the comp. state, and if the comp. state is changed, then the hidden field is updated to reflect new value, which is then submitted to the server at the next submit.
          Hide
          Judy Guglielmin added a comment -

          used the new hierarchy (except left script and hidden field in their own spans at bottom of element to keep them clean and out of the way.

          aria state changes cannot be done on the "onClick" event handler as we need to know when the space bar is pressed so need "onkeydown" event.

          hidden field is used to update between client and server (both ways).

          Show
          Judy Guglielmin added a comment - used the new hierarchy (except left script and hidden field in their own spans at bottom of element to keep them clean and out of the way. aria state changes cannot be done on the "onClick" event handler as we need to know when the space bar is pressed so need "onkeydown" event. hidden field is used to update between client and server (both ways).
          Hide
          Judy Guglielmin added a comment -

          component has been created and reviewed, following the new standards for component development for ICEfaces-2.0.

          Items to note:-
          1) hidden field "_hidden" maintains the value of the "checked" attribute, which may be updated via the yui checkbox or server-push.
          the javascript params are no longer used for this input component
          2) singleSubmit=true means that the checkbutton submits to the server side, singleSubmit=false means that the hidden field gets updated
          and waits for some other component to submit the form to the server.
          3) the event has a null target (event.target), so this must be set for partial submit = true.
          4) aria support means that the space bar toggles the button for true/false.

          Show
          Judy Guglielmin added a comment - component has been created and reviewed, following the new standards for component development for ICEfaces-2.0. Items to note:- 1) hidden field "_hidden" maintains the value of the "checked" attribute, which may be updated via the yui checkbox or server-push. the javascript params are no longer used for this input component 2) singleSubmit=true means that the checkbutton submits to the server side, singleSubmit=false means that the hidden field gets updated and waits for some other component to submit the form to the server. 3) the event has a null target (event.target), so this must be set for partial submit = true. 4) aria support means that the space bar toggles the button for true/false.

            People

            • Assignee:
              Judy Guglielmin
              Reporter:
              Judy Guglielmin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: