<div dir="ltr">It worked very well on textFields. I'll be doing more validation tests with other field types and controls<div><br></div><div>thank very much!<br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 17, 2017 at 2:48 PM, <span dir="ltr"><<a href="mailto:beanvalidation-dev-request@lists.jboss.org" target="_blank">beanvalidation-dev-request@lists.jboss.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send beanvalidation-dev mailing list submissions to<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.<wbr>jboss.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/<wbr>beanvalidation-dev</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:beanvalidation-dev-request@lists.jboss.org">beanvalidation-dev-request@<wbr>lists.jboss.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:beanvalidation-dev-owner@lists.jboss.org">beanvalidation-dev-owner@<wbr>lists.jboss.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of beanvalidation-dev digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Bean Validation and JavaFX (Rafael A P Nascimento)<br>
2. Re: Bean Validation and JavaFX (Guillaume Smet)<br>
3. Re: Bean Validation and JavaFX (Hendrik Ebbers)<br>
<br>
<br>
------------------------------<wbr>------------------------------<wbr>----------<br>
<br>
Message: 1<br>
Date: Fri, 17 Nov 2017 11:05:49 -0200<br>
From: Rafael A P Nascimento <<a href="mailto:rfx.go.on@gmail.com">rfx.go.on@gmail.com</a>><br>
Subject: [bv-dev] Bean Validation and JavaFX<br>
To: <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.<wbr>jboss.org</a><br>
Message-ID:<br>
<<a href="mailto:CAHT-tEgJt7jA4ifcR6OqhJ4_3ihuTy%2Bkt-FiD%2B1eboRT5A4d4w@mail.gmail.com">CAHT-tEgJt7jA4ifcR6OqhJ4_<wbr>3ihuTy+kt-FiD+1eboRT5A4d4w@<wbr>mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi all!<br>
How do I integrate Bean Validation with JavaFX?<br>
<br>
I would like to make a *bidirectional bind* between the entity field and<br>
the javaFx controllers. In this scenario how could I validate fields using<br>
Bean Validation?<br>
<br>
Ex:<br>
public class Category{<br>
@NotNull(message = "Name can't be null)<br>
@Size(max = 255, min=3, message = "Size name must be between 255 and 3")<br>
private StringProperty name = new SimpleStringProperty();<br>
//... getters & setters<br>
}<br>
<br>
//some fx Controller...<br>
public class CategoryController{<br>
@FXML<br>
private TextField textFiledCategoryName;<br>
private Category category;<br>
<br>
@FXML<br>
public void initialize() {<br>
category = new Category();<br>
<br>
textFiledCategoryName.<wbr>textProperty().<wbr>bindBidirectional(category.<wbr>nameProperty());<br>
<br>
}<br>
//other code...<br>
}<br>
<br>
thanks!<br>
--<br>
*Rafael A P Nascimento *<br>
<br>
*<a href="http://finalexception.blogspot.com" rel="noreferrer" target="_blank">finalexception.blogspot.com</a> <<a href="http://finalexception.blogspot.com.br" rel="noreferrer" target="_blank">http://finalexception.<wbr>blogspot.com.br</a>>*<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20171117/c0a33721/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.jboss.org/<wbr>pipermail/beanvalidation-dev/<wbr>attachments/20171117/c0a33721/<wbr>attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Fri, 17 Nov 2017 14:40:27 +0100<br>
From: Guillaume Smet <<a href="mailto:guillaume.smet@gmail.com">guillaume.smet@gmail.com</a>><br>
Subject: Re: [bv-dev] Bean Validation and JavaFX<br>
To: beanvalidation-dev List <<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.<wbr>jboss.org</a>><br>
Message-ID:<br>
<<a href="mailto:CALt0%2Bo9U6yG7dq_TH9MGwOasJvsYyk3Sz6K4vnRVYK7o90p19A@mail.gmail.com">CALt0+o9U6yG7dq_<wbr>TH9MGwOasJvsYyk3Sz6K4vnRVYK7o9<wbr>0p19A@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi Rafael,<br>
<br>
Hendrik contributed a few JavaFX examples here:<br>
<a href="https://github.com/hibernate/hibernate-demos/tree/master/hibernate-validator/javafx-validation-example" rel="noreferrer" target="_blank">https://github.com/hibernate/<wbr>hibernate-demos/tree/master/<wbr>hibernate-validator/javafx-<wbr>validation-example</a><br>
.<br>
<br>
I think they will probably help you getting it working.<br>
<br>
--<br>
Guillaume<br>
<br>
On Fri, Nov 17, 2017 at 2:05 PM, Rafael A P Nascimento <<a href="mailto:rfx.go.on@gmail.com">rfx.go.on@gmail.com</a>><br>
wrote:<br>
<br>
> Hi all!<br>
> How do I integrate Bean Validation with JavaFX?<br>
><br>
> I would like to make a *bidirectional bind* between the entity field and<br>
> the javaFx controllers. In this scenario how could I validate fields using<br>
> Bean Validation?<br>
><br>
> Ex:<br>
> public class Category{<br>
> @NotNull(message = "Name can't be null)<br>
> @Size(max = 255, min=3, message = "Size name must be between 255 and<br>
> 3")<br>
> private StringProperty name = new SimpleStringProperty();<br>
> //... getters & setters<br>
> }<br>
><br>
> //some fx Controller...<br>
> public class CategoryController{<br>
> @FXML<br>
> private TextField textFiledCategoryName;<br>
> private Category category;<br>
><br>
> @FXML<br>
> public void initialize() {<br>
> category = new Category();<br>
> textFiledCategoryName.<wbr>textProperty().<wbr>bindBidirectional(category.<wbr>nameProperty());<br>
><br>
> }<br>
> //other code...<br>
> }<br>
><br>
> thanks!<br>
> --<br>
> *Rafael A P Nascimento *<br>
><br>
> *<a href="http://finalexception.blogspot.com" rel="noreferrer" target="_blank">finalexception.blogspot.com</a> <<a href="http://finalexception.blogspot.com.br" rel="noreferrer" target="_blank">http://finalexception.<wbr>blogspot.com.br</a>>*<br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> beanvalidation-dev mailing list<br>
> <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.<wbr>jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/<wbr>beanvalidation-dev</a><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20171117/02af211b/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.jboss.org/<wbr>pipermail/beanvalidation-dev/<wbr>attachments/20171117/02af211b/<wbr>attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Fri, 17 Nov 2017 16:10:18 +0100<br>
From: Hendrik Ebbers <<a href="mailto:hendrik.ebbers@me.com">hendrik.ebbers@me.com</a>><br>
Subject: Re: [bv-dev] Bean Validation and JavaFX<br>
To: beanvalidation-dev List <<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.<wbr>jboss.org</a>><br>
Message-ID: <<a href="mailto:D586A1DE-05C9-47D7-9BA9-DC5C327242F5@me.com">D586A1DE-05C9-47D7-9BA9-<wbr>DC5C327242F5@me.com</a>><br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
Hi Rafael,<br>
please ping me on Monday if the example do not help. Than we can have a look :)<br>
<br>
Von meinem iPhone gesendet<br>
<br>
> Am 17.11.2017 um 14:40 schrieb Guillaume Smet <<a href="mailto:guillaume.smet@gmail.com">guillaume.smet@gmail.com</a>>:<br>
><br>
> Hi Rafael,<br>
><br>
> Hendrik contributed a few JavaFX examples here: <a href="https://github.com/hibernate/hibernate-demos/tree/master/hibernate-validator/javafx-validation-example" rel="noreferrer" target="_blank">https://github.com/hibernate/<wbr>hibernate-demos/tree/master/<wbr>hibernate-validator/javafx-<wbr>validation-example</a> .<br>
><br>
> I think they will probably help you getting it working.<br>
><br>
> --<br>
> Guillaume<br>
><br>
>> On Fri, Nov 17, 2017 at 2:05 PM, Rafael A P Nascimento <<a href="mailto:rfx.go.on@gmail.com">rfx.go.on@gmail.com</a>> wrote:<br>
>> Hi all!<br>
>> How do I integrate Bean Validation with JavaFX?<br>
>><br>
>> I would like to make a bidirectional bind between the entity field and the javaFx controllers. In this scenario how could I validate fields using Bean Validation?<br>
>><br>
>> Ex:<br>
>> public class Category{<br>
>> @NotNull(message = "Name can't be null)<br>
>> @Size(max = 255, min=3, message = "Size name must be between 255 and 3")<br>
>> private StringProperty name = new SimpleStringProperty();<br>
>> //... getters & setters<br>
>> }<br>
>><br>
>> //some fx Controller...<br>
>> public class CategoryController{<br>
>> @FXML<br>
>> private TextField textFiledCategoryName;<br>
>> private Category category;<br>
>><br>
>> @FXML<br>
>> public void initialize() {<br>
>> category = new Category();<br>
>> textFiledCategoryName.<wbr>textProperty().<wbr>bindBidirectional(category.<wbr>nameProperty());<br>
>> }<br>
>> //other code...<br>
>> }<br>
>><br>
>> thanks!<br>
>> --<br>
>> Rafael A P Nascimento<br>
>> <a href="http://finalexception.blogspot.com" rel="noreferrer" target="_blank">finalexception.blogspot.com</a><br>
>><br>
>><br>
>> ______________________________<wbr>_________________<br>
>> beanvalidation-dev mailing list<br>
>> <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.<wbr>jboss.org</a><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/<wbr>beanvalidation-dev</a><br>
><br>
> ______________________________<wbr>_________________<br>
> beanvalidation-dev mailing list<br>
> <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.<wbr>jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/<wbr>beanvalidation-dev</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20171117/5b1984d8/attachment.html" rel="noreferrer" target="_blank">http://lists.jboss.org/<wbr>pipermail/beanvalidation-dev/<wbr>attachments/20171117/5b1984d8/<wbr>attachment.html</a><br>
<br>
------------------------------<br>
<br>
______________________________<wbr>_________________<br>
beanvalidation-dev mailing list<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.<wbr>jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/<wbr>beanvalidation-dev</a><br>
<br>
End of beanvalidation-dev Digest, Vol 43, Issue 1<br>
******************************<wbr>*******************<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><b><i>Rafael A P Nascimento </i></b><div><b><i><a href="http://finalexception.blogspot.com.br" target="_blank">finalexception.blogspot.com</a><br></i></b><div><br></div></div></div></div>
</div></div></div>