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 Kočí (JIRA)" <de...@myfaces.apache.org> on 2011/05/25 20:25:47 UTC

[jira] [Created] (MYFACES-3157) Fix order of isRendered and pushComponentToEL invocations

Fix order of isRendered and pushComponentToEL invocations
---------------------------------------------------------

                 Key: MYFACES-3157
                 URL: https://issues.apache.org/jira/browse/MYFACES-3157
             Project: MyFaces Core
          Issue Type: Bug
         Environment: myfaces core trunk
            Reporter: Martin Kočí


Current specification for lifecycles methods:
1) processDecodes
2) processValidators
3) processUpdates
4) encodeAll
4) encodeBegin

explicitly says that:

1) If the rendered property of this UIComponent is false, skip further processing.
2) call pushComponentToEL

But in that order of invocations it is impossible to achieve rendered like this:

<h:outputText rendered="#{component.id eq 'outputTextId'}" id="outputTextId" />

i.e. any rendered ValueEpression based on component itself. In Myfaces  we should implement in in reverse order, because specified behaviour is buggy.


Please see this mail thread: http://www.mail-archive.com/dev@myfaces.apache.org/msg53300.html

and

http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1002

for details.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (MYFACES-3157) Fix order of isRendered and pushComponentToEL invocations

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

Martin Kočí commented on MYFACES-3157:
--------------------------------------

classes with isRendered() in myfaces -impl and myfaces-shared-core:

HtmlTableRendererBase
HtmlGridRendererBase
HtmlRendererUtils
RendererUtils
UIRepeat



> Fix order of isRendered and pushComponentToEL invocations
> ---------------------------------------------------------
>
>                 Key: MYFACES-3157
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3157
>             Project: MyFaces Core
>          Issue Type: Bug
>         Environment: myfaces core trunk
>            Reporter: Martin Kočí
>         Attachments: myfaces-api-MYFACES-3157-v1.patch
>
>
> Current specification for lifecycles methods:
> 1) processDecodes
> 2) processValidators
> 3) processUpdates
> 4) encodeAll
> 4) encodeBegin
> explicitly says that:
> 1) If the rendered property of this UIComponent is false, skip further processing.
> 2) call pushComponentToEL
> But in that order of invocations it is impossible to achieve rendered like this:
> <h:outputText rendered="#{component.id eq 'outputTextId'}" id="outputTextId" />
> i.e. any rendered ValueEpression based on component itself. In Myfaces  we should implement in in reverse order, because specified behaviour is buggy.
> Please see this mail thread: http://www.mail-archive.com/dev@myfaces.apache.org/msg53300.html
> and
> http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1002
> for details.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (MYFACES-3157) Fix order of isRendered and pushComponentToEL invocations

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

Martin Kočí commented on MYFACES-3157:
--------------------------------------

problem is not restricted only on rendered: for example,  #{component} for immediate property does not work too:
>From UIInput:

if (!isImmediate())
            {
                try
                {
                    pushComponentToEL(context, this);



> Fix order of isRendered and pushComponentToEL invocations
> ---------------------------------------------------------
>
>                 Key: MYFACES-3157
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3157
>             Project: MyFaces Core
>          Issue Type: Bug
>         Environment: myfaces core trunk
>            Reporter: Martin Kočí
>
> Current specification for lifecycles methods:
> 1) processDecodes
> 2) processValidators
> 3) processUpdates
> 4) encodeAll
> 4) encodeBegin
> explicitly says that:
> 1) If the rendered property of this UIComponent is false, skip further processing.
> 2) call pushComponentToEL
> But in that order of invocations it is impossible to achieve rendered like this:
> <h:outputText rendered="#{component.id eq 'outputTextId'}" id="outputTextId" />
> i.e. any rendered ValueEpression based on component itself. In Myfaces  we should implement in in reverse order, because specified behaviour is buggy.
> Please see this mail thread: http://www.mail-archive.com/dev@myfaces.apache.org/msg53300.html
> and
> http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1002
> for details.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (MYFACES-3157) Fix order of isRendered and pushComponentToEL invocations

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

Leonardo Uribe resolved MYFACES-3157.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.2
                   2.0.8
         Assignee: Martin Kočí

Thanks to Martin Koci for provide this patch

> Fix order of isRendered and pushComponentToEL invocations
> ---------------------------------------------------------
>
>                 Key: MYFACES-3157
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3157
>             Project: MyFaces Core
>          Issue Type: Bug
>         Environment: myfaces core trunk
>            Reporter: Martin Kočí
>            Assignee: Martin Kočí
>             Fix For: 2.0.8, 2.1.2
>
>         Attachments: myfaces-api-MYFACES-3157-v1.patch, myfaces-api-MYFACES-3157-v2.patch
>
>
> Current specification for lifecycles methods:
> 1) processDecodes
> 2) processValidators
> 3) processUpdates
> 4) encodeAll
> 4) encodeBegin
> explicitly says that:
> 1) If the rendered property of this UIComponent is false, skip further processing.
> 2) call pushComponentToEL
> But in that order of invocations it is impossible to achieve rendered like this:
> <h:outputText rendered="#{component.id eq 'outputTextId'}" id="outputTextId" />
> i.e. any rendered ValueEpression based on component itself. In Myfaces  we should implement in in reverse order, because specified behaviour is buggy.
> Please see this mail thread: http://www.mail-archive.com/dev@myfaces.apache.org/msg53300.html
> and
> http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1002
> for details.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (MYFACES-3157) Fix order of isRendered and pushComponentToEL invocations

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

Martin Kočí commented on MYFACES-3157:
--------------------------------------

This affects methods visitTree too: specification says "UIComponent.visitTree() implementations must call UIComponent.pushComponentToEL() before performing the visit and UIComponent.popComponentFromEL() after the visit." - methos isVisitable reads "rendered" property. 

> Fix order of isRendered and pushComponentToEL invocations
> ---------------------------------------------------------
>
>                 Key: MYFACES-3157
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3157
>             Project: MyFaces Core
>          Issue Type: Bug
>         Environment: myfaces core trunk
>            Reporter: Martin Kočí
>         Attachments: myfaces-api-MYFACES-3157-v1.patch
>
>
> Current specification for lifecycles methods:
> 1) processDecodes
> 2) processValidators
> 3) processUpdates
> 4) encodeAll
> 4) encodeBegin
> explicitly says that:
> 1) If the rendered property of this UIComponent is false, skip further processing.
> 2) call pushComponentToEL
> But in that order of invocations it is impossible to achieve rendered like this:
> <h:outputText rendered="#{component.id eq 'outputTextId'}" id="outputTextId" />
> i.e. any rendered ValueEpression based on component itself. In Myfaces  we should implement in in reverse order, because specified behaviour is buggy.
> Please see this mail thread: http://www.mail-archive.com/dev@myfaces.apache.org/msg53300.html
> and
> http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1002
> for details.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (MYFACES-3157) Fix order of isRendered and pushComponentToEL invocations

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

Martin Kočí commented on MYFACES-3157:
--------------------------------------

Classes from API where if (!isRendered()) is used:

javax.faces.render.Renderer.encodeChildren(FacesContext, UIComponent)

javax.faces.component.UIComponent.isVisitable(VisitContext)
javax.faces.component.UIComponent.encodeAll(FacesContext)
javax.faces.component.UIComponentBase._isPhaseExecutable(FacesContext)

javax.faces.component.UIData.processDecodes(FacesContext)
javax.faces.component.UIData.processValidators(FacesContext)
javax.faces.component.UIData.processUpdates(FacesContext)
javax.faces.component.UIData.processColumnFacets(FacesContext, int)
javax.faces.component.UIData.processColumnChildren(FacesContext, int)

javax.faces.component.UIInput.processDecodes(FacesContext)
javax.faces.component.UIInput.processValidators(FacesContext)
javax.faces.component.UIInput.processUpdates(FacesContext)


UIData code is inconsistent already: UIData.processDecodes
if (!isRendered())
  return;
pushComponentToEL(context, this);


and UIData.processUpdates:
pushComponentToEL(context, this);
if (!isRendered())
 return;



> Fix order of isRendered and pushComponentToEL invocations
> ---------------------------------------------------------
>
>                 Key: MYFACES-3157
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3157
>             Project: MyFaces Core
>          Issue Type: Bug
>         Environment: myfaces core trunk
>            Reporter: Martin Kočí
>
> Current specification for lifecycles methods:
> 1) processDecodes
> 2) processValidators
> 3) processUpdates
> 4) encodeAll
> 4) encodeBegin
> explicitly says that:
> 1) If the rendered property of this UIComponent is false, skip further processing.
> 2) call pushComponentToEL
> But in that order of invocations it is impossible to achieve rendered like this:
> <h:outputText rendered="#{component.id eq 'outputTextId'}" id="outputTextId" />
> i.e. any rendered ValueEpression based on component itself. In Myfaces  we should implement in in reverse order, because specified behaviour is buggy.
> Please see this mail thread: http://www.mail-archive.com/dev@myfaces.apache.org/msg53300.html
> and
> http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1002
> for details.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (MYFACES-3157) Fix order of isRendered and pushComponentToEL invocations

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

Jakob Korherr commented on MYFACES-3157:
----------------------------------------

we can only do this, if it is not explicitely tested by the TCK!

Unfortunately, TCK-compliance is more important then fixing such spec-bugs...

> Fix order of isRendered and pushComponentToEL invocations
> ---------------------------------------------------------
>
>                 Key: MYFACES-3157
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3157
>             Project: MyFaces Core
>          Issue Type: Bug
>         Environment: myfaces core trunk
>            Reporter: Martin Kočí
>
> Current specification for lifecycles methods:
> 1) processDecodes
> 2) processValidators
> 3) processUpdates
> 4) encodeAll
> 4) encodeBegin
> explicitly says that:
> 1) If the rendered property of this UIComponent is false, skip further processing.
> 2) call pushComponentToEL
> But in that order of invocations it is impossible to achieve rendered like this:
> <h:outputText rendered="#{component.id eq 'outputTextId'}" id="outputTextId" />
> i.e. any rendered ValueEpression based on component itself. In Myfaces  we should implement in in reverse order, because specified behaviour is buggy.
> Please see this mail thread: http://www.mail-archive.com/dev@myfaces.apache.org/msg53300.html
> and
> http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1002
> for details.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira