On 11/24/05, Kanuri, Chand <[EMAIL PROTECTED]> wrote: > my dropdown is populating properly but i couln't populate "name" in my > itembean. > > > <option value='<bean:write name="ItemType" property="code"/>'> > > <bean:write name="ItemType" property="name" /> > > here the value "code" is populated to the field "code" in my item bean. > how can i populated "name". > how can i link the both as the "name" should be populated based on the > selected "code".
This falls under "Don't store derived data." When the form is submitted, you have the 'code' in the form bean. Go back to "WebConstants.getItemTypeListName()" to get the 'name'. That's why I use Maps for these things, then displaying the code and name on a confirmation screen becomes: [untested] <c:out value="${formBean.item.code}"/> <c:out value="${itemNames[formBean.item.code]}"/> -- Wendy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]