I have finally figured out how to get my DynaValidationForm data in the Action 
class using the get() and set("Name", obj);
 
So I finally got a checkbox set in a DynaValidatorForm object, and I go to my 
JSP page to display its checked status.
Since it is a single checkbox, I figured I would throw this into the JSP page, 
and let it set checked or unchecked depending upon the form value.
 
But as usual, this tag does cannot fine the getCoversCheckbox() because this is 
a DynaValidatorForm bean and not a "real" class file. How does one get this 
value out ina  JSP page, usign the html: tags?
 
Anyone ....
I thought the DynaValidatorForm existed to cut down on the number of "Physical 
class beans" we had to create. I hope this works. 
 
JSP page this chokes.
         <html:checkbox property="coversCheckbox" />
 
 
config.
    <form-bean name="coversBean"
      type="org.apache.struts.validator.DynaValidatorForm">
      <form-property name="coversCheckbox" type="java.lang.Boolean" />
      <form-property name="catalogID" type="java.lang.String" />
    </form-bean>

 
Action
    DynaValidatorForm theForm = (DynaValidatorForm)form;
 
set checkbox on/off from db query
 if (val)
      theForm.set("coversCheckbox", Boolean.TRUE);
    else
      theForm.set("coversCheckbox", Boolean.FALSE);
 
 
 
 
Thanks,

Scott K Purcell | Developer | VERTIS | 
555 Washington Ave. 4th Floor | St. Louis, MO 63101 | 
314.588.0720 Ext:1320 | [EMAIL PROTECTED] | http://www.vertisinc.com 
<http://www.vertisinc.com/>  

Vertis is the premier provider of targeted advertising, media, and 
marketing services that drive consumers to marketers more effectively. 
                                                 

 

Reply via email to