ICEfaces
  1. ICEfaces
  2. ICE-2020

SelectInputText has a wrong renderer type when created via API

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.6
    • Fix Version/s: 1.8
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Windows XP SP2, Java 1.5.0_12, JBoss 4.0.5, Facelets, Seam 1.2.1
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      A renderer type should be assigned explicitly in the application code:

      SelectInputText input = new SelectInputText();
      input.setRendererType(SelectInputText.COMPONENT_TYPE);
      Show
      A renderer type should be assigned explicitly in the application code: SelectInputText input = new SelectInputText(); input.setRendererType(SelectInputText.COMPONENT_TYPE);

      Description

      When created via API, a SelectInputText component gets assigned a wrong renderer type "com.icesoft.faces.Text". A correct default renderer type, according to the JavaDoc, should be "com.icesoft.faces.SelectInputText". When created via a tag though, a SelectInputText component gets correctly initialized with a correct renderer type.

      The problem can be reproduced by binding a bean that will create an instance of SelectInputText with this snipplet:

      <ice:panelGroup binding="#{autoCompleteTestBean.panel}" >

      public void setPanel(HtmlPanelGroup panel) {
      ...
         SelectInputText input = new SelectInputText();
         panel.getChildren().add(input);
      ...
      }

      The resulting HTML code for the SelectInputText component is rendered as an ordinary InputText without any autocomplete features, unless the line

      input.setRendererType(SelectInputText.COMPONENT_TYPE);

      is not added to the code of the setPanel() method.

      A quick inspection of the source code of the SelectInputText class shows that the renderer type "com.icesoft.faces.SelectInputText" is declared in the class but is never assigned in its code. Instead, a class instance inherits a renderer type from its superclass which is HtmlInputText


        Issue Links

          Activity

          There are no subversion log entries for this issue yet.

            People

            • Assignee:
              Philip Breau
              Reporter:
              Alexei Novikov
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: