OK, I will test it with nonstatic inner classes.
The reason I used static inner classes is that I
simply always use static inner classes when the
instancec of them do not need access to the outer
instace. But I will try to use non-static inner
classes. The small memory overhead is it worth,
if the sources become cleaner.
--
gR
----- Original Message -----
From: "Laine Donlan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 13, 2001 3:24 PM
Subject: RE: Nested classes
I have had no problem using inner classes with struts, is there a reason
your inner class is static?
As long as the inner classes are public Struts should be able to get to
the properties with reflection.
Laine
-----Original Message-----
From: Gregor Rayman [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 13, 2001 6:54 AM
To: [EMAIL PROTECTED]
Subject: Nested classes
Hi all,
I am using an ActionForm with a collection of Rows which should be
editable.
My ActionForm contains a property getRow(int i) which returns a bean
with the row's properties.
Everything work perfectly, when the class returned from getRow(int) is
a standalone class. But as soon as I make this class a nested class
of my ActionForm, struts complains, if cannot find property setters:
This works:
public class MyForm ... {
public MyRow getRow(int i) {
...;
}
}
public class MyRow {
public setProperty(String value) {
...;
}
}
This does not: (cannot find property setter for row[0].property)
public class MyForm ... {
public MyRow getRow(int i) {
...;
}
public static class MyRow {
public setProperty(String value) {
...;
}
}
I'd really like to use nested classes. Is there a way?
--
gR