1 2 Previous Next 17 Replies Latest reply on Oct 31, 2006 11:36 AM by cja987

    JavaScript Error when using sortable <t:dataTable>

      Hi,

      I'd like to use the Apache Tomahawk dataTable component to display Seams taskInstanceList using pagination and to be able to sort the table according to the users selection.

      I followed the recommendations on this forum and I'm able to use tomahawk components (tested with dataTable, inputDate,...).
      After wrapping the taskInstanceList into another class, responsible for holding the logic for sorting, I'm able to get a perfectly rendered dataTable on my page. Another thing working right out of the box was pagination, but I've a little issue when it comes to be able to sort the table.

      Whenever a I click on a header field of the table, I get a JavaScript error

      clear__5Fid69 is not defined
      .
      <t:dataTable value="#{pagedTaskInstanceList.list}" var="task"
       rows="5" id="tasks" preserveDataModel="false" rowId="#{task.id}"
       sortColumn="#{pagedTaskInstanceList.sort}"
       sortAscending="#{pagedTaskInstanceList.ascending}"
       preserveSort="true" styleClass="scrollerTable">
      
       <h:column>
       <f:facet name="header">Id</f:facet>
       #{task.id}
       </h:column>
      
       <!-- further columns skipped -->
      
      </t:dataTable>
      


      Has anyone managed to get a sortable and paged tomahawk datatable running? Anyonw any ideas on what I could possibly miss?
      Is there an easier way to get the taskInstanceLIst paged and sortable?

      Thanks for any pointers,

      Kurt

        • 1. Re: JavaScript Error when using sortable <t:dataTable>
          texan

          When I was using it (I abandoned it for various reasons), I set "preserveSort" to false.

          I'm embarassed to admit it, but I can't remember which problem that solved. However, I can say that I concluded that when you see the word "preserve" in a tomahawk component, it means "don't preserve it: replace it with something you don't want".

          This was particularly true of "preserveDataModel", which I see you've set to false (as I did after trying to figure out why my table model was reduced to just the displayed rows).

          • 2. Re: JavaScript Error when using sortable <t:dataTable>

            Hi,

            thank you for your response. Unfortunately setting "preserveSort" to false didn't solve the problem.
            So you abandoned tomahawk components - are there any alternatives to implementing your components on your own?
            I mean a sortable, clickable table should be nothing unusual - standard components should be available, right?

            Thanks, Kurt

            • 3. Re: JavaScript Error when using sortable <t:dataTable>
              gavin.king

              The Trinidad stuff seems good.

              • 4. Re: JavaScript Error when using sortable <t:dataTable>
                texan

                [rant]
                I'm actually pretty shocked that the JSF team (commitee?) didn't build more of this stuff into the specification. We're all re-inventing these components, or trying to find alternatives like Trinidad. In my case, I'm not in a position to switch to Trinidad right now, as I'm too close to going live. I've pulled out most of the Tomahawk components and put in brute-force alternatives using Facelets "custom components". Later I'll probably integrate Trinidad.

                The things that I needed that are missing (as far as I can tell) from JSF and are poorly implemented in Tomahawk are:

                1. Date/Time input - tomahawk has a simple date picker, InputCalendar (which I'm still using), and a more complex date/time component, InputDate. For reasons that escape me, they hid many of the InputCalendar settings in the InputDate component, rendering it useless to me.

                2. Drop-down menus. Come on, how can you design a UI spec like JSF a leave this out? Tomahawk's component wrapper around the (excellent) JSCOOK javascript menu is extrememely weak, once again hiding many of the settings that I need to manipulate.

                3. A sortable, pageable table, with a corresponding TableData bean to hold sort column, ascending, and paging attributes. Tomahawk's component is half-baked.

                Maybe the Tomahawk components will improve in the next release, but I'm skeptical, and can't afford the risk of using their latest CVS dev code.

                There are plenty of other things that are missing, but these seem to be core components that are missing from JSF itself. What's the point of a UI specification if it leaves the meat of the problem as an excercise for the reader?
                [/rant]

                Okay, to be fair, I shouldn't complain if I'm not willing to step up and help. Sadly, I'm better at whining than helping.

                Having said all that, my ranting doesn't really contribute much to this forum, so I'll shut up now and get back to work.

                • 5. Re: JavaScript Error when using sortable <t:dataTable>
                  gavin.king

                  Well, I agree with most of what you say.

                  The thing is, that I don't actually want anything too complex and shiny and "rich" for this stuff (I can get rich using Ajax4JSF). But I really would like a simple date picker that I can make pretty using CSS. Same for drop-downs.

                  The table control is not so important to me. I think I can do something just fine by layering Ajax4JSF over the top of a h:dataTable.

                  It would be awesome if someone could contribute stuff like this to the Seam tag library.

                  • 6. Re: JavaScript Error when using sortable <t:dataTable>
                    shane.bryzak

                    I've got a really nice date picker that I wrote a few years ago. When I get a chance I'll dress it up as a Seam tag and add it to CVS.

                    • 7. Re: JavaScript Error when using sortable <t:dataTable>
                      gavin.king

                      That would be awesome.

                      • 8. Re: JavaScript Error when using sortable <t:dataTable>

                        Thank you all for your replies!

                        Since Gavin suggested to use the Apache Trinidad components, I gave it a shot.

                        I've downloaded the m1 snapshot from http://people.apache.org/maven-snapshot-repository/org/apache/myfaces/trinidad/ and followed teh documentation to get all teh servlets and required filters to work.

                        The essential section of web.xml:

                        <filter>
                         <filter-name>trinidad</filter-name>
                         <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
                        </filter>
                        
                        <filter-mapping>
                         <filter-name>trinidad</filter-name>
                         <servlet-name>Faces Servlet</servlet-name>
                        </filter-mapping>
                        
                        <servlet>
                         <servlet-name>resources</servlet-name>
                         <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
                        </servlet>
                        
                        <servlet-mapping>
                         <servlet-name>resources</servlet-name>
                         <url-pattern>/adf/*</url-pattern>
                        </servlet-mapping>
                        
                        <context-param>
                         <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
                         <param-value>com.sun.facelets.FaceletViewHandler</param-value>
                        </context-param>
                        
                        <context-param>
                         <param-name>facelets.VIEW_MAPPINGS</param-name>
                         <param-value>*.xhtml</param-value>
                        </context-param>
                        


                        The server starts up smoothly and is waiting for requests, BUT when a site is requested (even one without any trinidad components), I'm getting the following exceptions:

                        2006-10-19 17:33:55,810 ERROR [STDERR] 19.10.2006 17:33:55 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
                        SCHWERWIEGEND: Error Loading Library: jar:file:/D:/Internet/Server/jboss-4.0.4.GA/server/default/tmp/deploy/tmp22671PortalOne.ear-contents/PortalOne.jar-contents/WEB-INF/lib/t-impl.jar!/META-INF/trh.taglib.xml
                        java.io.IOException: Error parsing [jar:file:/D:/Internet/Server/jboss-4.0.4.GA/server/default/tmp/deploy/tmp22671PortalOne.ear-contents/PortalOne.jar-contents/WEB-INF/lib/t-impl.jar!/META-INF/trh.taglib.xml]:
                         at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:397)
                         at com.sun.facelets.compiler.TagLibraryConfig.loadImplicit(TagLibraryConfig.java:418)
                         at com.sun.facelets.compiler.Compiler.initialize(Compiler.java:86)
                         at com.sun.facelets.compiler.Compiler.compile(Compiler.java:103)
                         at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:192)
                         at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:141)
                         at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:93)
                         at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:503)
                         at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:553)
                         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:178)
                         at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
                         at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:383)
                         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                         at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:327)
                         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:291)
                         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:214)
                         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:90)
                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                         at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                         at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
                         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                         at java.lang.Thread.run(Thread.java:595)
                        Caused by: org.xml.sax.SAXException: Error Handling [jar:file:/D:/Internet/Server/jboss-4.0.4.GA/server/default/tmp/deploy/tmp22671PortalOne.ear-contents/PortalOne.jar-contents/WEB-INF/lib/t-impl.jar!/META-INF/trh.taglib.xml@13,107] <handler-class>
                         at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.endElement(TagLibraryConfig.java:258)
                         at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
                         at org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown Source)
                         at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
                         at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
                         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
                         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
                         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
                         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
                         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
                         at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
                         at javax.xml.parsers.SAXParser.parse(Unknown Source)
                         at javax.xml.parsers.SAXParser.parse(Unknown Source)
                         at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:394)
                         ... 45 more
                        Caused by: java.lang.Exception: org.apache.myfaces.trinidadinternal.facelets.TrinidadComponentHandler must be an instance of com.sun.facelets.tag.TagHandler
                         at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.createClass(TagLibraryConfig.java:280)
                         at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.endElement(TagLibraryConfig.java:205)
                         ... 60 more
                        2006-10-19 17:33:55,826 ERROR [STDERR] 19.10.2006 17:33:55 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
                        INFO: Added Library from: jar:file:/D:/Internet/Server/jboss-4.0.4.GA/server/default/tmp/deploy/tmp22671PortalOne.ear-contents/PortalOne-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
                        2006-10-19 17:33:55,841 ERROR [STDERR] 19.10.2006 17:33:55 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
                        SCHWERWIEGEND: Error Loading Library: jar:file:/D:/Internet/Server/jboss-4.0.4.GA/server/default/tmp/deploy/tmp22671PortalOne.ear-contents/PortalOne.jar-contents/WEB-INF/lib/t-impl.jar!/META-INF/tr.taglib.xml
                        java.io.IOException: Error parsing [jar:file:/D:/Internet/Server/jboss-4.0.4.GA/server/default/tmp/deploy/tmp22671PortalOne.ear-contents/PortalOne.jar-contents/WEB-INF/lib/t-impl.jar!/META-INF/tr.taglib.xml]:
                         at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:397)
                         at com.sun.facelets.compiler.TagLibraryConfig.loadImplicit(TagLibraryConfig.java:418)
                         at com.sun.facelets.compiler.Compiler.initialize(Compiler.java:86)
                         at com.sun.facelets.compiler.Compiler.compile(Compiler.java:103)
                         at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:192)
                         at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:141)
                         at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:93)
                         at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:503)
                         at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:553)
                         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:178)
                         at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
                         at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:383)
                         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                         at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:327)
                         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:291)
                         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:214)
                         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:90)
                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                         at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                         at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
                         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                         at java.lang.Thread.run(Thread.java:595)
                        Caused by: org.xml.sax.SAXException: Error Handling [jar:file:/D:/Internet/Server/jboss-4.0.4.GA/server/default/tmp/deploy/tmp22671PortalOne.ear-contents/PortalOne.jar-contents/WEB-INF/lib/t-impl.jar!/META-INF/tr.taglib.xml@10,101] <handler-class>
                         at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.endElement(TagLibraryConfig.java:258)
                         at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
                         at org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown Source)
                         at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
                         at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
                         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
                         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
                         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
                         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
                         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
                         at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
                         at javax.xml.parsers.SAXParser.parse(Unknown Source)
                         at javax.xml.parsers.SAXParser.parse(Unknown Source)
                         at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:394)
                         ... 45 more
                        Caused by: java.lang.Exception: org.apache.myfaces.trinidadinternal.facelets.SetActionListenerTag must be an instance of com.sun.facelets.tag.TagHandler
                         at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.createClass(TagLibraryConfig.java:280)
                         at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.endElement(TagLibraryConfig.java:205)
                         ... 60 more
                        2006-10-19 17:33:55,857 ERROR [STDERR] 19.10.2006 17:33:55 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
                        


                        The issue here is, that I'm not ok with the root exception!
                        Caused by: java.lang.Exception: org.apache.myfaces.trinidadinternal.facelets.TrinidadComponentHandler must be an instance of com.sun.facelets.tag.TagHandler


                        I've downloaded the sources and TrinidadComponentHandler IS an instance of TagHandler.

                        TrinidadComponentHandler extends com.sun.facelets.tag.jsf.ComponentHandler and this is inherited from TagHandler as examplified at http://www.docjar.org/docs/api/com/sun/facelets/tag/jsf/ComponentHandler.html

                        The same situation is faced when inspecting the second exception.
                        SetActionListenerTag is an instance of com.sun.facelets.tag.TagHandler.

                        I thought about a version conflict and tried several facelets versions between 1.1.5 and 1.1.11 without any luck.

                        Has anyone ever used the (incubated) version of the trinidad components?

                        Am I miss something obvious when looking at the stacktrace?

                        Any ideas?

                        Any help greatly appreciated,

                        Kurt

                        • 9. Re: JavaScript Error when using sortable <t:dataTable>
                          gavin.king

                          You have a classpath problem. Probably two different facelets jars floating around.

                          • 10. Re: JavaScript Error when using sortable <t:dataTable>

                            I thought about that as well, but couldn't find a second jsf-facelets.jar anywhere.
                            Anyways, I've downloaded the trinidad sources and did a complete build.
                            Everything's ok now.

                            Thank you all for the help!

                            Kurt

                            • 11. Re: JavaScript Error when using sortable <t:dataTable>

                              I've tried using trinidad and found that when I set it up as documented, that the standard JSF components no longer rendered (and I got log messages about HTMLRenderKit not being found). I thought maybe it was a classloader problem since I had trinidad in WEB-INF/lib and myfaces in jboss's jsf-libs, but moving them to jsf-libs did no good. I'm sort of stumped now, and had to back it out.

                              There's no way I want to use trinidad for everything, I just want to snag the table components and keep using seam's enhancements to JSF core components like h:inputText. Does anyone have a configuration they can share that succeeds in mixing JSF core and trinidad in facelets?


                              • 12. Re: JavaScript Error when using sortable <t:dataTable>
                                pmuir

                                I used the trinidad example on the wiki to set up trinidad and when doing so I had no problem using standard JSF components and trinidad components on the same page.

                                I'm using facelets 1.1.11 and didn't really deviate from the example when setting up.

                                • 13. Re: JavaScript Error when using sortable <t:dataTable>
                                  pmuir

                                  Post your faces-config.xml and web.xml

                                  • 14. Re: JavaScript Error when using sortable <t:dataTable>

                                    I tried the trinidad example on the wiki (registrationtrinidad.zip) and simply changed the tr:inputText tag to an h:inputText tag (and of course removed the trinidad-specific attributes). No changes to the web.xml or faces-config at all. So here's the entire diff of the two trees:

                                    --- registrationtrinidad/view/register.xhtml 2006-10-20 11:08:28.000000000 -0700
                                    +++ registrationtrinidad.new/view/register.xhtml 2006-10-30 21:57:53.000000000 -0800
                                    @@ -2,6 +2,7 @@
                                     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
                                     <html xmlns="http://www.w3.org/1999/xhtml"
                                     xmlns:s="http://jboss.com/products/seam/taglib"
                                    + xmlns:h="http://java.sun.com/jsf/html"
                                     xmlns:tr="http://myfaces.apache.org/trinidad"
                                     xmlns:trh="http://myfaces.apache.org/trinidad/html">
                                    
                                    @@ -16,8 +17,8 @@
                                     <s:validateAll>
                                     <tr>
                                     <td>Username</td>
                                    - <td><tr:inputText value="#{user.username}" required="true"
                                    - requiredMessageDetail="Must enter a user name"/></td>
                                    + <td><h:inputText value="#{user.username}" required="true" />
                                    + </td>
                                     </tr>
                                     <tr>
                                     <td>Real Name</td>
                                    
                                    


                                    I deployed this to JBoss 4.05 on a fresh CVS checkout. The JSF inputText just doesn't render at all. I just tried deploying on tomcat, and got the same result.


                                    1 2 Previous Next