After reading the documentation for LoopFormState, I found that ITERATION is the value I want in my case.
"When the Form is submitted, the Loop will re-acquire its source and iterate over it" But when I used this value in my loop component, an new error is throwed : # java.util.AbstractList$Itr.next(AbstractList.java:350) # org.apache.tapestry5.corelib.components.Loop.advanceVolatile(Loop.java:363) # org.apache.tapestry5.corelib.components.Loop.access$200(Loop.java:44) # org.apache.tapestry5.corelib.components.Loop$3.execute(Loop.java:95) # org.apache.tapestry5.corelib.components.Loop$3.execute(Loop.java:99) # org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:480) # org.apache.tapestry5.corelib.components.Form._$advised$onAction(Form.java:378) # org.apache.tapestry5.corelib.components.Form$onAction$invocation_126248d3e0b.invokeAdvisedMethod(Form$onAction$invocation_126248d3e0b.java) # org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:71) # org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:37) # org.apache.tapestry5.internal.transform.LogWorker$1.advise(LogWorker.java:54) # org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:80) # 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:910) # org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081) # org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:75) # org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42) # $ComponentEventRequestHandler_126248d2fe8.handle($ComponentEventRequestHandler_126248d2fe8.java) # org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42) # $ComponentEventRequestHandler_126248d2fe8.handle($ComponentEventRequestHandler_126248d2fe8.java) # org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2164) # $ComponentEventRequestHandler_126248d2fe8.handle($ComponentEventRequestHandler_126248d2fe8.java) # $ComponentEventRequestHandler_126248d2f4e.handle($ComponentEventRequestHandler_126248d2f4e.java) # org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43) # com.titans.surveys.services.access.AccessComponentRequestFilter.handleComponentEvent(AccessComponentRequestFilter.java:32) # $ComponentRequestHandler_126248d2f4f.handleComponentEvent($ComponentRequestHandler_126248d2f4f.java) # $ComponentRequestHandler_126248d2f41.handleComponentEvent($ComponentRequestHandler_126248d2f41.java) # org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46) # $Dispatcher_126248d2f43.dispatch($Dispatcher_126248d2f43.java) # $Dispatcher_126248d2f3a.dispatch($Dispatcher_126248d2f3a.java) # org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245) # com.titans.surveys.services.AppModule$1.service(AppModule.java:100) # $RequestFilter_126248d2f39.service($RequestFilter_126248d2f39.java) # $RequestHandler_126248d2f3b.service($RequestHandler_126248d2f3b.java) # org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) # $RequestHandler_126248d2f3b.service($RequestHandler_126248d2f3b.java) # org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778) # $RequestHandler_126248d2f3b.service($RequestHandler_126248d2f3b.java) # org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767) # $RequestHandler_126248d2f3b.service($RequestHandler_126248d2f3b.java) # org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) # $RequestHandler_126248d2f3b.service($RequestHandler_126248d2f3b.java) # org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) # org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) # org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) # org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103) # $RequestHandler_126248d2f3b.service($RequestHandler_126248d2f3b.java) # $RequestHandler_126248d2f30.service($RequestHandler_126248d2f30.java) # org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:197) # org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) # $HttpServletRequestHandler_126248d2f32.service($HttpServletRequestHandler_126248d2f32.java) # org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) # $HttpServletRequestFilter_126248d2f2f.service($HttpServletRequestFilter_126248d2f2f.java) # $HttpServletRequestHandler_126248d2f32.service($HttpServletRequestHandler_126248d2f32.java) # org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726) # $HttpServletRequestHandler_126248d2f32.service($HttpServletRequestHandler_126248d2f32.java) # $HttpServletRequestHandler_126248d2f2d.service($HttpServletRequestHandler_126248d2f2d.java) # org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127) Here is the code of my Survey.tml <t:form t:id="survey_form"> <t:radiogroup t:id="suggestionRG" value="selectedSuggestion" encoder="suggestionEncoder"> <t:loop source="suggestions" value="suggestionLoopValue" formState="literal:ITERATION" encoder="suggestionEncoder"> <t:radio t:id="radio" value="suggestionLoopValue"/> <t:label for="radio">${suggestionLoopValue.label}</t:label> </t:loop> </t:radiogroup> <t:submit id="surveyVote" t:id="vote" image="context:images/vote_button.gif" /> </t:form> This component was included into SuperComponent : <t:loop source="surveys" value="surveyLoopValue" encoder="surveyEncoder"> <t:surveys.survey surveyId="surveyLoopValue.id" /> </t:loop> Am I missing something ??? Regards, Antoine. Thiago H. de Paula Figueiredo wrote: > > On Tue, 12 Jan 2010 11:18:03 -0200, antb59 <ant...@gmail.com> wrote: > >> When you say "never use expansions in >> component parameters", you mean this syntax >> <t:surveys.surveySuggestionsForm surveyId="surveyLoopValue.id" /> >> is better ? > > Yes, because everytime you use an expansion to value is transformed in a > String. > >> About the LoopFormState, I'm going to check this feature, I didn't know >> it... >> Do I have to change the LoopFormState of the loop of forms or the loop of >> radio buttons ? > > The ones inside Forms, I guess. > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, > and instructor > Owner, software architect and developer, Ars Machina Tecnologia da > Informação Ltda. > http://www.arsmachina.com.br > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- View this message in context: http://old.nabble.com/Loop%2C-RadioGroup-and-Coercion-tp26944581p27135715.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