*
The moose likes JSP and the fly likes how to select multiple items in listbox  througth code in jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "how to select multiple items in listbox  througth code in jsp page" Watch "how to select multiple items in listbox  througth code in jsp page" New topic
Author

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

yerra reddy gatla
Greenhorn

Joined: Apr 25, 2006
Posts: 25
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

Joined: Jan 10, 2002
Posts: 60071
    
  65

Hint #1: If you were writing the page in raw HTML how would you do it?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
yerra reddy gatla
Greenhorn

Joined: Apr 25, 2006
Posts: 25
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

Joined: Jan 24, 2005
Posts: 34
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

Joined: Apr 14, 2004
Posts: 10336


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?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
yerra reddy gatla
Greenhorn

Joined: Apr 25, 2006
Posts: 25
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

Joined: Dec 11, 2004
Posts: 13410

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


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how to select multiple items in listbox througth code in jsp page
 
Similar Threads
Need Script
Help !! Problem with Model -2 Framework
select multiple dataitem
Scolling the List to specific place when key is pressed
simple doubt but getting headache