[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-313) <s:validateAll> + facelets user tag
by Gavin King (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-313?page=all ]
Gavin King closed JBSEAM-313.
-----------------------------
Fix Version/s: 1.3.0.BETA1
Resolution: Done
> <s:validateAll> + facelets user tag
> -----------------------------------
>
> Key: JBSEAM-313
> URL: http://jira.jboss.com/jira/browse/JBSEAM-313
> Project: JBoss Seam
> Issue Type: Bug
> Components: Core
> Environment: jBoss 4.0.4.GA
> Seam 1.0.1.GA
> Reporter: Denis Karpov
> Assigned To: Gavin King
> Fix For: 1.3.0.BETA1
>
> Attachments: test.zip
>
>
> =================================================
> *.xhtml file:
> --------------------
> .....
> <s:validateAll>
> <clv:edit id="edit" label="Test editable" value="#{test.obj.code}"/> <!-- User defined tag inside validateAll-->
> </s:validateAll>
> .....
> ==================================================
> tag file:
> -----------------
> ....
> <ui:component xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
> <input id="#{id}" type="text" jsfc="h:inputText" value="#{value}"/> <!-- Look at #{value} This is the root of problem -->
> </ui:component>
> ....
> =================================================
> Look at value=#{value}
> Validation framework now can not process such binding that concerns facelets templateing.
> In attachment you will find simple working project. Just uncomment <!--s:validateAll--> and you will get exception.
> Exception:
> 19:07:19,921 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
> java.lang.RuntimeException: not an attribute value binding: #{value}
> at org.jboss.seam.ui.ModelValidator.validate(ModelValidator.java:30)
> at javax.faces.component._ComponentUtils.callValidators(_ComponentUtils.java:157)
> at javax.faces.component.UIInput.validateValue(UIInput.java:312)
> at javax.faces.component.UIInput.validate(UIInput.java:353)
> at javax.faces.component.UIInput.processValidators(UIInput.java:183)
> at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
> at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
> at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
> at javax.faces.component.UIForm.processValidators(UIForm.java:70)
> at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
> at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:146)
> at org.apache.myfaces.lifecycle.LifecycleImpl.processValidations(LifecycleImpl.java:262)
> at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 9 months
[jbossseam-issues] [JBoss JIRA] Reopened: (JBSEAM-313) <s:validateAll> + facelets user tag
by Gavin King (JIRA)
[ http://jira.jboss.com/jira/browse/JBSEAM-313?page=all ]
Gavin King reopened JBSEAM-313:
-------------------------------
Assignee: Gavin King
> <s:validateAll> + facelets user tag
> -----------------------------------
>
> Key: JBSEAM-313
> URL: http://jira.jboss.com/jira/browse/JBSEAM-313
> Project: JBoss Seam
> Issue Type: Bug
> Components: Core
> Environment: jBoss 4.0.4.GA
> Seam 1.0.1.GA
> Reporter: Denis Karpov
> Assigned To: Gavin King
> Attachments: test.zip
>
>
> =================================================
> *.xhtml file:
> --------------------
> .....
> <s:validateAll>
> <clv:edit id="edit" label="Test editable" value="#{test.obj.code}"/> <!-- User defined tag inside validateAll-->
> </s:validateAll>
> .....
> ==================================================
> tag file:
> -----------------
> ....
> <ui:component xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
> <input id="#{id}" type="text" jsfc="h:inputText" value="#{value}"/> <!-- Look at #{value} This is the root of problem -->
> </ui:component>
> ....
> =================================================
> Look at value=#{value}
> Validation framework now can not process such binding that concerns facelets templateing.
> In attachment you will find simple working project. Just uncomment <!--s:validateAll--> and you will get exception.
> Exception:
> 19:07:19,921 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
> java.lang.RuntimeException: not an attribute value binding: #{value}
> at org.jboss.seam.ui.ModelValidator.validate(ModelValidator.java:30)
> at javax.faces.component._ComponentUtils.callValidators(_ComponentUtils.java:157)
> at javax.faces.component.UIInput.validateValue(UIInput.java:312)
> at javax.faces.component.UIInput.validate(UIInput.java:353)
> at javax.faces.component.UIInput.processValidators(UIInput.java:183)
> at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
> at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
> at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
> at javax.faces.component.UIForm.processValidators(UIForm.java:70)
> at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
> at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:146)
> at org.apache.myfaces.lifecycle.LifecycleImpl.processValidations(LifecycleImpl.java:262)
> at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 9 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-919) Form validation not working for Hibernate validation annotations when using Facelets composition components
by P B (JIRA)
Form validation not working for Hibernate validation annotations when using Facelets composition components
-----------------------------------------------------------------------------------------------------------
Key: JBSEAM-919
URL: http://jira.jboss.com/jira/browse/JBSEAM-919
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 1.1.6.GA
Reporter: P B
Attachments: facelets-composition-comp-validation.zip
This was first reported in the ICEfaces forums (http://www.icefaces.org/JForum/posts/list/0/3825.page#17329), but seems to occur without ICEfaces.
The Seam JSF Form validation does not happen for Hibernate annotated validations when using a Facelets composition component. When posting a form containing invalid values the validations that should occur for Seam components referenced in a Facelets composition component do not produce any ui error messages and instead cause the following sort of exception at EntityInsertAction.preInsert() stage:
- Exception
Exception during request processing: validation failed for: org.jboss.seam.example.booking.User
org.hibernate.validator.event.ValidateEventListener.validate(ValidateEventListener.java:132)
org.hibernate.validator.event.ValidateEventListener.onPreInsert(ValidateEventListener.java:156)
org.hibernate.action.EntityInsertAction.preInsert(EntityInsertAction.java:139)
org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:44)
org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:515)
org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1491)
org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1110)
org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:324)
org.jboss.tm.TxManager.commit(TxManager.java:240)
Steps to reproduce:
1. drop the test case files in the booking example
the test case defines a simple facelets composition component that shows an h:inputText, and uses it for the user name field on the register.xhtml page.
2. build the booking example
3. start the web app and navigate to the registration page
4. enter form values, leaving an invalid entry in the user name field
5. post the page, and an exception should be produced
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 9 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1529) NPE in MockFacesContext
by Markus Wolf (JIRA)
NPE in MockFacesContext
-----------------------
Key: JBSEAM-1529
URL: http://jira.jboss.com/jira/browse/JBSEAM-1529
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 1.2.1.GA
Environment: Java 5
Reporter: Markus Wolf
Priority: Minor
java.lang.NullPointerException
at org.jboss.seam.mock.MockFacesContext.getMessages(MockFacesContext.java:115)
at org.jboss.seam.core.FacesMessages.getCurrentGlobalMessages(FacesMessages.java:121)
at de.llynch.kingpin.ejb.RegisterBeanTest$1.renderResponse(RegisterBeanTest.java:236)
at de.llynch.kingpin.bean.AbstractSeamTest$Request.run(AbstractSeamTest.java:565)
at de.llynch.kingpin.ejb.RegisterBeanTest.testRegister2(RegisterBeanTest.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 9 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1512) IdleRemover throws NullPointers while developing
by Simon Bergamin (JIRA)
IdleRemover throws NullPointers while developing
------------------------------------------------
Key: JBSEAM-1512
URL: http://jira.jboss.com/jira/browse/JBSEAM-1512
Project: JBoss Seam
Issue Type: Bug
Components: Framework
Affects Versions: 1.2.1.GA
Environment: Windows XP, Java 6, Eclipse 3.2, Tomcat 6.0
Reporter: Simon Bergamin
Priority: Minor
The following Exception is thrown by IdleRemover randomly while developing a seam application:
Exception in thread "IdleRemover" java.lang.NullPointerException
at org.jboss.resource.connectionmanager.IdleRemover$1.run(IdleRemover.java:93)
at java.lang.Thread.run(Thread.java:619)
No further stack trace is given.
I'm developing with Eclipse, the application gets deployed as an extracted war to a tomcat server. Eclipse opens the debug perspective and the class file of IdleRemover automaticaly every time the exception occurs, so this is a very annoying problem.
I can't exactly say at what point the exception is thrown but it does not only happen when deploying the app.
Thanks for having a look on it.
Simon
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 9 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1214) Alternate EL property reference #{entity[fieldName]} doesn't work
by Joshua Davis (JIRA)
Alternate EL property reference #{entity[fieldName]} doesn't work
-----------------------------------------------------------------
Key: JBSEAM-1214
URL: http://jira.jboss.com/jira/browse/JBSEAM-1214
Project: JBoss Seam
Issue Type: Bug
Reporter: Joshua Davis
Fix For: 1.2.1.GA
Validation fails for inputText fields where the value expression is of the form: #{entity[fieldName]}
The problem is in Expressions.java, in the validate() method:
{code}
public InvalidValue[] validate(String propertyExpression, Object value)
{
int dot = propertyExpression.lastIndexOf('.');
int bracket = propertyExpression.lastIndexOf('[');
if (dot<=0 && bracket<=0)
{
return new InvalidValue[0];
}
String componentName;
String propertyName;
if (dot>bracket)
{
componentName = propertyExpression.substring(2, dot);
propertyName = propertyExpression.substring( dot+1, propertyExpression.length()-1 );
}
else
{
componentName = propertyExpression.substring(2, bracket);
propertyName = propertyExpression.substring( bracket+1, propertyExpression.length()-2 );
}
String modelExpression = propertyExpression.substring(0, dot) + '}';
Object modelInstance = createValueBinding(modelExpression).getValue(); //TODO: cache the ValueBinding object!
return getValidator(modelInstance, componentName).getPotentialInvalidValues(propertyName, value);
}
{code}
This line is the problem:
String modelExpression = propertyExpression.substring(0, dot) + '}';
if a dot is not found, 'dot' is -1... boom!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 9 months