[JBoss-user] [JBoss Seam] - Re: Complex validation assign message to specific component.
I have been using the component assigned messages in the following manner: | @IfInvalid(outcome = REDISPLAY) | public String create() { | | if(poCoupling.getSize().getId()==null) { | facesMessages.add(size, new FacesMessage(Size required)); | } | | if(poCoupling.getGrade().getId()==null) { | facesMessages.add(grade, new FacesMessage(Grade required)); | } | | if(!facesMessages.isEmpty()) return null; | | poCouplingDAO.makePersistent(poCoupling); | | return nothing; | } | I added the following method to FacesMessages in order to check to see if I should redisplay the form. | public boolean isEmpty() { | if(facesMessages.size()==0 keyedFacesMessages.size()==0) { | return true; | } else { | return false; | } | } | I need to check for the presence of an id in my objects because they are connected to a dropdown and if the id is null I get an org.hibernate.TransientObjectException. Is there an existing way to do this? If not, how do you feel about adding this funtionality? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3937975#3937975 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3937975 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss Seam] - Re: Complex validation assign message to specific component.
I have been using the component assigned messages in the following manner: | @IfInvalid(outcome = REDISPLAY) | public String create() { | | if(poCoupling.getSize().getId()==null) { | facesMessages.add(size, new FacesMessage(Size required)); | } | | if(poCoupling.getGrade().getId()==null) { | facesMessages.add(grade, new FacesMessage(Grade required)); | } | | if(!facesMessages.isEmpty()) return null; | | poCouplingDAO.makePersistent(poCoupling); | | return nothing; | } | I added the following method to FacesMessages in order to check to see if I should redisplay the form. | public boolean isEmpty() { | if(facesMessages.size()==0 keyedFacesMessages.size()==0) { | return true; | } else { | return false; | } | } | I need to check for the presence of an id in my objects because they are connected to a dropdown and if the id is null I get an org.hibernate.TransientObjectException. Is there an existing way to do this? If not, how do you feel about adding this funtionality? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3937976#3937976 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3937976 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss Seam] - Re: Complex validation assign message to specific component.
That was it. That rocks. It seems to do exactly what I wanted. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3936789#3936789 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3936789 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss Seam] - Re: Complex validation assign message to specific component.
The following is from chapter 3 of the validation chapter of the hibernate docs. I see the @MyBeanConstraint and I wonder what that is. Is that a validation created for by the developer for that class to ensure not more than 45 instances of dog? Can we attach validations for the entire class similiar to the @MyBeanConstraint or do we use MyBeanConstraint? Would this be what you are looking for. I know I have complex validations that span multiple fields and multiple classes. Where should I put that, in controlling logic, and only field level constraints in validations. While the example only shows public property validation, you can also annotate fields of any kind of visibility. @MyBeanConstraint(max=45) | public class Dog { | @AssertTrue private boolean isMale; | @NotNull protected String getName() { ... }; | ... | } | You can also annotate interfaces. Hibernate Validator will check all superclasses and interfaces extended or implemented by a given bean to read the appropriate validator annotations. public interface Named { | @NotNull String getName(); | ... | } | | public class Dog implements Named { | | @AssertTrue private boolean isMale; | | public String getName() { ... }; | | } | The name property will be checked for nullity when the Dog bean is validated. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3936630#3936630 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3936630 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss Seam] - Re: Complex validation assign message to specific component.
Unfortunately, JSF does not make it easy to do this. Look at ValidationInterceptor.addMessageToFacesContext() to see how to do it. What I will do for you is expose this functionality on FacesMessages. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3936654#3936654 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3936654 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss Seam] - Re: Complex validation assign message to specific component.
http://jira.jboss.com/jira/browse/JBSEAM-204 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3936655#3936655 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3936655 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss Seam] - Re: Complex validation assign message to specific component.
Thank you for the prompt reply and proposed solution. I spent all day yesterday trying to get this to work. I figured this would be obvious and trivial like most of the other seam features. I guess it will be when you add this to FacesMessages. Thx again. :) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3936656#3936656 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3936656 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss Seam] - Re: Complex validation assign message to specific component.
Fixed in CVS, please try it out for me. Thanks View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3936699#3936699 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3936699 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss Seam] - Re: Complex validation assign message to specific component.
I checked out the CVS head and saw your modifications. Then I complied my project against the new seam jar and included it with my project I cannot get any messages to appear from either the annotations or using your modification as shown below. Going back to the old jar solves the problem. Not even with h:messages/ | @In(create=true) | FacesMessages facesMessages; | | ... | | facesMessages.add(nameFirst, new FacesMessage(Test Gavin's new component messages)); | I have | h:inputText value=#{member.nameFirst} id=nameFirst / | h:message for=nameFirst/ | in my page. 1. Am I using the method properly? 2. If I do multiple validations and add a message for each one, how can I check the size of FacesMessages in order to decide if I should proceed or redirect back to form? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3936742#3936742 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3936742 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JBoss Seam] - Re: Complex validation assign message to specific component.
Try updating again. Perhaps you got a broken checkout. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3936764#3936764 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3936764 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user