This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi i am absolutely new to the Struts framework... what i want is a basic application showing the values in the Combo from database. I have made the following code for the jsp page:- <html:select property="status"> <html ption collection = "categoryList" /> </html:select> Now i am also coding the setter and getter method for property "status" which returns the String in the form class. what changes i have to make in the action class to make it return the collection. Any help will be appreciated in advance. Thanking you Mitesh
Hi, Here is a sample. <html:select property="teamParentId" > <html ptions name="idList" labelName="labelList"/> </html:select> Here, teamParentId is a form variable. the Form has a getter and setter for this. idList and labelList are collection that is put into pageContext. You can bring the collection into JSP through request scope / sessions scope. In JSP you can set them in pageContext Hope this help Lakshman
Joined: Aug 29, 2002
Hi Lakshman, Thanks for the reply.I am still having a small doubt. Now <html:select property="teamParentId" > will have the corresponding getter/setter methods. But i wanted to know where should i set the idList and labelList for the request scope? Suppose i have a combo to display the months can you please suggest me how shld i prepare the option tag for the same? Thanks for the help Mitesh