[
https://issues.apache.org/jira/browse/TAPESTRY-2177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570425#action_12570425
]
Robert Zeigler commented on TAPESTRY-2177:
------------------------------------------
Currently working on a test case to illustrate the issue.
IN terms of the strings from a url, that's exactly what's going on, but it's
not going through the URLEventContext. It's going through an anonymous class
in the PageResourcesImpl.
So you have a situation such as:
<form t:id="form">
...
</form>
And in the .java:
@Component(parameters="context=formContext")
private Form _form;
public List<?> getFormContext() {
return Arrays.asList(property1,property2);
}
Those values are then encoded into the submission url for the form, so the
final html looks like:
<form action="/app/page.form/valueEncodedProperty1/valueEncodedProperty2">
...
</form>
So then if you have something like:
onPrepareForSubmitFromForm(MyType1 property1, MyType2 property2) {
}
You'll hit the above mentioned stack trace, because the values from the form
context were encoded to string (using value encoders), but the decoding is done
via type coercion directly.
Hopefully that makes more sense now.
Again, working on a test case for this now.
> Conversion of context parameters to server-side objects uses type coercer
> rather than value encoders.
> -----------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-2177
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2177
> Project: Tapestry
> Issue Type: Bug
> Affects Versions: 5.0.10, 5.0.11
> Reporter: Robert Zeigler
> Assignee: Howard M. Lewis Ship
>
> TAPESTRY-2112 resulted in ValueEncoders being used to convert context
> parameters into strings for client-side representation.
> However, for form contexts, the strings are converted back into values via
> type coercion, rather than via ValueEncoder.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]