You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jayaveeran <ja...@gmail.com> on 2008/02/11 15:01:20 UTC

Populating dropdown

Hi all,

I am populating a dropdown in my jsp which has more than 10,000 elements in
it. Since the record size is very huge the time taken for the JSP to load is
very high. I am using the folowing snippet to populate the dropdown. I am
using struts framework. Is there any other way that I can populate the
dropdown to make it faster ? Please help.   


 <html:select property ='id' name="Form"
onchange='<%="fnDoCheck("+rowIndex.intValue()+")"%>' style="width:300px">
 <bean:define id ="List" property='id' name= "Object"/>
  <html:options collection="List" labelProperty="value" property="name"/>
   </html:select>
-- 
View this message in context: http://www.nabble.com/Populating-dropdown-tp15412021p15412021.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Populating dropdown

Posted by Roger Varley <ro...@googlemail.com>.
On Monday 11 February 2008 12:01, Jayaveeran wrote:
> Hi all,
>
> I am populating a dropdown in my jsp which has more than 10,000 elements in
> it. Since the record size is very huge the time taken for the JSP to load
> is very high. I am using the folowing snippet to populate the dropdown. I
> am using struts framework. Is there any other way that I can populate the
> dropdown to make it faster ? Please help.
>

I'd recommend re-thinking your design. Even if you could make the population 
of your drop-down faster, you're still going to have some serious useability 
issues with a dropdown of that size.

Regards
Roger

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Populating dropdown

Posted by Jorge Martín Cuervo <jo...@defactops.com>.
Hi,

Maybe you can divide your options in categories and use several
dropdowns with an ajax loading.

>>From the user point of view, large data in dropdowns are not very
usefull.

El lun, 11-02-2008 a las 06:01 -0800, Jayaveeran escribió:
> Hi all,
> 
> I am populating a dropdown in my jsp which has more than 10,000 elements in
> it. Since the record size is very huge the time taken for the JSP to load is
> very high. I am using the folowing snippet to populate the dropdown. I am
> using struts framework. Is there any other way that I can populate the
> dropdown to make it faster ? Please help.   
> 
> 
>  <html:select property ='id' name="Form"
> onchange='<%="fnDoCheck("+rowIndex.intValue()+")"%>' style="width:300px">
>  <bean:define id ="List" property='id' name= "Object"/>
>   <html:options collection="List" labelProperty="value" property="name"/>
>    </html:select>
-- 
____________________________________
Jorge Martin Cuervo
 
Outsourcing Emarketplace
deFacto Powered by Standards
 
email <jo...@defactops.com>
voice +34 985 129 820
voice +34 660 026 384
____________________________________


[...]


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Populating dropdown

Posted by Rushikesh Thakkar <th...@gmail.com>.
Better option would be: using *autocompleter* instead of select.

On Feb 11, 2008 3:01 PM, Jayaveeran <ja...@gmail.com> wrote:

>
> Hi all,
>
> I am populating a dropdown in my jsp which has more than 10,000 elements
> in
> it. Since the record size is very huge the time taken for the JSP to load
> is
> very high. I am using the folowing snippet to populate the dropdown. I am
> using struts framework. Is there any other way that I can populate the
> dropdown to make it faster ? Please help.
>
>
>  <html:select property ='id' name="Form"
> onchange='<%="fnDoCheck("+rowIndex.intValue()+")"%>' style="width:300px">
>  <bean:define id ="List" property='id' name= "Object"/>
>  <html:options collection="List" labelProperty="value" property="name"/>
>   </html:select>
> --
> View this message in context:
> http://www.nabble.com/Populating-dropdown-tp15412021p15412021.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Populating dropdown

Posted by Dave Newton <ne...@yahoo.com>.
--- Jayaveeran <ja...@gmail.com> wrote:
> I am populating a dropdown in my jsp which has more 
> than 10,000 elements in it.

That's your first problem.

> Since the record size is very huge the time taken for the JSP to load
> is very high. I am using the folowing snippet to populate the dropdown. 
> I am using struts framework. Is there any other way that I can populate 
> the dropdown to make it faster?

Not really... As suggested, using some form of autocompleter might be a good
idea, depending on how the back end is implemented.

A dropdown with that many elements is going to cause problems on several
fronts; it might make the JSP to big (some (all?) app servers won't handle a
JSP larger than 64K), it may cause an issue in some browsers due to sheer
size, and it'll almost always render fairly slowly.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: takes more time for populating values.

Posted by Randy Burgess <RB...@nuvox.com>.
Don't put 10,000 items in a drop down list. There is no way that a human is
going to read 10,000 items in a list and there is a good chance you will
crash their browser. I suggest making the user select some options, through
more drop down lists or input methods, to narrow down the final list before
displaying it.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: Jayaveeran <ja...@gmail.com>
> Reply-To: Struts Users Mailing List <us...@struts.apache.org>
> Date: Mon, 11 Feb 2008 06:03:47 -0800 (PST)
> To: <us...@struts.apache.org>
> Subject: <html:select> takes more time for populating values.
> 
> 
> Hi all,
> 
> I am populating a dropdown in my jsp which has more than 10,000 elements in
> it. Since the record size is very huge the time taken for the JSP to load is
> very high. I am using the folowing snippet to populate the dropdown. I am
> using struts framework. Is there any other way that I can populate the
> dropdown to make it faster ? Please help.
> 
> 
>  <html:select property ='id' name="Form"
> onchange='<%="fnDoCheck("+rowIndex.intValue()+")"%>' style="width:300px">
>  <bean:define id ="List" property='id' name= "Object"/>
>   <html:options collection="List" labelProperty="value" property="name"/>
>    </html:select>
> -- 
> View this message in context:
> http://www.nabble.com/%3Chtml%3Aselect%3E-takes-more-time-for-populating-value
> s.-tp15412021p15412021.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



This email and any attachments ("Message") may contain legally privileged and/or confidential information.  If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email.  Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org