Yes, you can access these properties using ognl expressions. The VisitorValidator is there to allow you to encapsulate those validations for the component classes in one spot, but you can do it this way too.
> -----Original Message----- > From: news.gmane.org [mailto:[EMAIL PROTECTED] > Sent: Monday, December 08, 2003 2:11 PM > To: [EMAIL PROTECTED] > Subject: [OS-webwork] Validation of components without using visitor > > > Is there a way to validate components without using the > visitor validator? > > Perhaps something like an ognl style of work with the > properties such as: > > field: component.compInternalProperty > validator: requiredstring > > Then, instead of using visitor and writing a validaiton.xml > for the component, I can simply have a requiredstring > validator validate the component's internal property. > > I have a current dilemma where my model/components classes > are part of another source package/project (my base framework > project which shouldn't contain those validation files), and > my actions are in another package/project. I would prefer to > have the model/component validation file be in the same > package as my action since different actions will be using > the same model but with different validation requirements. > > Of course, I know you can create different validation files > for the different actions, but that doesn't help me with the > current project layout. I wanna be able to be the validation > files for the models somewhere else. I guess my current > workaround is to actually create a package name that is > exactly the same as the one in the framework project (ie. > a.b.c) and then put the validation files in there so that the > resource loader will find it properly. > > Just wondering if you guys might have a better way of working > around this issue. > > Thanks, > Chris > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us > help YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork