ICEfaces
  1. ICEfaces
  2. ICE-10427

ace:textEntry, ace:textAreaEntry - Add new "charCount" client event

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P02, 4.0
    • Fix Version/s: EE-3.3.0.GA_P03, 4.1
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 4, ace:textEntry, ace:textAreaEntry

      Description

      Add a new "charCount" client event to the ace:textEntryArea the ace:textEntry components. This client event will be fired whenever the number of characters entered in the component changes, either by the user typing a new character, deleting one or more characters, or cutting/pasting characters into the component.

      The "charCount" client event will provide the following attributes for each event fired:

      - currLength: The current length of the value string.
      - charsRemaining: The number of characters remaining that can be entered. This is determined via subtracting the currLength value from the maxlength attribute value on the component. If no maxlength attribute value exists, this value is -1 (?).

      This new client event supports the use-case where an application would like to present the user with a message indicating how many characters are remaining in a textEntry component that has a maxlength specified.

      Note that by using a client event for this information, it is feasible for the application to trap the event on the client and prevent it from submitting to the server, if a purely client-side JavaScript update of the message is desired. In addition, the client event could instead (or in addition) submit to the server if a server-based implementation is desirable. Thus, the client-event approach provides the most flexibility.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44705 Tue May 19 08:38:04 MDT 2015 mircea.toma ICE-10427 Use Element.innerHTML instead of Element.textContent when updating SPAN's content since the latter property is not supported in IE8.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/textAreaEntry/textAreaEntryCharCount.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/textEntry/textEntryCharCount.xhtml
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44685 Wed May 13 11:54:04 MDT 2015 carlo.guglielmin ICE-10427 - Updated client side JS approach to use the new 'cfg' methods provided by ICEfaces
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/textAreaEntry/textAreaEntryCharCount.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/textEntry/textEntryCharCount.xhtml
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44670 Mon May 11 15:43:18 MDT 2015 mircea.toma ICE-10427 Provide JS API to access the current length and remaining chars for the input.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/textareaentry/textareaentry.js
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/textentry/textentry.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44669 Mon May 11 15:14:18 MDT 2015 carlo.guglielmin ICE-10427 - Changed textEntry and textAreaEntry to use the client side approach for charCount instead of server side
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/textAreaEntry/textAreaEntryCharCount.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/textEntry/TextEntryCharCountBean.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/textEntry/textEntryCharCount.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/resources/org/icefaces/samples/showcase/view/resources/messages.properties
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/textAreaEntry/TextAreaEntryCharCountBean.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44652 Wed May 06 15:55:13 MDT 2015 carlo.guglielmin ICE-10427 - Added a showcase demo for ace:textAreaEntry to demonstrate the new 'charCount' feature.
        Files Changed
        Commit graph ADD /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/textAreaEntry/textAreaEntryCharCount.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/textEntry/textEntryCharCount.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/resources/org/icefaces/samples/showcase/view/resources/messages.properties
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/textAreaEntry/TextAreaEntryBean.java
        Commit graph ADD /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/textAreaEntry/TextAreaEntryCharCountBean.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44649 Wed May 06 15:43:03 MDT 2015 carlo.guglielmin ICE-10427 - Added a demo for the new 'charCount' feature of the ace:textEntry. This allows us to dynamically display the number of characters remaining in a field that has maxlength set.
        Files Changed
        Commit graph ADD /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/textEntry/TextEntryCharCountBean.java
        Commit graph ADD /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/textEntry/textEntryCharCount.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/textEntry/TextEntryBean.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/resources/org/icefaces/samples/showcase/view/resources/messages.properties
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44636 Mon May 04 15:09:24 MDT 2015 mircea.toma ICE-10427 Added IE 9 special handling for backspace and delete keypresses since these keys do not trigger 'input' events. Added alternative callbacks for IE7/8 to handle 'charCount' component events (DOM 'input' events not supported).
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/textentry/textentry.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44631 Sat May 02 15:33:21 MDT 2015 mircea.toma ICE-10427 Wire only one callback to cancel backspace keypress events for elements other that textarea or input.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/textareaentry/textareaentry.js
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/textentry/textentry.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44615 Thu Apr 30 10:52:22 MDT 2015 mircea.toma ICE-10427 Added IE 9 special handling for backspace and delete keypresses since these keys do not trigger 'input' events. Added alternative callbacks for IE7/8 to handle 'charCount' component events (DOM 'input' events not supported).
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/textentry/textentry.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44610 Thu Apr 30 10:25:29 MDT 2015 mircea.toma ICE-10427 Added IE 9 special handling for backspace and delete keypresses since these keys do not trigger 'input' events. Added alternative callbacks for IE7/8 to handle 'charCount' component events (DOM 'input' events not supported).
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/textareaentry/textareaentry.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44608 Tue Apr 28 15:26:48 MDT 2015 mircea.toma ICE-10427 Avoid canceling backspace default action for textarea and input elements.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/textareaentry/textareaentry.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44583 Mon Apr 27 14:03:24 MDT 2015 mircea.toma ICE-10427 Prevent default action whenever backspace keypress events from the textarea reach the document.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/textareaentry/textareaentry.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44574 Thu Apr 23 16:46:26 MDT 2015 mircea.toma ICE-10427 Fix 'maxlength' attribute's default value.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textareaentry/TextAreaEntryMeta.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textareaentry/TextAreaEntryRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44544 Wed Apr 22 15:30:10 MDT 2015 mircea.toma ICE-10427 Test for existence of widget, when lazily created the destroy function might be invoked when widget was not yet initialized.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/core/core.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44539 Wed Apr 22 14:28:09 MDT 2015 mircea.toma ICE-10427 Cleanup JS widget when the update modifies the input element.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textareaentry/TextAreaEntryRenderer.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/util/JSONBuilder.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/textareaentry/textareaentry.js
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textentry/TextEntryRenderer.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/textentry/textentry.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44533 Tue Apr 21 08:34:03 MDT 2015 mircea.toma ICE-10427 Fix renderer to write-out the correct set of passthrough attributes.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textareaentry/TextAreaEntryRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44532 Tue Apr 21 07:55:41 MDT 2015 mircea.toma ICE-10427 Invoke behaviour decoders after the submitted value was acquired.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textareaentry/TextAreaEntryRenderer.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textentry/TextEntryRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44525 Mon Apr 20 16:01:42 MDT 2015 mircea.toma ICE-10427 Test for null event name.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textentry/TextEntry.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textareaentry/TextAreaEntry.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44505 Thu Apr 16 10:38:11 MDT 2015 mircea.toma ICE-10427 Implemented "charCount" client event for ace:textEntry and ace:textAreaEntry.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textentry/TextEntryMeta.java
        Commit graph ADD /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/event/CharCountEvent.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textareaentry/TextAreaEntryMeta.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/textareaentry/textareaentry.js
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textentry/TextEntry.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/textentry/textentry.js
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textareaentry/TextAreaEntry.java

          People

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

            Dates

            • Created:
              Updated:
              Resolved: