AJAX Throbber
Hi, I looking to implement a AJAX Throbber for all ajax calls. This is my java script function. Tapestry.onDOMLoaded(function() { function addAjaxOverlay(event, element) { var mgr = Tapestry.findZoneManager(element); var zone = mgr mgr.element; if (!zone) { return; } var $zone = $(zone); $zone.prepend(div class='zone-ajax-overlay'/); var overlay = $zone.children(:first); overlay.width($zone.width()).height($zone.height()); } $(document.body).bind(Tapestry.FORM_PROCESS_SUBMIT_EVENT, addAjaxOverlay); $(document.body).bind(Tapestry.TRIGGER_ZONE_UPDATE_EVENT, addAjaxOverlay); }); Show Pending Now when i include the above js in my page, i get a Page must be specified before initializing for partial page render. Here is my the code called for the click event ajaxResponseRenderer.addRender( searchTransactionZone, searchTransactionZone.getBody( ) ).addRender( pendingTransactionsZone, pendingTransactionsZone.getBody( )).addRender( processedTransactionsZone, processedTransactionsZone.getBody( )); this is the only code that is called. the return type of the function is null. Without including the JS my page works fine. Only after this JS does my application crash when doing a AJAX call. -- View this message in context: http://tapestry.1045711.n5.nabble.com/AJAX-Throbber-tp5718999.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
RE: NumberFormatException iocservices coercian flip flopping
This coercian logic is very unreasonable... and currently tripping up everything... even if I try to do a cancel push button on form all I have setup is my onActivate and it is characterizing all kinds of negative runtime problems public Object onActivate(String id) { if (beanType == null) return Utils.new404(messages); this.bean = contextValueEncoder.toValue(beanType, id); if (bean == null) return Utils.new404(messages); beanModel = beanModelSource.createEditModel(beanType, messages); propertyDescriptor = findPropertyDescriptor(beanType, photo); return null; } my attempt to obtain the bean using the contextValueEncoder is the mechanism thats causing the coercian to happen which I assume is retrieving the bean from the page context An unexpected application exception has occurred.org.apache.tapestry5.ioc.internal.OperationExceptionException converting 'coach' to instance of java.lang.Integer (id type for entity org.tynamo.examples.hibernatesecurity.model.Coach): Coercion of coach to type java.lang.Integer (via String -- Long, Long -- Integer) failed: For input string: coachtraceTriggering event 'activate' on edit/Coachorg.apache.tapestry5.runtime.ComponentEventExceptionException converting 'coach' to instance of java.lang.Integer (id type for entity org.tynamo.examples.hibernatesecurity.model.Coach): Coercion of coach to type java.lang.Integer (via String -- Long, Long -- Integer) failed: For input string: coachcontextcoach3eventTypeactivatejava.lang.RuntimeExceptionException converting 'coach' to instance of java.lang.Integer (id type for entity org.tynamo.examples.hibernatesecurity.model.Coach): Coercion of coach to type java.lang.Integer (via String -- Long, Long -- Integer) failed: For input string: coachjava.lang.NumberFormatExceptionFor input string: coachFilter stack frames Stack trace java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) java.lang.Long.parseLong(Long.java:410) java.lang.Long.init(Long.java:678) org.apache.tapestry5.ioc.services.TapestryIOCModule$9.coerce(TapestryIOCModule.java:241) org.apache.tapestry5.ioc.services.TapestryIOCModule$9.coerce(TapestryIOCModule.java:238) org.apache.tapestry5.ioc.services.CoercionTuple$CoercionWrapper.coerce(CoercionTuple.java:54) org.apache.tapestry5.ioc.internal.services.CompoundCoercion.coerce(CompoundCoercion.java:43) org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl$TargetCoercion.coerce(TypeCoercerImpl.java:71) org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl.coerce(TypeCoercerImpl.java:146) org.apache.tapestry5.internal.hibernate.HibernateEntityValueEncoder.toValue(HibernateEntityValueEncoder.java:80) org.apache.tapestry5.internal.services.ContextValueEncoderImpl.toValue(ContextValueEncoderImpl.java:47) org.tynamo.examples.hibernatesecurity.pages.edit.CoachEdit.onActivate(CoachEdit.java:104) org.tynamo.examples.hibernatesecurity.pages.edit.CoachEdit.dispatchComponentEvent(CoachEdit.java)
RE: NumberFormatException iocservices coercian flip flopping
I would like to challenge anyone to model an onActivate event handler that will work for me. I have scoped out and tried everything from demos to sample ciode to documentation code... etc...
RE: NumberFormatException iocservices coercian flip flopping
Just as a side issue... I have seen in the debugger... ID coming in as a string such as adminlayout which is definitely not an ID. I have been having some difficulty with the onActivate event handlers whenever I try to modify the method signature. Does anyone know if this is stable or not ? I am using tapestry 5.3.4
RE: NumberFormatException iocservices coercian flip flopping
I cannot even breakpoint at the onActivate now... This error says input string coach Not sure if thats whats being transmitted into the method signature or not I cannot seem to come up with a onActivate method signature that will hold water for me. somehow the page context is grabbing strings instead of ID's for the first formal parameter Any ideas on how to fix are appreciated I believe I have tried every sort of method signature that takes ONLY an ID as a formal parameter Ken An unexpected application exception has occurred.org.apache.tapestry5.runtime.ComponentEventExceptionException in method org.tynamo.examples.hibernatesecurity.pages.edit.CoachEdit.onActivate(java.lang.Integer), parameter #1: Coercion of coach to type java.lang.Integer (via String -- Long, Long -- Integer) failed: For input string: coachcontextcoach3eventTypeactivateorg.apache.tapestry5.ioc.internal.OperationExceptionException in method org.tynamo.examples.hibernatesecurity.pages.edit.CoachEdit.onActivate(java.lang.Integer), parameter #1: Coercion of coach to type java.lang.Integer (via String -- Long, Long -- Integer) failed: For input string: coachtraceTriggering event 'activate' on edit/CoachObtaining value for parameter #1 of org.tynamo.examples.hibernatesecurity.pages.edit.CoachEdit.onActivate(java.lang.Integer)java.lang.IllegalArgumentExceptionException in method org.tynamo.examples.hibernatesecurity.pages.edit.CoachEdit.onActivate(java.lang.Integer), parameter #1: Coercion of coach to type java.lang.Integer (via String -- Long, Long -- Integer) failed: For input string: coachjava.lang.RuntimeExceptionCoercion of coach to type java.lang.Integer (via String -- Long, Long -- Integer) failed: For input string: coachjava.lang.NumberFormatExceptionFor input string: coachFilter stack frames Stack trace java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) java.lang.Long.parseLong(Long.java:410) java.lang.Long.init(Long.java:678) org.apache.tapestry5.ioc.services.TapestryIOCModule$9.coerce(TapestryIOCModule.java:241) org.apache.tapestry5.ioc.services.TapestryIOCModule$9.coerce(TapestryIOCModule.java:238) org.apache.tapestry5.ioc.services.CoercionTuple$CoercionWrapper.coerce(CoercionTuple.java:54) org.apache.tapestry5.ioc.internal.services.CompoundCoercion.coerce(CompoundCoercion.java:43) org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl$TargetCoercion.coerce(TypeCoercerImpl.java:71) org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl.coerce(TypeCoercerImpl.java:146) org.apache.tapestry5.internal.services.TypeCoercedValueEncoderFactory$1.toValue(TypeCoercedValueEncoderFactory.java:45) org.apache.tapestry5.internal.services.ContextValueEncoderImpl.toValue(ContextValueEncoderImpl.java:47) org.apache.tapestry5.internal.URLEventContext.get(URLEventContext.java:43) org.apache.tapestry5.internal.services.ComponentEventImpl.coerceContext(ComponentEventImpl.java:83) org.apache.tapestry5.internal.transform.OnEventWorker$10.valueForEventHandlerMethodParameter(OnEventWorker.java:475) org.apache.tapestry5.internal.transform.EventHandlerMethodParameterSource$1.invoke(EventHandlerMethodParameterSource.java:54) org.apache.tapestry5.internal.transform.EventHandlerMethodParameterSource.get(EventHandlerMethodParameterSource.java:49) org.tynamo.examples.hibernatesecurity.pages.edit.CoachEdit.dispatchComponentEvent(CoachEdit.java) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:927) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1112) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3100(ComponentPageElementImpl.java:61) org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1057) org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1054) org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1053) org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.triggerContextEvent(InternalComponentResourcesImpl.java:302) org.apache.tapestry5.internal.services.PageActivatorImpl.activatePage(PageActivatorImpl.java:34) org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:68) org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42) org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42) org.apache.tapestry5.upload.internal.services.UploadExceptionFilter.handle(UploadExceptionFilter.java:75)
RE: NumberFormatException iocservices coercian flip flopping
Well according to this... http://tapestry.apache.org/page-navigation.html I have some options... so I decided to skip toe convoluted crap And do this void onActivate(Coach bean) { this.bean = bean; } Coach onPassivate() { return bean; } now everything works yaa !
RE: NumberFormatException iocservices coercian flip flopping
The clean solution was the modeling of just the page object and page activation context... and tapestry does the rest. so that sums up a custom edit page public class CoachEdit { @Inject private ContextValueEncoder contextValueEncoder; @Inject private Messages messages; @Inject private PersistenceService persistenceService; @Inject private PageRenderLinkSource pageRenderLinkSource; @Property(write = false) private Class beanType = Coach.class; @Property @PageActivationContext private Coach bean; @Property private BeanModel beanModel; @Inject private BeanModelSource beanModelSource; void onActivate(Coach bean) { this.bean = bean; beanModel = beanModelSource.createEditModel(beanType, messages); } Coach onPassivate() { return bean; } @CleanupRender void cleanup() { bean = null; beanType = null; } @Log @CommitAfter @OnEvent(EventConstants.SUCCESS) Link success() { persistenceService.save(bean); return back(); } @OnEvent(cancel) Link back() { return pageRenderLinkSource.createPageRenderLinkWithContext(Show.class, beanType, bean); } public String getListAllLinkMessage() { return TynamoMessages.listAll(messages, beanType); } public String getTitle() { return TynamoMessages.edit(messages, beanType); } }
RE: exception report
it would be nice if I knew WHICH parameter
Re: exception report
it would be nice if I knew WHICH parameter Probably 't:component-trace', but I believe it would fail for any parameter. I am not sure what is happening, but my guess is that your Jetty was recently upgraded, and now fails during parameter extraction (are your POSTed forms relatively large, e.g. more than 1000 parameters?). Probably Tapestry first gets an IllegalStateException trying to get parameters during normal rendering than again NullPointerException (because Jetty does not properly sets internal request state after previous exception) during rendering the exception page. To check whether my speculations are correct, try setting a breakpoint triggered by throwing IllegalStateException and see if Jetty throws one. Best regards, Cezary - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: exception report
Unsubscribe. On Dec 27, 2012, at 8:07 AM, nhhockeyplayer nashua nhhockeypla...@hotmail.com wrote: it would be nice if I knew WHICH parameter - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: exception report
Thanks Cezary, Yeah i set the breakpoint and it gets triggered... but really nothing to do at that point. And it looks like its coming from tapestry... the IllegalStateException So you saying my jetty plugin updated itself ? Ok here is some more stuff pertaining to your claims... 127.0.0.1 - - [27/Dec/2012:14:51:03 +] GET /tynamo/blob/coach/11/photo HTTP/1.1 200 123080 http://localhost:8080/home; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 127.0.0.1 - - [27/Dec/2012:14:51:03 +] GET /tynamo/blob/coach/5/photo HTTP/1.1 200 148106 http://localhost:8080/home; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 127.0.0.1 - - [27/Dec/2012:14:51:03 +] GET /tynamo/blob/coach/10/photo HTTP/1.1 200 63676 http://localhost:8080/home; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Form too large65812220 java.lang.IllegalStateException: Form too large65812220 at org.mortbay.jetty.Request.extractParameters(Request.java:1561) at org.mortbay.jetty.Request.getParameter(Request.java:859) at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:169) at org.apache.tapestry5.internal.services.RequestImpl.getParameter(RequestImpl.java:72) at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.validateAndConstructComponentEventRequest(ComponentEventLinkEncoderImpl.java:371) at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(ComponentEventLinkEncoderImpl.java:329) at org.apache.tapestry5.internal.services.linktransform.LinkTransformerInterceptor.decodeComponentEventRequest(LinkTransformerInterceptor.java:58) at $ComponentEventLinkEncoder_482c33ee18a9.decodeComponentEventRequest(Unknown Source) at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:42) at $Dispatcher_482c33ee18aa.dispatch(Unknown Source) at $Dispatcher_482c33ee18a2.dispatch(Unknown Source) at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) at $RequestHandler_482c33ee18a3.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902) at $RequestHandler_482c33ee18a3.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892) at $RequestHandler_482c33ee18a3.service(Unknown Source) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90) at $RequestHandler_482c33ee18a3.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_482c33ee18a3.service(Unknown Source) at $RequestHandler_482c33ee1871.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253) at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) at $HttpServletRequestHandler_482c33ee1873.service(Unknown Source) at org.tynamo.security.services.impl.SecurityConfiguration$1.call(SecurityConfiguration.java:58) at org.tynamo.security.services.impl.SecurityConfiguration$1.call(SecurityConfiguration.java:53) at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:380) at org.tynamo.security.services.impl.SecurityConfiguration.service(SecurityConfiguration.java:53) at $HttpServletRequestFilter_482c33ee186e.service(Unknown Source) at $HttpServletRequestHandler_482c33ee1873.service(Unknown Source) at org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44) at $HttpServletRequestHandler_482c33ee1873.service(Unknown Source) at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) at $HttpServletRequestFilter_482c33ee186f.service(Unknown Source) at $HttpServletRequestHandler_482c33ee1873.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852) at
RE: exception report
Thanks Cezary, Would you happen to know the configuration? I am using eclipse helios... maven-3 and I run my apps our of the debug-configurations dialogue from within eclipse. I am thinking somehow there is a parameter I can specify somehow within the debug configuration for the maven project. Or instrument the maven pom itself for the project somehow ? Best regards and thanks... KEN From: nhhockeypla...@hotmail.com To: users@tapestry.apache.org Subject: RE: exception report Date: Thu, 27 Dec 2012 09:58:51 -0500 Ok I am rendering a gallery of 24 objects... sizable BLOB's with huge photo images up to 30mb plys. Why would there be restrictions on my form size ? And how and where do I configure such a constraint? Best regards and thanks... KEN From: nhhockeypla...@hotmail.com To: users@tapestry.apache.org Subject: RE: exception report Date: Thu, 27 Dec 2012 09:56:39 -0500 Thanks Cezary, Yeah i set the breakpoint and it gets triggered... but really nothing to do at that point. And it looks like its coming from tapestry... the IllegalStateException So you saying my jetty plugin updated itself ? Ok here is some more stuff pertaining to your claims... 127.0.0.1 - - [27/Dec/2012:14:51:03 +] GET /tynamo/blob/coach/11/photo HTTP/1.1 200 123080 http://localhost:8080/home; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 127.0.0.1 - - [27/Dec/2012:14:51:03 +] GET /tynamo/blob/coach/5/photo HTTP/1.1 200 148106 http://localhost:8080/home; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 127.0.0.1 - - [27/Dec/2012:14:51:03 +] GET /tynamo/blob/coach/10/photo HTTP/1.1 200 63676 http://localhost:8080/home; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Form too large65812220 java.lang.IllegalStateException: Form too large65812220 at org.mortbay.jetty.Request.extractParameters(Request.java:1561) at org.mortbay.jetty.Request.getParameter(Request.java:859) at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:169) at org.apache.tapestry5.internal.services.RequestImpl.getParameter(RequestImpl.java:72) at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.validateAndConstructComponentEventRequest(ComponentEventLinkEncoderImpl.java:371) at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(ComponentEventLinkEncoderImpl.java:329) at org.apache.tapestry5.internal.services.linktransform.LinkTransformerInterceptor.decodeComponentEventRequest(LinkTransformerInterceptor.java:58) at $ComponentEventLinkEncoder_482c33ee18a9.decodeComponentEventRequest(Unknown Source) at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:42) at $Dispatcher_482c33ee18aa.dispatch(Unknown Source) at $Dispatcher_482c33ee18a2.dispatch(Unknown Source) at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) at $RequestHandler_482c33ee18a3.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902) at $RequestHandler_482c33ee18a3.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892) at $RequestHandler_482c33ee18a3.service(Unknown Source) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90) at $RequestHandler_482c33ee18a3.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_482c33ee18a3.service(Unknown Source) at $RequestHandler_482c33ee1871.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253) at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) at $HttpServletRequestHandler_482c33ee1873.service(Unknown Source) at org.tynamo.security.services.impl.SecurityConfiguration$1.call(SecurityConfiguration.java:58) at org.tynamo.security.services.impl.SecurityConfiguration$1.call(SecurityConfiguration.java:53) at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) at
RE: exception report
This fixed it systemProperty nameorg.mortbay.jetty.Request.maxFormContentSize/name value758122/value /systemProperty
Re: exception report
Have you considered NOT serializing giant blobs of data to the client? On Thu, Dec 27, 2012 at 7:52 AM, Cezary Biernacki cezary...@gmail.comwrote: Yeah i set the breakpoint and it gets triggered... but really nothing to do at that point. And it looks like its coming from tapestry... the IllegalStateException No, it is clearly coming from Jetty. Tapestry just calls standard servlet request API getParameter() method. So you saying my jetty plugin updated itself ? I believe that the default Maven behaviour is to automatically update plugins to the newest version. Or before your forms were small enough. Cezary Ok here is some more stuff pertaining to your claims... 127.0.0.1 - - [27/Dec/2012:14:51:03 +] GET /tynamo/blob/coach/11/photo HTTP/1.1 200 123080 http://localhost:8080/home; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 127.0.0.1 - - [27/Dec/2012:14:51:03 +] GET /tynamo/blob/coach/5/photo HTTP/1.1 200 148106 http://localhost:8080/home; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 127.0.0.1 - - [27/Dec/2012:14:51:03 +] GET /tynamo/blob/coach/10/photo HTTP/1.1 200 63676 http://localhost:8080/home; Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 [ERROR] TapestryModule.**RequestExceptionHandler Processing of request failed with uncaught exception: Form too large65812220 java.lang.**IllegalStateException: Form too large65812220 at org.mortbay.jetty.Request.**extractParameters(Request.** java:1561) at org.mortbay.jetty.Request.**getParameter(Request.java:859) at javax.servlet.**ServletRequestWrapper.**getParameter(** ServletRequestWrapper.java:**169) at org.apache.tapestry5.internal.**services.RequestImpl.** getParameter(RequestImpl.java:**72) at org.apache.tapestry5.internal.**services.** ComponentEventLinkEncoderImpl.**validateAndConstructComponentE** ventRequest(**ComponentEventLinkEncoderImpl.**java:371) --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com
Re: T5.4-alpha-1 is missing SystemPropertiesSymbolProvider
If that is true, it is an accident, possibly a bad merge. On Thu, Dec 27, 2012 at 3:00 AM, Kristian Marinkovic kristian.marinko...@gmail.com wrote: Hi, i was just testing the 5.4-alpha-1 release and realized that the SystemPropertiesSymbolProvider is not used anymore by the TapestryFilter. I'm not sure whether it happened accidentally or on purpose? g, Kris - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com
Re: T5.4-alpha-1 is missing SystemPropertiesSymbolProvider
I think you are mistaken: @Contribute(SymbolSource.class) public static void setupStandardSymbolProviders(OrderedConfigurationSymbolProvider configuration, @ApplicationDefaults SymbolProvider applicationDefaults, @FactoryDefaults SymbolProvider factoryDefaults) { configuration.add(SystemProperties, new SystemPropertiesSymbolProvider(), before:*); configuration.add(EnvironmentVariables, new SystemEnvSymbolProvider()); configuration.add(ApplicationDefaults, applicationDefaults); configuration.add(FactoryDefaults, factoryDefaults); } Whatever you are seeing is caused by something else: a typo perhaps, or something preventing the system property from being visible to the running application. On Thu, Dec 27, 2012 at 8:44 AM, Howard Lewis Ship hls...@gmail.com wrote: If that is true, it is an accident, possibly a bad merge. On Thu, Dec 27, 2012 at 3:00 AM, Kristian Marinkovic kristian.marinko...@gmail.com wrote: Hi, i was just testing the 5.4-alpha-1 release and realized that the SystemPropertiesSymbolProvider is not used anymore by the TapestryFilter. I'm not sure whether it happened accidentally or on purpose? g, Kris - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com
Re: T5.4-alpha-1 is missing SystemPropertiesSymbolProvider
Hi Howard, yes the SystemPropertySymbolProvider is in place but in Tapestry 5.3.6 the TapestryFilter used it to resolve system properties but now it doesn't. As a consequence properties like tapestry.disable-default-modules that are accessed within the TapestryAppInitializer cannot be read and therefore have no effect. The code in T5.4 looks like this: SymbolProvider contextProvider = new ServletContextSymbolProvider(context); SymbolProvider contextPathProvider = new SingleKeySymbolProvider(SymbolConstants.CONTEXT_PATH, context.getContextPath()); SymbolProvider combinedProvider = new DelegatingSymbolProvider(contextPathProvider, contextProvider); String executionMode = System.getProperty(SymbolConstants.EXECUTION_MODE, production); TapestryAppInitializer appInitializer = new TapestryAppInitializer(logger, combinedProvider, filterName, executionMode); And the code in T5.3.6: SymbolProvider provider = new SymbolProvider() { SymbolProvider contextProvider = new ServletContextSymbolProvider(context); SymbolProvider systemProvider = new SystemPropertiesSymbolProvider(); public String valueForSymbol(String symbolName) { String contextValue = contextProvider.valueForSymbol(symbolName); if (contextValue != null) return contextValue; return systemProvider.valueForSymbol(symbolName); } }; String executionMode = System.getProperty(SymbolConstants.EXECUTION_MODE, production); TapestryAppInitializer appInitializer = new TapestryAppInitializer(logger, provider, filterName, executionMode); g, Kris On Thu, Dec 27, 2012 at 5:47 PM, Howard Lewis Ship hls...@gmail.com wrote: I think you are mistaken: @Contribute(SymbolSource.class) public static void setupStandardSymbolProviders(OrderedConfigurationSymbolProvider configuration, @ApplicationDefaults SymbolProvider applicationDefaults, @FactoryDefaults SymbolProvider factoryDefaults) { configuration.add(SystemProperties, new SystemPropertiesSymbolProvider(), before:*); configuration.add(EnvironmentVariables, new SystemEnvSymbolProvider()); configuration.add(ApplicationDefaults, applicationDefaults); configuration.add(FactoryDefaults, factoryDefaults); } Whatever you are seeing is caused by something else: a typo perhaps, or something preventing the system property from being visible to the running application. On Thu, Dec 27, 2012 at 8:44 AM, Howard Lewis Ship hls...@gmail.com wrote: If that is true, it is an accident, possibly a bad merge. On Thu, Dec 27, 2012 at 3:00 AM, Kristian Marinkovic kristian.marinko...@gmail.com wrote: Hi, i was just testing the 5.4-alpha-1 release and realized that the SystemPropertiesSymbolProvider is not used anymore by the TapestryFilter. I'm not sure whether it happened accidentally or on purpose? g, Kris - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: exception report
serializing giant blobs of data to the client? shit I didnt know I was. No wonder I been chasing that damn property higher. so I remove Serializable from the interface ? Best regards and thanks... KEN From: nhhockeypla...@hotmail.com To: users@tapestry.apache.org Subject: RE: exception report Date: Thu, 27 Dec 2012 10:39:57 -0500 This fixed it systemProperty nameorg.mortbay.jetty.Request.maxFormContentSize/name value758122/value /systemProperty
Re: is there a @BootStrap annotation for methods ?
@PageLoaded or pageLoaded() This is invoked once when the page is first constructed. On Thu, Dec 27, 2012 at 9:32 AM, Ken in Nashua kcola...@live.com wrote: I have a page and I only want to do certain things during bootstrap... not specifically setupRender or onActivate Thanks in advance -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com
Re: exception report
You probably have a Loop inside a Form; look at the Loop documentation and determine if and how the Loop and the Form should interact; by default a Loop inside a Form stores the object iterated over. It's mean for Hibernate/JPA entities, where the Loop can use a ValueEncoder to store just the entity id ... but it often defaults back to serializing the objects, which is often not what you want. On Thu, Dec 27, 2012 at 9:18 AM, nhhockeyplayer nashua nhhockeypla...@hotmail.com wrote: serializing giant blobs of data to the client? shit I didnt know I was. No wonder I been chasing that damn property higher. so I remove Serializable from the interface ? Best regards and thanks... KEN From: nhhockeypla...@hotmail.com To: users@tapestry.apache.org Subject: RE: exception report Date: Thu, 27 Dec 2012 10:39:57 -0500 This fixed it systemProperty nameorg.mortbay.jetty.Request.maxFormContentSize/name value758122/value /systemProperty -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com
Re: T5.4-alpha-1 is missing SystemPropertiesSymbolProvider
Interesting; that could be a bug then. On Thu, Dec 27, 2012 at 9:05 AM, Kristian Marinkovic kristian.marinko...@gmail.com wrote: Hi Howard, yes the SystemPropertySymbolProvider is in place but in Tapestry 5.3.6 the TapestryFilter used it to resolve system properties but now it doesn't. As a consequence properties like tapestry.disable-default-modules that are accessed within the TapestryAppInitializer cannot be read and therefore have no effect. The code in T5.4 looks like this: SymbolProvider contextProvider = new ServletContextSymbolProvider(context); SymbolProvider contextPathProvider = new SingleKeySymbolProvider(SymbolConstants.CONTEXT_PATH, context.getContextPath()); SymbolProvider combinedProvider = new DelegatingSymbolProvider(contextPathProvider, contextProvider); String executionMode = System.getProperty(SymbolConstants.EXECUTION_MODE, production); TapestryAppInitializer appInitializer = new TapestryAppInitializer(logger, combinedProvider, filterName, executionMode); And the code in T5.3.6: SymbolProvider provider = new SymbolProvider() { SymbolProvider contextProvider = new ServletContextSymbolProvider(context); SymbolProvider systemProvider = new SystemPropertiesSymbolProvider(); public String valueForSymbol(String symbolName) { String contextValue = contextProvider.valueForSymbol(symbolName); if (contextValue != null) return contextValue; return systemProvider.valueForSymbol(symbolName); } }; String executionMode = System.getProperty(SymbolConstants.EXECUTION_MODE, production); TapestryAppInitializer appInitializer = new TapestryAppInitializer(logger, provider, filterName, executionMode); g, Kris On Thu, Dec 27, 2012 at 5:47 PM, Howard Lewis Ship hls...@gmail.com wrote: I think you are mistaken: @Contribute(SymbolSource.class) public static void setupStandardSymbolProviders(OrderedConfigurationSymbolProvider configuration, @ApplicationDefaults SymbolProvider applicationDefaults, @FactoryDefaults SymbolProvider factoryDefaults) { configuration.add(SystemProperties, new SystemPropertiesSymbolProvider(), before:*); configuration.add(EnvironmentVariables, new SystemEnvSymbolProvider()); configuration.add(ApplicationDefaults, applicationDefaults); configuration.add(FactoryDefaults, factoryDefaults); } Whatever you are seeing is caused by something else: a typo perhaps, or something preventing the system property from being visible to the running application. On Thu, Dec 27, 2012 at 8:44 AM, Howard Lewis Ship hls...@gmail.com wrote: If that is true, it is an accident, possibly a bad merge. On Thu, Dec 27, 2012 at 3:00 AM, Kristian Marinkovic kristian.marinko...@gmail.com wrote: Hi, i was just testing the 5.4-alpha-1 release and realized that the SystemPropertiesSymbolProvider is not used anymore by the TapestryFilter. I'm not sure whether it happened accidentally or on purpose? g, Kris - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com
RE: is there a @BootStrap annotation for methods ?
Thanks for tryin... my properties are @persistent @PageLoaded public void pageLoaded() { //if (itemsPerPage == null) if (securityService.getSubject().isAuthenticated()) itemsPerPage = getLayout().getItemsPerPage(); else itemsPerPage = 5; //if (tableColumns == null) if (securityService.getSubject().isAuthenticated()) tableColumns = getLayout().getTableColumns(); else tableColumns = 3; } An unexpected application exception has occurred.org.apache.tapestry5.ioc.internal.OperationExceptionError persisting field Home:itemsPerPage: Persistent fields may not be updated until after the page has finished loading. This may be due to a persistent field with a default value. The default value should be removed.traceConstructing instance of page class org.tynamo.examples.hibernatesecurity.pages.Homeorg.apache.tapestry5.ioc.internal.util.TapestryExceptionError persisting field Home:itemsPerPage: Persistent fields may not be updated until after the page has finished loading. This may be due to a persistent field with a default value. The default value should be removed.java.lang.RuntimeExceptionPersistent fields may not be updated until after the page has finished loading. This may be due to a persistent field with a default value. The default value should be removed.Filter stack frames Stack trace org.apache.tapestry5.internal.structure.PageImpl.persistFieldChange(PageImpl.java:254) org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.persistFieldChange(InternalComponentResourcesImpl.java:324) org.apache.tapestry5.internal.transform.PersistWorker$PersistentFieldConduit.set(PersistWorker.java:64) org.tynamo.examples.hibernatesecurity.pages.Home.conduit_set_itemsPerPage(Home.java) org.tynamo.examples.hibernatesecurity.pages.Home.pageLoaded(Home.java:137) org.tynamo.examples.hibernatesecurity.pages.Home$Shim_52076d740eb
RE: is there a @BootStrap annotation for methods ?
Well I cannot take this the whole mile... I have two persistent properties and just trying to persist them on subsequent authentications from the database. and I cant I beat these three routines to death. The afterRender works beautiful. I have never had luck with the init cycle and setupRender. I believe in stateless computing but a while ago I could not get anything working unless these properties were @Persistent If anyone wants to give this logic a whirl I will try anything. Home.JAVA @PageLoaded public void pageLoaded() { } @SetupRender public void setupRender() { if (itemsPerPage == null) { if (securityService.getSubject().isAuthenticated()) itemsPerPage = getLayout().getItemsPerPage(); else itemsPerPage = 5; } if (tableColumns == null) { if (securityService.getSubject().isAuthenticated()) tableColumns = getLayout().getTableColumns(); else tableColumns = 3; } if (cursor == null) { cursor = new Integer(0); } } @Log @CommitAfter @AfterRender public void afterRender() { AdminLayout adminLayout; if ( securityService.getSubject().isAuthenticated() ) if (applicationStateManager.exists(AdminLayout.class)) { adminLayout = applicationStateManager.get(AdminLayout.class); adminLayout.setItemsPerPage(itemsPerPage); adminLayout.setTableColumns(tableColumns); persistenceService.save(adminLayout); } }
RE: is there a @BootStrap annotation for methods ?
My main catching issue being on login... my persistent properties are null... and I can predictably load them from the database so i go ahead and use my app... then i decide to click logout button... app is still running though... just unauthenticated... so I go ahead and click login link... AND... on login... my persistent properties are NOT null (since it isnt bootstrap) ... and I cant load them from the database because my condition for loading from the database is the null check... so it takes what they floated to be after logout... which is NOT what was persisted by the authenticated user. So my subsequent logins are not making it past this logic. I need a new condition other than the null check. Might anyone know what my condition may be? in order to persist properties like these from/to to/from the database? like I said the afterRender works like abreeze Thank You
Re: is there a @BootStrap annotation for methods ?
Hi, @Persist defaults to session storage, it sounds like you are not discarding your session on logout and/or not always creating a new session on (re)login. -- Chris On Thu, Dec 27, 2012 at 7:28 PM, Ken in Nashua kcola...@live.com wrote: My main catching issue being on login... my persistent properties are null... and I can predictably load them from the database so i go ahead and use my app... then i decide to click logout button... app is still running though... just unauthenticated... so I go ahead and click login link... AND... on login... my persistent properties are NOT null (since it isnt bootstrap) ... and I cant load them from the database because my condition for loading from the database is the null check... so it takes what they floated to be after logout... which is NOT what was persisted by the authenticated user. So my subsequent logins are not making it past this logic. I need a new condition other than the null check. Might anyone know what my condition may be? in order to persist properties like these from/to to/from the database? like I said the afterRender works like abreeze Thank You
RE: is there a @BootStrap annotation for methods ?
Thanks Chris, I will think about that. Good practice anyway... it may be the condition case I am looking to operate. - cheers Ken
Re: init routine for page
Hi. I think you will need to share the code in order to get any help with this. Regards Sigbjørn Tvedt On 27 December 2012 18:03, nhhockeyplayer nashua nhhockeypla...@hotmail.com wrote: Folks, I am trying to perform a simple init for a couple page variables (oops properties) but setUpRender and onActivate are not cutting it my properties become null at some stage phase or state of the page cycle and I need to set them back if I am authenticated, I want to set them to what is in my database if I am not authenticated I want to hardwire them to some static constant but I only want to do this once for the lifetime of the page during being authenticated/unauthenticated and I am not sure if that has anything to do with the life time of the page itself... which seems unknown at this point or whether it even exists other than bootstrap. currently my properties are getting nulled out and subsequent logins are assuming what was hardwired as opposed to resuming what was persisted in the database. And on subsequent logins I want to resume whats persisted in the database not whats hardwired while unauthenticated. Who is knocking my properties to null? Can I influence this? Why arent they being nulled during subsequent logins? ... because thats when I attempt to resume to persiste whats in the database and at that point something is not nulling the properties... and the hardwired values are clobbering my database persisted ones from previous. Help Best regards and thanks... KEN
FormInjector example problem
Hi all, I want to be able to use a zone to add fields in my form and from what I can tell I need to use FormInjector. However I am having hard time trying to figure how to use it. I have create a small example that I am trying to run it, before I start working on the real form. My tml is t:form t:id=editForm Name t:textField value=name/ t:block t:id=block Description t:textField t:id=description value=description/ /t:block div t:type=FormInjector t:id=injector position=below / t:zone t:id=itemZone id=itemZone/ t:actionlink t:id=item zone=itemZoneClick me!/t:actionlink /t:form In page header I have in order to trigger the injection My .java class is @Inject private Block formFieldsBlock; @OnEvent(component = injector) Block loadExtraFormFields() { return this.formFieldsBlock; } @Property private String name; @Property private String description; For some reason I can seem to trigger the injection. I get js error TypeError: Cannot read property 'type' of undefined [http://localhost:8080/assets/feaaffaed17053ca/jquery/jquery_core/jquery-1.7.2.js:3111] I think that what the problem is I am using tapestry5-jquery if that matters. Thank you. Cheers -- View this message in context: http://tapestry.1045711.n5.nabble.com/FormInjector-example-problem-tp5719031.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
Re: T5.4-alpha-1 is missing SystemPropertiesSymbolProvider
hi Howard, created Ticket https://issues.apache.org/jira/browse/TAP5-2040 g, Kris On Thu, Dec 27, 2012 at 6:45 PM, Howard Lewis Ship hls...@gmail.com wrote: Interesting; that could be a bug then. On Thu, Dec 27, 2012 at 9:05 AM, Kristian Marinkovic kristian.marinko...@gmail.com wrote: Hi Howard, yes the SystemPropertySymbolProvider is in place but in Tapestry 5.3.6 the TapestryFilter used it to resolve system properties but now it doesn't. As a consequence properties like tapestry.disable-default-modules that are accessed within the TapestryAppInitializer cannot be read and therefore have no effect. The code in T5.4 looks like this: SymbolProvider contextProvider = new ServletContextSymbolProvider(context); SymbolProvider contextPathProvider = new SingleKeySymbolProvider(SymbolConstants.CONTEXT_PATH, context.getContextPath()); SymbolProvider combinedProvider = new DelegatingSymbolProvider(contextPathProvider, contextProvider); String executionMode = System.getProperty(SymbolConstants.EXECUTION_MODE, production); TapestryAppInitializer appInitializer = new TapestryAppInitializer(logger, combinedProvider, filterName, executionMode); And the code in T5.3.6: SymbolProvider provider = new SymbolProvider() { SymbolProvider contextProvider = new ServletContextSymbolProvider(context); SymbolProvider systemProvider = new SystemPropertiesSymbolProvider(); public String valueForSymbol(String symbolName) { String contextValue = contextProvider.valueForSymbol(symbolName); if (contextValue != null) return contextValue; return systemProvider.valueForSymbol(symbolName); } }; String executionMode = System.getProperty(SymbolConstants.EXECUTION_MODE, production); TapestryAppInitializer appInitializer = new TapestryAppInitializer(logger, provider, filterName, executionMode); g, Kris On Thu, Dec 27, 2012 at 5:47 PM, Howard Lewis Ship hls...@gmail.com wrote: I think you are mistaken: @Contribute(SymbolSource.class) public static void setupStandardSymbolProviders(OrderedConfigurationSymbolProvider configuration, @ApplicationDefaults SymbolProvider applicationDefaults, @FactoryDefaults SymbolProvider factoryDefaults) { configuration.add(SystemProperties, new SystemPropertiesSymbolProvider(), before:*); configuration.add(EnvironmentVariables, new SystemEnvSymbolProvider()); configuration.add(ApplicationDefaults, applicationDefaults); configuration.add(FactoryDefaults, factoryDefaults); } Whatever you are seeing is caused by something else: a typo perhaps, or something preventing the system property from being visible to the running application. On Thu, Dec 27, 2012 at 8:44 AM, Howard Lewis Ship hls...@gmail.com wrote: If that is true, it is an accident, possibly a bad merge. On Thu, Dec 27, 2012 at 3:00 AM, Kristian Marinkovic kristian.marinko...@gmail.com wrote: Hi, i was just testing the 5.4-alpha-1 release and realized that the SystemPropertiesSymbolProvider is not used anymore by the TapestryFilter. I'm not sure whether it happened accidentally or on purpose? g, Kris - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[5.3.6] Saving loop-generated checkbox values between requests
I have a numerous checkboxes generated withing a loop that is even inside another loop Loop Loop Checkbox So I set the checkbox's value this way: t:checkbox t:value=ipSelection(device.ip).selected/ So the ipSelection method accepts an ip, looks up a map of objects that have a selected boolean property. Now the device property isn't persisted among requests so an exception occurs while submitting the form. I'm only trying to persist state of selected checkboxes among requests. And I'm confused why solution doesn't work, and after giving it a little thought, I'm not sure why should it work ! I implemented a similar approach but that had a static text as the provided parameter (i.e. method('myKey'))
Re: FormInjector example problem
I think I have found the way to trigger the call using jquery plugin. It is using $('#injector').tapestryFormInjector(trigger); However my next problem is how can I get the id of the FormInjector component I have tried @Component private FormInjector injectImages; String clientId = injectImages.getClientId(); But I get null for client id. My idea is that once ajaxupload is triggered I will run a javascript function that will trigger the form injector to inject new form elements. So I need the client id of the component. Any suggestions? -- View this message in context: http://tapestry.1045711.n5.nabble.com/FormInjector-example-problem-tp5719031p5719035.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
StrategyBuilder Service and Components
I'm building a mixin that does different things depending what component it's added to. I was trying to use the StrategyBuilder but it does not match the component class In my AppModule I have this public static void contributeSimplifySource( MappedConfigurationClass,SimplifySource config) { config.addInstance(Object.class,SimplifyObject.class); config.addInstance(Form.class,SimplifyForm.class); } When I use the service it always matches Object.class I looked at the source and wrote this test case: MapClass,String map = new HashMapClass,String(); map.put(Form.class,); map.put(ClientElement.class,); for ( Class t: new InheritanceSearch(container.getClass) ) { logger.info({},t); if ( map.containsKey(t) ) { logger.info(match map {},t); } } When the container is a Form it does not match on Form.class but does match on ClientElement.class. It also appears Form.class.equals(container) is false. In some ways this makes sense because the container is a transformed class but containter.getClass().getName() is org.apache.tapestry5.corlib.components.Form So the question is should this work? -- View this message in context: http://tapestry.1045711.n5.nabble.com/StrategyBuilder-Service-and-Components-tp5719036.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