I am newbie.
I have a Primefaces tab (1. Summary 2. Detail).
I am allowing user to search for the list of items and then in 1st tab, the primefaces datatable shows the results. Along with the table there is an extra column on which user clicks then it should retrieve the corresponding record detail line and also switch to the 2nd tab.
I am able to click on the extra column using Action and log the selected line and it also moves to the second tab. However it is not showing my primefaces datatable on the 2nd tab.
However, when I click on the 2nd tab manually, I can see the datatable and all the correct data.
<p:column width="30">
<p:commandButton id="selectDetailCb"
title="View detail"
oncomplete="tabViewV.select(2)"
action="#itunesAnalysisToolMb.retrieveProductDetailRpt(itunesAnalysisToolSummaryV)}"
icon="ui-icon-search"
update=":itunesAnalysisToolForm:tabView:itunesAnalysisToolDetailDt">
</p:commandButton>
</p:column>
/*
* Retrieve the iTunes Analysis Tool detail for the selected product and for the selected time frame.
*/
public void retrieveProductDetailRpt(ItunesAnalysisToolSummary selectedProduct){
log.debug(selectedProduct.getRank());
log.debug(selectedProduct.getArtist());
log.debug(selectedProduct.getTitle());
log.debug(this.startReportDate);
log.debug(this.endReportDate);
log.debug(this.itunesProductTypeCode);
//return "goToDetail";
}
In the background I am getting this message.
Mar 29, 2013 1:02:04 PM com.warnermusic.wis.util.JsfPhaseListener beforePhase INFO: RENDER_RESPONSE 6 Mar 29, 2013 1:02:04 PM com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback visit SEVERE: java.lang.NullPointerException Mar 29, 2013 1:02:04 PM com.warnermusic.wis.util.JsfPhaseListener afterPhase INFO: RENDER_RESPONSE 6
but no other errors.
Can you please help me and advise why I am not able to see the dataTable on the 2nd tab while clicking the commandbutton, but I can see when I actually move to the next tab manually.