You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Pichai Ongvasith (JIRA)" <de...@myfaces.apache.org> on 2005/12/30 05:28:00 UTC

[jira] Created: (MYFACES-987) CLONE -Rendered attribute with request bean field makes a commandLink's action not get called.

CLONE -Rendered attribute with request bean field makes a commandLink's action not get called.
----------------------------------------------------------------------------------------------

         Key: MYFACES-987
         URL: http://issues.apache.org/jira/browse/MYFACES-987
     Project: MyFaces
        Type: Bug
    Versions: 1.0.7 beta, 1.0.8 beta    
 Environment: MyFaces CVS, Tomcat 5.0.28, Windows XP
    Reporter: Pichai Ongvasith


This is a bug which exist in JSF RI, and also exists in MyFaces.
Check out this forum post which describes it in detail.

http://forum.java.sun.com/thread.jspa?threadID=581959&tstart=45

The problem also occurs when a container in a higher level contains a similar rendered attribute. In my case a panelGroup.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-987) CLONE -Rendered attribute with request bean field makes a commandLink's action not get called.

Posted by "Dennis Byrne (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-987?page=comments#action_12361405 ] 

Dennis Byrne commented on MYFACES-987:
--------------------------------------

<t:saveState value="#{backingBean.propertyThatIsBoundToRendered}" />
<h:actionSource rendered="#{backingBean.propertyThatIsBoundToRendered}" />

There are lots of people on the user mailing list who can help with this one :)

> CLONE -Rendered attribute with request bean field makes a commandLink's action not get called.
> ----------------------------------------------------------------------------------------------
>
>          Key: MYFACES-987
>          URL: http://issues.apache.org/jira/browse/MYFACES-987
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.7 beta, 1.0.8 beta
>  Environment: MyFaces CVS, Tomcat 5.0.28, Windows XP
>     Reporter: Pichai Ongvasith

>
> This is a bug which exist in JSF RI, and also exists in MyFaces.
> Check out this forum post which describes it in detail.
> http://forum.java.sun.com/thread.jspa?threadID=581959&tstart=45
> The problem also occurs when a container in a higher level contains a similar rendered attribute. In my case a panelGroup.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-987) CLONE -Rendered attribute with request bean field makes a commandLink's action not get called.

Posted by "Pichai Ongvasith (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-987?page=comments#action_12361404 ] 

Pichai Ongvasith commented on MYFACES-987:
------------------------------------------

I'm not sure this is a valid issue, but I think the current behavior is annoying.
I read through the specification and didn't see anything specifying that rendered attribute must be checked during Apply Request Value phase, which also queues botton actions for later processing.

The condition of the problem is that
-  a commandBotton has the attribute "rendered" value bound to a backing bean's property.
- The backing bean is in a request scope.

This is how the issue would occur
- During the previous post, the backing bean computes its own state and set the property to true.
- The botton is rendered.
- During the Apply Request Values phase of the subsequent post back, the backing bean's state may be immature because some of its state may depend on other input fields, which have not been set until the Update Model Values phase.
- The backing bean immaturely computes its own state and set the property to false.
- The botton's rendered attribute is set to false, and, consequently, the action is not queued during the Apply Request Value phase.

With the current implementation of myfaces, the workaround is to set the scope of the backing bean to sessionScope. That could be a valid way to implementation what I intend to do. But I believe, this would make rendered attribute less useful, because all the backing beans that compute the rendered attribute value have to be in the session scope, instead of the more preferred request scope.

Another argument against the current implementation is that, if the button was rendered, the action, if any, should be queued during the post back  no matter what the state of the rendered attribute would be during the Apply Request Value phase of the post back.

> CLONE -Rendered attribute with request bean field makes a commandLink's action not get called.
> ----------------------------------------------------------------------------------------------
>
>          Key: MYFACES-987
>          URL: http://issues.apache.org/jira/browse/MYFACES-987
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.7 beta, 1.0.8 beta
>  Environment: MyFaces CVS, Tomcat 5.0.28, Windows XP
>     Reporter: Pichai Ongvasith

>
> This is a bug which exist in JSF RI, and also exists in MyFaces.
> Check out this forum post which describes it in detail.
> http://forum.java.sun.com/thread.jspa?threadID=581959&tstart=45
> The problem also occurs when a container in a higher level contains a similar rendered attribute. In my case a panelGroup.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (MYFACES-987) CLONE -Rendered attribute with request bean field makes a commandLink's action not get called.

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-987?page=all ]
     
Mike Kienenberger closed MYFACES-987:
-------------------------------------

    Resolution: Invalid

Whether or not we like the behavior, it's necessary to be JSF spec compliant.

See the MyFaces FAQ for information on how to submit a change request to the JSF spec.

> CLONE -Rendered attribute with request bean field makes a commandLink's action not get called.
> ----------------------------------------------------------------------------------------------
>
>          Key: MYFACES-987
>          URL: http://issues.apache.org/jira/browse/MYFACES-987
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.7 beta, 1.0.8 beta
>  Environment: MyFaces CVS, Tomcat 5.0.28, Windows XP
>     Reporter: Pichai Ongvasith

>
> This is a bug which exist in JSF RI, and also exists in MyFaces.
> Check out this forum post which describes it in detail.
> http://forum.java.sun.com/thread.jspa?threadID=581959&tstart=45
> The problem also occurs when a container in a higher level contains a similar rendered attribute. In my case a panelGroup.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira