[
https://issues.apache.org/jira/browse/TRINIDAD-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12683395#action_12683395
]
Cristiano commented on TRINIDAD-1428:
-------------------------------------
Hi Scott,
the answer to your first question follows :
the value returned from modifyAdP.doOpenCalendar is the string
"dialog:showcal", which is necessary for the faces-config.xml in the
navigation-rule.
I try to explain my scenario:
the Invalid index problem occurs only in the update form of a selected record
of table; in this case the backing bean provides the values to be shown in the
web components. Some of these components are bound whit the bean, I use the
following method:
private void _addTarget(UIComponent target) {
RequestContext adfContext = RequestContext.getCurrentInstance();
adfContext.addPartialTarget(target);
}
to update the components (I prefer this over the "partialTriggers".)
In the new insert form everything is OK!!!
I tried to remove the component by component in update form, with no luck; then
I tried to modify the source code of the dialog and I realized that by removing
the <tr:form> component the problem goes away. If I use the the standard <FORM>
tag everything is OK but I can't use <tr:commandButton> component.
It is very hard for me to build a test case without the backing bean...
But if you really need it, I can try to build it...
Please, let me know if you need further info.
Thanks!
bruce.
> Closing Dialogs cause java.lang.IllegalStateException: Invalid index - Server
> Exception during PPR
> --------------------------------------------------------------------------------------------------
>
> Key: TRINIDAD-1428
> URL: https://issues.apache.org/jira/browse/TRINIDAD-1428
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Components
> Affects Versions: 1.2.10-core
> Environment: Window XP SP2, JSF 1.2.10, Tomcat 6.0.18
> Reporter: Cristiano
>
> from release 1.2.10 i found a problem with dialogs opened by a jspx, (see the
> exception stak trace below).
> when i close the dialog window via a tr:commandButton (Confirm or Cancel) or
> by the X close icon the lifecicle of Jsf return a problem in RESTORE_VIEW, so
> the getViewRoot() of the FacesContext in the afterPhase event is NULL.
> This problem is still open in the last trunks.
> With release 1.2.8 i've got no problems.
> This is my page that open the dialog:
> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:trh="http://myfaces.apache.org/trinidad/html"
> xmlns:tr="http://myfaces.apache.org/trinidad">
> <jsp:directive.page contentType="text/html;charset=utf-8"/>
> <f:view locale="#{Session.locale}">
> <f:loadBundle basename="com.hit.messaggi" var="msgs"/>
> <trh:script source="/js/jsUploadR.js" />
> <tr:document styleClass="BodyDoc" inlineStyle="margin-top:0px"
> title="#{msgs.label_modtitle}">
> <tr:form id="myForm" usesUpload="true">
> .....
> <tr:commandLink id="loadIssue" text="" partialSubmit="true"
> action="#{modifyAdP.doOpenCalendar}"
> useWindow="true" windowWidth="450"
> windowHeight="520" returnListener="#{modifyAdP.selectedIssues}"
> onclick="clearFileValue();">
> <tr:image inlineStyle="border:0px;"
> source ="/images/IT_AddData.gif"
> rendered="#{Session.isItalian}"/>
> <tr:image inlineStyle="border:0px;"
> source ="/images/EN_AddData.gif"
> rendered="#{Session.isEnglish}"/>
> </tr:commandLink>
>
> .....
> </tr:form>
> </tr:document>
> </f:view>
> </jsp:root>
> --------------------------------------------------------------
> And this is my dialog
> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:trh="http://myfaces.apache.org/trinidad/html"
> xmlns:tr="http://myfaces.apache.org/trinidad">
> <jsp:directive.page contentType="text/html;charset=utf-8"/>
> <f:view>
> <f:loadBundle basename="com.hit.messaggi" var="msgs"/>
> <tr:document onload="parent.askQuit=false;
> dialogDropDownComponentRefresh();" title="#{msgs.label_isstitle}"
> inlineStyle="background-color:#ededed;">
> <script type='text/javascript' language='javascript'>
> //<![CDATA[
> var isIE6 = navigator.userAgent.toLowerCase().indexOf('msie 6')
> != -1;
>
> function dialogDropDownComponentRefresh() {
> if (isIE6) {
> var allSelectElements =
> document.getElementsByTagName('select');
> if (allSelectElements) {
> for (var i=0; i < allSelectElements.length; i++) {
> var tr = allSelectElements[i];
> tr.style.cssText = 'display:inline !important;
> visibility: visible !important;';
> }
> }
> }
> }
> //]]>
> </script>
> <tr:form id="frmFascicoli">
> <table border="0" cellpadding="0" cellspacing="0"
> width="100%" style="background-color:#ededed;">
> <tr>
> <td align="center">
> <tr:spacer height="10px" />
>
> <!-- ANNO -->
> <tr:spacer height="10px" />
> <tr:selectOneChoice id="cmbYears" autoSubmit="true"
> label="#{msgs.label_issanno}"
> value="#{calIssues.anno}"
> valueChangeListener="#{calIssues.annoChanged}">
> <f:selectItems
> value="#{calIssues.listaAnni}"></f:selectItems>
> </tr:selectOneChoice>
> </td>
> </tr>
>
> <tr>
> <td align="center">
> <!-- TABELLA FASCICOLI -->
> <tr:panelBorderLayout styleClass="tab_contentResRicMat">
> <tr:table id="IssList" varStatus="status" first="0"
> width="95%" emptyText="#{msgs.label_issgrid_norec}" rowSelection="multiple"
> var="row"
> binding="#{calIssues.tableIssues}"
> value="#{calIssues.listIssues}" >
> <tr:column width="30%" align="center"
> headerText="#{msgs.label_isscodfasc}">
> <tr:outputText
> value="#{row.fascicoloLabel}"/>
> </tr:column>
> <tr:column width="30%" align="center"
> headerText="#{msgs.label_issdatacop}">
> <tr:outputText value="#{row.dataCopertina}"/>
> </tr:column>
> <tr:column width="30%" align="center"
> headerText="#{msgs.label_issdatauscita}">
> <tr:outputText value="#{row.dataUscita}"/>
> </tr:column>
> </tr:table>
> </tr:panelBorderLayout>
>
> <tr:separator />
> <tr:spacer height="10px" />
> </td>
> </tr>
> <tr>
> <td align="center">
> <!-- PULSANTI -->
> <tr:commandButton text="#{msgs.label_issconferma}"
> action="#{calIssues.doSubmit}" onclick="parent.askQuit=true;">
> </tr:commandButton>
> <tr:spacer width="20px"/>
> <tr:commandButton text="#{msgs.label_issannulla}"
> immediate="true" action="#{calIssues.doCancel}">
> </tr:commandButton>
> </td>
> </tr>
> </table>
> </tr:form>
> </tr:document>
> </f:view>
> </jsp:root>
> --------------------------------------------------------------
> 6-mar-2009 8.36.16 com.sun.faces.lifecycle.LifecycleImpl phase
> AVVERTENZA: executePhase(RESTORE_VIEW
> 1,org.apache.myfaces.trinidadinternal.context.facescontextfactoryimpl$cacherender...@19ce6db)
> threw exception
> java.lang.IllegalStateException: Invalid index
> at
> org.apache.myfaces.trinidad.bean.util.StateUtils.restoreKey(StateUtils.java:257)
>
> at
> org.apache.myfaces.trinidad.bean.util.StateUtils.restoreState(StateUtils.java:351)
>
> at
> org.apache.myfaces.trinidad.bean.util.FlaggedPropertyMap.restoreState(FlaggedPropertyMap.java:194)
>
> at
> org.apache.myfaces.trinidad.bean.FacesBeanImpl.restoreState(FacesBeanImpl.java:347)
>
> at
> org.apache.myfaces.trinidad.component.UIXComponentBase.restoreState(UIXComponentBase.java:928)
>
> at
> org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:57)
>
> at
> org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:902)
>
> at
> org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
>
> at
> org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:902)
>
> at
> org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
>
> at
> org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:902)
>
> at
> org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
>
> at
> org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:902)
>
> at
> javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1157)
>
> at
> org.apache.myfaces.trinidadinternal.application.StateManagerImpl.restoreView(StateManagerImpl.java:626)
>
> at
> com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:290)
>
> at
> javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:193)
>
> at
> org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:275)
>
> at
> com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:141)
> at
> com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
> at
> com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
> at
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:238)
>
> at
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:195)
>
> at
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:138)
>
> at
> org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
> at com.hit.webapp.RedirectFilter.doFilter(RedirectFilter.java:118)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
> at
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
>
> 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:233)
>
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>
> 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:286)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>
> at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> at java.lang.Thread.run(Thread.java:619)
> 6-mar-2009 8.36.16
> org.apache.myfaces.trinidadinternal.config.xmlHttp.XmlHttpConfigurator
> handleError
> GRAVE: Server Exception during PPR, #1
> javax.servlet.ServletException: Invalid index
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
> at
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:238)
>
> at
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:195)
>
> at
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:138)
>
> at
> org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
> at com.hit.webapp.RedirectFilter.doFilter(RedirectFilter.java:118)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
> at
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
>
> 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:233)
>
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>
> 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:286)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>
> at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.IllegalStateException: Invalid index
> at
> org.apache.myfaces.trinidad.bean.util.StateUtils.restoreKey(StateUtils.java:257)
>
> at
> org.apache.myfaces.trinidad.bean.util.StateUtils.restoreState(StateUtils.java:351)
>
> at
> org.apache.myfaces.trinidad.bean.util.FlaggedPropertyMap.restoreState(FlaggedPropertyMap.java:194)
>
> at
> org.apache.myfaces.trinidad.bean.FacesBeanImpl.restoreState(FacesBeanImpl.java:347)
>
> at
> org.apache.myfaces.trinidad.component.UIXComponentBase.restoreState(UIXComponentBase.java:928)
>
> at
> org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:57)
>
> at
> org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:902)
>
> at
> org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
>
> at
> org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:902)
>
> at
> org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
>
> at
> org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:902)
>
> at
> org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
>
> at
> org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:902)
>
> at
> javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1157)
>
> at
> org.apache.myfaces.trinidadinternal.application.StateManagerImpl.restoreView(StateManagerImpl.java:626)
>
> at
> com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:290)
>
> at
> javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:193)
>
> at
> org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:275)
>
> at
> com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:141)
> at
> com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
> at
> com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
> ... 24 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.