You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Koci (JIRA)" <de...@myfaces.apache.org> on 2010/02/09 15:21:28 UTC

[jira] Created: (MYFACES-2542) Don't throw exception if no SelectItems found

Don't  throw exception if no SelectItems found
----------------------------------------------

                 Key: MYFACES-2542
                 URL: https://issues.apache.org/jira/browse/MYFACES-2542
             Project: MyFaces Core
          Issue Type: New Feature
          Components: General
    Affects Versions: 2.0.0-beta-2
         Environment: myfaces trunk
            Reporter: Martin Koci
            Priority: Trivial
         Attachments: MYFACES-2542.patch

if  <f:selectItems  value="#{aNonExistentModel}" /> resolves in runtime to null a expection is throw. But having no SelectItem(s) is legal and this state should not breaks view processing/rendering.  JSF RI  handles this situation without a exception.



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


[jira] Updated: (MYFACES-2542) Don't throw exception if no SelectItems found

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

Jakob Korherr updated MYFACES-2542:
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0-beta-2
         Assignee: Jakob Korherr
           Status: Resolved  (was: Patch Available)

> Don't  throw exception if no SelectItems found
> ----------------------------------------------
>
>                 Key: MYFACES-2542
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2542
>             Project: MyFaces Core
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.0-beta-2
>         Environment: myfaces trunk
>            Reporter: Martin Koci
>            Assignee: Jakob Korherr
>            Priority: Trivial
>             Fix For: 2.0.0-beta-2
>
>         Attachments: MYFACES-2542.patch
>
>
> if  <f:selectItems  value="#{aNonExistentModel}" /> resolves in runtime to null a expection is throw. But having no SelectItem(s) is legal and this state should not breaks view processing/rendering.  JSF RI  handles this situation without a exception.

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


[jira] Commented: (MYFACES-2542) Don't throw exception if no SelectItems found

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831479#action_12831479 ] 

Jakob Korherr commented on MYFACES-2542:
----------------------------------------

I almost forgot: I really like the idea of changing the log level depending on the current project stage :)

> Don't  throw exception if no SelectItems found
> ----------------------------------------------
>
>                 Key: MYFACES-2542
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2542
>             Project: MyFaces Core
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.0-beta-2
>         Environment: myfaces trunk
>            Reporter: Martin Koci
>            Priority: Trivial
>         Attachments: MYFACES-2542.patch
>
>
> if  <f:selectItems  value="#{aNonExistentModel}" /> resolves in runtime to null a expection is throw. But having no SelectItem(s) is legal and this state should not breaks view processing/rendering.  JSF RI  handles this situation without a exception.

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


[jira] Commented: (MYFACES-2542) Don't throw exception if no SelectItems found

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831501#action_12831501 ] 

Jakob Korherr commented on MYFACES-2542:
----------------------------------------

That's all really no problem. You learn from your mistakes. Believe me I also needed some time to get to know myfaces ;)

> Don't  throw exception if no SelectItems found
> ----------------------------------------------
>
>                 Key: MYFACES-2542
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2542
>             Project: MyFaces Core
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.0-beta-2
>         Environment: myfaces trunk
>            Reporter: Martin Koci
>            Assignee: Jakob Korherr
>            Priority: Trivial
>             Fix For: 2.0.0-beta-2
>
>         Attachments: MYFACES-2542.patch
>
>
> if  <f:selectItems  value="#{aNonExistentModel}" /> resolves in runtime to null a expection is throw. But having no SelectItem(s) is legal and this state should not breaks view processing/rendering.  JSF RI  handles this situation without a exception.

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


[jira] Commented: (MYFACES-2542) Don't throw exception if no SelectItems found

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831477#action_12831477 ] 

Jakob Korherr commented on MYFACES-2542:
----------------------------------------

Thanks for pointing that out and for the patch.

However, there are many problems with the patch: First the changed class is duplicated in javax.faces.component package (look at the comment at the top of the class), so this class has to be changed too. Second the patch contains unnecessary imports. Furthermore you should use FacesContext.isProjectStage() to check the current project stage (that's just more beautiful). Also you forgot to add {2} in the log message to print out the type of the value. And last but not least please take a look at your code format. There are not very strict rules for splitting parameter lists in two or more lines - it's mostly up to you, but it should be easily readable!



> Don't  throw exception if no SelectItems found
> ----------------------------------------------
>
>                 Key: MYFACES-2542
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2542
>             Project: MyFaces Core
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.0-beta-2
>         Environment: myfaces trunk
>            Reporter: Martin Koci
>            Priority: Trivial
>         Attachments: MYFACES-2542.patch
>
>
> if  <f:selectItems  value="#{aNonExistentModel}" /> resolves in runtime to null a expection is throw. But having no SelectItem(s) is legal and this state should not breaks view processing/rendering.  JSF RI  handles this situation without a exception.

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


[jira] Updated: (MYFACES-2542) Don't throw exception if no SelectItems found

Posted by "Martin Koci (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-2542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Koci updated MYFACES-2542:
---------------------------------

    Status: Patch Available  (was: Open)

> Don't  throw exception if no SelectItems found
> ----------------------------------------------
>
>                 Key: MYFACES-2542
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2542
>             Project: MyFaces Core
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.0-beta-2
>         Environment: myfaces trunk
>            Reporter: Martin Koci
>            Priority: Trivial
>         Attachments: MYFACES-2542.patch
>
>
> if  <f:selectItems  value="#{aNonExistentModel}" /> resolves in runtime to null a expection is throw. But having no SelectItem(s) is legal and this state should not breaks view processing/rendering.  JSF RI  handles this situation without a exception.

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


[jira] Commented: (MYFACES-2542) Don't throw exception if no SelectItems found

Posted by "Martin Koci (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831493#action_12831493 ] 

Martin Koci commented on MYFACES-2542:
--------------------------------------

> First the changed class is duplicated in javax.faces.component package (look at the comment at the top of the class)
Oh! I'm still not sure with api/impl/shared/shared_impl etc.
> Second the patch contains unnecessary imports
Fixed in my IDE settings
> Furthermore you should use FacesContext.isProjectStage() to check the current project stage
My old habit putttng constants on left side in if-condition
> Also you forgot to add {2} in the log message to print out the type of the value
glasses cleaned
> There are not very strict rules for splitting parameter lists in two or more line
Yes, but settings for eclipse from http://wiki.apache.org/myfaces/MyFaces_Developer_Notes did that, but this probably problem that formatter in eclipse 3.5 is too "smart"

> Don't  throw exception if no SelectItems found
> ----------------------------------------------
>
>                 Key: MYFACES-2542
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2542
>             Project: MyFaces Core
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.0-beta-2
>         Environment: myfaces trunk
>            Reporter: Martin Koci
>            Assignee: Jakob Korherr
>            Priority: Trivial
>             Fix For: 2.0.0-beta-2
>
>         Attachments: MYFACES-2542.patch
>
>
> if  <f:selectItems  value="#{aNonExistentModel}" /> resolves in runtime to null a expection is throw. But having no SelectItem(s) is legal and this state should not breaks view processing/rendering.  JSF RI  handles this situation without a exception.

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