ICEfaces
  1. ICEfaces
  2. ICE-3482

MenuRenderer redundantly calling getValue()

    Details

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

      Description

      MenuRenderer.renderOptions() calls renderOption() for every item. In renderOption() it calls isValueSelected(), which calls getCurrentSelectedValues(), when there are no submitted values. getCurrentSelectedValues() calls getValue(). So, for every option, we can call the same getValue(), which can get very expensive with Seam.

        Activity

        Hide
        Mark Collette added a comment -

        Moved the code that gets the submittedValue and the value up out of the loop that iterates over the SelectItem(s). Changed any other renderers that relied on those methods.

        TRUNK
        Subversion 17611
        ICEfaces 1.7 branch
        Subversion 17612
        icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\MenuRenderer.java
        icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\RadioRenderer.java
        icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\SelectManyCheckboxListRenderer.java

        Show
        Mark Collette added a comment - Moved the code that gets the submittedValue and the value up out of the loop that iterates over the SelectItem(s). Changed any other renderers that relied on those methods. TRUNK Subversion 17611 ICEfaces 1.7 branch Subversion 17612 icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\MenuRenderer.java icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\RadioRenderer.java icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\SelectManyCheckboxListRenderer.java

          People

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

            Dates

            • Created:
              Updated:
              Resolved: