I have just tested with Tapestry 5.3.2 and i don't reproduce your problem. Could you test on a page where there is only the ListSorter component ?
Thanks. Laurent ________________________________________ De : sommeralex [alexander.som...@gmail.com] Date d'envoi : lundi 13 février 2012 19:00 À : users@tapestry.apache.org Objet : Re: implementing a sortable list with jQuery Hi Guerin I have now implemented your plugin component. I am able to sort the list. But: I am not able to save the list order. If i am pressing the submit button. the following error occurs (i am using 1:1 of http://exanpe-t5-lib.appspot.com/components/listsorter/example1): [ERROR] ioc.Registry A JSONArray text must start with '[' at character 0 of [ERROR] ioc.Registry Operations trace: [ERROR] ioc.Registry [ 1] Triggering event 'action' on Exa:form [INFO] AppModule.TimingFilter Request time: 47 ms [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: A JSONArray text must start with '[' at character 0 of org.apache.tapestry5.ioc.internal.OperationException: A JSONArray text must start with '[' at character 0 of [at classpath:com/scrollstory/pages/Exa.tml, line 8] at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1121) at org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1047) at org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:81) at org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42) at $ComponentEventRequestHandler_12721c2d5ac43f16.handle(Unknown Source) at org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42) at $ComponentEventRequestHandler_12721c2d5ac43f16.handle(Unknown Source) at org.apache.tapestry5.upload.internal.services.UploadExceptionFilter.handle(UploadExceptionFilter.java:75) at $ComponentEventRequestHandler_12721c2d5ac43f16.handle(Unknown Source) at org.apache.tapestry5.services.TapestryModule$40.handle(TapestryModule.java:2456) at $ComponentEventRequestHandler_12721c2d5ac43f16.handle(Unknown Source) at $ComponentEventRequestHandler_12721c2d5ac43e47.handle(Unknown Source) at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43) at org.apache.tapestry5.services.InitializeActivePageName.handleComponentEvent(InitializeActivePageName.java:39) at $ComponentRequestHandler_12721c2d5ac43e48.handleComponentEvent(Unknown Source) at fr.exanpe.t5.lib.internal.authorize.AuthorizePageFilter.handleComponentEvent(AuthorizePageFilter.java:74) at $ComponentRequestHandler_12721c2d5ac43e48.handleComponentEvent(Unknown Source) at $ComponentRequestHandler_12721c2d5ac43e0a.handleComponentEvent(Unknown Source) at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46) at $Dispatcher_12721c2d5ac43e0f.dispatch(Unknown Source) at $Dispatcher_12721c2d5ac43e07.dispatch(Unknown Source) at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302) at com.scrollstory.services.AppModule$1.service(AppModule.java:103) at $RequestFilter_12721c2d5ac43e06.service(Unknown Source) at $RequestHandler_12721c2d5ac43e08.service(Unknown Source) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) at $RequestHandler_12721c2d5ac43e08.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902) at $RequestHandler_12721c2d5ac43e08.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892) at $RequestHandler_12721c2d5ac43e08.service(Unknown Source) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90) at $RequestHandler_12721c2d5ac43e08.service(Unknown Source) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:105) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:95) at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:119) at $RequestHandler_12721c2d5ac43e08.service(Unknown Source) at $RequestHandler_12721c2d5ac43dfa.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253) at org.got5.tapestry5.jquery.services.AjaxUploadServletRequestFilter.service(AjaxUploadServletRequestFilter.java:26) at $HttpServletRequestHandler_12721c2d5ac43dfc.service(Unknown Source) at org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44) at $HttpServletRequestHandler_12721c2d5ac43dfc.service(Unknown Source) at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) at $HttpServletRequestHandler_12721c2d5ac43dfc.service(Unknown Source) at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) at $HttpServletRequestFilter_12721c2d5ac43df6.service(Unknown Source) at $HttpServletRequestHandler_12721c2d5ac43dfc.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852) at $HttpServletRequestHandler_12721c2d5ac43dfc.service(Unknown Source) at $HttpServletRequestHandler_12721c2d5ac43df5.service(Unknown Source) at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:171) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) Caused by: org.apache.tapestry5.runtime.ComponentEventException: A JSONArray text must start with '[' at character 0 of [at classpath:com/scrollstory/pages/Exa.tml, line 8] at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1130) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3200(ComponentPageElementImpl.java:61) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1051) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1048) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) ... 70 more Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: A JSONArray text must start with '[' at character 0 of [at classpath:com/scrollstory/pages/Exa.tml, line 10] at org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:672) at org.apache.tapestry5.corelib.components.Form.advised$onAction_12721c2d5ac43e78(Form.java:522) at org.apache.tapestry5.corelib.components.Form$Invocation_onAction_12721c2d5ac43e77.proceedToAdvisedMethod(Unknown Source) at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84) at org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:37) at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86) at org.apache.tapestry5.corelib.components.Form.onAction(Form.java) at org.apache.tapestry5.corelib.components.Form.dispatchComponentEvent(Form.java) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:931) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1106) ... 74 more Caused by: java.lang.RuntimeException: A JSONArray text must start with '[' at character 0 of at org.apache.tapestry5.json.JSONTokener.syntaxError(JSONTokener.java:384) at org.apache.tapestry5.json.JSONArray.parse(JSONArray.java:126) at org.apache.tapestry5.json.JSONArray.<init>(JSONArray.java:95) at fr.exanpe.t5.lib.components.ListSorter.processSubmission(ListSorter.java:214) at fr.exanpe.t5.lib.components.ListSorter$ListSorterProcessSubmission.execute(ListSorter.java:167) at fr.exanpe.t5.lib.components.ListSorter$ListSorterProcessSubmission.execute(ListSorter.java:147) at org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:661) ... 83 more 2012/2/13 Guerin Laurent [via Tapestry] < ml-node+s1045711n5479998...@n5.nabble.com> > Try with exanpe.version in your properties and not exanpe-version > > Envoyé de mon iPhone > > Le 13 févr. 2012 à 18:33, "sommeralex" <[hidden > email]<http://user/SendEmail.jtp?type=node&node=5479998&i=0>> > a écrit : > > > Hi Guerin, > > > > i have the error: ArtifactDescriptorException: Failed to read artifact > > descriptor for fr.exanpe.ex (Click for 91 more) > > > > <dependency> > > <groupId>fr.exanpe</groupId> > > <artifactId>exanpe-t5-lib</artifactId> > > <version>${exanpe.version}</version> > > </dependency> > > > > <properties> > > <exanpe-version>1.2.0</exanpe-version> > > > > > <tapestry-jquery-release-version>3.2.0-SNAPSHOT</tapestry-jquery-release-version> > > > <tapestry-release-version>5.3.1</tapestry-release-version> > > > > <postgresql-release-version>9.1-901.jdbc4</postgresql-release-version> > > <hsql-release-version>1.8.0.7</hsql-release-version> > > </properties> > > > > 2012/2/13 Alexander Sommer <[hidden > > email]<http://user/SendEmail.jtp?type=node&node=5479998&i=1>> > > > > >> found the answer: 1.2.0< > http://exanpe.github.com/exanpe-t5-lib/changes-report.html#a1.2.0> > >> > >> will test it. > >> > >> thx > >> > >> > >> 2012/2/13 Alexander Sommer <[hidden > >> email]<http://user/SendEmail.jtp?type=node&node=5479998&i=2>> > > >> > >>> Hi Laurent, > >>> > >>> Is it comaptible with tabestry 3.2? what is the latest version? on: > >>> https://github.com/exanpe/exanpe-t5-lib i dont see the version > number. > >>> is it 1.3? > >>> > >>> thx > >>> > >>> 2012/2/13 Guerin Laurent [via Tapestry] < > >>> [hidden email] <http://user/SendEmail.jtp?type=node&node=5479998&i=3>> > > >>> > >>> This should work because we use YUI, so you shouldn't have any > >>>> Javascript conflict with JQuery, but i haven't tried. > >>>> To test, add exanpe-t5-lib dependency, annotate your module class > with > >>>> @SubModule(ExanpeLibraryModule.class) and declare the exanpe > namespace on > >>>> your page (xmlns:ex="tapestry-library:exanpe"). > >>>> More informations here : > >>>> http://exanpe.github.com/exanpe-t5-lib/getting_started.html > >>>> > >>>> > >>>> > >>>> -----Message d'origine----- > >>>> De : sommeralex [mailto:[hidden email]< > http://user/SendEmail.jtp?type=node&node=5479868&i=0>] > >>>> > >>>> Envoyé : lundi 13 février 2012 17:56 > >>>> À : [hidden email]< > http://user/SendEmail.jtp?type=node&node=5479868&i=1> > >>>> Objet : Re: implementing a sortable list with jQuery > >>>> > >>>> HI Laurent, > >>>> > >>>> thanks! can i mix this with jQuery? And if so, how? I need jQuery > >>>> because of the multiple file upload component.. > >>>> > >>>> alex > >>>> > >>>> 2012/2/13 Guerin Laurent [via Tapestry] < > >>>> [hidden email] <http://user/SendEmail.jtp?type=node&node=5479868&i=2>> > > >>>> > >>>>> Hi, > >>>>> We have a such component in exanpe-t5-lib, but not implemented with > >>>>> JQuery. > >>>>> You can have a look at our online demo here : > >>>>> http://exanpe-t5-lib.appspot.com/components/listsorter/example1 > >>>>> > >>>>> Laurent > >>>>> > >>>>> -----Message d'origine----- > >>>>> De : sommeralex [mailto:[hidden > >>>>> email]<http://user/SendEmail.jtp?type=node&node=5479777&i=0>] > >>>>> > >>>>> Envoyé : lundi 13 février 2012 16:07 > >>>>> À : [hidden email] > >>>>> <http://user/SendEmail.jtp?type=node&node=5479777&i=1> > >>>>> Objet : implementing a sortable list with jQuery > >>>>> > >>>>> Hi! > >>>>> > >>>>> I need to have sortable list by dragging the list elements and would > >>>>> like to store the order at the end. > >>>>> > >>>>> The http://tapestry5-jquery.com/core/docsgrid does not provide a > >>>>> component, so i thought i could take this one: > >>>>> > >>>>> > http://blogs.fau.de/pp/2010/09/01/sortierbare-elemente-in-tapestry-per > >>>>> -jquery-ui/ > >>>>> > >>>>> What i did, so far, is this: > >>>>> > >>>>> <html t:type="layout" t:title="Welcomes" t:tabTitle="Scrollstory" > >>>>> t:sidebarTitle="Menu" > >>>>> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd" > >>>>> xmlns:p="tapestry:parameter" > >>>>> xmlns:j="tapestry-library:jquery"> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> <ul id="sortable"> > >>>>> <li t:type="loop" source="fileElements" value="fileElement" > >>>>> id="${fileElement.id}">${fileElement.id} ${fileElement.name}</li> > >>>>> </ul> # ${message:save} <t:actionlink t:id="save" > >>>>> context="literal:dummy"></t:actionlink> > >>>>> > >>>>> </html> > >>>>> > >>>>> And my class file: > >>>>> > >>>>> @Property > >>>>> private List<FileElement> fileElements; > >>>>> > >>>>> @Property > >>>>> private FileElement fileElement; > >>>>> > >>>>> void pageAttached(){ > >>>>> System.out.println("page attached"); > >>>>> uploadedFiles = new ArrayList<UploadedFile>(); > >>>>> fileElements = new ArrayList<FileElement>(); > >>>>> > >>>>> fileElements.add(new FileElement(1, "test")); > >>>>> fileElements.add(new FileElement(2, "test2")); > >>>>> } > >>>>> > >>>>> the class FileElement is just a class with id as int and name as > >>>>> String with getters / setters. > >>>>> > >>>>> so, now, two questions: > >>>>> > >>>>> question 1: > >>>>> > >>>>> > http://blogs.fau.de/pp/2010/09/01/sortierbare-elemente-in-tapestry-per > >>>>> -jquery-ui/ > >>>>> says we have to implement > >>>>> > >>>>> <link type="text/css" > >>>>> href="${asset:jqueryui/themes/base/jquery.ui.all.css}" > >>>>> rel="stylesheet" /> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> but, is this not implicit in xmlns:j="tapestry-library:jquery ? if i > >>>>> have to add this that way, how can i reference my jquery asset which > >>>>> is stored in my mvn. folder? > >>>>> > >>>>> question 2: > >>>>> > >>>>> if i am adding the second part of code > >>>>> > >>>>> function storeOrder() { > >>>>> var result = $('#sortable').sortable('toArray'); > >>>>> var context = ""; > >>>>> for (var id in result) { > >>>>> if (context == "") { > >>>>> context = result[id]; > >>>>> } else { > >>>>> context = context + "_" + result[id]; > >>>>> } > >>>>> } > >>>>> window.location = "/${pageName}" + ".save/" + context; } > >>>>> > >>>>> i get the exception > >>>>> > >>>>> Exception assembling root component of page Gallery: Could not > convert > >>>>> 'pageName' into a component parameter binding: Exception generating > >>>>> conduit for expression 'pageName': Class > com.scrollstory.pages.Gallery > >>>>> does not contain a property (or public field) named 'pageName'. > >>>>> > >>>>> .. so, sorting my list does not work.. :-( > >>>>> > >>>>> > >>>>> > >>>>> -- > >>>>> View this message in context: > >>>>> > http://tapestry.1045711.n5.nabble.com/implementing-a-sortable-list-wit > >>>>> h-jQuery-tp5479509p5479509.html Sent from the Tapestry - User > mailing > >>>>> list archive at Nabble.com. > >>>>> > >>>>> > --------------------------------------------------------------------- > >>>>> To unsubscribe, e-mail: [hidden > >>>>> email]<http://user/SendEmail.jtp?type=node&node=5479777&i=2> > >>>>> For additional commands, e-mail: [hidden > >>>>> email]<http://user/SendEmail.jtp?type=node&node=5479777&i=3> > >>>>> > >>>>> > >>>>> > --------------------------------------------------------------------- > >>>>> To unsubscribe, e-mail: [hidden > >>>>> email]<http://user/SendEmail.jtp?type=node&node=5479777&i=4> > >>>>> For additional commands, e-mail: [hidden > >>>>> email]<http://user/SendEmail.jtp?type=node&node=5479777&i=5> > >>>>> > >>>>> > >>>>> > >>>>> ------------------------------ > >>>>> If you reply to this email, your message will be added to the > >>>>> discussion > >>>>> below: > >>>>> > >>>>> > http://tapestry.1045711.n5.nabble.com/implementing-a-sortable-list-wit > >>>>> h-jQuery-tp5479509p5479777.html To unsubscribe from implementing a > >>>>> sortable list with jQuery, click > >>>>> here< > http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?ma > >>>>> > cro=unsubscribe_by_code&node=5479509&code=YWxleGFuZGVyLnNvbW1lckBnbWFp > >>>>> bC5jb218NTQ3OTUwOXwxMDUzMzQxMzM4> > >>>>> . > >>>>> NAML< > http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?ma > >>>>> > cro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.nam > >>>>> > l.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-n > >>>>> > abble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%2 > >>>>> > 1nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant > >>>>> _email%21nabble%3Aemail.naml> > >>>>> > >>>> > >>>> > >>>> -- > >>>> View this message in context: > >>>> > http://tapestry.1045711.n5.nabble.com/implementing-a-sortable-list-with-jQuery-tp5479509p5479836.html > >>>> > >>>> Sent from the Tapestry - User mailing list archive at Nabble.com. > >>>> > >>>> > >>>> ------------------------------ > >>>> If you reply to this email, your message will be added to the > >>>> discussion below: > >>>> > >>>> > http://tapestry.1045711.n5.nabble.com/implementing-a-sortable-list-with-jQuery-tp5479509p5479868.html > >>>> To unsubscribe from implementing a sortable list with jQuery, click > >>>> here< > > >>>> . > >>>> NAML< > http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > > >>>> > >>> > >>> > >> > > > > > > -- > > View this message in context: > http://tapestry.1045711.n5.nabble.com/implementing-a-sortable-list-with-jQuery-tp5479509p5479944.html > > > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden > email]<http://user/SendEmail.jtp?type=node&node=5479998&i=4> > For additional commands, e-mail: [hidden > email]<http://user/SendEmail.jtp?type=node&node=5479998&i=5> > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://tapestry.1045711.n5.nabble.com/implementing-a-sortable-list-with-jQuery-tp5479509p5479998.html > To unsubscribe from implementing a sortable list with jQuery, click > here<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5479509&code=YWxleGFuZGVyLnNvbW1lckBnbWFpbC5jb218NTQ3OTUwOXwxMDUzMzQxMzM4> > . > NAML<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://tapestry.1045711.n5.nabble.com/implementing-a-sortable-list-with-jQuery-tp5479509p5480030.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org