For Programmers: Free Programming Magazines  


Home > Archive > Extreme Programming > April 2004 > How to Avoid Conntrols Disappear form a JSP Page









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to Avoid Conntrols Disappear form a JSP Page
krishnan.S

2004-04-29, 11:23 am

Dear All,

I have one Great Problem.Pls Give me a solution to OverCome this.

Assume that i have a 1.)State (Combo Box)

2.)City (Combo Box)

3.)Area (Combo Box)

All the above 3 are ComboBoxes in which the User have to select their
respective one's Based on which

the Url is Rewritten and the values are Populated.

What happens is after selecting the State all the Controls on the
screen is getting disappeared for quite a

few seconds and then it is getting appeared .I don't want this to
happen.I want all the controls to Remain

on the Screen .How to Avoid this .This happens for all the combo boxes
whether it is a State or a City or an

Area.

Expecting an early Reply

ThankYou
Phlip

2004-04-29, 6:28 pm

krishnan.S wrote:

> I have one Great Problem.Pls Give me a solution to OverCome this.
>
> Assume that i have a 1.)State (Combo Box)
>
> 2.)City (Combo Box)
>
> 3.)Area (Combo Box)
>
> All the above 3 are ComboBoxes in which the User have to select their
> respective one's Based on which
>
> the Url is Rewritten and the values are Populated.


If the "URL is rewritten", then doesn't that mean you re-fetch the page from
the server?

> What happens is after selecting the State all the Controls on the
> screen is getting disappeared for quite a
>
> few seconds and then it is getting appeared .I don't want this to
> happen.I want all the controls to Remain
>
> on the Screen .How to Avoid this .This happens for all the combo boxes
> whether it is a State or a City or an
> Area.


That's what happens when you hit the server for a new page.

To avoid this, you must ask what kinds of web browsers your customers may
use. If your customers are the public at large, then you must assume they
use anything - including lynx, mosiac, opera, etc.

Most of these use JavaScript, but not all use it the same way. If your
customers all live in one office, you may inspect which Web browser most of
them use, and then write JavaScript that executes on the client-side,
without a round-trip thru the server. This script will instantly refresh
those combo boxes.

But if you cannot control which browsers your customers use, then you should
not put a sign on your Web site saying "we only work with Browser X. Go
download it." Your customers will accept a page refresh - if it does not
erase any other data they wrote.

Finally, this newsgroup discusses eXtreme Programming, which is a technique
to associate automated tests with customer requirements. To test a Web page
(in Java) use HttpUnit. Here's a tutorial to use it:

http://www.c2.com/cgi/wiki?HttpUnitTutorial

In your case, you should write a test that checks your combo boxes have
states. This won't fix your problem, but it will prevent bugs when you
change your code.

--
Phlip
http://www.xpsd.org/cgi-bin/wiki?Te...tUserInterfaces


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com