[jboss-user] [JBoss Seam] - Re: Validation Documentation Incomplete
File a JIRA, we can link to the validator docs in the manual I guess. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4129919#4129919 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4129919 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation patter - Invalid State
Yes s:validateAll only adds the hibernate validator if there is no other validator specified. Also nest s:validate and it will work. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4129958#4129958 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4129958 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation Failed exception
I had a similar problem, and got the same errormessage. my newbie error was, that I have used the hibernate @NotEmpty annoation on my entity, and in my inputtext-tag I forgot to use required=true then I was wondering, why I got to the errorpage eventhough no validation message was shown. for details read petes comments in: http://www.jboss.com/index.html?module=bbop=viewtopict=127793 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4128403#4128403 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4128403 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation patter - Invalid State
I also read and can confirm the think that empty field that has pattern annotation and is not required will cause an exception when new object is created. Can I somehow avoid to it? I assume that value cannot be evaluated? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4128157#4128157 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4128157 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation patter - Invalid State
nope entityManager.merge() did not work. So it seems that @Pattern validation is ignored in JSF live cycle and applied at backend logic? I was expecting that seem handles this? Or what could be wrong? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4128052#4128052 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4128052 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation patter - Invalid State
I think I got it. if I will use | s:validateAll | h:inputText ... |f:validateLength minimum=0 maximum=100 / | /h:inputText | /s:validateAll | It will break hibernate validation. You can assume that f:validateLength does not need to be there, but what other validators, are they valid with hibernate validation? Tomas View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4128122#4128122 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4128122 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation messages are inconsistent
This is probably because the required=true means that it hits JSF validation first and therefore the message displayed (and the key you want to change) is the JSF one. Probably the javax.faces.component.UIInput.REQUIRED but do look it up somewhere. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4122894#4122894 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4122894 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation: @NotNull required=true
As of JSF 1.2, the h:inputText control has requiredMessage attribute that you can customize for each input field's required error message. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4120709#4120709 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4120709 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation annotations on private fields
No, they should work just fine. Maybe post some details of your problem? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4119675#4119675 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4119675 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation annotations on private fields
Well, if I annotate a private field with, say, @Length(max=50) and validate a form, invalid data doesn't get flagged. But when I move the same annotation to the corresponding property getter, validation works perfectly. Hmm... I wonder if it has anything to do with my naming convention for private fields. I use an m_ prefix. Maybe this prevents Seam from determining the property name. Is there a Seam equivalent to Hibernate's NamingStrategy interface, so I could tell it how to translate field names to property names? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4119704#4119704 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4119704 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation annotations on private fields
You would need to ask on the Hibernate Validator forum. Seam just gives hibernate validator a property name and a value and asks it to validate them. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4119752#4119752 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4119752 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation annotations on private fields
Confirmed, it is the m_ prefix on the private field names that is throwing it off. If I get rid of it, validation works fine. I'll just annotate the getter methods. Not a big deal. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4119774#4119774 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4119774 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation Failed exception
You are attempting to merge an invalid entity as specified by the hibernate validator annotations View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4113896#4113896 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4113896 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation messages with Seam 2.0 and Richfaces 3.1.0
This was fixed in CR2 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4095013#4095013 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4095013 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation facesmessages not showing up.
fixed in CR2, Thanks! View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4089495#4089495 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4089495 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation facesmessages not showing up.
Sorry I haven't checked the forum for awhile, what's the status of this issue? Has anyone filed a JIRA issue? I will do it if noone has filed it yet (its my first time) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4089055#4089055 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4089055 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation facesmessages not showing up.
Issue created: http://jira.jboss.org/jira/browse/JBSEAM-1975 Hope I did it right. Thanks. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4089061#4089061 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4089061 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation messages with Seam 2.0 and Richfaces 3.1.0
Interestingly, this only seems to affect s:validateAll... if I put s:validate/ within a component, it works. So, to summarise: This doesn't work: h:form | f:facet name=afterInvalidField | h:panelGroupbr/s:message//h:panelGroup | /f:facet | f:facet name=aroundInvalidField | s:span styleClass=error/ | /f:facet | s:validateAll | | rich:tabPanel contentClass=tabbedpanel switchType=client selectedTab=#{customerManager.selectedTab} | rich:tab label=General name=General | h:outputText value=First name: / | s:decorate id=firstname | h:inputText label=Customer first name value=#{customer.firstName} required=true | a4j:support event=onblur reRender=firstname ajaxSingle=true/ | /h:inputText | /s:decorate | /rich:tab | /rich:tabPanel | /s:validateAll | | /h:form This does: | h:form | f:facet name=afterInvalidField | h:panelGroupbr/s:message//h:panelGroup | /f:facet | f:facet name=aroundInvalidField | s:span styleClass=error/ | /f:facet | s:validateAll | | rich:tabPanel contentClass=tabbedpanel switchType=client selectedTab=#{customerManager.selectedTab} | rich:tab label=General name=General | h:outputText value=First name: / | s:decorate id=firstname | h:inputText label=Customer first name value=#{customer.firstName} required=true | a4j:support event=onblur reRender=firstname ajaxSingle=true/ | s:validate/ | /h:inputText | /s:decorate | /rich:tab | /rich:tabPanel | /s:validateAll | /h:form | Which leads me to suspect that this is in fact a bug.. although whether it's RichFaces or Seam I have no clue ;-) cheers phil View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4086213#4086213 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4086213 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation messages with Seam 2.0 and Richfaces 3.1.0
I have not tried it but this may help. http://in.relation.to/Bloggers/SeamValidation I don't think it has anything to do with RichFaces (at least not according to the blog post) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4086237#4086237 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4086237 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation facesmessages not showing up.
Yes, I can reproduce against CVS. Please file a jira issue. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4076055#4076055 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4076055 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation and persisting
But how to do with this situation: there is no @Begin annotated method. Page is displayed and when clicking the button actionlistener is called. public String save() { } How to do in this situation ? Thanks Mila View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074281#4074281 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074281 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation and persisting
Easy: Don't modify your data. If you do not have a conversation, then the entity instances have to be loaded by you from the database and it is you who are modifying these instances. Do your validation before you modify the instances. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074284#4074284 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074284 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation and persisting
If you want more specific help, as always, post your code. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074285#4074285 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074285 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation and persisting
There is code | @Name(requestAction) | @Stateful | @Restrict(#{identity.loggedIn}) | public class RequestAction implements RequestActionLocal, Serializable { | | | | | @ValidatedMethod(formName = editForm, validators = { @CustomValidator(validatorClass = RequestSaveValidator.class, mapping = { category, requestType, | request }) }) | @End(beforeRedirect = true) | public String update() { | log.info(adding the request #0, request); | em.refresh(category); | em.refresh(requestType); | | if (!requestType.getRequests().contains(request)) { | requestType.getRequests().add(request); | } | request.setCategory(category); | request.setAuthor(loggedUser); | request.setCreated(new Date()); | request.setRequestType(requestType); | | em.persist(request); | em.flush(); | return DefaultActions.EDITED; | } | | @Begin(join = true, flushMode=FlushModeType.MANUAL) | public String loadDetail() { | edit(); | return DefaultActions.LOADED; | } | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074291#4074291 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074291 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation and persisting
I remove the resfresh, but problem is,when validation failed some attributes are set and persisted to the entity Requst. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074300#4074300 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074300 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation and persisting
And? All I can see is that you probably do not know how refresh() is used properly (in 5 years of Hibernate I never needed it). View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074297#4074297 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074297 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation and persisting
Then that's the problem of how @ValidatedMethod works, which I guess is something you wrote. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074337#4074337 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074337 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation facesmessages not showing up.
anyone can help? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074469#4074469 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074469 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation facesmessages not showing up.
try putting the decorate AROUND the in/out elements not as an empty tag View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074055#4074055 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074055 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation facesmessages not showing up.
oh wow, that was it! thanks! but shouldn't it work both ways? it worked in Seam 1.2, did the team changed something on it and its not recommend to not wrap s:decorate tag around input tags? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074067#4074067 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074067 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation facesmessages not showing up.
does anyone from the dev team has any input in this? will we be able to use s:decorate for=website/ (not wrap around inputs) in the final release for seam 2.0? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074123#4074123 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074123 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation facesmessages not showing up.
h come to think I never used the 'for' attribute. Always the wrapped version.Personally, i'd not use the 'for' in this case, but that is my opinoin View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074130#4074130 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074130 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation and persisting
Throw an exception which causes a roll back, or, IMO a better option is to use the manual flush mode pattern./ View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074168#4074168 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074168 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation and persisting
Where can I read some about manual flushing ? Only set @Begin(flushMode) and em.flush() ? Or something special ? Thanks Mila View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074175#4074175 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074175 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation and persisting
AS you write. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074184#4074184 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074184 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation facesmessages not showing up.
sorry to bump this up... but can someone from the development team comment on having s:decorate for= or not for Seam 2.0? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4074234#4074234 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074234 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation
Thank you. I seem to like approach B. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4073795#4073795 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4073795 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation
Or D, use surrogate keys and don't let the user edit the PK. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4073802#4073802 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4073802 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation
I see three options: A) To catch the Exception in your code and then show the respective message. | public void create(Object entity) throws MyDuplicatedException { | try { | em.persist(entity); | em.flush(); | } catch (EntityExistsException e) { | throw new MyDuplicatedException(); | } | } | | B) To use @Validator and @Name enabling a JSF Validator as Seam component. | @Name(equalValidator) | @Validator | public class EqualValidator implements javax.faces.validator.Validator { | ... | public void validate(FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException { | ... | } | } | | | -- | | h:inputSecret id=confirmPassword value=#{user.confirmPassword} required=true |maxlength=40 redisplay=true tabindex=3 styleClass=input | f:validator validatorId=equalValidator/ | /h:inputSecret | | C) To implement custom Hibernate Validator (it will work with s:validate). | public class MyEmailValidator implements ValidatorMyEmail { | ... | public boolean isValid(Object value) {... | } | ... | } | - | | @Documented | @ValidatorClass(EmailValidator.class) | @Target({METHOD, FIELD}) | @Retention(RUNTIME) | public @interface MyEmail { | String message() default {validator.email}; | } | | | | . | @Entity | public class User { | ... | @MyEmail | private String email; | ... | } | | I used A) and B) and C) in different scenarios, but at the moment I din't use C) to access database querying for some data. Maybe you can try making MyEmail class a Seam component (which will allows you to access SMPC). HTH. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4073378#4073378 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4073378 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation selectManyListbox
I was able to trace the calls until I found where the error was coming from. Basically it comes because the entityManager is null, and it tries to create one by name. Since I didn't have entityManager defined in my components.xml it never created one. Since you mentioned that Seam 2.0 had redone this area, I decided to upgrade before adding stuff to my components.xml since it seemed weird that it would have an entitymanager available for the rest of the stuff except for this (but I think I know why now) So I updated to Seam 2.0 and when I run it now I get this error: | java.lang.NullPointerException | at org.jboss.seam.framework.EntityIdentifier.init(EntityIdentifier.java:15) | at org.jboss.seam.ui.converter.EntityConverterStore.put(EntityConverterStore.java:60) | at org.jboss.seam.ui.converter.EntityConverter.getAsString(EntityConverter.java:69) | at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getFormattedValue(HtmlBasicRenderer.java:469) | at com.sun.faces.renderkit.html_basic.SelectManyCheckboxListRenderer.renderOption(SelectManyCheckboxListRenderer.java:249) | at com.sun.faces.renderkit.html_basic.SelectManyCheckboxListRenderer.encodeEnd(SelectManyCheckboxListRenderer.java:146) | at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:833) | at javax.faces.component.UIComponent.encodeAll(UIComponent.java:896) | at javax.faces.render.Renderer.encodeChildren(Renderer.java:137) | at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809) | which leads me to believe it's the same issue. There is no entityManager. I didn't debug, but since it wasn't working before I wasn't expecting it to now. So I added the following to the components.xml: | persistence:managed-persistence-context name=entityManager | auto-create=true | persistence-unit-jndi-name=java:/numinsPersistenceUnit / | Now I get: | org.hibernate.TransientObjectException: The instance was not associated with this session | at org.hibernate.impl.SessionImpl.getIdentifier(SessionImpl.java:1375) | at org.hibernate.search.impl.FullTextSessionImpl.getIdentifier(FullTextSessionImpl.java:331) | at org.jboss.seam.persistence.HibernateSessionProxy.getIdentifier(HibernateSessionProxy.java:205) | at org.jboss.seam.persistence.HibernatePersistenceProvider.getId(HibernatePersistenceProvider.java:114) | at org.jboss.seam.framework.EntityIdentifier.init(EntityIdentifier.java:15) | at org.jboss.seam.ui.converter.EntityConverterStore.put(EntityConverterStore.java:60) | With this I think that the original object was loaded with something else and that another entitymanager is trying to use it now. Is this because of the whole Seam managed thing? I don't have my entities defined in components.xml. I just have the @Entity annotation in the class itself. I went ahed and changed the @Name to something else so it wouldn't collide and added it to the components.xml to try it out. So I added: | framework:entity-home name=role | entity-class=com.numbersinsight.data.security.Role |scope=session |auto-create=true | framework:id#{roleId}/framework:id | /framework:entity-home | And the error message is: | Caused by: java.lang.IllegalArgumentException: Can not set com.numbersinsight.data.security.Role field com.numbersinsight.admin.action.RoleFinderAction.role to org.jboss.seam.framework.EntityHome_$$_javassist_68 | at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146) | at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150) | at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63) | at java.lang.reflect.Field.set(Field.java:657) | at org.jboss.seam.util.Reflections.set(Reflections.java:64) | Why isn't it using the same entitymanager all around? I think I'm moving in the right direction and have an idea of how it's behaving, but it's confusing. I also tried using the hibernate-entity-home and got a class cast about going from a seam session to a hibernate session. I'll keep playing around to see what I can find. Any ideas? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4072847#4072847 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4072847 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation selectManyListbox
That did it. I was playing around with the entity itself and not with the entity manager. once I changed it to use @In instead of @PersistenceContext and I kept the manager defined in the components.xml it started working fine. At least with all this playing around I learned a bit of the internals of Seam and you got to fix something in the code!! Thanks for the help. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4073161#4073161 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4073161 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation selectManyListbox
I've fixed that error in CVS. The problem occurs because you aren't loading the entity using an SMPC (but probably @PersistenceContext). Make sure you read the item on the http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamProblemsFAQ View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4072940#4072940 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4072940 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation selectManyListbox
thank you for the solution to my original problem It was indeed the missing 'equals'. Now it works :-) Daniel View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4073192#4073192 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4073192 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation selectManyListbox
http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamProblemsFAQ View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4072731#4072731 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4072731 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation selectManyListbox
I had a similar issue but not with validating. My equals() method was wrong and always returning false. Blame it on autoboxing!! anyway, I fixed the equals() and now my checkbox list is selected appropriately based on the objects in the list. Which is a good sign. But still when I try to submit the form I get this message in the console (I don't see a stack trace or anything else) | sourceId=j_id29:j_id60[severity=(ERROR 2), summary=(Error selecting object), detail=(Error selecting object)] | Here's the tag: | h:selectManyCheckbox layout=pageDirection value=#{user.userRoles} | s:selectItems value=#{rolefinder.refreshedRoles} var=currentRole label=#{currentRole.roleName}/ | s:convertEntity / | /h:selectManyCheckbox | the userRoles is just a list of Role entities. Which has an @Id field: | @Entity | @Scope(SESSION) | @Name(role) | public class Role implements java.io.Serializable | { | | private static final long serialVersionUID = 1L; | | // Fields | @Id @GeneratedValue | @Column(name=role_id) | private int roleId; | When the form is submitted I see that the equals method is called a bunch of times (once per item) but then the error message pops up. I'm running 1.2.1GA with AS 4.2.0GA Thanks! View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4072761#4072761 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4072761 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation selectManyListbox
I'm not sure where that error comes from. You'll need to use your debugger/the source to find what exception is being thrown (and caught, to give that error messages). View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4072778#4072778 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4072778 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation of non-ui fields
This is an interesting requirement. You can use the validators component to help you here. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4070460#4070460 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4070460 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation of non-ui fields
[EMAIL PROTECTED] wrote : This is an interesting requirement. You can use the validators component to help you here. Pardon me but what do you mean by the validators component? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4070505#4070505 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4070505 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation of non-ui fields
@In(create=true) org.jboss.seam.core.Validators validators; View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4070514#4070514 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4070514 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation of non-ui fields
That is the approach we have taken. It works.fine is the appropriate word. Another idea would be to bind the values to a h:inputHidden. Using Hibernate Validator's @AssertTrue and @AssertFalse you could do some incredibly complicated validations without needing to RYO validators. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4070172#4070172 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4070172 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation and selectOneMenu question
1. Other than setting required=true I don't think that there's much else that you can do. 2. Are you reRendering your selectOneMenu after the ajax4jsf call? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4067425#4067425 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4067425 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation and selectOneMenu question
1. Well, that would be a solution (although it is semantically different from what I really want) 2. The corresponding code: | a:region | a:outputPanel id=% !a_id % | a:repeat var=listvar value=% !binding % | h:outputText value=#{listvar} / | a:commandButton ajaxSingle=true value=Delete reRender=% !a_id % action=#{% !a_remove %}/ | br / | /a:repeat | /a:outputPanel | br / | s:decorate | h:selectOneMenu id=% !ident % value=#{dev.nulll} valueChangeListener=#{% !a_listener %} | s:selectItems var=field label=#{field.toString} value=#{% all-concept type %} noSelectionLabel=Please select : / | s:convertEntity/ | a:support event=onchange reRender=% !a_id % bypassUpdates=true / | /h:selectOneMenu | /s:decorate | /a:region% | (Never mind the weird % % holes in the XML, this is due to this being a template in generative setting, the gist of it is clear I think) All I know is that the a:repeat gets re-rendered fine, and it is in the same outputPanel as the selectOneMenu. I confirmed that the 'dev.nulll' method gets called when the rerender happens (so the actual value of the selectOneMenu is requested), it just isn't reflected in the page... Thanks, Sander View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4067534#4067534 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4067534 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation oracle date field
I' m not sure what you mean, my class is an entity, user object with a field java.util.Date @Entity public class User{ private Date startdate; @Basic @Temporal(TemporalType.DATE) @NotNull public Date getStartdate() { return this.startdate; } public void setStartdate(Date startdate) { this.startdate = startdate; } } View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4063805#4063805 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4063805 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation oracle date field
There is also java.sql.Date. You'll probably have to use your debugger on this one... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4064046#4064046 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4064046 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation oracle date field
is your Date in the entity class java.util.Date? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4063641#4063641 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4063641 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation / exception handling patterns with EntityHome
No. *All* hibernate validators are tied into your views using s:validate View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=406#406 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=406 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation / exception handling patterns with EntityHome
From reading the 1.2.1.GA docs, it appears that using JSF validators is deprecated in favor of using Hibernate validators. Can a Hibernate validator also be a seam component similar to the above? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4059997#4059997 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4059997 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation / exception handling patterns with EntityHome
Is it possible to implement a hibernate validator with this functionality (run a query to determine uniqueness)? It's not clear from looking at the hibernate validator docs how i would inject a persistence context to use. BTW, I got the above strategy to work, but had to change a few things to get it to validate the unique property field itself. It wasn't clear how to set up the view to validate the *entire* object. | @Name(clusterConfigUniqueValidator) | @Validator | @Transactional | public class ClusterConfigUniqueNameValidator implements javax.faces.validator.Validator, Serializable{ | @In | EntityManager entityManager; | | @In EntityHomeClusterConfig clusterConfigHome; | | public void validate(FacesContext facesContext, UIComponent component, | Object value) throws ValidatorException { | String name = (String) value; | ClusterConfig cc = clusterConfigHome.getInstance(); | try { | ClusterConfig cc1 = (ClusterConfig) entityManager.createQuery(select cc from ClusterConfig cc where cc.name = :name) | .setParameter(name, name).getSingleResult(); | if (cc1 != null !cc1.getId().equals(cc.getId())) { | throw new ValidatorException(new FacesMessage(Name must be unique)); | } | } catch (NoResultException nre) { | // that's fine - this name is unique. | } | } | | } | | And then on the edit page: | | s:decorate id=nameDecoration template=layout/textField.xhtml | ui:define name=labelName:/ui:define | h:inputText fieldIdBase=name id=name value=#{clusterConfig.name} required=true | f:validator validatorId=clusterConfigUniqueValidator/ | s:validate/ | /h:inputText | /s:decorate | | Also, what about dealing with SQLException when you delete something and violate a foreign key constraint? Does anybody have a recommendation for how to avoid this gracefully? Should I not display the delete link/button on my list page if it's referenced (which would require an extra query per entity listed)? Write a custom exception handler in pages.xml to catch SQLException and a custom error page/handler that somehow parses the message? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4060043#4060043 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4060043 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation / exception handling patterns with EntityHome
That looks correct to me (I was assuming you would have a converted object arriving at the validator, not just a string representing it). You can't really validate the whole object using this scheme as you need a different validator for each property. If we do a generic one, then a s:validateAll will apply it. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4060056#4060056 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4060056 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation / exception handling patterns with EntityHome
Pete, What is your suggestion for writing a validator that validates the property against other properties values within the object (ie is this property than another property in the object)? I thought maybe i could use hibernate validator's bean level validation but based on your last post it doesn't look like this option would work. Should such object level validation even be performed at the validation phase of the jsf lifecycle or is it better suited for another phase down the lifecycle? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4060070#4060070 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4060070 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation / exception handling patterns with EntityHome
Currently its best to do this in the application phase. This will be addressed in JSF 2. I've got some ideas about how to add this in before that, but I need time to work on them. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4060071#4060071 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4060071 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation / exception handling patterns with EntityHome
You could write a validator for this @Name(uniqueValidator) | @Validator | @Transactional | public class UniqueValidator { | |@In EntityManager entityManager; | |public void validate(FacesContext facesContext, UIComponent component, Object value) | throws ValidatorException { | Foo foo = (Foo) value; | Foo foo1 = entityManager.createQuery(select f from Foo f where f.uniqueProperty = :uniqueProperty).setParameter(uniqueProperty, foo.getUniqueProperty()).getSingleResult(); | if (foo1 != null !foo1.getId().equals(foo.getId)) { | throw new ValidatorException(Unique Constraint Violation); | } |} | } In fact, we could have a generic version of this in Seam as part of s:validate. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4059691#4059691 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4059691 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation / exception handling patterns with EntityHome
By the way, I think it's pretty slick that you can use Seam components as validators like that. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4059711#4059711 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4059711 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation throws an exception instead of redisplaying t
[EMAIL PROTECTED] wrote : You've probably got the problem described here: | | http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamProblemsFAQ regard @NotNull, @Length etc. Hi, I have the same problem with an @Email annotated field. The problem is that the field can allow null values (so no @NotNull, the field is nullable in the DB). It throws the same error as this thread describes. I looked into the EmailValidator and for a null/empty string it shoul be a valid email. And still I get the InvalidStateException... public boolean isValid(Object value) { | if ( value == null ) return true; | if ( !( value instanceof String ) ) return false; | String string = (String) value; | if ( string.length() == 0 ) return true; | Matcher m = pattern.matcher( string ); | return m.matches(); | } I also have the same problem with a field marked with @Pattern. If the field is empty (and also is not required), when the page is saved I get to the debug page with a stacktrace and again the cause is InvalidStateException I looked into the Pattern isValid method from SVN and it doesn't check if the field is of length 0 ( aka '' - empty string). View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4056931#4056931 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056931 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation throws an exception instead of redisplaying t
I looked into the EmailValidator class supplied with Seam 1.2.1, and its different from that found in SVN. So I found the culprit, it doesn't consider valid a String with value ''. And apparently this is the value that gets saved into the bean: Java code in Home.update(): System.out.println( ###Email: ' + getInstance().getContact().getEmail()+ ' ); | System.out.println( ###Email validator: ' + eVal.isValid( getInstance().getContact().getEmail() )+ ' ); And in the log: 2007-06-22 18:57:47,549 INFO [STDOUT] ###Email: '' | 2007-06-22 18:57:47,549 INFO [STDOUT] ###Email validator: 'false' The vestion in SVN treats that case as well. I'm also eager to find when the similar problem in the PatternValidator will be solved. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4056938#4056938 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056938 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation throws an exception instead of redisplaying t
Huh? What is the problem? You mention an exception then where is the stack trace? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4056542#4056542 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056542 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation throws an exception instead of redisplaying t
So put a breakpoint at org.hibernate.validator.event.ValidateEventListener.validate() and see what is the cause of the validation failure. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4056545#4056545 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056545 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation throws an exception instead of redisplaying t
I've never done that with a seam application ... do you have any help about how I can setup that ? The app has been generated by seam-gen and I'm using eclipse, It shouldn't be too hard ... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4056549#4056549 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056549 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation throws an exception instead of redisplaying t
Put the HV source in your sourcepath. Add a breakpoint. Debug the server. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4056552#4056552 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056552 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation throws an exception instead of redisplaying t
You've probably got the problem described here: http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamProblemsFAQ regard @NotNull, @Length etc. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4056558#4056558 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056558 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation throws an exception instead of redisplaying t
I've managed to debug it but I don't know where and what it fails. Moreover I miss some sources. Anyway, here is my whole test application : http://beta.livre-rare-book.net/metadebug.tar.bz2 I've not included the lib dir as it's the one from seam 1.3.0.ALPHA. The app uses DefaultDS Step to reproduce : - just deploy the app - login - go to admin (top-right) - click to users (there must be two) - click on new - valid without filling in the form by clicking on create = no validation, but the above exception. pete.muir I'll test tomorrow to see if then the validation occur when adding required=true or if it just avoid empty fields. Thanks for your help :) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4056584#4056584 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056584 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation in Restful mode
Currently Seam has no validation for page parameters, but I agree that it would be a very-nice-to-have, and easy to implement. So my question really is: exactly what should actually *happen* when page parameter validation fails?? It's not like we can redisplay the form with error messages ;-) Options: * set validation.succeeded to false (allowing you to skip the page action) and add the validation messages to the page? * add the validation messages to the page and then redirect to some view-id defined in pages.xml? * throw an exception that you can handle in pages.xml? I can see good arguments for each one... Please create an issue in JIRA for this, and let's kick off discussion in this thread - I really don't know what is the best option View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4049111#4049111 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4049111 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation in Restful mode
The way I would like to use this feature would be option 1. I have a page living on a separate site that would have its form posting to my seam page. If the validation fails it would be nice to add the validation messages to the page where the form can be fixed up and submitted again from within my site. However I can see merits in the other options and it would be interesting to see what others think. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4049162#4049162 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4049162 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation: @NotNull required=true
I think thisis what you are after: | javax.faces.component.UIInput.CONVERSIONConversion error occurred | javax.faces.component.UIInput.REQUIRED required | javax.faces.component.UISelectOne.INVALID Value is not a a valid option | javax.faces.component.UISelectMany.INVALID Value is not a valid option | javax.faces.validator.NOT_IN_RANGE Specified attribute is not between the expected values of {0} and {1} | javax.faces.validator.DoubleRangeValidator.MAXIMUM Value is greater than allowable maximum of '{0}' | javax.faces.validator.DoubleRangeValidator.MINIMUM Value is less than allowable minimum of '{0}' | javax.faces.validator.DoubleRangeValidator.TYPE Value is not of the correct type | javax.faces.validator.LengthValidator.MAXIMUM Value is greater than allowable maximum of '{0}' | javax.faces.validator.LengthValidator.MINIMUM Value is less than allowable minimum of '{0}' | javax.faces.validator.LongRangeValidator.MAXIMUMValue is greater than allowable maximum of '{0}' | javax.faces.validator.LongRangeValidator.MINIMUMValue is less than allowable minimum of '{0}' | javax.faces.validator.LongRangeValidator.TYPE Value is not of the correct type | | put into a file in my War Src area. I refer to it in my faces.config | !-- My Messages Please -- | application | message-bundlenz.co.risingstars.i18n.jsfstandarderrors/message-bundle | /application | This is on top of the messages you put into the messages.properies in the jar. (there are a LOT more message that just this list!): | javax.faces.component.UIInput.CONVERSION error | javax.faces.component.UIInput.CONVERSION_detail = invalid | javax.faces.component.UIInput.REQUIRED required | javax.faces.convert.DateTimeConverter.CONVERSION = must be a valid date | #javax.faces.convert.DateTimeConverter.CONVERSION_detail = value must be a datetime | | #javax.faces.component.UISelectOne.INVALID Value is not a a valid option | #javax.faces.component.UISelectMany.INVALID Value is not a valid option | #javax.faces.validator.NOT_IN_RANGE Specified attribute is not between the expected values of {0} and {1} | #javax.faces.validator.DoubleRangeValidator.MAXIMUM Value is greater than allowable maximum of '{0}' | #javax.faces.validator.DoubleRangeValidator.MINIMUM Value is less than allowable minimum of '{0}' | #javax.faces.validator.DoubleRangeValidator.TYPE Value is not of the correct type | #javax.faces.validator.LengthValidator.MAXIMUM Value is greater than allowable maximum of '{0}' | #javax.faces.validator.LengthValidator.MINIMUM Value is less than allowable minimum of '{0}' | #javax.faces.validator.LongRangeValidator.MAXIMUMValue is greater than allowable maximum of '{0}' | #javax.faces.validator.LongRangeValidator.MINIMUMValue is less than allowable minimum of '{0}' | #javax.faces.validator.LongRangeValidator.TYPE Value is not of the correct type | | #javax.faces.convert.DateTimeConverter.CONVERSION= Conversion Error | #javax.faces.convert.DateTimeConverter.CONVERSION_detail = {1}: xxSpecified value is not a valid date/time. | #javax.faces.converter.DateTimeConverter.DATE=value must be a date | #javax.faces.converter.DateTimeConverter.DATE_detail=value must be a date, eg. {1} | #javax.faces.converter.DateTimeConverter.TIME=value must be a time | #javax.faces.converter.DateTimeConverter.TIME_detail=value must be a time, eg. {1} | #javax.faces.converter.DateTimeConverter.DATETIME=value must be a date and time | #javax.faces.converter.DateTimeConverter.DATETIME_detail=value must be a date and time, eg. {1} | #javax.faces.converter.DateTimeConverter.PATTERN_TYPE=a pattern or type attribute must be specified to convert the value | #JSF 1.1: | #javax.faces.convert.BigDecimalConverter.CONVERSION = value must be a number | #javax.faces.convert.BigDecimalConverter.CONVERSION_detail = value must be a number | #javax.faces.convert.BigIntegerConverter.CONVERSION = value must be an integre | #javax.faces.convert.BigIntegerConverter.CONVERSION_detail = value must be a number | #javax.faces.convert.BooleanConverter.CONVERSION = value must be true or false | #javax.faces.convert.BooleanConverter.CONVERSION_detail = value must be true or false | #javax.faces.convert.ByteConverter.CONVERSION = value must be a byte | #javax.faces.convert.ByteConverter.CONVERSION_detail = value must be a byte | #javax.faces.convert.CharacterConverter.CONVERSION = value must be a character | #javax.faces.convert.CharacterConverter.CONVERSION_detail = value must be a character | #javax.faces.convert.DoubleConverter.CONVERSION = value must be a number | #javax.faces.convert.DoubleConverter.CONVERSION_detail = value must be a number | javax.faces.convert.FloatConverter.CONVERSION = value must be a number | javax.faces.convert.FloatConverter.CONVERSION_detail = value must be a number |
[jboss-user] [JBoss Seam] - Re: Validation: @NotNull required=true
If this is helpful then you might want to propose to add it to the FAQ... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4045188#4045188 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4045188 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation: @NotNull required=true
Thanks for reply, but I don't know how to disable the displaying the UIInput default validation message. When the field isn't empty, the hibernate validation work good. If the input is empty the UIInput default message is show - and I would like to don't show this but show the @NotNull. M. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4045189#4045189 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4045189 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation: @NotNull required=true
Currently there is no way to utilize the message of @NotNull, you need to change the JSF validator message for required=true globally. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4045193#4045193 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4045193 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation: @NotNull required=true
There is no way to do it globally but you can use a phase listener: import java.util.Iterator; | | import javax.faces.application.FacesMessage; | import javax.faces.component.UIComponent; | import javax.faces.component.UIViewRoot; | import javax.faces.context.FacesContext; | import javax.faces.event.PhaseEvent; | import javax.faces.event.PhaseId; | import javax.faces.event.PhaseListener; | | /** | * Example messages.properties entries: | * javax.faces.validator.LengthValidator.MAXIMUM=[fieldLabel] value is greater than allowable maximum of {0} characters. | * javax.faces.validator.LengthValidator.MINIMUM=[fieldLabel] value must contain at least {0} characters. | */ | | @SuppressWarnings(serial) | public class MessageListener implements PhaseListener { | | public PhaseId getPhaseId() { | return PhaseId.RENDER_RESPONSE; | } | | public void beforePhase(PhaseEvent e) { | FacesContext fc = e.getFacesContext(); | UIViewRoot root = fc.getViewRoot(); | Iterator i = fc.getClientIdsWithMessages(); | while (i.hasNext()) { | String clientId = (String) i.next(); | if(clientId != null) { | UIComponent c = root.findComponent(clientId); | if (c != null) { | String fieldRef = | (String) c.getAttributes().get(fieldLabel); | if (fieldRef != null) { | Iterator j = fc.getMessages(clientId); | while (j.hasNext()) { | FacesMessage fm = (FacesMessage) j.next(); | String s = fm.getSummary(); | s = s.replaceFirst(\\[fieldLabel\\], fieldRef); | fm.setSummary(s); | } | } | } | } | } | } | | public void afterPhase(PhaseEvent e) { | } | } | Then specify the fielLabel in the f:attribute tag: h:inputText value=#{contactUs.email} size=50 maxlength=75 required=true | f:attribute name=fieldLabel value=Email/ | /h:inputText Or, if you require completely different messages for each component, you could specify a resource bundle key h:inputText value=#{contactUs.email} size=50 maxlength=75 required=true | f:attribute name=bundleKey value=contactus.error.email.required/ | /h:inputText Using the latter approach, you would get the resource bundle key from the component attributes map in the listener and replace the summary text altogether. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4045194#4045194 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4045194 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation: @NotNull required=true
On second thought, this is of no use to you within the context of hibernate validation. This is strictly JSF. I'll be quiet now. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4045195#4045195 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4045195 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation message displayed twice
@damianharvey i tried that without any effect. but thanks for the hint. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4043676#4043676 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4043676 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation message displayed twice
i checked out the head revision from anoncvs.forge.jboss.com. i compiled it and packaged the jboss-seam*.jars into my ear. now i get the following error message when deploying the new ear. com.sun.facelets.FaceletException: Could not instantiate feature[compiler.ExpressionFactory]: org.jboss.el.ExpressionFactoryImpl | at com.sun.facelets.compiler.Compiler.featureInstance(Compiler.java:154) | at com.sun.facelets.compiler.Compiler.createExpressionFactory(Compiler.java:128) | at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:198) | at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:144) | at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:95) | at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:496) | at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:546) | at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108) | at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229) | at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108) | at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266) | at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:159) | at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245) | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) | at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96) | at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220) | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) | at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63) | at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60) | at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) | at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57) | at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) | at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79) | at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) | at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) | at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) | at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84) | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) | at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) | at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175) | at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432) | at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) | at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156) | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) | at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) | at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) | at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) | at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) | at java.lang.Thread.run(Thread.java:595) | | did i check out the wrong files or where have a made a mistake? thanks for any help regards, hasc View the original post :
[jboss-user] [JBoss Seam] - Re: validation message displayed twice
would be great if anyone could give me a hint here. regards, hasc View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4042736#4042736 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4042736 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation message displayed twice
*which* error message is displayed twice? h:message globalOnly=true / doesn't display messages targeted at particular JSF components, only those which aren't attached to any. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4042752#4042752 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4042752 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation message displayed twice
thanks for help. i defined a message text in messages.properties GreaterThanZero=some text when i enter e.g. 0 as value the message text for GreaterThanZero is displayed twice. i just set globalOnly=true to check if the message is bound to the component. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4042786#4042786 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4042786 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation message displayed twice
What version of Seam and which JSF impl are you using? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4042788#4042788 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4042788 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation message displayed twice
jboss-seam-1.2.1.GA jsf1.2 with facelets View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4042790#4042790 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4042790 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation message displayed twice
Please try with CVS http://jira.jboss.com/jira/browse/JBSEAM-1236 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4042793#4042793 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4042793 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation message displayed twice
thanks i ll try that View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4042795#4042795 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4042795 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: validation message displayed twice
Do you have showDetail=true? If so, try removing it. I had the same issue and this was the cause for me. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4042945#4042945 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4042945 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation fails in registration example
Hi, I have got the same problem with my code too. By me there is a problem with the length of password. I hashed this and then got a string longer of 15 chars, what has been set actually in my @Length-rule. Some of rules (@Length for example) are first checked when You try to persist Your bean (at database level). I think that is the problem View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4041487#4041487 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4041487 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation fails in registration example
Take a look at the SeamProblemsFAQ on the wiki to understand why some validators aren't run by s:validate View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4041514#4041514 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4041514 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation messages
Take a look at the message attribute of the Hibernate Validator annotations, they allow per field overrides of the default message. NotNull is still handled by JSF's required=true mechanism, but you have greater flexibility for other field constraints. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4037111#4037111 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4037111 ___ jboss-user mailing list [EMAIL PROTECTED] https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation messages
CptnKirk wrote : Take a look at the message attribute of the Hibernate Validator annotations, they allow per field overrides of the default message. NotNull is still handled by JSF's required=true mechanism, but you have greater flexibility for other field constraints. I don't want per-field messages. I want to provide some context to the message itself. For example, I would put @NotNull(message={value.required}) | value.required={0} is required. ... and magically be able to inject some value into {0} from somewhere else with Contact name or Billing name, etc instead of just Value is required. Does that make sense? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4037113#4037113 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4037113 ___ jboss-user mailing list [EMAIL PROTECTED] https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation messages
Yep. It makes sense, it would be nice if you could override the validation message at the s:validate level. This has long been a complaint of JSF, and one that I believe will be fixed in JSF 2.0. JBoss will start using the 1.2 RI in 4.2, and that may allow some jsf-ext work to be used, including maybe support for what you're looking for. Until then, ask Gavin real nice for a s:validate message=my message feature. Note though that NotNull is a special case in JSF. I believe that JSF will always handle required fields via its required=true mechanism so NotNull isn't a great example of using Hibernate Validator. Also, Seam provides EL and context aware markup in JSF resource bundles. I don't know if it extends this capability to Hibernate Validator resource bundles, I'd assume not. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4037127#4037127 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4037127 ___ jboss-user mailing list [EMAIL PROTECTED] https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation messages
Apparently you can do @Length(min=10,max=20,message=#{messages.lengthValidatorMessage}) Then you can take advantage of Seam's per view message bundle feature. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4037130#4037130 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4037130 ___ jboss-user mailing list [EMAIL PROTECTED] https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation messages
petemuir wrote : Apparently you can do | | @Length(min=10,max=20,message=#{messages.lengthValidatorMessage}) | | Then you can take advantage of Seam's per view message bundle feature. Do you have a link to some documentation on the per view message bundle feature? It sounds useful. In this situation, it wouldn't quite work. My problem is the reuse of fine-grained domain objects, for example an Address. I may have five addresses on a single form, so even if I could customize that message for that view, it would still render the same message for each address instead of Home address ... and Work address ..., etc. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4037131#4037131 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4037131 ___ jboss-user mailing list [EMAIL PROTECTED] https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation messages
http://docs.jboss.com/seam/1.2.1.GA/reference/en/html/i18n.html#d0e7197 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4037134#4037134 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4037134 ___ jboss-user mailing list [EMAIL PROTECTED] https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation messages
As CptnKirk says, create a JIRA request for overriding the message on the s:validate tag, sounds like the only way to do what you want... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4037139#4037139 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4037139 ___ jboss-user mailing list [EMAIL PROTECTED] https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation Error
Seems to work fine for me. Why not supply a bit of code we can look at? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4029727#4029727 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4029727 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Validation Error
I have incorporated the TinyMCE rich text editor in my template and it looks as follows: | !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; | html xmlns=http://www.w3.org/1999/xhtml; | xmlns:ui=http://java.sun.com/jsf/facelets; | xmlns:h=http://java.sun.com/jsf/html; | xmlns:f=http://java.sun.com/jsf/core; | xmlns:s=http://jboss.com/products/seam/taglib; | head | meta http-equiv=Content-Type content=text/html; charset=UTF-8 / | titleAdmininstration/title | link href=../stylesheet/admin-style.css rel=stylesheet type=text/css / | script language=javascript type=text/javascript src=../javascript/tiny_mce/tiny_mce.js/script | script language=javascript type=text/javascript | tinyMCE.init({ | mode : textareas, | theme : advanced, | plugins : devkit,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template, | theme_advanced_buttons1_add_before : save,newdocument,separator, | theme_advanced_buttons1_add : fontselect,fontsizeselect, | theme_advanced_buttons2_add : separator,insertdate,inserttime,preview,separator,forecolor,backcolor, | theme_advanced_buttons2_add_before: cut,copy,paste,pastetext,pasteword,separator,search,replace,separator, | theme_advanced_buttons3_add_before : tablecontrols,separator, | theme_advanced_buttons3_add : emotions,iespell,media,advhr,separator,print,separator,ltr,rtl,separator,fullscreen, | theme_advanced_buttons4 : insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,|,code, | theme_advanced_toolbar_location : top, | theme_advanced_toolbar_align : left, | theme_advanced_path_location : bottom, | plugin_insertdate_dateFormat : %Y-%m-%d, | plugin_insertdate_timeFormat : %H:%M:%S, | extended_valid_elements : hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style], | theme_advanced_resize_horizontal : false, | theme_advanced_resizing : true, | nonbreaking_force_tab : true, | apply_source_formatting : true, | }); | /script | /head | body | div class=header | h1safami website - administration interface/h1 | /div | ui:include src=menu.xhtml/ | ui:include src=loginout.xhtml/ | div class=body | f:facet name=aroundInvalidField | s:span styleClass=errors/ | /f:facet | f:facet name=afterInvalidField | s:span#160;s:message//s:span | /f:facet | ui:insert name=body/ | /div | ui:include src=footer.xhtml / | /body | /html | | Please note that the TinyMCE editor is appearing and looks perfect however it doesn't save the data. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4029740#4029740 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4029740 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user