You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Matías Fernández (JIRA)" <ji...@apache.org> on 2017/07/03 15:55:00 UTC
[jira] [Created] (WICKET-6414) Form submit with
scheduleRequestHandlerAfterCurrent break after download
Matías Fernández created WICKET-6414:
----------------------------------------
Summary: 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.6.0, 7.5.0
Environment: JBoss EAP 6.4
Reporter: Matías Fernández
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)