Thanks Mike,

That is what I said. Its got to work, or why have it. Anyway, the error, (past 
my tail command by now) was the tag could not find a getter for the 
coversCheckbox element. And of course it can't, there is none. There needs to 
be a way to let the html: element know that this is a DynaValidationForm and 
now a normal bean. At least I would think so.

And yes, I double checked all my syntax before I posted. Even to double check 
myself, I just created a simple CheckboxBean, put my value from the Dyna into 
there, and called the new one in the JSP page, and that works. 

So that tells me I am either missing a step, or it does not work that way.

Anyone else?

Scott

-----Original Message-----
From: Nidel, Mike [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 30, 2005 12:16 PM
To: Struts Users Mailing List
Subject: RE: DynaValidationForm Display In JSP?


Wow. I'm stumped. As I said, I don't have firsthand experience
with DynaForms...

Only thing I can think of is, did you set the input to your
JSP correctly in the struts-config?

Not to sound overly optimistic, but it's GOT to work. It uses
the same functionality on the sending as it does when setting
up the JSP, it's not like it's a separate (difficult) problem
to solve. Maybe double-check your get() method to make sure it
matches your set() as far as return type etc.?

What exactly is the error you get when the JSP blows up?

> -----Original Message-----
> From: Scott Purcell [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 30, 2005 1:04 PM
> To: user@struts.apache.org
> Subject: DynaValidationForm Display In JSP?
> 
> 
> 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. 
                                                 

 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to