Well from what I can see, it is not possible to put form in the middle of the table, so that means I will have to put it around the table. However for me this is a bit tricky cause inside I have a lot of loop iteration for the same source, hence when the form is submitted those loops will try to populate the same source.
Is it possible to somehow tell tapestry to ignore those other loops? To disable them in a manner of speaking? On Sun, Jun 1, 2014 at 3:45 PM, Boris Horvat <horvat.z.bo...@gmail.com> wrote: > Hi Geoff, > > I am not sure I follow what you mean? I have tried to integrate loop into > <td> it made no difference I am afraid. > > Thiago, I have the id there (in the actually example) adding it to my demo > didnt make a difference I am afraid. > > Cheers > > > On Sun, Jun 1, 2014 at 3:29 PM, Geoff Callender < > geoff.callender.jumpst...@gmail.com> wrote: > >> Probably nothing to do with your problem, but I don't think it's legal to >> have ${values} outside of a cell. The same goes for the LinkSubmit. >> >> On 1 Jun 2014, at 6:11 am, Boris Horvat <horvat.z.bo...@gmail.com> wrote: >> >> > Here is the code that will trigger the issue (I needed a bit of time to >> > isolate everything sorry for the delay. >> > >> > The fact that loop is around <td> element is what is triggering the >> issue >> > >> > <t:zone t:id="zone"> >> > <table> >> > <tr> >> > <td></td> >> > <t:form t:id="form" t:zone="^"> >> > ${values} >> > <t:loop t:source="values" t:value="value" >> > t:encoder="encoder"> >> > <td> >> > <t:checkbox t:value="value.value" /> >> > </td> >> > </t:loop> >> > <t:linksubmit> >> > refresh >> > </t:linksubmit> >> > </t:form> >> > </tr> >> > </table> >> > </t:zone> >> > >> > @Inject >> > private AjaxResponseRenderer ajaxResponseRenderer; >> > @InjectComponent >> > private Zone zone; >> > >> > @Persist >> > @Property >> > private List<ItemSingleHolder<Boolean>> values; //ItemSingleHolder >> is a >> > generic class that is just used to hold objects >> > @Property >> > private ItemSingleHolder<Boolean> value; >> > >> > @OnEvent(value = EventConstants.SUCCESS, component = "form") >> > public void form() { >> > System.out.println(values); >> > ajaxResponseRenderer.addRender(zone); >> > } >> > >> > @SetupRender >> > public void setup() { >> > values = new LinkedList<ItemSingleHolder<Boolean>>(); >> > values.add(new ItemSingleHolder<Boolean>(true)); >> > values.add(new ItemSingleHolder<Boolean>(true)); >> > values.add(new ItemSingleHolder<Boolean>(false)); >> > values.add(new ItemSingleHolder<Boolean>(true)); >> > } >> > >> > public ValueEncoder<ItemSingleHolder<Boolean>> getEncoder() { >> > return new ItemHolderEncoder<ItemSingleHolder<Boolean>>(values); >> // >> > generic encoder for the holder class >> > } >> > >> > >> > >> > On Sat, May 31, 2014 at 10:09 PM, Boris Horvat < >> horvat.z.bo...@gmail.com> >> > wrote: >> > >> >> Hi, thanks for the quick response >> >> >> >> Thiago, the entire form is already in a zone. >> >> >> >> I don't think that stack trace will help but here it is >> >> >> >> Stack trace >> >> >> >> - >> >> >> org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:649) >> >> - >> >> >> org.apache.tapestry5.corelib.components.Form.advised$onAction_3a65a93609ae0(Form.java:539) >> >> - >> org.apache.tapestry5.corelib.components.Form$Invocation_onAction_3a65a93609adf.proceedToAdvisedMethod(Unknown >> >> Source) >> >> - >> >> >> org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84) >> >> - >> >> >> org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:37) >> >> - >> >> >> org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86) >> >> - org.apache.tapestry5.corelib.components.Form.onAction(Form.java) >> >> - >> >> >> org.apache.tapestry5.corelib.components.Form.dispatchComponentEvent(Form.java) >> >> - >> >> >> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:940) >> >> - >> >> >> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1117) >> >> - >> >> >> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3100(ComponentPageElementImpl.java:61) >> >> - >> >> >> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1062) >> >> - >> >> >> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1059) >> >> - >> >> >> org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146) >> >> - >> >> >> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1058) >> >> - >> >> >> org.apache.tapestry5.internal.services.AjaxComponentEventRequestHandler.handle(AjaxComponentEventRequestHandler.java:110) >> >> - >> >> >> org.apache.tapestry5.internal.services.ajax.AjaxFormUpdateFilter.handle(AjaxFormUpdateFilter.java:56) >> >> - >> >> >> org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42) >> >> - >> >> >> org.apache.tapestry5.upload.internal.services.UploadExceptionFilter.handle(UploadExceptionFilter.java:75) >> >> - >> >> >> org.apache.tapestry5.services.TapestryModule$41.handle(TapestryModule.java:2476) >> >> - >> >> >> org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43) >> >> - >> >> >> com.bomahabo.flow.services.security.AllowSuspendedStudioFilter.handleComponentEvent(AllowSuspendedStudioFilter.java:65) >> >> - >> >> >> com.bomahabo.flow.services.security.RequiresProjectFilter.handleComponentEvent(RequiresProjectFilter.java:65) >> >> - >> >> >> org.apache.tapestry5.services.InitializeActivePageName.handleComponentEvent(InitializeActivePageName.java:39) >> >> - >> >> >> org.tynamo.security.SecurityComponentRequestFilter.handleComponentEvent(SecurityComponentRequestFilter.java:41) >> >> - >> >> >> org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46) >> >> - >> >> >> org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302) >> >> - >> >> >> org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) >> >> - >> >> >> org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902) >> >> - >> >> >> org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892) >> >> - >> >> >> org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90) >> >> - >> >> >> org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:105) >> >> - >> >> >> org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:95) >> >> - >> >> >> org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) >> >> - >> >> >> org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:119) >> >> - >> >> >> org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253) >> >> - >> >> >> org.got5.tapestry5.jquery.services.AjaxUploadServletRequestFilter.service(AjaxUploadServletRequestFilter.java:27) >> >> - >> >> >> org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) >> >> - >> >> >> org.tynamo.resteasy.ResteasyRequestFilter.service(ResteasyRequestFilter.java:100) >> >> - >> >> >> org.tynamo.security.services.impl.SecurityConfiguration$1.call(SecurityConfiguration.java:56) >> >> - >> >> >> org.tynamo.security.services.impl.SecurityConfiguration$1.call(SecurityConfiguration.java:54) >> >> - >> >> >> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) >> >> - >> >> >> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) >> >> - >> >> >> org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:380) >> >> - >> >> >> org.tynamo.security.services.impl.SecurityConfiguration.service(SecurityConfiguration.java:54) >> >> - >> >> >> org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44) >> >> - >> >> >> org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) >> >> - >> >> >> org.lazan.t5.cometd.web.ServletHttpServletRequestFilter.service(ServletHttpServletRequestFilter.java:76) >> >> - >> >> >> org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852) >> >> - >> org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:171) >> >> >> >> >> >> >> >> On Sat, May 31, 2014 at 9:47 PM, Kalle Korhonen < >> >> kalle.o.korho...@gmail.com> wrote: >> >> >> >>> On Sat, May 31, 2014 at 11:55 AM, Boris Horvat < >> horvat.z.bo...@gmail.com> >> >>> wrote: >> >>> >> >>>> I have form that basically displays couple of checkboxs that user can >> >>>> select/deselect. Once he is made his choice he clicks a button and a >> >>> form >> >>>> is submited, zone is refreshed (include the form). >> >>>> All of the data is nicely displayed but a second submissions throws >> the >> >>>> error >> >>>> Forms require that the request method be POST and that the t:formdata >> >>> query >> >>>> parameter have values. >> >>>> Am I doing something wrong? Is my scenario possible? >> >>>> Let me know if you need code samples >> >>>> >> >>> >> >>> (I apologize in advance but couldn't resist...). Yes, you need to fix >> the >> >>> error. Let me know if you need better instructions. >> >>> >> >>> In all seriousness, yes of course we need code samples and a bare >> minimum >> >>> is you tell us which error you are seeing, e.g. a stack trace. >> >>> >> >>> Kalle >> >>> >> >> >> >> >> >> >> >> -- >> >> Sincerely >> >> *Boris Horvat* >> >> >> > >> > >> > >> > -- >> > Sincerely >> > *Boris Horvat* >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > > -- > Sincerely > *Boris Horvat* > -- Sincerely *Boris Horvat*