ICEfaces
  1. ICEfaces
  2. ICE-11392

ace:dynamicResource type="button" does not render id attribute

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-4.2.0.GA, EE-3.3.0.GA_P05
    • Fix Version/s: 4.3, EE-3.3.0.GA_P06
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ace

      Description

      Using ace:dyanmicResource id="......" type="button", the renderer does not write the id to the html markup.
      The container is rendered with the id, but the id of the element is only written when the type is not "button"
      ....
      from DynamicResourceRenderer code....
      {code}
      ...
             if ("button".equals(dynamicResource.getType())) {
                      writer.startElement(HTML.INPUT_ELEM, null);
                      if (disabled) {
                          writer.writeAttribute(HTML.DISABLED_ATTR, HTML.DISABLED_ATTR, null);
                      }
                      writer.writeAttribute(HTML.TYPE_ATTR, "button", null);
                      writer.writeAttribute(HTML.VALUE_ATTR, label, null);
                      writer.writeAttribute(HTML.ONCLICK_ATTR, "window.open('" + resource.getRequestPath() + "');", null);
                      writeStyleAttributes(dynamicResource, writer);
                      writer.endElement(HTML.INPUT_ELEM);
                  } else {
                      if (disabled) {
                          writer.startElement(HTML.SPAN_ELEM, null);
                      } else {
                          writer.startElement(HTML.ANCHOR_ELEM, null);
                          writer.writeAttribute(HTML.HREF_ATTR, resource.getRequestPath(), null);
                          String target = dynamicResource.getTarget();
                          if (target != null) {
                              writer.writeAttribute(HTML.TARGET_ATTR, target, null);
                          }
                      }
                      writer.writeAttribute(HTML.ID_ATTR, clientId, null);

                      String image = dynamicResource.getImage();
      .....
      {code}

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #52359 Tue Mar 27 19:38:16 MDT 2018 art.zambrano ICE-11392 fix to render client id on button element when the type is 'button'; added another fix to force a full update of the component when changing types, in order to avoid some dom diff issues
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dynamicresource/DynamicResourceRenderer.java

          People

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

            Dates

            • Created:
              Updated:
              Resolved: