Details
Description
Check out screens (before and after generated source was manually-edited to remove the newline). also attaching sample xhtml file and button image
-
- buttons.xhtml
- 1 kB
- dukehoops
-
Hide
- ICE-1351.war
- 5.22 MB
- yip.ng
-
- META-INF/MANIFEST.MF 0.1 kB
- buttons.xhtml 1 kB
- IceEval/nav_Home.gif 0.7 kB
- welcome.jspx 0.1 kB
- WEB-INF/faces-config.xml 0.4 kB
- WEB-INF/web.xml 1 kB
- WEB-INF/lib/backport-util-concurrent.jar 343 kB
- WEB-INF/lib/commons-beanutils.jar 184 kB
- WEB-INF/lib/commons-collections.jar 558 kB
- WEB-INF/lib/commons-digester.jar 107 kB
- WEB-INF/lib/commons-discovery.jar 70 kB
- WEB-INF/lib/commons-el.jar 110 kB
- WEB-INF/lib/commons-fileupload.jar 52 kB
- WEB-INF/lib/commons-logging.jar 52 kB
- WEB-INF/lib/el-api.jar 24 kB
- WEB-INF/lib/el-ri.jar 97 kB
- WEB-INF/lib/icefaces-comps.jar 620 kB
- WEB-INF/lib/icefaces-facelets.jar 575 kB
- WEB-INF/lib/icefaces.jar 679 kB
- WEB-INF/lib/jsf-api.jar 356 kB
- WEB-INF/lib/jsf-impl.jar 778 kB
- WEB-INF/lib/jstl.jar 17 kB
- WEB-INF/lib/portlet.jar 15 kB
- WEB-INF/lib/xercesImpl.jar 1.15 MB
- WEB-INF/lib/xml-apis.jar 190 kB
-
Hide
- test.zip
- 3 kB
- yip.ng
-
- IceEval/nav_Home.gif 0.7 kB
- WEB-INF/faces-config.xml 0.4 kB
- WEB-INF/web.xml 1 kB
- buttons.xhtml 1 kB
- welcome.jspx 0.1 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Seems like the root maybe here (DOMUtils):
if (children != null) { int childrenLength = children.getLength(); for (int i = 0; i < childrenLength; i++) { boolean childAddTrailingNewline = false; if (allowAddingWhitespace) { if ((i + 1) < childrenLength) { Node nextChild = children.item(i + 1); // We don't add the newline if the next tag is a TD, // because when rendering our tabbedPane, if there's // any whitespace between the adjacent TDs, then // Internet Explorer will add vertical spacing childAddTrailingNewline = !isWhitespaceText(nextChild) && !isTD(nextChild); } } printNode(children.item(i), stringbuffer, depth + 1, allowAddingWhitespace, childAddTrailingNewline); } }
When ice:form is being rendered, after rendering the first child (button1), childAddTrailingNewline is evaluated to true before button2 is rendered.
Is this needed for pretty-printing?
this is worked around by wrapping buttons in a table with 0 cellpadding, cellspacing:
<ice:panelGrid columns="2" cellspacing="0" cellpadding="0"/>
Test webapp.
Note: before running the webapp, add the relevant jars to the WEB-INF/lib dir, including icefaces.jar, where the code change will be compiled into.
Fixed by adding code to not emit the newline. Test webapp attached.
The following posting says that if there is a new line character between two img elements, the browsers renders a space between them.
Included <img> tag in the list of tags not to output newline.
Also merged and re-factored methods checking node types and node names.
before and after screens added
-nikita