Hi,

could anyone answer the question:
"Why is this method called for a child of type 
org.apache.myfaces.trinidad.component.core.output.CoreOutputText?"

Thanks for your help.

   Harald

Harald Kuhn
AirPlus International
Business Information Services
Dornhofstr. 36
63263 Neu-Isenburg
T  +49 (0) 61 02. 2 04 - 8 21
F  +49 (0) 61 02. 2 04 - 1 39
[email protected]
www.airplus.com


-----Original Message-----
From: Kuhn, Harald
Sent: Friday, January 23, 2009 9:37 AM
To: 'MyFaces Discussion'
Subject: RE: [Trinidad]: state of outputText (within tr:iterator) ???

Hi Matthias,

I don't really understand your question.
But our Trinidad jars are based on subversion Rev. 693879.
Nevertheless the mentioned code has not been changed since July, 2006 (Rev. 
425266).

The implementation in the trunk_1.2.x is
FQCN: org.apache.myfaces.trinidad.component.StampState.EVHState

    @Override
    public void restoreRowState(UIComponent child)
    {
      assert _assertIsStampCorrect(child);

      EditableValueHolder evh = (EditableValueHolder) child;
      evh.setSubmittedValue(_submitted);
      evh.setValue(_local);
      evh.setLocalValueSet(_localSet);
      evh.setValid(_valid);

      assert _assertStampHonoursState(evh);
    }
Our Implementation is the same:
    @Override
    public void restoreRowState(UIComponent child)
    {
      assert _assertIsStampCorrect(child);

      EditableValueHolder evh = (EditableValueHolder) child;
      evh.setSubmittedValue(_submitted);
      evh.setValue(_local);
      evh.setLocalValueSet(_localSet);
      evh.setValid(_valid);

      assert _assertStampHonoursState(evh);
    }

The question I couldn't answer right now is: "Why is this method called for a 
child of type org.apache.myfaces.trinidad.component.core.output.CoreOutputText?"

To be more precise the page is functional a hundred times and then suddenly the 
ClassCastException is thrown.
On my development box I was able to force the exception if I pressed the reload 
button of the browser (Don't know if this information is really helpful).

Best regards

  Harald

Harald Kuhn
AirPlus International
Business Information Services
Dornhofstr. 36
63263 Neu-Isenburg
T  +49 (0) 61 02. 2 04 - 8 21
F  +49 (0) 61 02. 2 04 - 1 39
[email protected]
www.airplus.com

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of 
Matthias Wessendorf
Sent: Thursday, January 22, 2009 5:44 PM
To: MyFaces Discussion
Subject: Re: [Trinidad]: state of outputText (within tr:iterator) ???

snip
The cause of the exception is:
        EditableValueHolder evh = (EditableValueHolder) child;

q: when was that line updated (last time)?

On Thu, Jan 22, 2009 at 1:42 AM, Kuhn, Harald <[email protected]> wrote:
> Hi,
>
> I found a strange behaviour in one of our pages (facelet).
> From time to time there seems to be a state of <tr:outputText>.
> I can't think of a situation where <tr:outputText> should save a state,
> neither does Trinidad assume this case.
> Therefore there is a ClassCastException thrown on RestoreState.
>
> Our environment is:
> Tomcat 6
> Myfaces 1.2.3
> Trinidad 1.2.10 (SNAP)
> Facelets 1.1.14
>
> Any pointers to solve this problem are welcome.
>
> Thanks in advance
>
>   Harald
>
>
>
> facelet fragment:
> …
> <table>
>   <tr:iterator id="iterator"
>                value="#{textFilter.listFilter}"
>                var="columnFilter"
>                varStatus="status"
>               rows="0" >
>      <tr>
>        <td>
>          <!-- ******************** -->
>          <tr:outputText
> value="#{bundle['aim.text.label.reportgen.textenthaelt']}:" />
>          <!-- ******************** -->
>      </td>
>        <td>&#0160;</td>
>        <td>
>          <tr:inputText id="textBedingung"
>                        value="#{columnFilter.textBedingungFrontend}"
>                        inlineStyle="width:120px;"
>                        simple="true"
>                        onkeyup="javascript:this.value =
> this.value.toUpperCase();" />
>        </td>
>       <td>&#0160;</td>
>        <td>&#0160;</td>
>      </tr>
>    </tr:iterator>
> </table>
> …
>
> Exception:
> javax.servlet.ServletException:
> org.apache.myfaces.trinidad.component.core.output.CoreOutputText
>         at
> javax.faces.webapp._ErrorPageWriter.throwException(_ErrorPageWriter.java:401)
>         at
> javax.faces.webapp.FacesServlet.handleLifecycleException(FacesServlet.java:221)
>         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:156)
>         at
> com.airplus.aim.webapp.jsf.AIMFacesServlet.service(AIMFacesServlet.java:63)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>         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:215)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>         at
> com.airplus.aim.webapp.filter.AIMFilter.doFilter(AIMFilter.java:147)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>         at
> org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:347)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
>         at
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
>         at
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
>         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
>         at
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
>         at
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.ClassCastException:
> org.apache.myfaces.trinidad.component.core.output.CoreOutputText
>         at
> org.apache.myfaces.trinidad.component.StampState$EVHState.restoreRowState(StampState.java:451)
>         at
> org.apache.myfaces.trinidad.component.StampState.restoreStampState(StampState.java:125)
>
> The cause of the exception is:
>         EditableValueHolder evh = (EditableValueHolder) child;
>
> In case of the exception child is of type CoreOutputText.
>
> Harald Kuhn
> AirPlus International
> Business Information Services
> Dornhofstr. 36
> 63263 Neu-Isenburg
> T  +49 (0) 61 02. 2 04 - 8 21
> F  +49 (0) 61 02. 2 04 - 1 39
> [email protected]
> www.airplus.com
>
>
>



--
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Reply via email to