[OT] Help !! Too many select-box in one page
Hi, My page has too many select-box in one page. The .html has 17XXX lines. This make the page load for a long time to appear =( Anyone face this problem too?? Please give me some idea Thx a lot Cliff
Re: [OT] Help !! Too many select-box in one page
Cliff Lam wrote: Hi, My page has too many select-box in one page. The .html has 17XXX lines. This make the page load for a long time to appear =( Anyone face this problem too?? Please give me some idea Thx a lot Maybe some of the select-boxes can be rendered using javascript on the clientside? Or maybe Ajax, since that seems to be popular at the moment :) -- Robin Ericsson http://robin.vill.ha.kuddkrig.nu/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Help !! Too many select-box in one page
You need to decide also whether those too many select-boxes are there for a reason or not. If they are, then you can't very well get rid of them, if they are not, again, re-factor the form, re-gather requirements for the form data capture and work from that. Sounds like you could re-factor your HTML forms into perhaps a series of forms rather than one page. You might like to provide more information to the list with regard to how your page is built, what it's function is, the type of info it collects and the type of info it shows. Allistair. -Original Message- From: Cliff Lam [mailto:[EMAIL PROTECTED] Sent: 10 May 2005 09:25 To: Struts Users Mailing List Subject: [OT] Help !! Too many select-box in one page Hi, My page has too many select-box in one page. The .html has 17XXX lines. This make the page load for a long time to appear =( Anyone face this problem too?? Please give me some idea Thx a lot Cliff FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Help !! Too many select-box in one page
Thank you very much for your quick reply. Actually, all the select-box is in one table contain 89 lists and each list has several select-box in-side. but each select in each list has the same options. I'm trying to find a way to reuse it. So i can just generate one select-box for the other 88 select-box =( Cliff - Original Message - From: Allistair Crossley [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, May 10, 2005 4:31 PM Subject: RE: [OT] Help !! Too many select-box in one page You need to decide also whether those too many select-boxes are there for a reason or not. If they are, then you can't very well get rid of them, if they are not, again, re-factor the form, re-gather requirements for the form data capture and work from that. Sounds like you could re-factor your HTML forms into perhaps a series of forms rather than one page. You might like to provide more information to the list with regard to how your page is built, what it's function is, the type of info it collects and the type of info it shows. Allistair. -Original Message- From: Cliff Lam [mailto:[EMAIL PROTECTED] Sent: 10 May 2005 09:25 To: Struts Users Mailing List Subject: [OT] Help !! Too many select-box in one page Hi, My page has too many select-box in one page. The .html has 17XXX lines. This make the page load for a long time to appear =( Anyone face this problem too?? Please give me some idea Thx a lot Cliff FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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]
RE: [OT] Help !! Too many select-box in one page
You could define a JSP include file with one of these select lists, e.g select name=${selectName} ... /select And then in your main form, using JSTL before each select change the selectName page variable c:set var=selectName value=selectA / select name=${selectName} ... /select c:set var=selectName value=selectB / select name=${selectName} ... /select However, this will not reduce your HTML page size, because you are still using 88 select blocks. You should understand the difference between reducing page size (less code) and producing re-usable code (includes) Cheers, Allistair. -Original Message- From: Cliff Lam [mailto:[EMAIL PROTECTED] Sent: 10 May 2005 09:36 To: Struts Users Mailing List Subject: Re: [OT] Help !! Too many select-box in one page Thank you very much for your quick reply. Actually, all the select-box is in one table contain 89 lists and each list has several select-box in-side. but each select in each list has the same options. I'm trying to find a way to reuse it. So i can just generate one select-box for the other 88 select-box =( Cliff - Original Message - From: Allistair Crossley [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, May 10, 2005 4:31 PM Subject: RE: [OT] Help !! Too many select-box in one page You need to decide also whether those too many select-boxes are there for a reason or not. If they are, then you can't very well get rid of them, if they are not, again, re-factor the form, re-gather requirements for the form data capture and work from that. Sounds like you could re-factor your HTML forms into perhaps a series of forms rather than one page. You might like to provide more information to the list with regard to how your page is built, what it's function is, the type of info it collects and the type of info it shows. Allistair. -Original Message- From: Cliff Lam [mailto:[EMAIL PROTECTED] Sent: 10 May 2005 09:25 To: Struts Users Mailing List Subject: [OT] Help !! Too many select-box in one page Hi, My page has too many select-box in one page. The .html has 17XXX lines. This make the page load for a long time to appear =( Anyone face this problem too?? Please give me some idea Thx a lot Cliff FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Help !! Too many select-box in one page
thank you for you reply I really want to solve the problem in the client side. It load for 1 min for the page = ( kill me please X.X Cliff - Original Message - From: Allistair Crossley [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, May 10, 2005 4:40 PM Subject: RE: [OT] Help !! Too many select-box in one page You could define a JSP include file with one of these select lists, e.g select name=${selectName} ... /select And then in your main form, using JSTL before each select change the selectName page variable c:set var=selectName value=selectA / select name=${selectName} ... /select c:set var=selectName value=selectB / select name=${selectName} ... /select However, this will not reduce your HTML page size, because you are still using 88 select blocks. You should understand the difference between reducing page size (less code) and producing re-usable code (includes) Cheers, Allistair. -Original Message- From: Cliff Lam [mailto:[EMAIL PROTECTED] Sent: 10 May 2005 09:36 To: Struts Users Mailing List Subject: Re: [OT] Help !! Too many select-box in one page Thank you very much for your quick reply. Actually, all the select-box is in one table contain 89 lists and each list has several select-box in-side. but each select in each list has the same options. I'm trying to find a way to reuse it. So i can just generate one select-box for the other 88 select-box =( Cliff - Original Message - From: Allistair Crossley [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, May 10, 2005 4:31 PM Subject: RE: [OT] Help !! Too many select-box in one page You need to decide also whether those too many select-boxes are there for a reason or not. If they are, then you can't very well get rid of them, if they are not, again, re-factor the form, re-gather requirements for the form data capture and work from that. Sounds like you could re-factor your HTML forms into perhaps a series of forms rather than one page. You might like to provide more information to the list with regard to how your page is built, what it's function is, the type of info it collects and the type of info it shows. Allistair. -Original Message- From: Cliff Lam [mailto:[EMAIL PROTECTED] Sent: 10 May 2005 09:25 To: Struts Users Mailing List Subject: [OT] Help !! Too many select-box in one page Hi, My page has too many select-box in one page. The .html has 17XXX lines. This make the page load for a long time to appear =( Anyone face this problem too?? Please give me some idea Thx a lot Cliff FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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] - 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]
Re: [OT] Help !! Too many select-box in one page
how r u rendering you select boxes? ie, database call for each render? riyaz Cliff Lam wrote: Hi, My page has too many select-box in one page. The .html has 17XXX lines. This make the page load for a long time to appear =( Anyone face this problem too?? Please give me some idea Thx a lot Cliff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Help !! Too many select-box in one page
Thank you for your reply I get the options from the db But the main concern is in the client side ... It loaded about 1min for the 17XXX lines html ... Cliff - Original Message - From: rmanchu [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, May 10, 2005 5:27 PM Subject: Re: [OT] Help !! Too many select-box in one page how r u rendering you select boxes? ie, database call for each render? riyaz Cliff Lam wrote: Hi, My page has too many select-box in one page. The .html has 17XXX lines. This make the page load for a long time to appear =( Anyone face this problem too?? Please give me some idea Thx a lot Cliff - 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]
RE: [OT] Help !! Too many select-box in one page
yes you won't be able to solve that problem if you are rendering 88 select boxes. why? because you are rending 88 select boxes that are populated from the database. no amount of client-sise javascript (yuck) is going to help you. you need to re-factor your design which is clearly not working for you. if you absolutely cannot re-factor the design, then you could consider using some caching strategy to prevent the huge database lookup more than once using something like OSCACHE perhaps. you could also consider hitting the database for 1 select list and building the html select list into a java String, i.e String select = select name=\PLACEHOLDER\; // loop database result set adding option to select // render JSP page in your JSP, replace the PLACEHOLDER with the select name you need % String select = request.getAttribute(select); % %= select.replaceAll(PLACEHOLDER, selectNameA) % %= select.replaceAll(PLACEHOLDER, selectNameB) % This method therefore hits the database ONCE (since you say you can reuse the select lists) and should be much faster. Allistair. -Original Message- From: Cliff Lam [mailto:[EMAIL PROTECTED] Sent: 10 May 2005 09:52 To: Struts Users Mailing List Subject: Re: [OT] Help !! Too many select-box in one page Thank you for your reply I get the options from the db But the main concern is in the client side ... It loaded about 1min for the 17XXX lines html ... Cliff - Original Message - From: rmanchu [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, May 10, 2005 5:27 PM Subject: Re: [OT] Help !! Too many select-box in one page how r u rendering you select boxes? ie, database call for each render? riyaz Cliff Lam wrote: Hi, My page has too many select-box in one page. The .html has 17XXX lines. This make the page load for a long time to appear =( Anyone face this problem too?? Please give me some idea Thx a lot Cliff - 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Help !! Too many select-box in one page
Thank you very much for your reply ^^ You are right !! I should not get the list from db so many times ^^ But I want to solve the loading time in the client side frist = (. It loaded 1 min even I copy the html source code loaded in the drameweaver = ( it is the html has 17XXX lines is too big ? Thanks a lot Cliff - Original Message - From: Allistair Crossley [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, May 10, 2005 4:58 PM Subject: RE: [OT] Help !! Too many select-box in one page yes you won't be able to solve that problem if you are rendering 88 select boxes. why? because you are rending 88 select boxes that are populated from the database. no amount of client-sise javascript (yuck) is going to help you. you need to re-factor your design which is clearly not working for you. if you absolutely cannot re-factor the design, then you could consider using some caching strategy to prevent the huge database lookup more than once using something like OSCACHE perhaps. you could also consider hitting the database for 1 select list and building the html select list into a java String, i.e String select = select name=\PLACEHOLDER\; // loop database result set adding option to select // render JSP page in your JSP, replace the PLACEHOLDER with the select name you need % String select = request.getAttribute(select); % %= select.replaceAll(PLACEHOLDER, selectNameA) % %= select.replaceAll(PLACEHOLDER, selectNameB) % This method therefore hits the database ONCE (since you say you can reuse the select lists) and should be much faster. Allistair. -Original Message- From: Cliff Lam [mailto:[EMAIL PROTECTED] Sent: 10 May 2005 09:52 To: Struts Users Mailing List Subject: Re: [OT] Help !! Too many select-box in one page Thank you for your reply I get the options from the db But the main concern is in the client side ... It loaded about 1min for the 17XXX lines html ... Cliff - Original Message - From: rmanchu [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, May 10, 2005 5:27 PM Subject: Re: [OT] Help !! Too many select-box in one page how r u rendering you select boxes? ie, database call for each render? riyaz Cliff Lam wrote: Hi, My page has too many select-box in one page. The .html has 17XXX lines. This make the page load for a long time to appear =( Anyone face this problem too?? Please give me some idea Thx a lot Cliff - 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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]
Re: [OT] Help !! Too many select-box in one page
i don't think u can do this on the client side. i suggest a caching solution. something like this might be useful write a small plugin that stores a Map at servlet context. The map.key could be the table/form/field name. upto u. The value is a SQL statement that retrieves the data for the dropdown/checkboxes [of the form LabeL/Value using LabelValueBean]. anytime i need a dropdown or list of checkboxes i just call the Map. if the map needs to be updated, u can use another attribute that says if whether it is update. whenever an underlying table changes, u can set it to false. Map is updated only when there is a call to retrieve a list and if it is not uptodate. HTH riyaz Cliff Lam wrote: Thank you for your reply I get the options from the db But the main concern is in the client side ... It loaded about 1min for the 17XXX lines html ... Cliff - Original Message - From: rmanchu [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, May 10, 2005 5:27 PM Subject: Re: [OT] Help !! Too many select-box in one page how r u rendering you select boxes? ie, database call for each render? riyaz Cliff Lam wrote: Hi, My page has too many select-box in one page. The .html has 17XXX lines. This make the page load for a long time to appear =( Anyone face this problem too?? Please give me some idea Thx a lot Cliff - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Help !! Too many select-box in one page
haha.. ='( really Thx a lot !!! Cliff - Original Message - From: Allistair Crossley [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, May 10, 2005 5:16 PM Subject: RE: [OT] Help !! Too many select-box in one page the problem as I have said in both my previous replies is that you cannot possibly expect 17,000 lines of HTML to be fast not matter how you go about generating that 17,000 lines of code. so, as I have suggested, you need to look at your forms design and break it down into more pages I would say Form now: select1 select2 select3 select4 Re-factor 2-step process Page 1 select1 select2 Page 2 select3 select4 FOR EXAMPLE. Please note I am not in a position to tell you how to design your forms or application, but I am in a position to tell you that there is nothing you can do about making 17,000 lines of HTML quicker (unless you buy a new desktop PC for every user and increase network bandwidth ;) ). Re-factor Re-factor Re-factor -Original Message- From: Cliff Lam [mailto:[EMAIL PROTECTED] Sent: 10 May 2005 10:07 To: Struts Users Mailing List Subject: Re: [OT] Help !! Too many select-box in one page Thank you very much for your reply ^^ You are right !! I should not get the list from db so many times ^^ But I want to solve the loading time in the client side frist = (. It loaded 1 min even I copy the html source code loaded in the drameweaver = ( it is the html has 17XXX lines is too big ? Thanks a lot Cliff - Original Message - From: Allistair Crossley [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, May 10, 2005 4:58 PM Subject: RE: [OT] Help !! Too many select-box in one page yes you won't be able to solve that problem if you are rendering 88 select boxes. why? because you are rending 88 select boxes that are populated from the database. no amount of client-sise javascript (yuck) is going to help you. you need to re-factor your design which is clearly not working for you. if you absolutely cannot re-factor the design, then you could consider using some caching strategy to prevent the huge database lookup more than once using something like OSCACHE perhaps. you could also consider hitting the database for 1 select list and building the html select list into a java String, i.e String select = select name=\PLACEHOLDER\; // loop database result set adding option to select // render JSP page in your JSP, replace the PLACEHOLDER with the select name you need % String select = request.getAttribute(select); % %= select.replaceAll(PLACEHOLDER, selectNameA) % %= select.replaceAll(PLACEHOLDER, selectNameB) % This method therefore hits the database ONCE (since you say you can reuse the select lists) and should be much faster. Allistair. -Original Message- From: Cliff Lam [mailto:[EMAIL PROTECTED] Sent: 10 May 2005 09:52 To: Struts Users Mailing List Subject: Re: [OT] Help !! Too many select-box in one page Thank you for your reply I get the options from the db But the main concern is in the client side ... It loaded about 1min for the 17XXX lines html ... Cliff - Original Message - From: rmanchu [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, May 10, 2005 5:27 PM Subject: Re: [OT] Help !! Too many select-box in one page how r u rendering you select boxes? ie, database call for each render? riyaz Cliff Lam wrote: Hi, My page has too many select-box in one page. The .html has 17XXX lines. This make the page load for a long time to appear =( Anyone face this problem too?? Please give me some idea Thx a lot Cliff - 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
RE: [OT] Help !! Too many select-box in one page
it's plausible but has it's own performance implications. best to just try it out for your case and maybe it's a quick fix. however, if you *can* spend some time re-factoring your forms, you should .. does not sound like a particularly useful design right now. all the best, Allistair. -Original Message- From: Cliff Lam [mailto:[EMAIL PROTECTED] Sent: 10 May 2005 10:46 To: Struts Users Mailing List Subject: Re: [OT] Help !! Too many select-box in one page woo... Thx a lot ^^ Cliff - Original Message - From: James Neville [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, May 10, 2005 5:21 PM Subject: Re: [OT] Help !! Too many select-box in one page Cliff, If you truly have no choice but to collect the data from one huge form, try using a compression filter on the offending jsps. http://www.netspade.com/software/java/compression-filter/ http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters-p3.html http://www.google.co.uk/search?hl=enq=java+compression+filter btnG=Google+Searchmeta= Works well for us on some heavily scripted pages, and I don't need to worry about splitting/slimming down large css files too ;) James Cliff Lam wrote: Thank you very much for your reply ^^ You are right !! I should not get the list from db so many times ^^ But I want to solve the loading time in the client side frist = (. It loaded 1 min even I copy the html source code loaded in the drameweaver = ( it is the html has 17XXX lines is too big ? Thanks a lot Cliff - Original Message - From: Allistair Crossley [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, May 10, 2005 4:58 PM Subject: RE: [OT] Help !! Too many select-box in one page yes you won't be able to solve that problem if you are rendering 88 select boxes. why? because you are rending 88 select boxes that are populated from the database. no amount of client-sise javascript (yuck) is going to help you. you need to re-factor your design which is clearly not working for you. if you absolutely cannot re-factor the design, then you could consider using some caching strategy to prevent the huge database lookup more than once using something like OSCACHE perhaps. you could also consider hitting the database for 1 select list and building the html select list into a java String, i.e String select = select name=\PLACEHOLDER\; // loop database result set adding option to select // render JSP page in your JSP, replace the PLACEHOLDER with the select name you need % String select = request.getAttribute(select); % %= select.replaceAll(PLACEHOLDER, selectNameA) % %= select.replaceAll(PLACEHOLDER, selectNameB) % This method therefore hits the database ONCE (since you say you can reuse the select lists) and should be much faster. Allistair. -Original Message- From: Cliff Lam [mailto:[EMAIL PROTECTED] Sent: 10 May 2005 09:52 To: Struts Users Mailing List Subject: Re: [OT] Help !! Too many select-box in one page Thank you for your reply I get the options from the db But the main concern is in the client side ... It loaded about 1min for the 17XXX lines html ... Cliff - Original Message - From: rmanchu [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, May 10, 2005 5:27 PM Subject: Re: [OT] Help !! Too many select-box in one page how r u rendering you select boxes? ie, database call for each render? riyaz Cliff Lam wrote: Hi, My page has too many select-box in one page. The .html has 17XXX lines. This make the page load for a long time to appear =( Anyone face this problem too?? Please give me some idea Thx a lot Cliff - 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] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
Re: [OT] Help !! Too many select-box in one page
Allistair Crossley wrote: it's plausible but has it's own performance implications. best to just try it out for your case and maybe it's a quick fix. Yup, its a hack in this case, but still a useful tool for the box. however, if you *can* spend some time re-factoring your forms, you should .. does not sound like a particularly useful design right now. I'd agree here, but sometimes the person making the business decisions is a bit of a spoilt child, and if thats how they want it. Best way round these folks is simply don't give it to them in the first place, and deny the possibility. Unfortunately, once they've seen that it *can* work (albeit badly), you've lost ;) James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Help !! Too many select-box in one page
unless they see the 1+ minute performance time and you take a hard stance on it and say well that's what you get when you ask for silly design ;)) Allistair. -Original Message- From: James Neville [mailto:[EMAIL PROTECTED] Sent: 10 May 2005 11:04 To: Struts Users Mailing List Subject: Re: [OT] Help !! Too many select-box in one page Allistair Crossley wrote: it's plausible but has it's own performance implications. best to just try it out for your case and maybe it's a quick fix. Yup, its a hack in this case, but still a useful tool for the box. however, if you *can* spend some time re-factoring your forms, you should .. does not sound like a particularly useful design right now. I'd agree here, but sometimes the person making the business decisions is a bit of a spoilt child, and if thats how they want it. Best way round these folks is simply don't give it to them in the first place, and deny the possibility. Unfortunately, once they've seen that it *can* work (albeit badly), you've lost ;) James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Help !! Too many select-box in one page
Cliff Lam wrote the following on 5/10/2005 4:25 AM: My page has too many select-box in one page. The .html has 17XXX lines. Nobody asked this, so I wanted to make sure, Are each of the select box entries a different list? I'm assuming so, but sometimes for master detail records where you have multiple select boxes that have the same list of options (for example having to select a role from a drop down for several persons), javascript and dhtml is great option. I'm guessing you have a case though where each drop down is different set of options? (If so redesign, as others have brought up, or just live with a long rendering time.) -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Help !! Too many select-box in one page
I'd suggest doing some testing to determine where the delay is actually occurring... is it reading from the database that takes so long? Is it transit time from the server to the client? Is it rendering on the client? The firsr two you should be able to determine on the server-side, then just subtract that out from the total time to see how long the client is taking. If it's either of the first two then people have given you some options to explore already... if it's the later, you'll almost certainly have to refactor your design... the suggestion of populating the boxes via scripting is a good one, but I've done this extensively and so can tell you that it will become a bottleneck in a hurry, no to mention the fact that the perceived performance of your site can vary greatly depending on the clients' PC. Hence, my suggestion... once you determine where the greatest amount of time is actually spent, then folks can probably help in a hurry :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com John Fletcher wrote: Cliff, but each select in each list has the same options. If each select in each list has the same options, you can just download the options once to a javascript array and populate all of the select boxes on the client side. A quick example: script language=JavaScript var optionArray = {c:out value=${myValuesCSV} /}; function populateBoxes() { var mySelectBox; // You'll need to do this for each box on your form for (var i = 0; i optionArray.length; i++) { mySelectBox.options[i] = new Option(optionArray[i], optionArray[i]); } } /script Call that populateBoxes function on startup. Who knows how long that'll take to populate client-side, but it should reduce your page size considerably. If you need different values than text in the select boxes, you could either have a 2-dimensional array (which would require different formatting for the values, or a different method of printing them out in the javascript), or you could maintain 2 arrays, one for values and one for text. Note that you will need to know all of the names of the select boxes unless you want to just loop through all of the form elements and do the action for any of the select form elements that you find. Your CSV string that you drop into the optionArray will need to have strings quoted if necessary of course. John - 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]
Re: [OT] Help !! Too many select-box in one page
Thx a lot !! Really thank you to everyone =) !!! Cliff - Original Message - From: Frank W. Zammetti [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, May 11, 2005 12:05 AM Subject: Re: [OT] Help !! Too many select-box in one page I'd suggest doing some testing to determine where the delay is actually occurring... is it reading from the database that takes so long? Is it transit time from the server to the client? Is it rendering on the client? The firsr two you should be able to determine on the server-side, then just subtract that out from the total time to see how long the client is taking. If it's either of the first two then people have given you some options to explore already... if it's the later, you'll almost certainly have to refactor your design... the suggestion of populating the boxes via scripting is a good one, but I've done this extensively and so can tell you that it will become a bottleneck in a hurry, no to mention the fact that the perceived performance of your site can vary greatly depending on the clients' PC. Hence, my suggestion... once you determine where the greatest amount of time is actually spent, then folks can probably help in a hurry :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com John Fletcher wrote: Cliff, but each select in each list has the same options. If each select in each list has the same options, you can just download the options once to a javascript array and populate all of the select boxes on the client side. A quick example: script language=JavaScript var optionArray = {c:out value=${myValuesCSV} /}; function populateBoxes() { var mySelectBox; // You'll need to do this for each box on your form for (var i = 0; i optionArray.length; i++) { mySelectBox.options[i] = new Option(optionArray[i], optionArray[i]); } } /script Call that populateBoxes function on startup. Who knows how long that'll take to populate client-side, but it should reduce your page size considerably. If you need different values than text in the select boxes, you could either have a 2-dimensional array (which would require different formatting for the values, or a different method of printing them out in the javascript), or you could maintain 2 arrays, one for values and one for text. Note that you will need to know all of the names of the select boxes unless you want to just loop through all of the form elements and do the action for any of the select form elements that you find. Your CSV string that you drop into the optionArray will need to have strings quoted if necessary of course. John - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]