You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Madan Narra <ma...@gmail.com> on 2007/05/28 13:14:32 UTC

Popup not opening if operations take time

Hi All,

I have a popup with a sheet inside it.

Sheet is mapped to a List<> which holds Objects based upon the logic in the
controller. These Objects are set from calls made b/w EJB's and Webservices.

When i click on the Popup, If at all the List<> is being set lately ( say
7-10 secs ), The popup is not displayed.

If at all I comment the webservice calling part, the popup is displayed
immediatly as the call is not being made and takes less time to set these
objects and add them to List<>.

So was thinking, if at all the response to display the popup takes time,
then the popup is never displayed.

Used renderedPartially to open a popup for <tc:link/> .

Is there anyway to showup the popup even if the response takes some time to
get back to the JSP page ?
-- 
Regards,
Madan N

Re: Popup not opening if operations take time

Posted by Volker Weber <v....@inexso.de>.
Hi Madan,


2007/5/29, Madan Narra <ma...@gmail.com>:
> Hi Volker,
>
> This code worked and was able to see the popup as the time out has set to
> 10000.
>
> I tested for few times to see the Time which my List<> gets set. Its taking
> around 8-10 sec so now this works fine.
>
> But the popup opens only after 10sec which makes the User to think that no
> action is being done after he clicks on the link and double click the same
> link or other links.

thats exact the reason why i suggested to use normal request instead of ajax.

>
> As i stated a long back before , there can be any Ajax Process Image being
> displayed when an Ajax request is being sent to the server , which makes the
> customer think that some process is going on in backend...
>
> Can you please let me know how to notify the User if he has to wait for the
> popup to open 10sec if the popup is opened via " renderPartially "
>

In you case (opening a popup) there will be no visual difference in
having a translation layer on th ajax request or making a standard
request. The translation layer will hide the whole app in both cases.

I don't think it makes mutch sense to use ajax for long time requests,
but a translaition layer for ajax requests won't break anything
(mostly the request is finished before the layer cames up). So if you
provide a patch for this, i can review and apply it.


Regards,
    Volker

> Thnx in advance
>
> Regards,
> Madan N

Re: Popup not opening if operations take time

Posted by Madan Narra <ma...@gmail.com>.
Hi Volker,

This code worked and was able to see the popup as the time out has set to
10000.

I tested for few times to see the Time which my List<> gets set. Its taking
around 8-10 sec so now this works fine.

But the popup opens only after 10sec which makes the User to think that no
action is being done after he clicks on the link and double click the same
link or other links.

As i stated a long back before , there can be any Ajax Process Image being
displayed when an Ajax request is being sent to the server , which makes the
customer think that some process is going on in backend...

Can you please let me know how to notify the User if he has to wait for the
popup to open 10sec if the popup is opened via " renderPartially "

Thnx in advance

Regards,
Madan N

Re: Popup not opening if operations take time

Posted by Volker Weber <v....@inexso.de>.
Hi,

you can use a script tag:

<tc:script>
  Tobago.Updater.UPDATE_TIMEOUT = 10000;
</tc:script>

or place this line somewhere in your custom javascript files.

the value is in milliseconds, the default is 5000 (defined in tobago.js).


Regards,
    Volker




2007/5/28, Madan Narra <ma...@gmail.com>:
> Hi Volker,
>
> The suggestion is convising..
>
> But the client has asked for an Ajax like feature which could probably done
> via renderedPartially and they would be sticiking for that :(
>
> Is there no other way to increase the timeout for Ajax request and display
> the popup even if it takes couple of more seconds to come up....
>
> Forgot to Place [ Tobago ] in Subject Line.... :)
>
> Regards,
> Madan N
>
>
> On 5/28/07, Volker Weber <v....@inexso.de> wrote:
> > Hi Madan,
> >
> > for operations which takes long time you should not use renderedPartially.
> > there is ia timeout for ajax requests to enable removing the blocking
> > layer from the
> > app if a request fails.
> >
> > It is no problem to use a popup without renderedPartially.
> >
> > Regards,
> >    Volker
> >
> > 2007/5/28, Madan Narra <madan.tobago@gmail.com >:
> > > Hi All,
> > >
> > > I have a popup with a sheet inside it.
> > >
> > > Sheet is mapped to a List<> which holds Objects based upon the logic in
> the
> > > controller. These Objects are set from calls made b/w EJB's and
> Webservices.
> > >
> > > When i click on the Popup, If at all the List<> is being set lately (
> say
> > > 7-10 secs ), The popup is not displayed.
> > >
> > > If at all I comment the webservice calling part, the popup is displayed
> > > immediatly as the call is not being made and takes less time to set
> these
> > > objects and add them to List<>.
> > >
> > > So was thinking, if at all the response to display the popup takes time,
> > > then the popup is never displayed.
> > >
> > > Used renderedPartially to open a popup for <tc:link/> .
> > >
> > > Is there anyway to showup the popup even if the response takes some time
> to
> > > get back to the JSP page ?
> > > --
> > > Regards,
> > > Madan N
> >
>
>
>
> --
> Regards,
> Madan N

Re: Popup not opening if operations take time

Posted by Madan Narra <ma...@gmail.com>.
Hi Volker,

The suggestion is convising..

But the client has asked for an Ajax like feature which could probably done
via renderedPartially and they would be sticiking for that :(

Is there no other way to increase the timeout for Ajax request and display
the popup even if it takes couple of more seconds to come up....

Forgot to Place [ Tobago ] in Subject Line.... :)

Regards,
Madan N

On 5/28/07, Volker Weber <v....@inexso.de> wrote:
>
> Hi Madan,
>
> for operations which takes long time you should not use renderedPartially.
> there is ia timeout for ajax requests to enable removing the blocking
> layer from the
> app if a request fails.
>
> It is no problem to use a popup without renderedPartially.
>
> Regards,
>    Volker
>
> 2007/5/28, Madan Narra <ma...@gmail.com>:
> > Hi All,
> >
> > I have a popup with a sheet inside it.
> >
> > Sheet is mapped to a List<> which holds Objects based upon the logic in
> the
> > controller. These Objects are set from calls made b/w EJB's and
> Webservices.
> >
> > When i click on the Popup, If at all the List<> is being set lately (
> say
> > 7-10 secs ), The popup is not displayed.
> >
> > If at all I comment the webservice calling part, the popup is displayed
> > immediatly as the call is not being made and takes less time to set
> these
> > objects and add them to List<>.
> >
> > So was thinking, if at all the response to display the popup takes time,
> > then the popup is never displayed.
> >
> > Used renderedPartially to open a popup for <tc:link/> .
> >
> > Is there anyway to showup the popup even if the response takes some time
> to
> > get back to the JSP page ?
> > --
> > Regards,
> > Madan N
>



-- 
Regards,
Madan N

Re: Popup not opening if operations take time

Posted by Volker Weber <v....@inexso.de>.
Hi Madan,

for operations which takes long time you should not use renderedPartially.
there is ia timeout for ajax requests to enable removing the blocking
layer from the
app if a request fails.

It is no problem to use a popup without renderedPartially.

Regards,
    Volker

2007/5/28, Madan Narra <ma...@gmail.com>:
> Hi All,
>
> I have a popup with a sheet inside it.
>
> Sheet is mapped to a List<> which holds Objects based upon the logic in the
> controller. These Objects are set from calls made b/w EJB's and Webservices.
>
> When i click on the Popup, If at all the List<> is being set lately ( say
> 7-10 secs ), The popup is not displayed.
>
> If at all I comment the webservice calling part, the popup is displayed
> immediatly as the call is not being made and takes less time to set these
> objects and add them to List<>.
>
> So was thinking, if at all the response to display the popup takes time,
> then the popup is never displayed.
>
> Used renderedPartially to open a popup for <tc:link/> .
>
> Is there anyway to showup the popup even if the response takes some time to
> get back to the JSP page ?
> --
> Regards,
> Madan N