cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Howard <coc...@leverageweb.com>
Subject Re: File upload with flow (Wiki examples)
Date Mon, 15 Sep 2003 02:01:05 GMT
Stephen Ramsay wrote:
> On Sun, Sep 14, 2003 at 08:33:01AM -0400, Geoff Howard wrote:
> 
>>Aha!  That wiki example has a problem I just noticed -- you shouldn't 
>>return null here (I just corrected the wiki).  Use the corrected version 
>>above - I'll explain below.

...

> I'm not sure "return new Map()" will work in the revised Wiki
> example.  Map is just an interface, so you can't actually return an
> instantiated object.

DOH!  Sorry, typing between commercials of the football game.  I was 
undecided between two alternatives and took halfway between.  Use this:

return java.util.Collections.EMPTY_MAP;

> On the other hand, I'm not sure if returning some random object
> (say, HashMap) is going to work.  I'm going to give it a try,
> though, and see what happens.

Yes, that would work too.  Well, not a random object but any instanceof 
Map obviously.  As long as it's not null.

> If I get this going, I'll try to put together an wikified example
> that uses the Cocoon 2.1 API.

That'd be great.  Actually, I have had a written but not tested version 
of a MultiPartFileAction on my hard drive for months which was meant to 
be committed into CVS but I haven't had the time or interest to finish 
up.  If you're motivated to test it etc., it's attached.  I was just 
finishing converting an original which merely saved to disk to now use 
ModifiableSource which would provide automatic support for other Source 
implementations, such as webdav repositories, cvs, etc. as they become 
available.

Geoff

Mime
View raw message