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=en&q=java+compression+filter > &btnG=Google+Search&meta= > > > > 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] > > >> > > > > > > > > > > --------------------------------------------------------------------- > > > 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]