If you use Wicket to process a request, it is going to synchronize on
the page map (up through 1.4.x).  This means that any request that is
bound to a page (like a form, which is stateful) will result in
synchronization.  The stateful forms in Wicket submit back to
themselves, which means they will always be synchronizing on the
pagemap that contains the page that contains the form.  No other
requests can happen on that pagemap until that one is complete.

So, you can submit to another servlet.  All you need to do is create a
<form action="http://server:port/url-to-your-servlet";
method="post">... etc ... </form>.  You can use Wicket to create this
form tag in your page, although you probably wouldn't use a Form
component for this, because you won't actually be using the processing
that the form component provides.  You would probably just use a
WebMarkupContainer, override onComponentTag, and do tag.put("action",
yourUrl) to put the URL in the tag.

If you don't think that's what you want, please describe the actual
problem a little more.

On Wed, Dec 8, 2010 at 12:32 AM, exl <[email protected]> wrote:
>
> Thanks for the reply.  Sure - I can understand that if the client submits the
> form directly to the separate servlet, then this would achieve the
> "background processing thread" on the server side.
>
> However, wouldn't this mean that the Wicket application loses control in
> that client browser window, since it has been passed over to the separate
> servlet?
>
> The only way I can see this setup working in the sense that a client to be
> able to continue working somewhere else (perhaps on a different page of the
> Wicket application) whilst uploading, would be to open a new browser window
> on the client and have that new window perform the submit to the separate
> servlet.  Our Wicket application is stateful, but hopefully the opening on a
> new window wouldn't cause problems.
>
> So am I on the right track with the above or am I missing something here?
>
> Also, would it still be possible to use Wicket components with a submit form
> posting to the separate servlet? I'm just thinking if I wanted to use
> Wicket's single file upload (demonstrated here:
> http://wicketstuff.org/wicket/upload/single?0), whether that would still be
> possible.
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Asynchronous-File-Uploads-tp2541855p3077766.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>



-- 
Jeremy Thomerson
http://wickettraining.com
Need a CMS for Wicket?  Use Brix! http://brixcms.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to