[
https://issues.apache.org/jira/browse/WICKET-6414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16098632#comment-16098632
]
Matías Fernández commented on WICKET-6414:
------------------------------------------
Hello Martin,
Sorry for taking too long, but I couldn't reproduce the bug in the quick-start
yet. However I have another trouble in the same page with a
AutoCompleteTextField and encoding. For this problem I could create a quickstar
example in here https://github.com/matiasf/bugdownload
It's a auto-complete text field with two values (Saúl, Matías), but when I
enter "Saú" on the field, the encoding is wrong on server side and don't return
the result Saúl for this value.
If you want I can create another issue for this problem.
Thanks Matías.
> Form submit with scheduleRequestHandlerAfterCurrent break after download
> ------------------------------------------------------------------------
>
> Key: WICKET-6414
> URL: https://issues.apache.org/jira/browse/WICKET-6414
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 7.5.0, 7.6.0
> Environment: JBoss EAP 6.4
> Reporter: Matías Fernández
> Labels: download, submit
>
> Hello there Wicket Developers!
> We are currently working with Wicket 7.4 and have the following behavior.
> We have a form to download some report after fill some fields. This button
> and the fields are inside a Wicket Form.
> To do this we have a on submit this code.
> {code:java}
> final AbstractResourceStreamWriter rstream = new
> AbstractResourceStreamWriter() {
> @Override
> public void write(final OutputStream output) throws IOException {
> output.write(bytes);
> }
> @Override
> public String getContentType() {
> return contentType;
> }
> };
> final ResourceStreamRequestHandler handler = new
> ResourceStreamRequestHandler(rstream)
> .setFileName(downloadFileName)
> .setCacheDuration(Duration.NONE)
> .setContentDisposition(ContentDisposition.ATTACHMENT);
> RequestCycle.get().scheduleRequestHandlerAfterCurrent(handler);
> {code}
> The problem is after download if we want to export again or change any
> component which access model object throw this exception.
> at
> org.apache.wicket.core.util.lang.PropertyResolver$MethodGetAndSet.getValue(PropertyResolver.java:946)
> [wicket-core-7.6.0.jar:7.6.0]
> at
> org.apache.wicket.core.util.lang.PropertyResolver$ObjectWithGetAndSet.getValue(PropertyResolver.java:440)
> [wicket-core-7.6.0.jar:7.6.0]
> at
> org.apache.wicket.core.util.lang.PropertyResolver.getValue(PropertyResolver.java:117)
> [wicket-core-7.6.0.jar:7.6.0]
> at
> org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:86)
> [wicket-core-7.6.0.jar:7.6.0]
> at
> org.apache.wicket.Component.getDefaultModelObject(Component.java:1646)
> [wicket-core-7.6.0.jar:7.6.0]
> ... 52 more
> Caused by: java.lang.IllegalArgumentException: object is not an instance of
> declaring class
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [rt.jar:1.8.0_131]
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> [rt.jar:1.8.0_131]
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [rt.jar:1.8.0_131]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_131]
> at
> org.apache.wicket.core.util.lang.PropertyResolver$MethodGetAndSet.getValue(PropertyResolver.java:937)
> [wicket-core-7.6.0.jar:7.6.0]
> ... 56 more
> This work on wicket 7.4, but when we update to 7.5 or 7.6 throw this
> exception.
> Is like scheduleRequestHandlerAfterCurrent is not after but is right now on
> this versions.
> If you need more information just let me know.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)