You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Marco Beelen (JIRA)" <de...@myfaces.apache.org> on 2007/02/21 15:54:06 UTC

[jira] Resolved: (TOMAHAWK-779) ExcelExportPhaseListener throws NullPointerException

     [ https://issues.apache.org/jira/browse/TOMAHAWK-779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marco Beelen resolved TOMAHAWK-779.
-----------------------------------

       Resolution: Invalid
    Fix Version/s: 1.1.5-SNAPSHOT

After giving it another go, after several months the Export to Excel-component does work.

I can't give any specific reason for it previous faillure, but it is work now.


> ExcelExportPhaseListener throws NullPointerException
> ----------------------------------------------------
>
>                 Key: TOMAHAWK-779
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-779
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.5-SNAPSHOT
>         Environment: JDK 1.5.0_07, Tomcat 5.5.12, MyFaces Core 1.13, MyFaces Tomahawk 1.1.5-SNAPSHOT, Myfaces Tomahawk Sandbox 1.1.5-SNAPSHOT.
> com.sun.facelets:jsf-facelets 1.1.11
>            Reporter: Marco Beelen
>         Assigned To: Cagatay Civici
>             Fix For: 1.1.5-SNAPSHOT
>
>
> On a page in my webapp I use the extDataTable of tomahawk including paging and sorting. I would like to use the excelExport-component to generate an excel-file containing the table.
> The page renders oke, but when I click on the commandButton an new window opens, within which the same page is being shown.
> In the logfile of my application I see the following stacktrace:
> 2006-11-14 17:42:40,193 ERROR lifecycle.PhaseListenerManager - Exception in PhaseListener RESTORE_VIEW(1) afterPhase
> java.lang.NullPointerException
>         at org.apache.myfaces.custom.excelexport.ExcelExportPhaseListener.generateExcel(ExcelExportPhaseListener.java:104)
>         at org.apache.myfaces.custom.excelexport.ExcelExportPhaseListener.afterPhase(ExcelExportPhaseListener.java:57)
>         at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
>         at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:181)
>         at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
>         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>         ....... [ 20 more ]
> I'm using com.sun.facelets.FaceletViewHandler as the ViewHandler for my jsf-application.
> The code of my xhtml page is shown below:
> <ui:component
> 	xmlns="http://www.w3.org/1999/xhtml" 
> 	xmlns:ui="http://java.sun.com/jsf/facelets" 
> 	xmlns:h="http://java.sun.com/jsf/html"
> 	xmlns:f="http://java.sun.com/jsf/core" 
> 	xmlns:t="http://myfaces.apache.org/tomahawk"
> 	xmlns:s="http://myfaces.apache.org/sandbox">
> <h:form id="selectMarketForm">
> 		<t:dataTable 
> 			value="#{marketEditBean.markets}" 
> 			var="market" rows="10" id="marketList"
> 			sortColumn="#{marketEditBean.sortColumn}" 
>             sortAscending="#{marketEditBean.sortAscending}"
>             preserveDataModel="false"
>             preserveSort="true">
>             		    
> 		    <t:column sortable="true">
> 		    	<f:facet name="header">
> 					<t:commandSortHeader columnName="id" arrow="true" propertyName="id">  
> 			            <h:outputText value="Id"/>   
> 			        </t:commandSortHeader>
> 		    	</f:facet>
> 				<h:outputText value="#{market.id}" />
> 		    </t:column>
> 		    
> 		    <t:column sortable="true" >
> 		    	<f:facet name="header">
> 					<t:commandSortHeader columnName="description" arrow="true" propertyName="description">  
> 			            <h:outputText value="Description"/>   
> 			        </t:commandSortHeader>
> 		    	</f:facet>
> 		    	<h:commandLink action="#{marketEditBean.select}" value="#{market.description}" immediate="true">
> 		    		<t:updateActionListener property="#{marketEditBean.market}" value="#{market}" />
> 		       </h:commandLink>
> 		    </t:column>		
> 	
> 		</t:dataTable>
>     <h:panelGrid columns="1" styleClass="scrollerTable2" columnClasses="standardTable_ColumnCentered" >
>         <t:dataScroller id="scroll_1"
>                         for="marketList"
>                         fastStep="10"
>                         pageCountVar="pageCount"
>                         pageIndexVar="pageIndex"
>                         styleClass="scroller"
>                         paginator="true"
>                         paginatorMaxPages="9"
>                         paginatorTableClass="paginator"
>                         paginatorActiveColumnStyle="font-weight:bold;">
>             <f:facet name="first" >
>                 <t:graphicImage url="images/arrow-first.gif" />
>             </f:facet>
>             <f:facet name="last">
>                 <t:graphicImage url="images/arrow-last.gif"  />
>             </f:facet>
>             <f:facet name="previous">
>                 <t:graphicImage url="images/arrow-previous.gif"  />
>             </f:facet>
>             <f:facet name="next">
>                 <t:graphicImage url="images/arrow-next.gif" />
>             </f:facet>
>             <f:facet name="fastforward">
>                 <t:graphicImage url="images/arrow-ff.gif"  />
>             </f:facet>
>             <f:facet name="fastrewind">
>                 <t:graphicImage url="images/arrow-fr.gif"  />
>             </f:facet>
>         </t:dataScroller>
>     </h:panelGrid>
> 	<s:excelExport for="marketList">
> 		<h:commandButton value="Export to excel" />
> 	</s:excelExport>
> </h:form>
> </ui:component>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.