chaitanya karthikk
,
Ranch Hand
Aug 18, 2010 03:59:55
Hi everybody, I am Chaitanya, I am having a doubt regarding how to transfer data from server to client.
I am having a table which consists subject names and codes. At most there can be 500 records in that table.
I have an equivalent bean which has the getter and setter methods.
I need to send the entire details to the client so that he can select any subject. This is my requirement. Can I go with beans?
Or is there any other alternative?
Thank you all in advance. Have a good day.
David Newton
,
Author
Aug 18, 2010 05:18:09
Of course; why couldn't you?
(That said, giving the user a web page with 500 options on it is a poor user experience--I'd consider some sort of paging mechanism.)
chaitanya karthikk
,
Ranch Hand
Aug 18, 2010 08:00:18
Hi Mr. David, can you please tell me what is meant by paging mechanism. Actually I need to generate a jsp which consists of some options and a drop down list. The user must select an option from the drop down list. The options in the list are in the database table. There can be at most 500 options. This is the thing.
Can you please tell me how to do? Thank you in advance.
chaitanya karthikk
,
Ranch Hand
Aug 18, 2010 09:07:16
Hi Mr. David, kindly can you please tell me how to address this requirement. I stopped my coding here and looking or a best alternative.
Bear Bibeault
,
Sheriff
staff
Aug 18, 2010 09:32:03
Sounds like what you need is what is called an "autocompleter" or "suggest" control. And before you ask, just google those terms.
chaitanya karthikk
,
Ranch Hand
Aug 18, 2010 09:33:52
I am confused Mr. Bear with paging, autocompleter, i dont know what those are.
David Newton
,
Author
Aug 18, 2010 09:37:13
And googling didn't help at all?
Bear Bibeault
,
Sheriff
staff
Aug 18, 2010 09:38:22
Bear Bibeault wrote: And before you ask, just google those terms.
chaitanya karthikk
,
Ranch Hand
Aug 18, 2010 09:39:50
I referred here . Already I am confused, this page confused me again.
Bear Bibeault
,
Sheriff
staff
Aug 18, 2010 09:42:26
Try this page . Play with the example.
chaitanya karthikk
,
Ranch Hand
Aug 18, 2010 09:46:25
This is my actual requirement. There is a user(student) who has to select his course subjects form the given list. The subjects list is in a database table. So I am sending a request to a servlet and that servlet calls a model and retrieves the data and submits to the servlet, then the servlet sets an attribute and sends it to the view(jsp) from where the user will select his course subject. This is what I have to do.
chaitanya karthikk
,
Ranch Hand
Aug 18, 2010 09:48:52
Hi Bear I dont want a suggest box, I want a combobox in which the list is already populated. Can I use array of beans, is it a best approach?
Bear Bibeault
,
Sheriff
staff
Aug 18, 2010 09:50:57
There is no such thing as a "combo box" on the web. Please read this: HtmlHasNoComboBox
So you really want an unusable dropdown control with 500 entries? Really? I mean, really?
And if that's the case what is your confusion? You deal with a collection of 500 element in the same exact manner as a collection of 2 elements.
chaitanya karthikk
,
Ranch Hand
Aug 18, 2010 09:54:09
Sorry I said combo box, its a dropdown box.
I was asking that, can I go for bean length of 500, that was my question. I thought that it is a false idea. Now it is clear. Thank you Mr. Bear. I ll go with beans.
David Newton
,
Author
Aug 18, 2010 10:45:35
A dropdown box with 500 elements is completely unusable.
chaitanya karthikk
,
Ranch Hand
Aug 18, 2010 10:54:57
Unusable means? I did not get you Mr. David. Can you please tell me?
Albareto McKenzie
,
Ranch Hand
Aug 18, 2010 11:22:22
chaitanya karthikk wrote: Unusable means? I did not get you Mr. David. Can you please tell me?
Unusable means that anyone who sees a select box with 500 elements will run away from the application.
chaitanya karthikk
,
Ranch Hand
Aug 18, 2010 11:23:42
I see. Ok, I agree with all of you and thanks for making me understand. I will go with suggest controls. Thank you all.
This is my favorite tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com