You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2010/05/20 18:11:06 UTC
svn commit: r946683 - in
/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html:
HtmlOutputScriptHandler.java HtmlOutputStylesheetHandler.java
Author: lu4242
Date: Thu May 20 16:11:06 2010
New Revision: 946683
URL: http://svn.apache.org/viewvc?rev=946683&view=rev
Log:
MYFACES-2727 h:outputScript / h:outputStylesheet bad relocation when pss is used and there is a refresh transient build (scan only viewRoot facets)
Modified:
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlOutputScriptHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlOutputStylesheetHandler.java
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlOutputScriptHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlOutputScriptHandler.java?rev=946683&r1=946682&r2=946683&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlOutputScriptHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlOutputScriptHandler.java Thu May 20 16:11:06 2010
@@ -18,7 +18,10 @@
*/
package org.apache.myfaces.view.facelets.tag.jsf.html;
+import java.util.Iterator;
+
import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
import javax.faces.view.facelets.ComponentConfig;
import javax.faces.view.facelets.FaceletContext;
@@ -50,7 +53,14 @@ public class HtmlOutputScriptHandler ext
UIComponent c = ComponentSupport.findChildByTagId(parent, id);
if (c == null)
{
- return ComponentSupport.findChildByTagId(ComponentSupport.getViewRoot(ctx, parent), id);
+ UIViewRoot root = ComponentSupport.getViewRoot(ctx, parent);
+ Iterator<UIComponent> itr = root.getFacets().values().iterator();
+ while (itr.hasNext() && c == null)
+ {
+ UIComponent facet = itr.next();
+ c = ComponentSupport.findChildByTagId(facet, id);
+ }
+ return c;
}
else
{
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlOutputStylesheetHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlOutputStylesheetHandler.java?rev=946683&r1=946682&r2=946683&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlOutputStylesheetHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlOutputStylesheetHandler.java Thu May 20 16:11:06 2010
@@ -18,7 +18,10 @@
*/
package org.apache.myfaces.view.facelets.tag.jsf.html;
+import java.util.Iterator;
+
import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
import javax.faces.view.facelets.ComponentConfig;
import javax.faces.view.facelets.FaceletContext;
@@ -46,7 +49,15 @@ public class HtmlOutputStylesheetHandler
public UIComponent findChildByTagId(FaceletContext ctx, UIComponent parent,
String id)
{
- return ComponentSupport.findChildByTagId(ComponentSupport.getViewRoot(ctx, parent), id);
+ UIComponent c = null;
+ UIViewRoot root = ComponentSupport.getViewRoot(ctx, parent);
+ Iterator<UIComponent> itr = root.getFacets().values().iterator();
+ while (itr.hasNext() && c == null)
+ {
+ UIComponent facet = itr.next();
+ c = ComponentSupport.findChildByTagId(facet, id);
+ }
+ return c;
}
}