Details
-
Type: Bug
-
Status: Closed
-
Priority: 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
-
Support Case References:
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}
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
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
r52359: 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 (4.0 trunk)
r52360: committed fix to the 3.3 EE m aintenance branch