Hello list,

I have a page with two tr:tables in. The first contains checkboxes and
the second radio buttons (i.e. rowSelection="single" and "multiple"
respectively). Since the first represents queues, and the second users
assigned to those queues, changing selected queue should change the
selected users, that is when a queue is selected, the user table should
show the appropriate users selected in it.

I can achieve this the first time a queue is selected, by calling a
presetSelections method when the bound table is set in the bean. I can
not get it to update on selection events, however.

I'm using PPR and I know that setting the partialTrigger for the second
table to the first table isn't enough -- the second table's selections
need to be reset. I therefore have a selection listener on the first
table which calls a resetTableSelections method which then calls
table.resetStampState(), where table is the property bound to the second
table.

The stamp state is duly reset, but the selections on the table do not
change in the browser. The previous selections are being restored, not
recalculated. This morning I've tried experimenting with a phase
listener to get in there and call the preset method. I thought a likely
place would be after the apply request values phase, as the events would
have been processed, and any changes in the first table registered.
However this caused null pointer exceptions in the render response phase
-- the collection backing the first table. None of the other phases I
tried gave a noticeable effect.

I enclose the stack trace. Was using a phase listener an appropriate
approach to this problem?  Is there a better way?

Cheers,
Edd

SEVERE: Error during partial-page rendering
java.lang.NullPointerException
        at
org.apache.myfaces.trinidad.model.RowKeySet.isContained(RowKeySet.java:1
04)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableSele
ctOneRenderer$Radio.getSubmittedValue(TableSelectOneRenderer.java:253)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectBoo
leanRenderer.encodeAllAsElement(SimpleSelectBooleanRenderer.java:139)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormElementRend
erer.encodeAll(FormElementRenderer.java:109)
        at
org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRen
derer.java:318)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableSele
ctOneRenderer.renderCellContent(TableSelectOneRenderer.java:177)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableSele
ctManyRenderer.renderCellContent(TableSelectManyRenderer.java:224)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableSele
ctOneRenderer.encodeAll(TableSelectOneRenderer.java:151)
        at
org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRen
derer.java:318)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.Selection
ColumnRenderer.renderKids(SelectionColumnRenderer.java:48)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer.
_renderKids(ColumnRenderer.java:168)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer.
_renderTD(ColumnRenderer.java:330)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer.
_renderDataMode(ColumnRenderer.java:241)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer.
encodeAll(ColumnRenderer.java:96)
        at
org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRen
derer.java:318)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer._
renderSelectionColumn(TableRenderer.java:549)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer.r
enderSpecialColumns(TableRenderer.java:514)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableR
enderer.renderSingleRow(DesktopTableRenderer.java:108)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableR
enderer$1.processRowImpl(DesktopTableRenderer.java:853)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableUtil
s$RowLoop.processRow(TableUtils.java:117)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableUtil
s$RowLoop.loop(TableUtils.java:103)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableUtil
s$RowLoop.run(TableUtils.java:75)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableR
enderer._renderTableRows(DesktopTableRenderer.java:904)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableR
enderer.renderTableRows(DesktopTableRenderer.java:638)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableR
enderer.renderTableContent(DesktopTableRenderer.java:364)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer.e
ncodeAll(TableRenderer.java:285)
        at
org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.j
ava:208)
        at
org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComp
onentBase.java:733)
        at
org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollect
ion.java:527)
        at
org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode._renderComp
onent(UIComponentUINode.java:337)
        at
org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode._renderComp
onent(UIComponentUINode.java:332)
        at
org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode._renderComp
onent(UIComponentUINode.java:332)
        at
org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode.render(UICo
mponentUINode.java:279)
        at
org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode.render(UICo
mponentUINode.java:256)
        at
org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderChild(BaseRend
erer.java:425)
        at
org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderIndexedChild(B
aseRenderer.java:343)
        at
org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderIndexedChild(B
aseRenderer.java:235)
        at
org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderContent(BaseRe
nderer.java:142)
        at
org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.PanelTabbedRende
rer.renderContent(PanelTabbedRenderer.java:112)
        at
org.apache.myfaces.trinidadinternal.ui.BaseRenderer.render(BaseRenderer.
java:93)
        at
org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.XhtmlLafRenderer.r
ender(XhtmlLafRenderer.java:84)
        at
org.apache.myfaces.trinidadinternal.uinode.UIXComponentUINode.renderInte
rnal(UIXComponentUINode.java:192)
        at
org.apache.myfaces.trinidadinternal.uinode.UINodeRendererBase.encodeEnd(
UINodeRendererBase.java:70)
        at
org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComp
onentBase.java:733)
        at
org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUti
ls.java:69)
        at
org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUti
ls.java:64)
        at
org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer
.java:282)
        at
org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRe
nderer.java:304)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRoo
tRenderer.renderContent(PanelPartialRootRenderer.java:72)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.re
nderContent(BodyRenderer.java:136)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRoo
tRenderer.encodeAll(PanelPartialRootRenderer.java:107)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.en
codeAll(BodyRenderer.java:78)
        at
org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.j
ava:208)
        at
org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComp
onentBase.java:733)
        at
org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive
(UIXComponentBase.java:1271)
        at
org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive
(UIXComponentBase.java:1266)
        at
org.apache.myfaces.trinidad.component.UIXComponentBase.encodeAll(UIXComp
onentBase.java:753)
        at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:890)
        at
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:5
71)
        at
javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper
.java:178)
        at
org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderVi
ew(ViewHandlerImpl.java:174)
        at
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.
java:106)
        at
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
        at
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
        at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
        at
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoF
ilter(TrinidadFilterImpl.java:208)
        at
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterI
mpl(TrinidadFilterImpl.java:165)
        at
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(T
rinidadFilterImpl.java:138)
        at
org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilte
r.java:92)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
        at
com.detica.ddi.security.TigSecurityContextServletFilter.doFilter(TigSecu
rityContextServletFilter.java:45)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:175)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:525)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:128)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:102)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
63)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:84
4)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:584)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:595)






This message should be regarded as confidential. If you have received this 
email in error please notify the sender and destroy it immediately.
Statements of intent shall only become binding when confirmed in hard copy by 
an authorised signatory.  The contents of this email may relate to dealings 
with other companies within the Detica Group plc group of companies.

Detica Limited is registered in England under No: 1337451.

Registered offices: Surrey Research Park, Guildford, Surrey, GU2 7YP, England.


Reply via email to