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/27 00:36:15 UTC
svn commit: r948624 - in
/myfaces/core/trunk/api/src/main/java/javax/faces/component:
UIComponentBase.java UIViewRoot.java _SelectItemsIterator.java
behavior/ClientBehaviorBase.java
Author: lu4242
Date: Wed May 26 22:36:15 2010
New Revision: 948624
URL: http://svn.apache.org/viewvc?rev=948624&view=rev
Log:
use cached facesContext
Modified:
myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/_SelectItemsIterator.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/behavior/ClientBehaviorBase.java
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java?rev=948624&r1=948623&r2=948624&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java Wed May 26 22:36:15 2010
@@ -108,6 +108,8 @@ public abstract class UIComponentBase ex
private Map<String, List<ClientBehavior>> _behaviorsMap = null;
private transient Map<String, List<ClientBehavior>> _unmodifiableBehaviorsMap = null;
+ transient Character _separatorChar;
+
public UIComponentBase()
{
}
@@ -498,6 +500,15 @@ public abstract class UIComponentBase ex
popComponentFromEL(context);
}
}
+
+ char getSeparatorChar()
+ {
+ if (_separatorChar == null)
+ {
+ _separatorChar = Character.valueOf(UINamingContainer.getSeparatorChar(FacesContext.getCurrentInstance()));
+ }
+ return _separatorChar.charValue();
+ }
/**
* Standard method for finding other components by id, inherited by most UIComponent objects.
@@ -530,7 +541,7 @@ public abstract class UIComponentBase ex
if (expr.length() == 0)
return null;
- final char separatorChar = UINamingContainer.getSeparatorChar(FacesContext.getCurrentInstance());
+ final char separatorChar = getSeparatorChar();
UIComponent findBase;
if (expr.charAt(0) == separatorChar)
{
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java?rev=948624&r1=948623&r2=948624&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java Wed May 26 22:36:15 2010
@@ -240,7 +240,7 @@ public class UIViewRoot extends UICompon
*/
public String createUniqueId()
{
- return createUniqueId(FacesContext.getCurrentInstance(), null);
+ return createUniqueId(getFacesContext(), null);
}
/**
@@ -568,7 +568,7 @@ public class UIViewRoot extends UICompon
{
// Call UIComponentBase.getRendersChildren()
// If PartialViewContext.isAjaxRequest() returns true this method must return true.
- PartialViewContext context = FacesContext.getCurrentInstance().getPartialViewContext();
+ PartialViewContext context = getFacesContext().getPartialViewContext();
return (context.isAjaxRequest()) ? true : super.getRendersChildren();
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/_SelectItemsIterator.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/_SelectItemsIterator.java?rev=948624&r1=948623&r2=948624&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/_SelectItemsIterator.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/_SelectItemsIterator.java Wed May 26 22:36:15 2010
@@ -179,7 +179,7 @@ class _SelectItemsIterator implements It
else
{
Level level = Level.FINE;
- if (!FacesContext.getCurrentInstance().isProjectStage(ProjectStage.Production))
+ if (!_facesContext.isProjectStage(ProjectStage.Production))
{
level = Level.WARNING;
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/behavior/ClientBehaviorBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/behavior/ClientBehaviorBase.java?rev=948624&r1=948623&r2=948624&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/behavior/ClientBehaviorBase.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/behavior/ClientBehaviorBase.java Wed May 26 22:36:15 2010
@@ -91,7 +91,7 @@ public class ClientBehaviorBase extends
throw new NullPointerException("behaviorContext");
}
- ClientBehaviorRenderer renderer = getRenderer(FacesContext.getCurrentInstance());
+ ClientBehaviorRenderer renderer = getRenderer(behaviorContext.getFacesContext());
if (renderer != null)
{
// If a BehaviorRenderer is available for the specified behavior renderer type, this method delegates