Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Won't Fix
-
Affects Version/s: 2.0.0
-
Fix Version/s: 4.0.BETA
-
Component/s: ICE-Components
-
Labels:None
-
Environment:ICEfaces, compat
Description
DOMContext is used by components that manipulate the DOMResponseWriter DOM directly. This API should not be used as it prevents the components from rendering when a different ResponseWriter is active.
Issue Links
Activity
Ted Goddard
created issue -
Ken Fyten
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [] | |
Fix Version/s | 2.1 [ 10241 ] | |
Affects Version/s | 2.0.0 [ 10230 ] | |
Affects Version/s | 2.0.1 [ 10255 ] | |
Assignee | Ken Fyten [ ken.fyten ] |
Ken Fyten
made changes -
Fix Version/s | 3.1 [ 10312 ] | |
Fix Version/s | 3.0 [ 10241 ] |
Ken Fyten
made changes -
Fix Version/s | 3.2 [ 10338 ] | |
Fix Version/s | 3.1 [ 10312 ] |
Migration
made changes -
Fix Version/s | 3.3 [ 10370 ] | |
Fix Version/s | 3.2 [ 10338 ] |
Ken Fyten
made changes -
Fix Version/s | 3.4 [ 10770 ] | |
Fix Version/s | 3.3 [ 10370 ] |
Ken Fyten
made changes -
Assignee | Ken Fyten [ ken.fyten ] | yip.ng [ yip.ng ] |
Assignee Priority | P1 [ 10010 ] |
yip.ng
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
yip.ng
made changes -
Status | In Progress [ 3 ] | Open [ 1 ] |
yip.ng
made changes -
Attachment | Document5.txt [ 15712 ] |
Ken Fyten
made changes -
Assignee Priority | P1 [ 10010 ] |
Ken Fyten
made changes -
Assignee | yip.ng [ yip.ng ] | Ken Fyten [ ken.fyten ] |
Ken Fyten
made changes -
Status | Open [ 1 ] | Closed [ 6 ] |
Resolution | Won't Fix [ 2 ] |
Porting steps:
DOMContext calls should first be ordered so that the elimination step is clear:
Element table = domContext.createElement(HTML.TABLE_ELEM);
Element calendarDiv = domContext.createElement(HTML.DIV_ELEM);
calendarDiv
.setAttribute(HTML.ID_ATTR, clientId + CALENDAR_POPUP);
table.setAttribute(HTML.ID_ATTR, clientId + CALENDAR_TABLE);
Element positionDiv = domContext.createElement(HTML.DIV_ELEM);
positionDiv.appendChild(table);
calendarDiv.appendChild(positionDiv);
root.appendChild(calendarDiv);
should be replaced with:
Element calendarDiv = domContext.createElement(HTML.DIV_ELEM);
calendarDiv.setAttribute(HTML.ID_ATTR, clientId + CALENDAR_POPUP);
Element positionDiv = domContext.createElement(HTML.DIV_ELEM);
Element table = domContext.createElement(HTML.TABLE_ELEM);
table.setAttribute(HTML.ID_ATTR, clientId + CALENDAR_TABLE);
positionDiv.appendChild(table);
calendarDiv.appendChild(positionDiv);
root.appendChild(calendarDiv);
All setAttribute() calls to an element immediately follow the associated createElement(), and no other calls to DOMContext are permitted until the setAttribute calls are complete.
No further reference to an element is permitted after appendChild(element) is called.
The component should be tested once re-ordering is complete and no behavioural changes should be observed.
This allows the next step in the transformation:
writer.startElement(HTML.DIV_ELEM, component); //calendarDiv
writer.writeAttribute(HTML.ID_ATTR, clientId + CALENDAR_POPUP, null);
writer.startElement(HTML.DIV_ELEM, component); //positionDiv
writer.startElement(HTML.TABLE_ELEM, component); //table
writer.writeAttribute(HTML.ID_ATTR, clientId + CALENDAR_TABLE, null);
writer.endElement(HTML.TABLE_ELEM); //table
writer.endElement(HTML.DIV_ELEM); //positionDiv
writer.endElement(HTML.DIV_ELEM); //calendarDiv
The DOM element variable names should be added as comments to assist with the endElement() arguments. Once the component is ported, the comments may be removed.