This is probably related to the conversion from PrimaryKeyEncoder to ValueEncoder, perhaps. Odd.
On Sat, Mar 28, 2009 at 9:01 AM, Shing Hing Man <mat...@yahoo.com> wrote: > > > --- On Sun, 29/3/09, Shing Hing Man <mat...@yahoo.com> wrote: > >> From: Shing Hing Man <mat...@yahoo.com> >> Subject: Re: String to Double Type Coercion problem in 5.1.0.2 snapshot >> To: "Howard Lewis Ship" <hls...@gmail.com> >> Date: Sunday, 29 March, 2009, 12:00 AM >> Earlier, I have not given the full picture. >> In fact the text component is inside two nested Loop >> components. >> >> <tr t:type="loop" source="rowLoop" >> value="currentRow" index="rowIndex"> >> >> <td t:type="loop" >> source="currentRow" value="inputValue" >> index="columnIndex"> >> <INPUT >> t:id="MatrixEntry" type="text" >> value="inputValue"/> >> </td> >> >> </tr> >> >> >> The type of the source parameter for the outer and inner >> Loop are Double[][], Double[] respectively. >> >> public Double[][] getRowLoop(){ >> return matrix.getEntries(); >> >> } >> >> >> public Double[] getCurrentRow(){ >> Double[] row=matrix.getRow(rowIndex); >> return row; >> } >> >> >> >> Somehow, in 5.1.0.2 Snapshot, the source parameter in >> component Loop can not handle >> Double[][] or Double[] anymore. >> >> >> I have a similar Type Coercion error when I set the Loop >> source parameter to an ArrayList. >> >> >> Shing >> >> >> >> --- On Sat, 28/3/09, Howard Lewis Ship >> <hls...@gmail.com> wrote: >> >> > From: Howard Lewis Ship <hls...@gmail.com> >> > Subject: Re: String to Double Type Coercion problem in >> 5.1.0.2 snapshot >> > To: "Tapestry users" >> <users@tapestry.apache.org>, mat...@yahoo.com >> > Date: Saturday, 28 March, 2009, 11:43 PM >> > The error reporting could be better, but the coersion >> there >> > indicates >> > a Double[], not a double. >> > >> > On Sat, Mar 28, 2009 at 6:57 AM, Shing Hing Man >> > <mat...@yahoo.com> wrote: >> > > >> > > I have a TextField component to input a Double. >> > > >> > > >> > > �...@component(id = >> "MatrixEntry", >> > parameters ={ >> "validate=prop:fieldValidator"}) >> > > private TextField entry; >> > > >> > > <INPUT t:id="MatrixEntry" >> > t:type="text" >> > t:value="inputValue"/> >> > > >> > > >> > > >> > > It works fine in 5.0.18. But in 5.1.0.2 snapshot, >> I >> > get the following error >> > > when I submit the form containing the above >> TextField >> > component. >> > > >> > > >> > > >> > > >> > > Could not find a coercion from type >> java.lang.String >> > to type [Ljava.lang.Double;. Available coercions: >> Double >> > --> Float, Float --> Double, Long --> >> Boolean, Long >> > --> Byte, Long --> Double, Long --> Integer, >> Long >> > --> Short, Number --> Long, Object --> >> Object[], >> > Object --> String, Object --> java.util.List, >> Object[] >> > --> java.util.List, String --> Boolean, String >> --> >> > Double, String --> Long >> > > >> > > >> > > # >> > >> org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl.findOrCreateCoercion(TypeCoercerImpl.java:244) >> > > # >> > >> org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl.access$000(TypeCoercerImpl.java:29) >> > > # >> > >> org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl$TargetCoercion.getCoercion(TypeCoercerImpl.java:88) >> > > # >> > >> org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl$TargetCoercion.coerce(TypeCoercerImpl.java:61) >> > > # >> > >> org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl.coerce(TypeCoercerImpl.java:133) >> > > # >> > >> $TypeCoercer_1204d5395c9.coerce($TypeCoercer_1204d5395c9.java) >> > > # >> > >> org.apache.tapestry5.internal.services.TypeCoercedValueEncoderFactory$1.toValue(TypeCoercedValueEncoderFactory.java:45) >> > > # >> > >> org.apache.tapestry5.corelib.components.Loop.restoreStateFromStoredClientValue(Loop.java:423) >> > > # >> > >> org.apache.tapestry5.corelib.components.Loop.access$500(Loop.java:41) >> > > # >> > >> org.apache.tapestry5.corelib.components.Loop$RestoreStateFromStoredClientValue.execute(Loop.java:162) >> > > # >> > >> org.apache.tapestry5.corelib.components.Loop$RestoreStateFromStoredClientValue.execute(Loop.java:151) >> > > # >> > >> org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:477) >> > > # >> > >> org.apache.tapestry5.corelib.components.Form._$advised$onAction(Form.java:375) >> > > # >> > >> org.apache.tapestry5.corelib.components.Form$onAction$invocation_1204d53cecf.invokeAdvisedMethod(Form$onAction$invocation_1204d53cecf.java) >> > > # >> > >> org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(A >> > > >> > > >> > > >> > > Any assistance to resolve the problem would be >> very >> > much appreciated! >> > > >> > > Shing >> > > >> > > >> > > >> > > >> > > >> > > >> > >> --------------------------------------------------------------------- >> > > To unsubscribe, e-mail: >> > users-unsubscr...@tapestry.apache.org >> > > For additional commands, e-mail: >> > users-h...@tapestry.apache.org >> > > >> > > >> > >> > >> > >> > -- >> > Howard M. Lewis Ship >> > >> > Creator Apache Tapestry and Apache HiveMind > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org