Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to select multiple items in listbox througth code in jsp page

 
yerra reddy gatla
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I was writing a jsp page in which I have to search for the number of records for the given email-id. I have fileds like name,companyname,website and technology. All the fileds are textboxes except technology. Technology field is listbox.

What I am trying to do is when i search a record for a given email-id. If the record exists with the given mail-id,I succeeded to populate the information and I am able to display the data in the corresponding textboxes. But iam unable to do it for technology listbox. there may be multiple technologies(records) for the same mail-id.

I am unable to select the items in the technology listbox after populating the information from database.

can anybody help?

thanks
yerra reddy
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hint #1: If you were writing the page in raw HTML how would you do it?
 
yerra reddy gatla
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your response..

I am writing it in a jsp page only,not in raw html.

After entering email-id and press search, I am able to display name,companyname and website etc in the corresponding textboxes. And I got technologies of that particular email id into an array.

Now I have to select the technologies in the listbox with the technologies i have in the array(means technologies of that particular email id).

I think my problem understood.

anybody help me about how to select technologies in the listbox corresponding to the records in the database.

it's urgent..

thanks
yerra reddy
 
Hema lata
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by yerra reddy gatla:


But iam unable to do it for technology listbox. there may be multiple technologies(records) for the same mail-id.

I am unable to select the items in the technology listbox after populating the information from database.


your question is not clear.

Are you unable to populate data in list box ?
or
You are able to populate data in list box but unable to select data after populating it.

populating data in list box and selecting data from list box are both different requirement. What's is your requirement
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am writing it in a jsp page only,not in raw html.

Bear's hint is still a good one. Ultimately, regardless of what technology you have chosen to write your applicaiton in (JSP, ASP, PHP, etc. ) its end product will be HTML, since that what the browser will render. So, ignoring the fact you will generate your HTML with a JSP, can you write this in HTML?
 
yerra reddy gatla
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Latha,

I am able to get the technologies that are retrieved from database into an array in jsp code.But how to select or highlight those technologies in listbox?
I hope u understood my doubt.If u need any clarifications,plz let me know.
Please try to give solution
bye
reddy
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HTML is often (and should be) a pre-requisite to web development.

If you don't already know the basics of HTML, it might be good idea to step back and spend a day or two learning it.

This chapter in Core Servlets and Java Server Pages is nice because it goes over this from a JSP developer's prospective:
http://pdf.coreservlets.com/CSAJSP-Chapter16.pdf
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic