Hi,

if you're not editing the objects just set the formState="none" in the Loop
components.


On Thu, Apr 8, 2010 at 10:11 PM, Mite <mitemeis...@gmail.com> wrote:

>
> Hi
>
> I have this method and need to display the strings in the .tml. When the
> page is opened the first time it works fine. But when I submit from the
> page
> it throws:
>
> Could not find a coercion from type java.lang.String to type
> java.util.ArrayList.
>
> In the documentation is written that this might happen in T5.1:
> "You may see type coercion errors on pages where you have specified the
> encoder parameter of the Grid, Loop or AjaxFormLoop components as a
> PrimaryKeyEncoder"  http://tapestry.apache.org/tapestry5.1/upgrade.htmlhere
>
> But I am not using any encoder. And I think that I shouldn't be because
> String and ArrayList are not custom types.
>
> <tr t:type="loop" t:source="scheduledCourseEvents"
> t:value="currentScheduledEvent">
>  <td t:type="loop" t:source="currentScheduledEvent"
> t:value="scheduledEventCell">
>   ${scheduledEventCell}
>  </td>
> </tr>
>
> @Property
> private ArrayList<String> currentScheduledEvent;
> @Property
> private String scheduledEventCell;
>
> public ArrayList<ArrayList<String>> getScheduledCourseEvents(){
>        ArrayList<ArrayList<String>> res = new
> ArrayList<ArrayList<String>>();
>        for(InstructionEvent insEvent:
> eventManager.getInstructionEventsByCourse(currentCourse.getCourseId())){
>                EventSlot es =
> eventManager.getEventSlotForEvent(insEvent.getEvent().getEventId());
>                if(es != null){
>                        ArrayList<String> temp = new ArrayList<String>();
>                        temp.add(es.getSlot().getDay()+"");
>                        temp.add(es.getSlot().getHour()+" часот");
>                        temp.add(es.getSlot().getFacility().getTitle());
>                        temp.add(insEvent.getInstructionType().getTitle());
>                        res.add(temp);
>                }
>        }
>
>        return res;
>    }
>
> Anyone has an idea how can this be solved?
> Thank you
> --
> View this message in context:
> http://old.nabble.com/Coercion-from-String-to-ArrayList-in-Loop-tp28183967p28183967.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
>
>

Reply via email to