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

          Judy Guglielmin created issue -
          Judy Guglielmin made changes -
          Field Original Value New Value
          Assignee Judy Guglielmin [ judy.guglielmin ]
          Ken Fyten made changes -
          Salesforce Case []
          Affects [Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial]
          Assignee Priority P2
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21666 Fri Jun 04 15:15:46 MDT 2010 judy.guglielmin ICE-5798
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/resources/org.icefaces.component.checkbox/checkbox.js
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21667 Fri Jun 04 15:18:18 MDT 2010 judy.guglielmin ICE-5798
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/src/org/icefaces/component/checkbox/Checkbox.java
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/src/org/icefaces/component/checkbox/CheckboxMeta.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21668 Fri Jun 04 15:18:36 MDT 2010 judy.guglielmin ICE-5798
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/sparkle/showcase/test/web/buttons/checkbox.xhtml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21669 Fri Jun 04 15:18:49 MDT 2010 judy.guglielmin ICE-5798
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/sparkle/showcase/test/web/buttons.xhtml
          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.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21676 Mon Jun 07 10:25:07 MDT 2010 judy.guglielmin ICE-5798
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/src/org/icefaces/component/checkbox/Checkbox.java
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/src/org/icefaces/component/checkbox/CheckboxRenderer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21677 Mon Jun 07 10:28:12 MDT 2010 judy.guglielmin ICE-5798
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/sparkle/showcase/test/web/buttons/pushbutton.xhtml
          Commit graph MODIFY /icefaces/scratchpads/sparkle/showcase/test/web/buttons/checkbox.xhtml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21678 Mon Jun 07 10:28:28 MDT 2010 judy.guglielmin ICE-5798
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/sparkle/showcase/test/src/org/icefaces/button/ButtonBean.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21739 Mon Jun 14 14:15:25 MDT 2010 judy.guglielmin ICE-5798, 5805 checkbox now works for singleSubmit being true or false. For false, hidden field is utilized.
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/resources/org.icefaces.component.checkbox/checkbox.js
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/src/org/icefaces/component/checkbox/Checkbox.java
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/src/org/icefaces/component/checkbox/CheckboxRenderer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21740 Mon Jun 14 14:22:36 MDT 2010 judy.guglielmin ICE-5798 showing examples of checkbutton with singleSubmit true (submits itself to server) and false (stores state in hidden field).
          Files Changed
          Commit graph ADD /icefaces/scratchpads/sparkle/showcase/test/web/buttons/mixed.xhtml
          Commit graph MODIFY /icefaces/scratchpads/sparkle/showcase/test/web/buttons/checkbox.xhtml
          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.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21756 Thu Jun 17 15:41:50 MDT 2010 judy.guglielmin ICE-5798 added div surrounding component, span surrounding hidden field and span surrounding script. Also using hidden field for all updates between client and server (both ways)
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/resources/org.icefaces.component.checkbox/checkbox.js
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/src/org/icefaces/component/checkbox/CheckboxMeta.java
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/src/org/icefaces/component/checkbox/CheckboxRenderer.java
          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).
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21784 Tue Jun 22 10:53:12 MDT 2010 judy.guglielmin ICE-5798, ICE-5753 modifications after code review of components pushbutton and checkbox
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/src/org/icefaces/component/pushbutton/sprites/sam/button-skin.css
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/resources/org.icefaces.component.checkbox/checkbox.js
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/src/org/icefaces/component/checkbox/Checkbox.java
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/src/org/icefaces/component/pushbutton/sprites/sam/button.css
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/src/org/icefaces/component/pushbutton/PushButton.java
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/resources/org.icefaces.component.pushbutton/pushbutton.js
          Commit graph MODIFY /icefaces/scratchpads/sparkle/showcase/test/web/buttons/mixed.xhtml
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/src/org/icefaces/component/pushbutton/PushButtonRenderer.java
          Commit graph MODIFY /icefaces/scratchpads/sparkle/showcase/test/web/buttons/pushbutton.xhtml
          Commit graph MODIFY /icefaces/scratchpads/sparkle/showcase/test/web/buttons/checkbox.xhtml
          Commit graph MODIFY /icefaces/scratchpads/sparkle/showcase/test/src/org/icefaces/button/ButtonBean.java
          Judy Guglielmin made changes -
          Link This issue duplicates ICE-5624 [ ICE-5624 ]
          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.
          Judy Guglielmin made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Priority P2

            People

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

              Dates

              • Created:
                Updated:
                Resolved: