here is what i have done so far.
Page:
Form
---Submit Button
SearchResultPanel
Default State: the page displays Form and SearchResultPanel which is blank
by default.
User clicks submit button(ajax):
1)the Form.onSubmit creates a future task, and submit to exector to perform
search, at the same time, response back with SearchResultPanel.
2) question is how do i make SearchResultPanel periodically refresh itself
thanks in advance
cemeterygate wrote:
>
> so it's not possible for 1.3 branch. That's fine. I am on java 1.4. I am
> using back-ported concurrent package to handle mutiple search request.
> Everything is going well and i can cancel the previous request if there is
> new search request.
>
> Now, I am trying to figure out how to fresh search panel every few seconds
> after submit button is clicked, then stop if there is result ready to be
> displayed. Can you give me some pointer on this? much appreciated!!
>
>
>
>
> igor.vaynberg wrote:
>>
>> it might be possible, but unlikely in the 1.3 branch. it is an
>> interesting idea however, mind adding it to the wishlist for 1.4 wiki
>> page?
>>
>> the issues is not as simple as it first seems. there is
>> serialization/versioning issues to consider, etc.
>>
>> -igor
>>
>>
>> On Jan 29, 2008 8:26 AM, cemeterygate <[EMAIL PROTECTED]> wrote:
>>>
>>> (first, sorry for start a new thread. The original thread was mixed-up
>>> with
>>> different top discussion)
>>>
>>> that's right, i am screwed anyway if request takes too long, but from
>>> the
>>> browser user decides to give up current search by click the stop button
>>> and
>>> fire a new search. Since the pagemap is still locked by previous
>>> request,
>>> the second request will have to wait. sounds like i will end up handle
>>> this
>>> senario by pulling. is it possible to have a page that's not single
>>> thread
>>> model? Can we have two interfaces, such as SingleThreadPage, and
>>> ConcurrentThreadPage?
>>>
>>> igor.vaynberg wrote:
>>> yeah, if it takes a while the browser will timeout and you are
>>> screwed
>>> anyways...
>>>
>>> what do you mean they cant start a new search? you mean they no
>>> longer
>>> for the results of the currently running search and just press the
>>> search button again?
>>>
>>> if they would open a new tab with the search page, and you had
>>> automultiwindowsupport option enabled that new opened page would be
>>> created in a new pagemap, and so you wouldnt have a locking
>>> problem...
>>>
>>> -igor
>>>
>>>
>>> On Jan 28, 2008 2:51 PM, Johan Compagner <[EMAIL PROTECTED]>
>>> wrote:
>>> > shared resources are not synced thats one way of going round it.
>>> >
>>> > the other way is as igor describes. do the search in a seperate
>>> thread.
>>> > If it really takes that long then you do know that browsers also
>>> can
>>> just
>>> > time out after they don't get anything for a while?
>>> >
>>> > If it really takes that long then you should build a page where
>>> people
>>> can
>>> > fire searches to the system
>>> > and the page is just displayig the searches they did and then if
>>> the
>>> search
>>> > is finished that page can bring them to the result
>>> >
>>> > johan
>>> >
>>> >
>>> >
>>> >
>>> > On Jan 28, 2008 11:46 PM, cemeterygate <[EMAIL PROTECTED]>
>>> wrote:
>>> >
>>> > >
>>> > > that's nice to have but is there a way to work around this
>>> issue?
>>> Our
>>> > > application for customer service and they perform a lot search
>>> on a
>>> huge
>>> > > database, in some cases, customer service would like to start
>>> new
>>> search.
>>> > > Since wicket is locked by page path, there is no way for CSR to
>>> start a
>>> > > new
>>> > > request until previous one is finished.
>>> > >
>>> > >
>>> > > igor.vaynberg wrote:
>>> > > >
>>> > > > the pages are locked on the pagemap. so you cannot have two
>>> concurrent
>>> > > > requests from the same user to the same pagemap. this is so
>>> when
>>> you
>>> > > > are coding your pages you can use the much simpler
>>> single-threaded
>>> > > > model.
>>> > > >
>>> > > > every have fields in your servlet implementation? those have
>>> to be
>>> > > > synchronized or you will run into threading issues. this is
>>> the
>>> stuff
>>> > > > we make sure you dont have to worry about.
>>> > > >
>>> > > > the trade off is that if you have long running requests you
>>> should
>>> > > > probably process them in a different thread and let the UI
>>> poll
>>> for
>>> > > > status.
>>> > > >
>>> > > > -igor
>>> > > >
>>> > > >
>>> > > > On Jan 28, 2008 2:08 PM, cemeterygate <[EMAIL PROTECTED]>
>>> wrote:
>>> > > >>
>>> > > >> So I developed my first wicket application and I kept getting
>>> exception
>>> > > >> below
>>> > > >> as soon as i point my application to production database.
>>> > > >>
>>> > > >> Can someone tell me why wicket can't handle concurrent
>>> request?
>>> > > >>
>>> > > >> to replicate this issue, i have a page with a form component
>>> and
>>> > > regular
>>> > > >> submit button.
>>> > > >> on the onSubmit method,
>>> > > >> protected void onSubmit() {
>>> > > >> try {
>>> > > >> Thread.sleep(3 * 60 * 1000);
>>> > > >> } catch (InterruptedException e) {
>>> > > >> }
>>> > > >> }
>>> > > >>
>>> > > >> i put the thread into sleep for 3 minutes. I hit submit, then
>>> stop the
>>> > > >> request on browser and submit another request. then result
>>> to a
>>> > > internal
>>> > > >> error page. Why can't wicket handle mutiple submit? i dont'
>>> get
>>> it,
>>> > > >> shouldn't wicket process the new require like how servlet
>>> works?
>>> > > Someone
>>> > > >> please tell me how to work around this issue. Thanks in
>>> advance.
>>> > > >>
>>> > > >>
>>> > > >> 2008-01-25 14:45:05,443 ERROR
>>> [org.apache.wicket.RequestCycle] -
>>> <After
>>> > > 1
>>> > > >> minute the Pagemap null is still locked by:
>>> > > >> Thread[resin-tcp-connection-*:8080-45,5,main], giving up
>>> trying
>>> to get
>>> > > >> the
>>> > > >> page for path: 5>
>>> > > >> org.apache.wicket.WicketRuntimeException: After 1 minute the
>>> Pagemap
>>> > > null
>>> > > >> is
>>> > > >> still locked by:
>>> Thread[resin-tcp-connection-*:8080-45,5,main],
>>> giving
>>> > > up
>>> > > >> trying to get the page for path: 5
>>> > > >> at
>>> org.apache.wicket.Session.getPage(Session.java:734)
>>> > > >> at
>>> > > >>
>>> > >
>>> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage
>>> > > (AbstractRequestCycleProcessor.java:443)
>>> > > >> at
>>> > > >>
>>> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(
>>> > > WebRequestCycleProcessor.java:139)
>>> > > >> at
>>> org.apache.wicket.RequestCycle.step(RequestCycle.java:1152)
>>> > > >> at
>>> org.apache.wicket.RequestCycle.steps(RequestCycle.java:1245)
>>> > > >> at
>>> org.apache.wicket.RequestCycle.request(RequestCycle.java
>>> > > :489)
>>> > > >> at
>>> > > >>
>>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java
>>> > > :354)
>>> > > >> at
>>> > > >>
>>> org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java
>>> > > :121)
>>> > > >> at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:115)
>>> > > >> at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
>>> > > >> at
>>> > > >> com.caucho.server.dispatch.ServletFilterChain.doFilter(
>>> > > ServletFilterChain.java:106)
>>> > > >> --
>>> > > >> View this message in context:
>>> > > >>
>>> > >
>>> http://www.nabble.com/Pagemap-null-is-still-locked-by-blah-exception%2C-help%21%21-why-does-wicket-have-to-lock-the-pagemap-tp15146763p15146763.html
>>> > > >> Sent from the Wicket - User mailing list archive at
>>> Nabble.com<http://nabble.com/>
>>> > > .
>>> > > >>
>>> > > >>
>>> > > >>
>>> ---------------------------------------------------------------------
>>> > > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> > > >> For additional commands, e-mail: [EMAIL PROTECTED]
>>> > > >>
>>> > > >>
>>> > > >
>>> > > >
>>> ---------------------------------------------------------------------
>>> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> > > > For additional commands, e-mail: [EMAIL PROTECTED]
>>> > > >
>>> > > >
>>> > > >
>>> > >
>>> > > --
>>> > > View this message in context:
>>> > >
>>> http://www.nabble.com/Pagemap-null-is-still-locked-by-blah-exception%2C-help%21%21-why-does-wicket-have-to-lock-the-pagemap-tp15146763p15147756.html
>>> > > Sent from the Wicket - User mailing list archive at
>>> Nabble.com<http://nabble.com/>
>>> >
>>> > > .
>>> > >
>>> > >
>>> > >
>>> ---------------------------------------------------------------------
>>> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> > > For additional commands, e-mail: [EMAIL PROTECTED]
>>> > >
>>> > >
>>> >
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>> ... [show rest of quote]
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/is-it-possible-to-have-concurrent-page--tp15163142p15163142.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/is-it-possible-to-have-concurrent-page--tp15163142p15168031.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]