You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Andrew Robinson (JIRA)" <de...@myfaces.apache.org> on 2010/02/19 23:52:27 UTC

[jira] Commented: (TRINIDAD-1733) Throw an error if component binding is used illegally

    [ https://issues.apache.org/jira/browse/TRINIDAD-1733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836023#action_12836023 ] 

Andrew Robinson commented on TRINIDAD-1733:
-------------------------------------------

I also proposed this to Mojarra as an enhancement:
https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1559

> Throw an error if component binding is used illegally
> -----------------------------------------------------
>
>                 Key: TRINIDAD-1733
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1733
>             Project: MyFaces Trinidad
>          Issue Type: New Feature
>          Components: Components
>    Affects Versions: 1.2.13-core 
>            Reporter: Andrew Robinson
>            Assignee: Andrew Robinson
>
> Because users often illegally use component binding with non-request scopes, it would be very good to have a way to stop users from doing so with Trinidad components.
> <tr:outputText binding="#{requestScope.myBean.outputComponent}" />
> vs.
> <tr:outputText binding="#{sessionScope.myBean.outputComponent}" />
> I suggest we put code into UIXComponentBase  that when the parent
> component is set on a component, we check the old view root and the new view
> root and if they are not the same, throw an exception. This way we would
> catch these design errors before they are filed as bugs in the components.
> I have seen many people trying to flag these situations as bugs in the framework instead of realizing it is a problem with their application.

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