So, if the action properties are pushed onto the stack via OGNL, then what from below would be preventing me from seeing the values that should be there? Displaying a list worked just find, the Dept object seems to be unavailable. I have getter and setter, according to documentation, I shouldn't have to do anything else. According to examples, what I show below would seem to be correct. Appreciate the help.
Thanks, shadman shadman wrote: > > I can't seem to get values retrieved from the DB to populate on the form. > The list jsp and retrieving from DB work great, but values don't seem to > make it to the jsp. I pass the ID into the action method, retrieve the > record, and want to display the results. > > struts.xml: > <action name="findDeptId" class="actions.DepartmentAction" > method="findById"> > <result name="input">jsps/errors.jsp</result> > <result name="success">jsps/edit_dept.jsp</result> > <interceptor-ref name="crudStack"/> > </action> > > DepartmentAction: > public String findById () throws Exception { > this.dept = getDaoManager().getDeptDao().findById(this.getId()); > return SUCCESS; > } > > Method fills dept object. also, getDept() & setDept() in action. > > edit_dept.jsp: > <s:form action="save" validate="true" > > <table cellspacing="0" cellpadding="0" border="0"> > <tr> > <td align="right">ID:</td> > <td> > <s:property value="dept.deptId" /> > <s:hidden name="dept.deptId" value="dept.deptName" /> > </td> > </tr><tr> > <s:textfield name="dept.deptName" label="Dept Name" > value="dept.deptName" size="10" /> > </tr> > </table> > </s:form> > > I have to be doing something simple wrong, I just don't see it. > shadman > -- View this message in context: http://www.nabble.com/-S2--form-population-problem-tf3792422.html#a10737881 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]