Hmh, I just tried that out.
I have a Book.java Bean with title, author, etc.
Than I have a BookForm.java ActionForm that has a Book.
Now to use a form to set the title of the book my BookForm still needs to
have a setTitle() method. So, I still end writing (and maintaining) all
those getters and setters twice?

Stephan


-------Original-Nachricht-------

Von: Struts Developers List
Datum: Mittwoch, 3. April 2002 14:54:41
An: 'Struts Developers List'
Betreff: RE: Use of ActionForm:

Hi, Stephan:

We typically keep an instance of our bean in the ActionForm and provide an
accessor method for the bean. In our JSPs, we simply reference the bean
properties via the accessor method:

fooBean.date
fooBean.name




Chris

-----Original Message-----
From: Stephan Wiesner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 6:12 AM
To: [EMAIL PROTECTED]
Subject: Use of ActionForm:


If I got it right I normally define an ActionFormBean for every Bean of mine
But it is basically just the same, just without logic. I don't want my
Model Beans to extend a Strut class, though. So I end coding the same getter
and setter methods in two classes.
If ActionForm were an Interface I could define a class extending my normal
Bean and implementing it.

I suppose I don't see something here, so can anybody enlighten me?

Stephan

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

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


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

Reply via email to