struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From punee...@tcs.com
Subject Re: Intermediate loading page
Date Tue, 27 Jul 2004 04:08:57 GMT
thannx for liking this idea, I have received the request from many people 
to send the code, I'll look for theat piece of code pass it to this list 
some time later in the day..

Puneet Agarwal
Tata Consultancy Services
Mailto: puneet.a@tcs.com
Website: http://www.tcs.com



"Shailender Jain" <shailender.jain@teleatlas.com> 
07/26/2004 10:03 AM

Please respond to
"Struts Users Mailing List" <user@struts.apache.org>


To
Struts Users Mailing List <user@struts.apache.org>
cc

Subject
Re: Intermediate loading page






Hi Puneet,

I am really in needs of such a type of javascript code.
This code should work both on IE and netscape.

I know i need to use the <DIV> and <LAYER> tag.
Any indicator for such a  type of code will be really helpfull.


Regards
Shailender Jain

puneet.a@tcs.com wrote:

>
> But if you change your approach of showing "work in process" label,
> while the report is being generated, to this one, both your problems
> get solved.
>
> "write some javascript that will show a layer which is opaque in the
> browser, and let that layer show some text like 'processing...' in
> blinking mode. invoke this function onSubmit event of your screen. The
> report gets fired at the server side and when it gets generated it
> send response to the browser"
>
> the advantages of this approach are
> 1.        You avoid one network round trip ( which is a primary focus
> for architects of remotely accessible applications, that have high
> network latency)
> 2.        There is no flag at the server side therefore half complete
> reports get completed and those are not sent anywhere and does not
> cause any problem.
>
> do u think it can work for u ?
>
> Regards,
> Puneet Agarwal
> Tata Consultancy Services
> Mailto: puneet.a@tcs.com
> Website: http://www.tcs.com
>
>
> "Jim Barrows"
                                        "Struts Users Mailing List"
  <jbarrows@sssc.com>                To <user@struts.apache.org>

  07/23/2004 05:03 AM                cc
      Please respond to         Subject RE: Intermediate loading page
    "Struts Users Mailing
            List"
   <user@struts.apache.org>

>
>
>
>
>
> > -----Original Message-----
> > From: Rizwan Merchant [mailto:rizwan.merchant@digitalpaytech.com]
> > Sent: Thursday, July 22, 2004 4:23 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Intermediate loading page
> >
> >
> >
> > Thanks for the previous input. I moved the report generation
> > to a thread and
> > set a session variable which is a boolean indicating that a report
> is
> > currently being generated. Once the report generation is complete
> that
> > session variable is set to false again.
> > I have come across another problem though. Say a user starts
> > generating a
> > report. The boolean session variable is set to true. If the
> > user tries to
> > generate another report while the fist oneis not complete,
> > then the boolean
> > variable is checked and the user is not allowed to generate
> > another report
> > (until the first one is complete and the boolean session
> > variable is set to
> > false).
> >
> > In this scenario, if the user abruptly closes the
> > intermediate page which is
> > supposed to load the report , then the session variable is
> > still set to true
> > (indicating report is being generated) as the thread on the
> > server has not
> > finished running. If the user now tries to create another
> > report then s/he
> > will not be allowed to do so (until the thread on the server is done
>
> > running).
> >
> > So I guess my question is : Is there any way to set a session
> > variable when
> > the user closes a browser window abruptly?
> > Or is there another way to approach this problem?
> Yes and no.  Since the browser sends no closing informaiton to the
> server, there isn't much you can do... however using
> HttpSessionListener, you can know when the session is destroyed, in
> the case of the user wandering away, this would be a session
> timeout... you can use the event to get some information from the
> session, but not necessarily the exact cause of the session
> destruction.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ForwardSourceID:NT00002806
>
>    ----------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>

ForwardSourceID:NT00003352 

Mime
View raw message