[richfaces-issues] [JBoss JIRA] Commented: (RF-6039) reRender is f:subview blind (and it shouldn't)

Francisco Jose Peredo Noguez (JIRA) jira-events at lists.jboss.org
Thu Feb 5 13:28:44 EST 2009


    [ https://jira.jboss.org/jira/browse/RF-6039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12451361#action_12451361 ] 

Francisco Jose Peredo Noguez commented on RF-6039:
--------------------------------------------------

This problem can be worked around in some cases by manually prefixing the ids in the reRender with the f:subview id. Example:

<a:commandButton id="commandButton" reRender = "idSubview2:idOfRichControl"> 

But that solution is insufficient because, if the subView id is not known. Example:

<f:subview id="idSubView1">   
   <ui:include src="OtherStuff.xhtml" />
</f:subview> 

<f:subview id="idSubView1">   
   <ui:include src="OtherStuff.xhtml" />
</f:subview> 

>From inside OtherStuff.xhtml there is no way to know the id of subview  (there is no way to even know if it inside a subView, or inside a subView of a subView or inside a subView of a subView. Example:

<f:subview id="...">   
.
. //N levels of subviews
.
<f:subview id="idSubView1">   
   <ui:include src="OtherStuff.xhtml" />
</f:subview> 
.
.
.
</f:subview> 


I think richfaces reRendering should be smart enough to start looking for the controls that will be reRendered inside the same subView where the control triggering the rerendering is located, and only if does not find it there, start looking outside. Without that, reutilization is severely limited.






> reRender is f:subview blind (and it shouldn't)
> ----------------------------------------------
>
>                 Key: RF-6039
>                 URL: https://jira.jboss.org/jira/browse/RF-6039
>             Project: RichFaces
>          Issue Type: Bug
>            Reporter: Francisco Jose Peredo Noguez
>
> rerender is subView blind, lets say we have 2 subview
> <f:subview id="idSubview1">
> <a:aRichControl="idOfRichControl">
> <a:commandButton id="commandButton" reRender = "idOfRichControl">
> </f:subview id="someSubview1">
> <f:subview id="idSubview2">
> <a:aRichControlid="idOfRichControl">
> <a:commandButton id="commandButton" reRender = "idOfRichControl">
> </f:subview id="someSubview1">
> Since we are using subview, it does not matter that the id of the aRichControl inside each of the subview is the same, because the id of the subview is prefixed on runtime, so the ids of the two aRichControl end up being idSubview1:idOfRichControl and idSubview2:idOfRichControl.
> But the problem is that reRender  is  subView blind, so, idSubview2.commandButton will reRender the first idSubview1:idOfRichControl instead of  idSubview2:idOfRichControl.

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

        



More information about the richfaces-issues mailing list