Hi Jing,
the constraints are not mandatory, actually if you look at the RIFE/
Crud samples you'll see this:
https://svn.rifers.org/rife-crud/trunk/samples/java/com/uwyn/rife/
crud/samples/beans/Regular.java
This is a normal POJO without any RIFE-specific information.
However, I think it should be possible to specify constraints for
such classes. I have written a proposal for this here:
http://article.gmane.org/gmane.comp.java.rife.user/1245
http://article.gmane.org/gmane.comp.java.rife.user/1252
What do you think about it?
Would this be what you are looking for?
Best regards,
Geert
On 5-nov-05, at 18:28, Jing Ai wrote:
Hi Geert,
First I want to thank you for your answers to my post about using
toplink with RIFE.
I have another question regarding the constraints defined in my
java object. If I already have my database created before using
RIFE/CRUD, do I still need to specify the schema as constraints in
my java object? I understand that those relationship constraints
have to be specified in order to create the site structure. But for
other constraints, like whether it's a valid data, I think we
should not have to if we choose not, we can ask database to
validate for us and the framework can catch the exceptions and
display the page back ( I know this is not a good design , we
should do as much validation as possible before we pass data to
database call, it's only for prototyping usage of the framework).
based on my testing. If I remove a constraint for a particular
column, this column will not be showed up on the page. Is this by
design? I though we should display the fields based on the private
data fields defined in the java objects. Are you concerning that
developers may put extra data field into the object that not
corresponding to any columns in the table?
Thank you very much in advance
Jing
_______________________________________________
Rife-users mailing list
[email protected]
http://www.uwyn.com/mailman/listinfo/rife-users
--
Geert Bevin Uwyn bvba
"Use what you need" Avenue de Scailmont 34
http://www.uwyn.com 7170 Manage, Belgium
gbevin[remove] at uwyn dot com Tel +32 64 84 80 03
PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9
Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net
_______________________________________________
Rife-users mailing list
[email protected]
http://www.uwyn.com/mailman/listinfo/rife-users