Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.2-EE-GA_P02
-
Fix Version/s: 1.8.3, EE-1.8.2.GA_P03
-
Component/s: ICE-Components
-
Labels:None
-
Environment:-
-
Affects:Documentation (User Guide, Ref. Guide, etc.)
Description
<table>
<tr>
<th> </th>
<th scope="col" >Header1</th> <th scope="col" >Header2</th> <th scope="col" >Header3</th> <th scope="col" >Header4</th> </tr>
<tr> <td scope="row" >Row1-Data1</td> <td>Row1-Data2</td>
</tr>
<tr> <td scope="row" >Row2-Data1</td> <td>Row2-Data2</td>
</tr>
</table>
-
- ICEfaces-dataTable.JPG
- 131 kB
-
- JSF-dataTable.JPG
- 105 kB
-
- screenshot-03.png
- 208 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Also, I don't think the scope attribute is limited to the 1st column in a row, the idea is to mark which column in the row should be used as an identifier for the row (for example, a row number col, etc.).
Suggest the following changes to the ice:column:
1. Each <f:facet name="header"> will render the following new HTML attribute in the <th> element for that column header: <th scope="col">
2. The ice:column itself will support the following new attribute "isRowIdentifier=true/false" (default=false). When specified as true, the column will render each of it's <td> elements with the following scope attribute: <td scope="row">
Example usage:
<ice:dataTable id="iceDataTbl"
var="employee"
value="#
" >
<ice:column isRowIdentifier="true">
<f:facet name="header">
<ice:outputText id="nameCol"
value="#
"/>
</f:facet>
<ice:outputText id="name"
value="#
"/>
</ice:column>
<ice:column>
<f:facet name="header">
<ice:outputText id="lngText1Lbl"
value="#
"/>
</f:facet>
<ice:outputText id="lngText1"
value="#
, #
{employee.firstName}"/>
</ice:column>
<ice:column>
<f:facet name="header">
<ice:outputText id="lngText2Lbl"
value="#
"/>
</f:facet>
<ice:outputText id="lngText2"
value="#
, #
{employee.subDepartmentName}, #
{employee.phone}"/>
</ice:column>
</ice:dataTable>
Looks like the std. JSF h:datatTable has supported this since JSF 1.2.
Done. See screenshot 3.
Attribute name is "rowIdentifier", not "isRowIdentifier". (Generated tag handler uses name in look up through attributes map, which will look for a method with the strange name : "isIsRowIdentifier".)
Other table layout configs may not work if they don't share same rendering code as for UIColumn.
Revision: 23418
Modified : /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/UIColumn.java
Modified : /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/TableRenderer.java
Modified : /icefaces/trunk/icefaces/component-metadata/src/main/resources/conf/ice_properties/ice-uicolumn-props.xml
this fix affects any tables that have <h:column> under an <ice:dataTable/> component. causes the following NPE:-
A distributed application with Seam (icefaces booking example) for some reason has this and it worked with 1.8.2 as well as P01, etc. but P03 is breaking here.
15:46:43,782 ERROR [D2DFaceletViewHandler] Problem in renderResponse: null
java.lang.NullPointerException
at com.icesoft.faces.component.ext.renderkit.TableRenderer.encodeChildren(TableRenderer.java:869)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:357)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:364)
at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:95)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:490)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:495)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:495)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:495)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:495)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:495)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:495)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:495)
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:281)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:155)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:51)
at com.icesoft.faces.context.View$2$1.respond(View.java:84)
at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:233)
at com.icesoft.faces.context.View$2.serve(View.java:118)
at com.icesoft.faces.context.View.servePage(View.java:191)
at com.icesoft.faces.webapp.http.core.MultiViewServer.service(MultiViewServer.java:111)
at com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:43)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:183)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:48)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:55)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:77)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:55)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:182)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:680)
15:46:43,793 SEVERE [lifecycle] JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /main.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@6159a20c]
15:46:43,803 ERROR [View] Failed to render page for http://localhost:8080/seam-icefaces/main.seam?cid=15 [/main.xhtml]
15:46:43,804 ERROR [View] Problem encountered during View.servePage
javax.faces.FacesException: Problem in renderResponse: null
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:295)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:155)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:51)
at com.icesoft.faces.context.View$2$1.respond(View.java:84)
I will update the seam-booking example, but it will only be done for the next release of Seam (2.3?), so no good for now. Mark has suggested the following fix:-
//change code at 869 from
if (((Boolean)isRowIdentifier).booleanValue())
//to
if (isRowIdentifier instanceof Boolean && ((Boolean)isRowIdentifier).booleanValue())
and this fixes the issue with the seam application that is included in their distribution bundles.
Done.
Revision: 24761
Modified : /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/TableRenderer.java
Basically, we need to support the 'scope' attribute as a passthru attribute on the ice:column component, and datatable header column.