You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Christoph Göldner (JIRA)" <ji...@apache.org> on 2010/03/15 09:51:27 UTC

[jira] Created: (MYFACESTEST-4) Unable to call setValue of ValueExpression in test

Unable to call setValue of ValueExpression in test
--------------------------------------------------

                 Key: MYFACESTEST-4
                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-4
             Project: Apache MyFaces Test
          Issue Type: Bug
         Environment: See attached JUnit test case which fails with myfaces-test20-1.0.0-SNAPSHOT
Tested with Mojarra-2.0.2

            Reporter: Christoph Göldner


Components tested inside a test case inherited from AbstractJsfTestCase are not able to do following:

  ELContext elContext = facesContext.getELContext();
  ValueExpression ve = application.getExpressionFactory().createValueExpression(elContext, "#{foo}", String.class);
  ve.setValue(elContext, "BAR");

The error is caused by the FacesResourceBundleELResolver inside the setValue method, where it tries to get a ResourceBundle from MockApplication12 for the given ValueExpression. Unfortunately the MockApplication12 getResourceBundle method throws a MissingResourceException instead of returning null.

Please apply attached patch to the code base.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACESTEST-4) Unable to call setValue of ValueExpression in test

Posted by "Jakob Korherr (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACESTEST-4?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845427#action_12845427 ] 

Jakob Korherr commented on MYFACESTEST-4:
-----------------------------------------

Oh, I almost forgot: The MyFaces test code for 2.0 uses most of the parts of MyFaces test 1.2. Also the class for which you provided the patch (MockApplication12) is from MyFaces test 1.2. So there is no need to change this twice!

> Unable to call setValue of ValueExpression in test
> --------------------------------------------------
>
>                 Key: MYFACESTEST-4
>                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-4
>             Project: Apache MyFaces Test
>          Issue Type: Bug
>         Environment: See attached JUnit test case which fails with myfaces-test20-1.0.0-SNAPSHOT
> Tested with Mojarra-2.0.2
>            Reporter: Christoph Göldner
>            Assignee: Jakob Korherr
>         Attachments: MockApplication12.patch, ValueExpressionTest.java
>
>
> Components tested inside a test case inherited from AbstractJsfTestCase are not able to do following:
>   ELContext elContext = facesContext.getELContext();
>   ValueExpression ve = application.getExpressionFactory().createValueExpression(elContext, "#{foo}", String.class);
>   ve.setValue(elContext, "BAR");
> The error is caused by the FacesResourceBundleELResolver inside the setValue method, where it tries to get a ResourceBundle from MockApplication12 for the given ValueExpression. Unfortunately the MockApplication12 getResourceBundle method throws a MissingResourceException instead of returning null.
> Please apply attached patch to the code base.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACESTEST-4) Unable to call setValue of ValueExpression in test

Posted by "Christoph Göldner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACESTEST-4?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845264#action_12845264 ] 

Christoph Göldner commented on MYFACESTEST-4:
---------------------------------------------

I assume that it also fails with JSF 1.2 implementations

> Unable to call setValue of ValueExpression in test
> --------------------------------------------------
>
>                 Key: MYFACESTEST-4
>                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-4
>             Project: Apache MyFaces Test
>          Issue Type: Bug
>         Environment: See attached JUnit test case which fails with myfaces-test20-1.0.0-SNAPSHOT
> Tested with Mojarra-2.0.2
>            Reporter: Christoph Göldner
>         Attachments: MockApplication12.patch, ValueExpressionTest.java
>
>
> Components tested inside a test case inherited from AbstractJsfTestCase are not able to do following:
>   ELContext elContext = facesContext.getELContext();
>   ValueExpression ve = application.getExpressionFactory().createValueExpression(elContext, "#{foo}", String.class);
>   ve.setValue(elContext, "BAR");
> The error is caused by the FacesResourceBundleELResolver inside the setValue method, where it tries to get a ResourceBundle from MockApplication12 for the given ValueExpression. Unfortunately the MockApplication12 getResourceBundle method throws a MissingResourceException instead of returning null.
> Please apply attached patch to the code base.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MYFACESTEST-4) Unable to call setValue of ValueExpression in test

Posted by "Christoph Göldner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACESTEST-4?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christoph Göldner updated MYFACESTEST-4:
----------------------------------------

    Status: Patch Available  (was: Open)

> Unable to call setValue of ValueExpression in test
> --------------------------------------------------
>
>                 Key: MYFACESTEST-4
>                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-4
>             Project: Apache MyFaces Test
>          Issue Type: Bug
>         Environment: See attached JUnit test case which fails with myfaces-test20-1.0.0-SNAPSHOT
> Tested with Mojarra-2.0.2
>            Reporter: Christoph Göldner
>         Attachments: MockApplication12.patch, ValueExpressionTest.java
>
>
> Components tested inside a test case inherited from AbstractJsfTestCase are not able to do following:
>   ELContext elContext = facesContext.getELContext();
>   ValueExpression ve = application.getExpressionFactory().createValueExpression(elContext, "#{foo}", String.class);
>   ve.setValue(elContext, "BAR");
> The error is caused by the FacesResourceBundleELResolver inside the setValue method, where it tries to get a ResourceBundle from MockApplication12 for the given ValueExpression. Unfortunately the MockApplication12 getResourceBundle method throws a MissingResourceException instead of returning null.
> Please apply attached patch to the code base.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MYFACESTEST-4) Unable to call setValue of ValueExpression in test

Posted by "Jakob Korherr (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACESTEST-4?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Korherr updated MYFACESTEST-4:
------------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

> Unable to call setValue of ValueExpression in test
> --------------------------------------------------
>
>                 Key: MYFACESTEST-4
>                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-4
>             Project: Apache MyFaces Test
>          Issue Type: Bug
>         Environment: See attached JUnit test case which fails with myfaces-test20-1.0.0-SNAPSHOT
> Tested with Mojarra-2.0.2
>            Reporter: Christoph Göldner
>            Assignee: Jakob Korherr
>         Attachments: MockApplication12.patch, ValueExpressionTest.java
>
>
> Components tested inside a test case inherited from AbstractJsfTestCase are not able to do following:
>   ELContext elContext = facesContext.getELContext();
>   ValueExpression ve = application.getExpressionFactory().createValueExpression(elContext, "#{foo}", String.class);
>   ve.setValue(elContext, "BAR");
> The error is caused by the FacesResourceBundleELResolver inside the setValue method, where it tries to get a ResourceBundle from MockApplication12 for the given ValueExpression. Unfortunately the MockApplication12 getResourceBundle method throws a MissingResourceException instead of returning null.
> Please apply attached patch to the code base.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACESTEST-4) Unable to call setValue of ValueExpression in test

Posted by "Jakob Korherr (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACESTEST-4?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845424#action_12845424 ] 

Jakob Korherr commented on MYFACESTEST-4:
-----------------------------------------

Thank you very much for the patch and the test case for this one and also for MYFACESTEST-5, Christoph.

However, please try to follow the code guidelines of MyFaces in your next patch(es). I know, the code in MyFaces test does not really do this either, but if we keep on committing the code in any style, it will become a bigger mess with every commit.

> Unable to call setValue of ValueExpression in test
> --------------------------------------------------
>
>                 Key: MYFACESTEST-4
>                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-4
>             Project: Apache MyFaces Test
>          Issue Type: Bug
>         Environment: See attached JUnit test case which fails with myfaces-test20-1.0.0-SNAPSHOT
> Tested with Mojarra-2.0.2
>            Reporter: Christoph Göldner
>            Assignee: Jakob Korherr
>         Attachments: MockApplication12.patch, ValueExpressionTest.java
>
>
> Components tested inside a test case inherited from AbstractJsfTestCase are not able to do following:
>   ELContext elContext = facesContext.getELContext();
>   ValueExpression ve = application.getExpressionFactory().createValueExpression(elContext, "#{foo}", String.class);
>   ve.setValue(elContext, "BAR");
> The error is caused by the FacesResourceBundleELResolver inside the setValue method, where it tries to get a ResourceBundle from MockApplication12 for the given ValueExpression. Unfortunately the MockApplication12 getResourceBundle method throws a MissingResourceException instead of returning null.
> Please apply attached patch to the code base.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.