ICEfaces
  1. ICEfaces
  2. ICE-4455

Make inputTextarea render via ResponseWriter

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8.1
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      Change the h:inputTextarea and ice:inputTextarea component renderers to use the ResponseWriter, and make the pass-through attribute rendering correct.

        Issue Links

          Activity

          Mark Collette created issue -
          Mark Collette made changes -
          Field Original Value New Value
          Link This issue blocks ICE-3458 [ ICE-3458 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18843 Wed May 06 17:37:28 MDT 2009 mark.collette ICE-4455 : Make inputTextarea render via ResponseWriter
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/TextareaRenderer.java
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/PassThruAttributeWriter.java
          Commit graph ADD /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/BaseInputRenderer.java
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/InputTextRenderer.java
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/BridgeFacesContext.java
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/TextareaRenderer.java
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/DomBasicRenderer.java
          Hide
          Mark Collette added a comment -

          Changed the h:inputTextarea and ice:inputTextarea rendering from being DOM based to being ResponseWriter based. This involved refactoring some code from InputTextRenderer into a common class BaseInputRenderer, which InputTextArea could then also make use of. The h: and ice: renderers were modified to make optimal use of the pass-through attribute and effects (ice: only) APIs to improve performance and correctness.

          One issue I ran into was that the old code's applyBrowserDOMChanges() algorith would create an empty child text node in the old DOM for an empty inputTextarea, so the inputTextarea had to render out an empty child text node when there was nothing to render, so the dom diff wouldn't needlessly resend the <textarea>...</textarea> tag. The DOMResponseWriter has code to detect attempt to create empty text nodes, and not do so, which caused the discrepancy for me, resulting in the textarea losing focus. I had to change the component render and the applyBrowserDOMChanges() algorithm to both not create the empty child text node, to fix everything.

          Subversion 18843
          icefaces\component\src\com\icesoft\faces\component\ext\renderkit\TextareaRenderer.java
          icefaces\core\src\com\icesoft\faces\context\BridgeFacesContext.java
          icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\DomBasicRenderer.java
          icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\InputTextRenderer.java
          icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\PassThruAttributeWriter.java
          icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\TextareaRenderer.java
          icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\BaseInputRenderer.java

          Show
          Mark Collette added a comment - Changed the h:inputTextarea and ice:inputTextarea rendering from being DOM based to being ResponseWriter based. This involved refactoring some code from InputTextRenderer into a common class BaseInputRenderer, which InputTextArea could then also make use of. The h: and ice: renderers were modified to make optimal use of the pass-through attribute and effects (ice: only) APIs to improve performance and correctness. One issue I ran into was that the old code's applyBrowserDOMChanges() algorith would create an empty child text node in the old DOM for an empty inputTextarea, so the inputTextarea had to render out an empty child text node when there was nothing to render, so the dom diff wouldn't needlessly resend the <textarea>...</textarea> tag. The DOMResponseWriter has code to detect attempt to create empty text nodes, and not do so, which caused the discrepancy for me, resulting in the textarea losing focus. I had to change the component render and the applyBrowserDOMChanges() algorithm to both not create the empty child text node, to fix everything. Subversion 18843 icefaces\component\src\com\icesoft\faces\component\ext\renderkit\TextareaRenderer.java icefaces\core\src\com\icesoft\faces\context\BridgeFacesContext.java icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\DomBasicRenderer.java icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\InputTextRenderer.java icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\PassThruAttributeWriter.java icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\TextareaRenderer.java icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\BaseInputRenderer.java
          Mark Collette made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 1.8.1 [ 10170 ]
          Resolution Fixed [ 1 ]
          Assignee Mark Collette [ mark.collette ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Mark Collette
              Reporter:
              Mark Collette
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: