The value fetched from select property is null.
The code for jsp is..
<nested:select property="role.roleSID">
<logic:iterate name="roleList" id="roleListId">
<html:option
value="<bean:write name='roleListId' property='roleSID'/>">
<bean:write name='roleListId' property='roleName' />
</html:option>
</logic:iterate>
</nested:select>
And the code for Action class is..
Long roleSID = userForm.getRole().getRoleSID();
The listbox is correctly populated with the expected values. But while fetching the selected value, the null is returned.
Can you tell me where i’ve gone wrong
I tried another way which gave me expected result.
The jsp content is ..
And the action content is ..
And the UserForm is a form bean which contains roleSID attribute with getters and setters.
The roleList contains collection of Role objects which in turn containd roleName, roleSId attributes. UserForm also contains Role bean as nested.