Author: nbelaevski
Date: 2010-07-21 10:10:47 -0400 (Wed, 21 Jul 2010)
New Revision: 18177
Modified:
root/core/trunk/api/src/main/java/org/ajax4jsf/Messages.java
root/core/trunk/api/src/main/java/org/richfaces/skin/Skin.java
root/core/trunk/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java
root/core/trunk/impl/src/main/java/org/richfaces/skin/BasicSkinImpl.java
root/core/trunk/impl/src/main/java/org/richfaces/skin/SkinBean.java
root/core/trunk/impl/src/main/resources/org/ajax4jsf/messages.properties
root/core/trunk/impl/src/test/java/org/richfaces/skin/SkinTestCase.java
root/core/trunk/impl/src/test/resources/bindedtest.skin.properties
Log:
Removed renderkit parameter handling from skins
Modified: root/core/trunk/api/src/main/java/org/ajax4jsf/Messages.java
===================================================================
--- root/core/trunk/api/src/main/java/org/ajax4jsf/Messages.java 2010-07-21 13:35:53 UTC
(rev 18176)
+++ root/core/trunk/api/src/main/java/org/ajax4jsf/Messages.java 2010-07-21 14:10:47 UTC
(rev 18177)
@@ -110,7 +110,6 @@
public static final String ENCODING_TEMPLATE_TERMINATED_INFO =
"ENCODING_TEMPLATE_TERMINATED_INFO";
public static final String END_DOCUMENT_SAX_EXCEPTION =
"END_DOCUMENT_SAX_EXCEPTION";
public static final String END_ELEMENT_SAX_EXCEPTION =
"END_ELEMENT_SAX_EXCEPTION";
- public static final String ENTER_BEFORE_RENDER_VIEW_PHASE =
"ENTER_BEFORE_RENDER_VIEW_PHASE";
public static final String ERROR_ON_PAGE = "ERROR_ON_PAGE";
public static final String EVENT_IS_READ_ONLY = "EVENT_IS_READ_ONLY";
public static final String EVENT_MUST_BE_LITERAL =
"EVENT_MUST_BE_LITERAL";
@@ -253,7 +252,6 @@
public static final String SET_AJAX_LISTENER = "SET_AJAX_LISTENER";
public static final String SET_AJAX_REQUEST = "SET_AJAX_REQUEST";
public static final String SET_MYFACES_SEQUENCE_INFO =
"SET_MYFACES_SEQUENCE_INFO";
- public static final String SET_RENDER_KIT_ID_INFO =
"SET_RENDER_KIT_ID_INFO";
public static final String SET_RESPONSE_HEADERS_INFO =
"SET_RESPONSE_HEADERS_INFO";
public static final String SET_SKIN_FACTORY_INFO =
"SET_SKIN_FACTORY_INFO";
public static final String SET_VALUE_BINDING_FOR_EVENT =
"SET_VALUE_BINDING_FOR_EVENT";
Modified: root/core/trunk/api/src/main/java/org/richfaces/skin/Skin.java
===================================================================
--- root/core/trunk/api/src/main/java/org/richfaces/skin/Skin.java 2010-07-21 13:35:53 UTC
(rev 18176)
+++ root/core/trunk/api/src/main/java/org/richfaces/skin/Skin.java 2010-07-21 14:10:47 UTC
(rev 18177)
@@ -253,16 +253,6 @@
public static final String TAB_WEIGHT_FONT = "tabWeightFont";
/**
- * Get Rener Kit name for this skin.
- *
- * @param context -
- * {@link FacesContext } for current request. need for
- * {@link javax.faces.el.ValueBinding} evaluation.
- * @return RenderKitId for this skin, or <code>null</code> for default.
- */
- public String getRenderKitId(FacesContext context);
-
- /**
* Get value for configuration parameter. If parameter set as EL-expression,
* calculate it value.
*
Modified: root/core/trunk/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java
===================================================================
---
root/core/trunk/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java 2010-07-21
13:35:53 UTC (rev 18176)
+++
root/core/trunk/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java 2010-07-21
14:10:47 UTC (rev 18177)
@@ -21,19 +21,18 @@
package org.ajax4jsf.event;
-import org.ajax4jsf.Messages;
-import org.ajax4jsf.context.AjaxContext;
-import org.richfaces.log.RichfacesLogger;
-import org.richfaces.skin.SkinFactory;
-import org.slf4j.Logger;
+import java.util.Map;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;
-import java.util.Map;
+import org.ajax4jsf.context.AjaxContext;
+import org.richfaces.log.RichfacesLogger;
+import org.slf4j.Logger;
+
/**
* Listener for act before Render phase to set RenderKit Id for current skin.
*
@@ -99,27 +98,6 @@
// Clear ViewId replacement, to avoid incorrect rendering of forms
// URI.
AjaxContext.getCurrentInstance(context).setViewIdHolder(null);
-
- UIViewRoot root = context.getViewRoot();
-
- if (null != root) {
- LOG.debug(Messages.getMessage(Messages.ENTER_BEFORE_RENDER_VIEW_PHASE,
root.getViewId(),
- root.getRenderKitId()));
-
- // TODO - create special skin-config.xml configuration.
- String renderKitId = null;
-
- try {
- renderKitId =
SkinFactory.getInstance().getSkin(context).getRenderKitId(context);
- } catch (Exception e) {
- LOG.error("Exception on get current Skin ", e);
- }
-
- if (null != renderKitId) {
- LOG.debug(Messages.getMessage(Messages.SET_RENDER_KIT_ID_INFO,
renderKitId));
- root.setRenderKitId(renderKitId);
- }
- }
} else if (phaseId == PhaseId.RESTORE_VIEW) {
// TODO Refactoring
Modified: root/core/trunk/impl/src/main/java/org/richfaces/skin/BasicSkinImpl.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/skin/BasicSkinImpl.java 2010-07-21
13:35:53 UTC (rev 18176)
+++ root/core/trunk/impl/src/main/java/org/richfaces/skin/BasicSkinImpl.java 2010-07-21
14:10:47 UTC (rev 18177)
@@ -39,8 +39,6 @@
*/
public abstract class BasicSkinImpl implements Skin {
- public static final String RENDER_KIT_PARAMETER = "render.kit";
-
private int hashCode = 0;
private final Map<Object, Object> skinParams;
@@ -60,14 +58,6 @@
/*
* (non-Javadoc)
- * @see org.richfaces.skin.Skin#getRenderKitId(javax.faces.context.FacesContext)
- */
- public String getRenderKitId(FacesContext context) {
- return (String) getValueReference(context, resolveSkinParameter(context,
RENDER_KIT_PARAMETER));
- }
-
- /*
- * (non-Javadoc)
* @see org.richfaces.skin.Skin#getParameter(javax.faces.context.FacesContext,
java.lang.String)
*/
public Object getParameter(FacesContext context, String name) {
Modified: root/core/trunk/impl/src/main/java/org/richfaces/skin/SkinBean.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/skin/SkinBean.java 2010-07-21
13:35:53 UTC (rev 18176)
+++ root/core/trunk/impl/src/main/java/org/richfaces/skin/SkinBean.java 2010-07-21
14:10:47 UTC (rev 18177)
@@ -109,14 +109,6 @@
/*
* (non-Javadoc)
- * @see org.richfaces.skin.Skin#getRenderKitId(javax.faces.context.FacesContext)
- */
- public String getRenderKitId(FacesContext context) {
- return getSkin().getRenderKitId(context);
- }
-
- /*
- * (non-Javadoc)
* @see org.richfaces.skin.Skin#getParameter(javax.faces.context.FacesContext,
java.lang.String)
*/
public Object getParameter(FacesContext context, String name) {
Modified: root/core/trunk/impl/src/main/resources/org/ajax4jsf/messages.properties
===================================================================
--- root/core/trunk/impl/src/main/resources/org/ajax4jsf/messages.properties 2010-07-21
13:35:53 UTC (rev 18176)
+++ root/core/trunk/impl/src/main/resources/org/ajax4jsf/messages.properties 2010-07-21
14:10:47 UTC (rev 18177)
@@ -118,8 +118,6 @@
GET_DEFAULT_RENDER_KIT_ERROR=Error for get default render kit
DEFAULT_RENDER_KIT_INFO=Default render kit id for chameleon will: {0}
AJAX_RESPONSE_NOT_RENDERED_INFO=AJAX response not rendered - possible MyFaces <f:view
tag behavior.
-ENTER_BEFORE_RENDER_VIEW_PHASE=PhaseListener enter Before RenderView Phase with ViewId
{0} and RenderKitId {1}
-SET_RENDER_KIT_ID_INFO=PhaseListener Set new RenderKitId to {0}
PROCESS_AJAX_EVENTS_INFO=Process AJAX events to calculate areas.
DELEGATE_AJAX_PROCESSING_INFO=Delegate AJAX processing to container.
BREAKPOINTS_UNSUPPORTED_INSIDE_ATTRIBUTE_ERROR=Breakpoints inside attribute element not
allowed, attribute name: {0} of component: {1}
Modified: root/core/trunk/impl/src/test/java/org/richfaces/skin/SkinTestCase.java
===================================================================
--- root/core/trunk/impl/src/test/java/org/richfaces/skin/SkinTestCase.java 2010-07-21
13:35:53 UTC (rev 18176)
+++ root/core/trunk/impl/src/test/java/org/richfaces/skin/SkinTestCase.java 2010-07-21
14:10:47 UTC (rev 18177)
@@ -237,7 +237,6 @@
//
assertEquals("base.string",skin.getParameter(mockContext,"base.property"));
assertEquals("binded.test.value", skin.getParameter(facesContext,
"bind.property"));
- assertEquals("TEST", skin.getRenderKitId(facesContext));
}
@SkinParameters(skinName = "#{test.skin}")
Modified: root/core/trunk/impl/src/test/resources/bindedtest.skin.properties
===================================================================
--- root/core/trunk/impl/src/test/resources/bindedtest.skin.properties 2010-07-21 13:35:53
UTC (rev 18176)
+++ root/core/trunk/impl/src/test/resources/bindedtest.skin.properties 2010-07-21 14:10:47
UTC (rev 18177)
@@ -1,4 +1,3 @@
-render.kit=TEST
string.property=bindedstring
int.property=10
bind.property=\#{test.bean}
Show replies by date