Forgot to mention this in my last message. You might want to look at the
@StrictBinding<http://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/stripes/action/StrictBinding.html>annotation
to control what properties are allowed to bind into your model.
I'm updating the Javadocs right now to reflect this: the preferred method to
enable binding into a property is simply to apply @Validate to the property,
even if it is empty. For example:

@StrictBinding
public class UserProfileActionBean extends BaseActionBean {
@Validate(required=true)
@ValidateNestedProperties({
@Validate(field="firstName", required=true),
@Validate(field="middleName"),
@Validate(field="lastName", required=true)
})
private User user;
...
}

Anything with @Validate on it will allow binding. In this example, that's
the User itself and its firstName, middleName and lastName properties. Even
though user.middleName isn't being validated in any way, I added @Validate
just to enable binding on the property. Anything without a @Validate on it
-- say, a Set<Role> named user.roles -- will not allow binding.

-Ben

On Fri, Feb 27, 2009 at 7:58 AM, Ben Gunter <[email protected]> wrote:

> Very good, honest assessment. Thanks, Christian.
>
> If anyone out there would like to volunteer to bring the documentation on
> the web site up to date, we would be more than happy to have the help.
>
> -Ben
>
>
> On Fri, Feb 27, 2009 at 12:56 AM, Christian Nelson <[email protected]>wrote:
>
>> Fellow Stripes users,
>>
>> I recently wrote up my experience using Stripes for the first time on a
>> production system.  I'm pretty sure there's nothing there that most of the
>> people on this list doesn't already know, but it might be an interesting
>> read regardless.  Check it out if you're interested:
>>
>> http://blog.carbonfive.com/2009/02/java/stripes-a-succesful-first-project
>>
>> Thanks again for a great framework...
>> Christian
>>
>
>
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to