|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
File Uploads with DWR 3.0 M1Hi all,
I was searching the nabble archive but still am not quite sure how FileUploads are supposed to work with 3.0 M1. I have a test implementation of my webapp that currently give me the error: Parameter callCount not defined! When I do a normal DWR request that does not involve a file upload, it still works fine (as it was in DWR 2.0.3). We are using Spring, so DWR is conifgured using this in one of the spring xml files: <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="/engine.js">dwrController</prop> <prop key="/util.js">dwrController</prop> <prop key="/interface.js">dwrController</prop> <prop key="/call/**">dwrController</prop> <prop key="/interface/**">dwrController</prop> </props> </property> </bean> <dwr:controller id="dwrController" debug="true" /> <dwr:configuration> </dwr:configuration> The Bean that exposes methods is this: <bean id="AJAXController" class=" ... "> ... <dwr:remote javascript="Mac"> <dwr:include method="checkIO"/> <dwr:include method="checkImage"/> </dwr:remote> </bean> On the client side, I call the checkImage function liek this: //DWR var creative = dwr.util.getValue(fieldId); //YAHOO.log(creative); Mac.checkImage(creative, c.width, c.height, c.size, fieldId, { callback: function(result) { alert("Image check: " + result); }, timeout: 5000, errorHandler: function(message) { alert("Oops: " + message); } }); I verified that the parameter creative really is resolved into the input element that I want to upload. The method on the server that I am trying ot invoke is this: public boolean checkImage(FileTransfer uploadImage, Integer width, Integer height, Float size, String creativeId ) throws IOException { log.debug("verifyImage()"); ... } Basically it never get's invoked. once Mac.checkImage ()... is called I get the error wiht 'Failed to find parameter: callCount' Any ideas? Could it be that DWR needs to be configured a bit differently in 3.0, especially when it comes to Spring? Thanx Sven --- Sven Haiges Y! Messenger / Skype: hansamann --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: File Uploads with DWR 3.0 M1Hi,
I'm not sure what you're doing wrong (have you put commons libs in WEB-INF/lib?) but IWebMvc handles file uploads using DWR so you could check it and see if you spot the problem Regards,
On Tue, Apr 22, 2008 at 11:51 PM, Sven Haiges <hansamann@...> wrote: Hi all, |
| Free Forum Powered by Nabble | Forum Help |