Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Map with html:optionCollection

 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i want to render combo box item to selected item .


combo box has map value.. i.e key & value.

for examle 18= Agent
20= Contractor
22= Employee
24= Manager

If i select 20= Contractor in combo box...

and click save button and logout and again i login in to apllication ..
the combo box must display 20 contractor .
But it is displaying 18=Agent.

20 18=Agent

if i change code in the following way :

<td>
${c.cucl}
<html:select property = "cucl" name = "customerForm">
<html ptionsCollection name = "customerForm" property="custGroupsMap" value="cucl" label="value" />
</html:select></td>


i am getting following exception:


javax.servlet.ServletException: No getter method available for property 018 for bean under name 018=Agent


Please help me

Thanks
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
set the value using the setter method for "cucl"

and then try..
 
This is my favorite tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic