Hi
Im new in java/swing and im a spanish speaker, so hope you understand
me :)
We are starting a java migration project and we make our first
application to see what problems we encounter, one of this problems is
from building and validation. As anybody researches over internet we
fall into JGoodies.
I like the Validation Framework, i look at the tutorial, but there is a
problem, the binding framework do not apply on our soft, really is the
Java Bean we avoid, our domain is POJO and there are some things that
we avoid, like public empty constructors, we intend to have always
coherent and fully objects, not invalid objects, anyway, we are not
going to use the bindings right now.
Now, its possible to use the validation without the binding ? the docs
says yes, but i dont see how to implement the "Validate on commit" with
just the validation framework, some clue ?
Thanks!
A.U.S. Enrique Ferreyra
IchBin - 17 Mar 2006 15:01 GMT
probity wrote:
> Hi
>
[quoted text clipped - 20 lines]
>
> A.U.S. Enrique Ferreyra
Karsten will probably answer you here but they have a mailing list to
ask questions about that product: users@validation.dev.java.net
https://validation.dev.java.net/servlets/ProjectMailingListList
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
eferreyra - 17 Mar 2006 16:22 GMT
Thanks, i kind of tight of have to join mailing list for tools im not
already user, im just evaluating if this works for me .... :(
Just using google groups for now.
IchBin - 17 Mar 2006 18:54 GMT
> Thanks, i kind of tight of have to join mailing list for tools im not
> already user, im just evaluating if this works for me .... :(
>
> Just using google groups for now.
You do not have to be a user. You only have to have a Java.net account
and that is free. Then just submit you question. I only mention this
because you will get an answer right from the developer, of the products.
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Oliver Wong - 17 Mar 2006 15:59 GMT
> Hi
>
[quoted text clipped - 12 lines]
> coherent and fully objects, not invalid objects, anyway, we are not
> going to use the bindings right now.
I'm not familiar with JGoodies, but Hibernate has a way around this: In
Hibernate, you can make the constructor private, so that client code will
know they shouldn't touch that constructor, but Hibernate will use
reflection to gain access to the constructor for its own internal use.
If JGoodies has a similar capability, maybe you could use private
constructs to gain the benefits of the JGoodies framework without breaking
your design? Otherwise, perhaps you could submit this as a feature request
to the developers of JGoodies?
- Oliver
eferreyra - 17 Mar 2006 16:17 GMT
Thanks we take several weeks to analize ORM tools, as y say we are
migrating applications, we already have a huge Relational model that we
cant change, and we are newbies so we choose iBatis and after using it
we are very happy with this tool.
The legacy soft is in Informix 4gl so hide the SQL is not a good thing
here :)
Thanks !
Karsten Lentzsch - 17 Mar 2006 21:23 GMT
> [...]
> I like the Validation Framework, i look at the tutorial, but there is a
> problem, the binding framework do not apply on our soft, really is the
> Java Bean we avoid, our domain is POJO and there are some things that
> we avoid, like public empty constructors, we intend to have always
> coherent and fully objects, not invalid objects, [...]
The JGoodies Binding can work with POJOs. It does not require
to work with Java Beans, or even with Java Bean-like objects.
More generally, it can bind every observable read-write target,
where the read/write/observable are all optional. The Binding
has been designed around the ValueModel interface that describes
the latter.
Anyway, there are good reasons to not use an automatic databinding.
> Now, its possible to use the validation without the binding ? the docs
> says yes, but i dont see how to implement the "Validate on commit" with
> just the validation framework, some clue ?
Yes, the JGoodies Validation can be used without the Binding.
The core library does not refer to any other JGoodies library.
In the Validation tutorial, the Binding just helped me save
boilerplate code necessary to bind the UI components to the
example domain values. And the Binding makes it quite easy
to validate on key typed, and focus lost.
If you want to validate on commit, here's one approach.
First commit the GUI state to your domain POJO properties;
then have a Validator for each domain object that you
want to validate, or have a Validator for the whole
domain object graph; then invoke the validator's #validate
method to get a ValidationResult. You can display this
result - if any - in a modal dialog. Or you can set
the result in a ValidationResultModel that will update
validation result views bound to that model.
Recently I added a Validation issue where you can track
the progress of "Add an example that doesn't use the Binding":
https://validation.dev.java.net/issues/show_bug.cgi?id=16
Please post further questions to the Validation user mailing list.
Kind regards,
Karsten Lentzsch
eferreyra - 18 Mar 2006 15:07 GMT
ok, i was reading and consuming raw javadocs and i like the aproach, i
mean for core validation, i need extend this, and sure make some link
api to inputverifiers and abstract clases for whole forms dialogs.
So i register to Java.net and post some issues there.
Thanks Karsten, nice work.