JBoss Rich Faces SVN: r4524 - in branches/3.1.x/ui/orderingList/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-12-05 21:02:58 -0500 (Wed, 05 Dec 2007)
New Revision: 4524
Modified:
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
Log:
onorderchanged event handler updated
Modified: branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java 2007-12-06 00:37:42 UTC (rev 4523)
+++ branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java 2007-12-06 02:02:58 UTC (rev 4524)
@@ -16,6 +16,11 @@
import javax.faces.context.ResponseWriter;
import javax.faces.convert.Converter;
+import org.ajax4jsf.javascript.JSFunction;
+import org.ajax4jsf.javascript.JSFunctionDefinition;
+import org.ajax4jsf.javascript.JSReference;
+import org.ajax4jsf.javascript.ScriptString;
+import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.renderkit.ComponentVariables;
import org.ajax4jsf.renderkit.ComponentsVariableResolver;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
@@ -461,4 +466,23 @@
}
return "display: none;";
}
+
+ public String getAsEventHandler(FacesContext context, UIComponent component, String attributeName) {
+ String event = (String) component.getAttributes().get(attributeName);
+ ScriptString result = JSReference.NULL;
+
+ if (event != null) {
+ event = event.trim();
+
+ if (event.length() != 0) {
+ JSFunctionDefinition function = new JSFunctionDefinition();
+ function.addParameter("event");
+ function.addToBody(event);
+
+ result = function;
+ }
+ }
+
+ return ScriptUtils.toScript(result);
+ }
}
Modified: branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-12-06 00:37:42 UTC (rev 4523)
+++ branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-12-06 02:02:58 UTC (rev 4524)
@@ -9,7 +9,11 @@
initialize: function(containerId, contentTableId, headerTableId, focusKeeperId,
ids, onclickControlId, onorderchanged) {
Richfaces.OrderingList.parentClass.constructor().call(this, containerId, contentTableId, headerTableId, focusKeeperId, onclickControlId);
- this.onorderchanged = onorderchanged;
+
+ if (onorderchanged) {
+ this.container.observe("rich:onorderchanged", onorderchanged);
+ }
+
this.controlList = new Array();
this.initControlList(containerId, ids);
@@ -112,7 +116,7 @@
if (action != null)
this.autoScrolling(action, event);
- this.onorderchanged();
+ this.container.fire("rich:onorderchanged", {});
this.controlListManager();
this.saveState();
}
Modified: branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-12-06 00:37:42 UTC (rev 4523)
+++ branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-12-06 02:02:58 UTC (rev 4524)
@@ -89,7 +89,7 @@
var clientId = '#{cId}';
Event.onReady(function() {
var cotrolsIdPrefix = [['up', 'disup'], ['down', 'disdown'], ['last', 'dislast'], ['first','disfirst']];
- var shuttle = new Richfaces.OrderingList('#{cId}', '#{cId}internal_tab', '#{cId}internal_header_tab', '#{cId}focusKeeper', cotrolsIdPrefix, '#{cId}sortLabel', function() {#{component.attributes['onorderchanged']}});
+ var shuttle = new Richfaces.OrderingList('#{cId}', '#{cId}internal_tab', '#{cId}internal_header_tab', '#{cId}focusKeeper', cotrolsIdPrefix, '#{cId}sortLabel', #{this:getAsEventHandler(context, component, "onorderchanged")});
var layoutManager = new LayoutManager('#{clientId}internal_header_tab', '#{clientId}internal_tab');
layoutManager.widthSynchronization();
});
18 years, 5 months
JBoss Rich Faces SVN: r4523 - in trunk: framework/api/src/main/java/org/ajax4jsf/renderkit and 12 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-12-05 19:37:42 -0500 (Wed, 05 Dec 2007)
New Revision: 4523
Added:
trunk/framework/api/src/main/java/org/ajax4jsf/renderkit/UserResourceRenderer.java
trunk/framework/impl/src/main/java/org/ajax4jsf/context/ViewResources.java
trunk/framework/impl/src/main/resources/META-INF/skins/NULL.skin.properties
trunk/ui/assembly/scripts.txt
trunk/ui/assembly/styles.txt
Modified:
trunk/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java
trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResource.java
trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResourceBuilder.java
trunk/framework/api/src/main/java/org/richfaces/skin/Skin.java
trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
trunk/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/PPrint.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoParser.java
trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToXHTMLStream.java
trunk/samples/richfaces-demo/src/main/webapp/templates/include/header.xhtml
trunk/samples/skins/src/main/java/org/richfaces/SkinBean.java
trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/LoadResourceRendererBase.java
Log:
Fix http://jira.jboss.com/jira/browse/RF-851.
Create NULL skin ( without default stylesheet loading ).
Create configuration parameters for a scripts and styles loading strategy.
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java 2007-12-06 00:29:55 UTC (rev 4522)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java 2007-12-06 00:37:42 UTC (rev 4523)
@@ -1,6 +1,10 @@
package org.ajax4jsf.context;
+import java.io.BufferedReader;
import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.HashMap;
import java.util.Map;
import java.util.Set;
@@ -9,6 +13,7 @@
import javax.faces.context.FacesContext;
import javax.faces.el.VariableResolver;
+import org.ajax4jsf.Messages;
public abstract class AjaxContext {
@@ -56,22 +61,27 @@
public abstract void processHeadResources(FacesContext context)
throws FacesException;
- public abstract void encodeAjaxEnd(FacesContext context, UIComponent component)
- throws IOException;
+ public abstract void encodeAjaxEnd(FacesContext context,
+ UIComponent component) throws IOException;
- public abstract void encodeAjaxBegin(FacesContext context, UIComponent component)
- throws IOException;
+ public abstract void encodeAjaxBegin(FacesContext context,
+ UIComponent component) throws IOException;
- public abstract void renderAjaxRegion(FacesContext context, UIComponent component,
- boolean useFilterWriter) throws FacesException;
+ public abstract void renderAjaxRegion(FacesContext context,
+ UIComponent component, boolean useFilterWriter)
+ throws FacesException;
- public abstract void renderSubmittedAjaxRegion(FacesContext context, final boolean useFilterWriter);
+ public abstract void renderSubmittedAjaxRegion(FacesContext context,
+ final boolean useFilterWriter);
public abstract void renderSubmittedAjaxRegion(FacesContext context);
public static final String SCRIPTS_PARAMETER = "org.ajax4jsf.framework.HEADER_SCRIPTS";
public static final String STYLES_PARAMETER = "org.ajax4jsf.framework.HEADER_STYLES";
public static final String RESPONSE_DATA_KEY = "_ajax:data";
+ private static final String SERVICE_RESOURCE = "META-INF/services/"
+ + AjaxContext.class.getName();
+ private static final String DEFAULT_CONTEXT_CLASS = "org.ajax4jsf.context.AjaxContextImpl";
/**
* Get instance of current AJAX Context. Instance get by
@@ -81,39 +91,91 @@
* @return memento instance for current request
*/
public static AjaxContext getCurrentInstance() {
- FacesContext context = FacesContext.getCurrentInstance();
- return getCurrentInstance(context);
+ FacesContext context = FacesContext.getCurrentInstance();
+ return getCurrentInstance(context);
}
+ private static Map<ClassLoader, Class<AjaxContext>> ajaxContextClasses = new HashMap<ClassLoader, Class<AjaxContext>>();
+
/**
* Get instance of current AJAX Context. Instance get by
* {@link VariableResolver#resolveVariable(FacesContext, String)} for
* variable {@link AjaxContext#AJAX_CONTEXT_KEY}
*
* @param context
- * current FacesContext
+ * current FacesContext
* @return instance of AjaxContext.
*/
public static AjaxContext getCurrentInstance(FacesContext context) {
- if (null == context) {
- throw new NullPointerException("FacesContext is null");
+ if (null == context) {
+ throw new NullPointerException("FacesContext is null");
+ }
+ Map<String, Object> requestMap = context.getExternalContext()
+ .getRequestMap();
+ AjaxContext ajaxContext = (AjaxContext) requestMap
+ .get(AJAX_CONTEXT_KEY);
+ if (null == ajaxContext) {
+ // TODO Create default implementation.
+ // ajaxContext = new AjaxContext();
+ ClassLoader contextClassLoader = Thread.currentThread()
+ .getContextClassLoader();
+ Class<AjaxContext> clazz;
+ synchronized (ajaxContextClasses) {
+ clazz = ajaxContextClasses.get(contextClassLoader);
+ if (null == clazz) {
+ String factoryClassName = DEFAULT_CONTEXT_CLASS;
+ // Pluggable factories.
+ InputStream input = null; // loader.getResourceAsStream(SERVICE_RESOURCE);
+ input = contextClassLoader
+ .getResourceAsStream(SERVICE_RESOURCE);
+ // have services file.
+ if (input != null) {
+ try {
+ BufferedReader reader = new BufferedReader(
+ new InputStreamReader(input));
+ factoryClassName = reader.readLine();
+
+ } catch (Exception e) {
+ throw new FacesException(
+ "Error to create AjaxContext Instance", e);
+ } finally {
+ try {
+ input.close();
+ } catch (IOException e) {
+ // Ignore
+ }
+ }
+ }
+ try {
+ clazz = (Class<AjaxContext>) Class.forName(
+ factoryClassName, false, contextClassLoader);
+ } catch (ClassNotFoundException e) {
+ throw new FacesException(
+ "AjaxContext implementation class "
+ + factoryClassName + " not found ", e);
+ }
+ ajaxContextClasses.put(contextClassLoader, clazz);
+
+ }
+ }
+ try {
+ ajaxContext = clazz.newInstance();
+ } catch (InstantiationException e) {
+ throw new FacesException(
+ "Error to create AjaxContext Instance", e);
+ } catch (IllegalAccessException e) {
+ throw new FacesException(
+ "No access to AjaxContext constructor", e);
+ }
+ requestMap.put(AJAX_CONTEXT_KEY, ajaxContext);
+ }
+ return ajaxContext;
}
- AjaxContext ajaxContext = (AjaxContext) context.getApplication()
- .getVariableResolver().resolveVariable(context,
- AJAX_CONTEXT_KEY);
- if (null == ajaxContext) {
- // TODO Create default implementation.
-// ajaxContext = new AjaxContext();
-// context.getExternalContext().getRequestMap().put(AJAX_CONTEXT_KEY,
-// ajaxContext);
- }
- return ajaxContext;
- }
public AjaxContext() {
super();
}
-
+
public abstract void release();
public abstract Map getResponseDataMap();
Added: trunk/framework/api/src/main/java/org/ajax4jsf/renderkit/UserResourceRenderer.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/renderkit/UserResourceRenderer.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/renderkit/UserResourceRenderer.java 2007-12-06 00:37:42 UTC (rev 4523)
@@ -0,0 +1,34 @@
+package org.ajax4jsf.renderkit;
+
+import java.util.LinkedHashSet;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+/**
+ * Marker interface for a user-defined resources for a HTML HEAD tag.
+ * There resourses must be loaded AFTER all other components.
+ * @author asmirnov
+ *
+ */
+public interface UserResourceRenderer {
+
+ /**
+ * Return set of strings with URI's of nessesary scripts.
+ * Use linked set to preserve insertion order
+ * @param context - current faces context.
+ * @param component TODO
+ * @return - set of URI's or null
+ */
+ public LinkedHashSet getHeaderScripts(FacesContext context, UIComponent component);
+
+ /**
+ * Return set of strings with URI's of nessesary CSS styles.
+ * Use linked set to preserve insertion order.
+ * @param context - current faces context.
+ * @param component TODO
+ * @return - set of URI's or null
+ */
+ public LinkedHashSet getHeaderStyles(FacesContext context, UIComponent component);
+
+}
Property changes on: trunk/framework/api/src/main/java/org/ajax4jsf/renderkit/UserResourceRenderer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResource.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResource.java 2007-12-06 00:29:55 UTC (rev 4522)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResource.java 2007-12-06 00:37:42 UTC (rev 4523)
@@ -49,7 +49,6 @@
public static final int RESOURCE_URI_PREFIX_LENGTH = RESOURCE_URI_PREFIX.length();
public static final String DATA_SEPARATOR = "/DATA/";
static public final long DEFAULT_EXPIRE = 1000L * 60L * 60L * 24L;// 1 day
-
/**
* @param resourceContext current {@link ResourceContext}
* @return Returns the contentLength.
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResourceBuilder.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResourceBuilder.java 2007-12-06 00:29:55 UTC (rev 4522)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResourceBuilder.java 2007-12-06 00:37:42 UTC (rev 4523)
@@ -38,6 +38,12 @@
public abstract class InternetResourceBuilder {
private static final Log log = LogFactory.getLog(InternetResourceBuilder.class);
+ public static final String LOAD_NONE = "NONE";
+ public static final String LOAD_ALL = "ALL";
+ public static final String COMMON_SCRIPT = "/org/richfaces/compressedScript.js";
+ public static final String COMMON_STYLE = "/org/richfaces/commonStyle.xcss";
+ public static final String LOAD_STYLE_STRATEGY_PARAM = "org.richfaces.LoadStyleStrategy";
+ public static final String LOAD_SCRIPT_STRATEGY_PARAM = "org.richfaces.LoadScriptStrategy";
/**
* Get application start time for check resources modification time.
Modified: trunk/framework/api/src/main/java/org/richfaces/skin/Skin.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/skin/Skin.java 2007-12-06 00:29:55 UTC (rev 4522)
+++ trunk/framework/api/src/main/java/org/richfaces/skin/Skin.java 2007-12-06 00:37:42 UTC (rev 4523)
@@ -240,6 +240,8 @@
public static final String generalLinkColor = "generalLinkColor";
public static final String panelTextColor = "panelTextColor";
+
+ public static final String loadStyleSheets = "loadStyleSheets";
// Preferable parameters
/**
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2007-12-06 00:29:55 UTC (rev 4522)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2007-12-06 00:37:42 UTC (rev 4523)
@@ -60,7 +60,9 @@
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.HeaderResourceProducer;
import org.ajax4jsf.renderkit.RendererUtils;
+import org.ajax4jsf.renderkit.UserResourceRenderer;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
+import org.ajax4jsf.resource.InternetResourceBuilder;
import org.ajax4jsf.webapp.BaseFilter;
import org.ajax4jsf.webapp.FilterServletResponseWrapper;
import org.apache.commons.logging.Log;
@@ -356,13 +358,48 @@
.debug("Process component tree for collect used scripts and styles");
}
UIViewRoot root = context.getViewRoot();
- Set scripts = new LinkedHashSet();
- Set styles = new LinkedHashSet();
- RenderKitFactory rkFactory = (RenderKitFactory) FactoryFinder
- .getFactory(FactoryFinder.RENDER_KIT_FACTORY);
- RenderKit renderKit = rkFactory.getRenderKit(context, context
- .getViewRoot().getRenderKitId());
- processHeadResources(context, root, scripts, styles, renderKit);
+ ViewResources viewResources = new ViewResources();
+ try {
+ Skin skin = SkinFactory.getInstance().getSkin(
+ context);
+ // Set default style sheet for current skin.
+ String styleSheetUri = (String) skin.getParameter(context,
+ Skin.generalStyleSheet);
+ if(null != styleSheetUri){
+ String resourceURL = context.getApplication()
+ .getViewHandler().getResourceURL(context,
+ styleSheetUri);
+ viewResources.addStyle(resourceURL);
+ }
+ // For a "NULL" skin, do not collect components stylesheets
+ if("false".equals(skin.getParameter(context, Skin.loadStyleSheets))){
+ viewResources.setProcessStyles(false);
+ }
+ } catch (SkinNotFoundException e) {
+ log.warn("Current Skin is not found", e);
+ }
+ InternetResourceBuilder internetResourceBuilder = InternetResourceBuilder.getInstance();
+ // Check init parameters for a resources processing.
+ String scriptStrategy = externalContext.getInitParameter(InternetResourceBuilder.LOAD_SCRIPT_STRATEGY_PARAM);
+ if(null != scriptStrategy){
+ if(InternetResourceBuilder.LOAD_NONE.equals(scriptStrategy)){
+ viewResources.setProcessScripts(false);
+ } else if (InternetResourceBuilder.LOAD_ALL.equals(scriptStrategy)) {
+ viewResources.setProcessScripts(false);
+ viewResources.addScript(internetResourceBuilder.createResource(this, InternetResourceBuilder.COMMON_SCRIPT).getUri(context, null));
+ }
+ }
+ String styleStrategy = externalContext.getInitParameter(InternetResourceBuilder.LOAD_STYLE_STRATEGY_PARAM);
+ if(null != styleStrategy){
+ if(InternetResourceBuilder.LOAD_NONE.equals(styleStrategy)){
+ viewResources.setProcessStyles(false);
+ } else if (InternetResourceBuilder.LOAD_ALL.equals(styleStrategy)) {
+ viewResources.setProcessStyles(false);
+ viewResources.addStyle(internetResourceBuilder.createResource(this, InternetResourceBuilder.COMMON_STYLE).getUri(context, null));
+ }
+ }
+ viewResources.collect(context);
+ Set scripts = viewResources.getScripts();
if (scripts.size() > 0) {
if (log.isDebugEnabled()) {
StringBuffer buff = new StringBuffer(
@@ -375,29 +412,7 @@
}
requestMap.put(SCRIPTS_PARAMETER, scripts);
}
- // Set default style sheet for current skin.
- String styleSheetUri = null;
- try {
- styleSheetUri = (String) SkinFactory.getInstance().getSkin(
- context).getParameter(context,
- Skin.generalStyleSheet);
- } catch (SkinNotFoundException e) {
- log.warn("Current Skin is not found", e);
- }
- if (null != styleSheetUri) {
- String resourceURL = context.getApplication()
- .getViewHandler().getResourceURL(context,
- styleSheetUri);
- // TODO - some resources can be non-session aware, we
- // must
- // skip encoding for this case ?
- // But, in common case - static links not need session
- // info,
- // and dynamic resources perform encodings if nessesary
- // resourceURL =
- // context.getExternalContext().encodeResourceURL(resourceURL);
- styles.add(resourceURL);
- }
+ Set styles = viewResources.getStyles();
if (styles.size() > 0) {
if (log.isDebugEnabled()) {
StringBuffer buff = new StringBuffer(
@@ -419,66 +434,7 @@
}
}
- /**
- * Append nessesary scripts and styles from component ( if renderer
- * implements {@link HeaderResourceProducer}) and recursive process all
- * facets and childrens.
- *
- * @param context
- * TODO
- * @param root
- * @param scripts
- * @param styles
- * @param renderKit
- * TODO
- */
- private void processHeadResources(FacesContext context, UIComponent root,
- Set scripts, Set styles, RenderKit renderKit) {
- Renderer renderer = getRenderer(context, root, renderKit);
- if (null != renderer) {
- if (renderer instanceof HeaderResourceProducer) {
- HeaderResourceProducer producer = (HeaderResourceProducer) renderer;
- Set set = producer.getHeaderScripts(context, root);
- if (null != set) {
- scripts.addAll(set);
- }
- set = producer.getHeaderStyles(context, root);
- if (null != set) {
- styles.addAll(set);
- }
- }
- }
- for (Iterator iter = root.getFacets().values().iterator(); iter
- .hasNext();) {
- UIComponent child = (UIComponent) iter.next();
- processHeadResources(context, child, scripts, styles, renderKit);
- }
- for (Iterator iter = root.getChildren().iterator(); iter.hasNext();) {
- UIComponent child = (UIComponent) iter.next();
- processHeadResources(context, child, scripts, styles, renderKit);
- }
- }
- /**
- * Find renderer for given component.
- *
- * @param context
- * @param comp
- * @param renderKit
- * @return
- */
- private Renderer getRenderer(FacesContext context, UIComponent comp,
- RenderKit renderKit) {
-
- String rendererType = comp.getRendererType();
- if (rendererType != null) {
- return (renderKit.getRenderer(comp.getFamily(), rendererType));
- } else {
- return (null);
- }
-
- }
-
public void saveViewState(FacesContext context) throws IOException {
// TODO - for facelets environment, we need to remove transient
// components.
Added: trunk/framework/impl/src/main/java/org/ajax4jsf/context/ViewResources.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/context/ViewResources.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/context/ViewResources.java 2007-12-06 00:37:42 UTC (rev 4523)
@@ -0,0 +1,166 @@
+/**
+ *
+ */
+package org.ajax4jsf.context;
+
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import javax.faces.FactoryFinder;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.faces.render.RenderKit;
+import javax.faces.render.RenderKitFactory;
+import javax.faces.render.Renderer;
+
+import org.ajax4jsf.renderkit.HeaderResourceProducer;
+import org.ajax4jsf.renderkit.UserResourceRenderer;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class ViewResources {
+
+ LinkedHashSet scripts = new LinkedHashSet();
+ LinkedHashSet styles = new LinkedHashSet();
+ LinkedHashSet userScripts = new LinkedHashSet();
+ LinkedHashSet userStyles = new LinkedHashSet();
+ boolean processStyles = true;
+ boolean processScripts = true;
+ RenderKit renderKit = null;
+
+ public void collect(FacesContext context) {
+ UIViewRoot root = context.getViewRoot();
+ RenderKitFactory rkFactory = (RenderKitFactory) FactoryFinder
+ .getFactory(FactoryFinder.RENDER_KIT_FACTORY);
+ renderKit = rkFactory.getRenderKit(context, context
+ .getViewRoot().getRenderKitId());
+ processHeadResources(context, root);
+ styles.addAll(userStyles);
+ scripts.addAll(userScripts);
+ }
+
+ /**
+ * Append nessesary scripts and styles from component ( if renderer
+ * implements {@link HeaderResourceProducer}) and recursive process all
+ * facets and childrens.
+ *
+ * @param context
+ * TODO
+ * @param root
+ */
+ private void processHeadResources(FacesContext context, UIComponent root) {
+ Renderer renderer = getRenderer(context, root);
+ if (null != renderer) {
+ if ((processScripts || processStyles ) && renderer instanceof HeaderResourceProducer) {
+ HeaderResourceProducer producer = (HeaderResourceProducer) renderer;
+ if (processScripts) {
+ Set set = producer.getHeaderScripts(context, root);
+ if (null != set) {
+ scripts.addAll(set);
+ }
+
+ }
+ if (processStyles) {
+ Set set = producer.getHeaderStyles(context, root);
+ if (null != set) {
+ styles.addAll(set);
+ }
+
+ }
+ } else if (renderer instanceof UserResourceRenderer) {
+ UserResourceRenderer producer = (UserResourceRenderer) renderer;
+ Set set = producer.getHeaderScripts(context, root);
+ if (null != set) {
+ userScripts.addAll(set);
+ }
+ set = producer.getHeaderStyles(context, root);
+ if (null != set) {
+ userStyles.addAll(set);
+ }
+ }
+
+ }
+ for (Iterator iter = root.getFacets().values().iterator(); iter
+ .hasNext();) {
+ UIComponent child = (UIComponent) iter.next();
+ processHeadResources(context, child);
+ }
+ for (Iterator iter = root.getChildren().iterator(); iter.hasNext();) {
+ UIComponent child = (UIComponent) iter.next();
+ processHeadResources(context, child);
+ }
+ }
+
+ /**
+ * Find renderer for given component.
+ *
+ * @param context
+ * @param comp
+ * @param renderKit
+ * @return
+ */
+ private Renderer getRenderer(FacesContext context, UIComponent comp) {
+
+ String rendererType = comp.getRendererType();
+ if (rendererType != null) {
+ return (renderKit.getRenderer(comp.getFamily(), rendererType));
+ } else {
+ return (null);
+ }
+
+ }
+
+ /**
+ * @return the processStyles
+ */
+ public boolean isProcessStyles() {
+ return processStyles;
+ }
+
+ /**
+ * @param processStyles the processStyles to set
+ */
+ public void setProcessStyles(boolean processStyles) {
+ this.processStyles = processStyles;
+ }
+
+ /**
+ * @return the processScripts
+ */
+ public boolean isProcessScripts() {
+ return processScripts;
+ }
+
+ /**
+ * @param processScripts the processScripts to set
+ */
+ public void setProcessScripts(boolean processScripts) {
+ this.processScripts = processScripts;
+ }
+
+ /**
+ * @return the scripts
+ */
+ public Set getScripts() {
+ return scripts;
+ }
+
+ /**
+ * @return the styles
+ */
+ public Set getStyles() {
+ return styles;
+ }
+
+ public void addScript(String scriptUrl) {
+ scripts.add(scriptUrl);
+ }
+
+ public void addStyle(String styleUrl) {
+ styles.add(styleUrl);
+ }
+}
Property changes on: trunk/framework/impl/src/main/java/org/ajax4jsf/context/ViewResources.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/PPrint.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/PPrint.java 2007-12-06 00:29:55 UTC (rev 4522)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/org/w3c/tidy/PPrint.java 2007-12-06 00:37:42 UTC (rev 4523)
@@ -1047,13 +1047,13 @@
}
// look for ASP, Tango or PHP instructions for computed attribute value
- if (valueChars != null && valueChars.length >= 5 && valueChars[0] == '<')
- {
- if (valueChars[1] == '%' || valueChars[1] == '@' || (new String(valueChars, 0, 5)).equals("<?php"))
- {
- mode |= CDATA;
- }
- }
+// if (valueChars != null && valueChars.length >= 5 && valueChars[0] == '<')
+// {
+// if (valueChars[1] == '%' || valueChars[1] == '@' || (new String(valueChars, 0, 5)).equals("<?php"))
+// {
+// mode |= CDATA;
+// }
+// }
if (delim == 0)
{
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java 2007-12-06 00:29:55 UTC (rev 4522)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java 2007-12-06 00:37:42 UTC (rev 4523)
@@ -423,7 +423,7 @@
filterName));
}
String resourcePrefix = (String) context
- .getAttribute(RESOURCE_URI_PREFIX_PARAM);
+ .getInitParameter(RESOURCE_URI_PREFIX_PARAM);
if (null == resourcePrefix) {
resourcePrefix = RESOURCE_URI_PREFIX;
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoParser.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoParser.java 2007-12-06 00:29:55 UTC (rev 4522)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoParser.java 2007-12-06 00:37:42 UTC (rev 4523)
@@ -380,7 +380,7 @@
}
}
- if (isStateMarker(element, attributes)) {
+ if (stateMarkerLevel <0 && isStateMarker(element, attributes)) {
stateMarkerLevel = 0;
return;
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToXHTMLStream.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToXHTMLStream.java 2007-12-06 00:29:55 UTC (rev 4522)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToXHTMLStream.java 2007-12-06 00:37:42 UTC (rev 4523)
@@ -966,7 +966,7 @@
{
ElemContext elemContext = m_elemContext;
- final ElemDesc elemDesc = elemContext.m_elementDesc;
+ final ElemDesc elemDesc = elemContext.m_elementDesc != null?elemContext.m_elementDesc:m_dummy;
final int elemFlags = elemDesc.getFlags();
final boolean elemEmpty = (elemFlags & ElemDesc.EMPTY) != 0;
Added: trunk/framework/impl/src/main/resources/META-INF/skins/NULL.skin.properties
===================================================================
--- trunk/framework/impl/src/main/resources/META-INF/skins/NULL.skin.properties (rev 0)
+++ trunk/framework/impl/src/main/resources/META-INF/skins/NULL.skin.properties 2007-12-06 00:37:42 UTC (rev 4523)
@@ -0,0 +1,65 @@
+loadStyleSheets=false
+#Colors
+headerBackgroundColor=#D4CFC7
+headerGradientColor=#EDEAE6
+headerTextColor=#000000
+headerWeightFont=bold
+
+generalBackgroundColor=#FFFFFF
+generalTextColor=#000000
+generalSizeFont=11px
+generalFamilyFont=Arial, Verdana, sans-serif
+
+controlTextColor=#000000
+controlBackgroundColor=#ffffff
+additionalBackgroundColor=#F1EEE9
+
+shadowBackgroundColor=#000000
+shadowOpacity=1
+
+panelBorderColor=#C4C0B9
+subBorderColor=#ffffff
+
+tabBackgroundColor=#E3DED5
+tabDisabledTextColor=#B1ADA7
+
+trimColor=#DFDCD5
+
+tipBackgroundColor=\#FAE6B0
+tipBorderColor=\#E5973E
+
+selectControlColor=#E79A00
+
+
+generalLinkColor=#0078D0
+hoverLinkColor=#0090FF
+visitedLinkColor=#0090FF
+
+# Fonts
+headerSizeFont=11px
+headerFamilyFont=Arial, Verdana, sans-serif
+
+tabSizeFont=11
+tabFamilyFont=Arial, Verdana, sans-serif
+
+buttonSizeFont=11
+buttonFamilyFont=Arial, Verdana, sans-serif
+
+tableBackgroundColor=#FFFFFF
+tableFooterBackgroundColor=#cccccc
+tableSubfooterBackgroundColor=#f1f1f1
+tableBorderColor=#C4C0C9
+tableBorderWidth=1px
+
+
+#Calendar colors
+calendarWeekBackgroundColor=#F1EEE9
+
+calendarHolidaysBackgroundColor=#FFEBDA
+calendarHolidaysTextColor=#FF7800
+
+calendarCurrentBackgroundColor=#FF7800
+calendarCurrentTextColor=#FFEBDA
+
+calendarSpecBackgroundColor=#F1EEE9
+calendarSpecTextColor=#000000
Property changes on: trunk/framework/impl/src/main/resources/META-INF/skins/NULL.skin.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/samples/richfaces-demo/src/main/webapp/templates/include/header.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/templates/include/header.xhtml 2007-12-06 00:29:55 UTC (rev 4522)
+++ trunk/samples/richfaces-demo/src/main/webapp/templates/include/header.xhtml 2007-12-06 00:37:42 UTC (rev 4523)
@@ -114,6 +114,12 @@
<f:param value="DEFAULT" name="s"/>
</h:outputLink>
</td>
+ <td>
+ <h:outputLink value="#{componentNavigator.currentComponent.contextRelativeDemoLocation}">
+ Null
+ <f:param value="NULL" name="s"/>
+ </h:outputLink>
+ </td>
<td class="control">
<rich:toggleControl for="skin_chooser" value="« less" />
</td>
Modified: trunk/samples/skins/src/main/java/org/richfaces/SkinBean.java
===================================================================
--- trunk/samples/skins/src/main/java/org/richfaces/SkinBean.java 2007-12-06 00:29:55 UTC (rev 4522)
+++ trunk/samples/skins/src/main/java/org/richfaces/SkinBean.java 2007-12-06 00:37:42 UTC (rev 4523)
@@ -45,7 +45,8 @@
"japanCherry",
"ruby",
"wine",
- "plain"
+ "plain",
+ "NULL"
};
private String defaultSkin = "blueSky";
Added: trunk/ui/assembly/scripts.txt
===================================================================
--- trunk/ui/assembly/scripts.txt (rev 0)
+++ trunk/ui/assembly/scripts.txt 2007-12-06 00:37:42 UTC (rev 4523)
@@ -0,0 +1,33 @@
+./org/richfaces/renderkit/html/script/SpinnerScript.js
+./org/richfaces/renderkit/html/script/SliderScript.js
+./org/richfaces/renderkit/html/script/virtualEarth.js
+./org/richfaces/renderkit/html/script/processEffect.js
+./org/richfaces/renderkit/html/script/gmap.js
+./org/richfaces/renderkit/html/scripts/JQuerySpinBtn.js
+./org/richfaces/renderkit/html/scripts/calendar.js
+./org/richfaces/renderkit/html/scripts/tree-selection.js
+./org/richfaces/renderkit/html/scripts/scriptaculo.js
+./org/richfaces/renderkit/html/scripts/tooltip.js
+./org/richfaces/renderkit/html/scripts/tree.js
+./org/richfaces/renderkit/html/scripts/togglePanel.js
+./org/richfaces/renderkit/html/scripts/simpleTogglePanel.js
+./org/richfaces/renderkit/html/scripts/menu.js
+./org/richfaces/renderkit/html/scripts/simple-draggable.js
+./org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/slider.js
+./org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/scriptaculous.js
+./org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/builder.js
+./org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/dragdrop.js
+./org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/unittest.js
+./org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/controls.js
+./org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/effects.js
+./org/richfaces/renderkit/html/scripts/panelbar.js
+./org/richfaces/renderkit/html/scripts/scrollable-data-table.js
+./org/richfaces/renderkit/html/scripts/panelMenu.js
+./org/richfaces/renderkit/html/scripts/simple-dropzone.js
+./org/richfaces/renderkit/html/scripts/modalPanelBorders.js
+./org/richfaces/renderkit/html/scripts/drag-indicator.js
+./org/richfaces/renderkit/html/scripts/tabPanel.js
+./org/richfaces/renderkit/html/scripts/suggestionbox.js
+./org/richfaces/renderkit/html/scripts/tree-item.js
+./org/richfaces/renderkit/html/scripts/tree-item-dnd.js
+./org/richfaces/renderkit/html/scripts/modalPanel.js
Property changes on: trunk/ui/assembly/scripts.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/ui/assembly/styles.txt
===================================================================
--- trunk/ui/assembly/styles.txt (rev 0)
+++ trunk/ui/assembly/styles.txt 2007-12-06 00:37:42 UTC (rev 4523)
@@ -0,0 +1,23 @@
+./org/richfaces/renderkit/html/css/toggleControl.xcss
+./org/richfaces/renderkit/html/css/menucomponents.xcss
+./org/richfaces/renderkit/html/css/tree.xcss
+./org/richfaces/renderkit/html/css/virtualEarth.xcss
+./org/richfaces/renderkit/html/css/spinner.xcss
+./org/richfaces/renderkit/html/css/dropdownmenu.xcss
+./org/richfaces/renderkit/html/css/tabPanel.xcss
+./org/richfaces/renderkit/html/css/calendar.xcss
+./org/richfaces/renderkit/html/css/panel.xcss
+./org/richfaces/renderkit/html/css/modalPanel.xcss
+./org/richfaces/renderkit/html/css/datascroller.xcss
+./org/richfaces/renderkit/html/css/panelbar.xcss
+./org/richfaces/renderkit/html/css/scrollable-data-table.xcss
+./org/richfaces/renderkit/html/css/slider.xcss
+./org/richfaces/renderkit/html/css/simpleTogglePanel.xcss
+./org/richfaces/renderkit/html/css/toolBar.xcss
+./org/richfaces/renderkit/html/css/table.xcss
+./org/richfaces/renderkit/html/css/dragIndicator.xcss
+./org/richfaces/renderkit/html/css/tooltip.xcss
+./org/richfaces/renderkit/html/css/gmap.xcss
+./org/richfaces/renderkit/html/css/panelMenu.xcss
+./org/richfaces/renderkit/html/css/suggestionbox.xcss
+./org/richfaces/renderkit/html/css/dataFilterSlider.xcss
Property changes on: trunk/ui/assembly/styles.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/LoadResourceRendererBase.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/LoadResourceRendererBase.java 2007-12-06 00:29:55 UTC (rev 4522)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/LoadResourceRendererBase.java 2007-12-06 00:37:42 UTC (rev 4523)
@@ -34,7 +34,7 @@
* @author shura
*
*/
-public class LoadResourceRendererBase extends RendererBase implements HeaderResourceProducer {
+public class LoadResourceRendererBase extends RendererBase implements UserResourceRenderer {
private static final String SCRIPT_COMPONENT_FAMILY="org.ajax4jsf.LoadScript";
private static final String STYLE_COMPONENT_FAMILY="org.ajax4jsf.LoadStyle";
18 years, 5 months
JBoss Rich Faces SVN: r4522 - in branches/3.1.x/ui/listShuttle/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-12-05 19:29:55 -0500 (Wed, 05 Dec 2007)
New Revision: 4522
Modified:
branches/3.1.x/ui/listShuttle/src/main/config/component/listShuttle.xml
branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
Log:
style attributes added
Modified: branches/3.1.x/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- branches/3.1.x/ui/listShuttle/src/main/config/component/listShuttle.xml 2007-12-06 00:29:49 UTC (rev 4521)
+++ branches/3.1.x/ui/listShuttle/src/main/config/component/listShuttle.xml 2007-12-06 00:29:55 UTC (rev 4522)
@@ -22,21 +22,9 @@
</superclass>
</tag>
- <!--
- <taghandler>
- <classname>org.ajax4jsf.tag.TestHandler</classname>
- </taghandler>
- -->
&ui_component_attributes;
- <!--
- <property>
- <name>param</name>
- <classname>java.lang.String</classname>
- <description>
- </description>
- <defaultvalue>"default"</defaultvalue>
- </property>
- -->
+ &html_style_attributes;
+
<property hidden="true" exist="true">
<name>value</name>
</property>
Modified: branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-12-06 00:29:49 UTC (rev 4521)
+++ branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-12-06 00:29:55 UTC (rev 4522)
@@ -29,7 +29,8 @@
</h:scripts>
<f:clientId var="clientId"/>
- <table id="#{clientId}" class="rich-list-shuttle">
+ <table id="#{clientId}" class="rich-list-shuttle #{component.attributes['styleClass']}"
+ x:passThruWithExclusions="id, class, styleClass">
<tbody>
<vcp:body>
<f:clientId var="clientId"/>
18 years, 5 months
JBoss Rich Faces SVN: r4521 - in branches/3.1.x/ui/orderingList/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-12-05 19:29:49 -0500 (Wed, 05 Dec 2007)
New Revision: 4521
Modified:
branches/3.1.x/ui/orderingList/src/main/config/component/orderinglist.xml
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
Log:
style attributes added
Modified: branches/3.1.x/ui/orderingList/src/main/config/component/orderinglist.xml
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/config/component/orderinglist.xml 2007-12-06 00:04:59 UTC (rev 4520)
+++ branches/3.1.x/ui/orderingList/src/main/config/component/orderinglist.xml 2007-12-06 00:29:49 UTC (rev 4521)
@@ -232,18 +232,8 @@
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
- <property>
- <name>style</name>
- <classname>java.lang.String</classname>
- <description>CSS style(s) is/are to be applied when this component is rendered</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>styleClass</name>
- <classname>java.lang.String</classname>
- <description>Corresponds to the HTML class attribute</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
+
+ &html_style_attributes;
<property>
<name>onclick</name>
Modified: branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-12-06 00:04:59 UTC (rev 4520)
+++ branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-12-06 00:29:49 UTC (rev 4521)
@@ -28,7 +28,7 @@
<f:clientId var="clientId"/>
- <div id="#{clientId}" class="rich-ordering-list-ds" x:passThruWithExclusions="id,class">
+ <div id="#{clientId}" class="rich-ordering-list-ds #{component.attributes['styleClass']}" x:passThruWithExclusions="id,class,styleClass">
<input id="#{clientId}focusKeeper" type="button" value="" name="focusKeeper"
style="width: 1px; position: absolute; left: -32767px;" />
18 years, 5 months
JBoss Rich Faces SVN: r4520 - branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-12-05 19:04:59 -0500 (Wed, 05 Dec 2007)
New Revision: 4520
Modified:
branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1510
Modified: branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-12-06 00:04:30 UTC (rev 4519)
+++ branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-12-06 00:04:59 UTC (rev 4520)
@@ -29,165 +29,169 @@
</h:scripts>
<f:clientId var="clientId"/>
- <vcp:body>
- <f:clientId var="clientId"/>
- <jsp:scriptlet>
- <![CDATA[
- SelectionState sourceSelectionState = new SelectionState();
- variables.setVariable(SELECTION_STATE_VAR_NAME, sourceSelectionState);
- String encodedSourceRows = encodeRows(context, component, true);
+ <table id="#{clientId}" class="rich-list-shuttle">
+ <tbody>
+ <vcp:body>
+ <f:clientId var="clientId"/>
+
+ <jsp:scriptlet>
+ <![CDATA[
+ SelectionState sourceSelectionState = new SelectionState();
+ variables.setVariable(SELECTION_STATE_VAR_NAME, sourceSelectionState);
+ String encodedSourceRows = encodeRows(context, component, true);
+
+ SelectionState targetSelectionState = new SelectionState();
+ variables.setVariable(SELECTION_STATE_VAR_NAME, targetSelectionState);
+ String encodedTargetRows = encodeRows(context, component, false);
+
+ Boolean switchByClick = (Boolean) component.getAttributes().get("switchByClick");
+ variables.setVariable("switchByClick", switchByClick);
+ ]]>
+ </jsp:scriptlet>
- SelectionState targetSelectionState = new SelectionState();
- variables.setVariable(SELECTION_STATE_VAR_NAME, targetSelectionState);
- String encodedTargetRows = encodeRows(context, component, false);
-
- Boolean switchByClick = (Boolean) component.getAttributes().get("switchByClick");
- variables.setVariable("switchByClick", switchByClick);
- ]]>
- </jsp:scriptlet>
- <table id="#{clientId}" class="rich-list-shuttle">
- <tr style="#{this:getCaptionDisplay(context, component)}" >
- <td class="rich-list-shuttle-caption" colspan="2">
- <f:call name="encodeSLCaption"/>
- </td>
- <td class="rich-list-shuttle-caption" colspan="2">
- <f:call name="encodeTLCaption"/>
- </td>
- </tr>
- <tr>
- <td>
- <div class="rich-shuttle-source-items">
- <input id="#{clientId}focusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
-
- <table id="#{clientId}table" cellpadding="0" cellspacing="0" class="rich-shuttle-body">
- <tbody>
- <tr>
- <td style="border:0px;padding : 0px;">
- <div id="#{clientId}headerBox" class="rich-shuttle-list">
- <jsp:scriptlet>
- <![CDATA[
- String contentContainerStyle = "";
- String sourceListWidthValue = (String) component.getAttributes().get("sourceListWidth");
- if (sourceListWidthValue != null) {
- contentContainerStyle = contentContainerStyle.concat("width:").concat(HtmlUtil.qualifySize(sourceListWidthValue)).concat(";");
- variables.setVariable("contentContainerStyle", contentContainerStyle);
- }
- ]]>
- </jsp:scriptlet>
- <div class="rich-shuttle-list-header" style="#{contentContainerStyle}">
- <table id="#{clientId}internal_header_tab" class="rich-shuttle-internal-header-tab" cellpadding="0" cellspacing="0">
- <f:call name="encodeSLHeader"/>
- </table>
+ <tr style="#{this:getCaptionDisplay(context, component)}" >
+ <td class="rich-list-shuttle-caption" colspan="2">
+ <f:call name="encodeSLCaption"/>
+ </td>
+ <td class="rich-list-shuttle-caption" colspan="2">
+ <f:call name="encodeTLCaption"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div class="rich-shuttle-source-items">
+ <input id="#{clientId}focusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
+
+ <table id="#{clientId}table" cellpadding="0" cellspacing="0" class="rich-shuttle-body">
+ <tbody>
+ <tr>
+ <td style="border:0px;padding : 0px;">
+ <div id="#{clientId}headerBox" class="rich-shuttle-list">
+ <jsp:scriptlet>
+ <![CDATA[
+ String contentContainerStyle = "";
+ String sourceListWidthValue = (String) component.getAttributes().get("sourceListWidth");
+ if (sourceListWidthValue != null) {
+ contentContainerStyle = contentContainerStyle.concat("width:").concat(HtmlUtil.qualifySize(sourceListWidthValue)).concat(";");
+ variables.setVariable("contentContainerStyle", contentContainerStyle);
+ }
+ ]]>
+ </jsp:scriptlet>
+ <div class="rich-shuttle-list-header" style="#{contentContainerStyle}">
+ <table id="#{clientId}internal_header_tab" class="rich-shuttle-internal-header-tab" cellpadding="0" cellspacing="0">
+ <f:call name="encodeSLHeader"/>
+ </table>
+ </div>
+ <jsp:scriptlet>
+ <![CDATA[
+ String listHeightValue = (String) component.getAttributes().get("listsHeight");
+ if (listHeightValue != null) {
+ contentContainerStyle = contentContainerStyle.concat("height:").concat(HtmlUtil.qualifySize(listHeightValue)).concat(";");
+ variables.setVariable("contentContainerStyle", contentContainerStyle);
+ }
+ ]]>
+ </jsp:scriptlet>
+ <div id="#{clientId}contentBox" class="rich-shuttle-list-content" style="#{contentContainerStyle}">
+ <table id="#{clientId}internal_tab" class="rich-shuttle-internal-tab" cellpadding="0" cellspacing="0">
+ <tbody id="#{clientId}tbody">
+ <jsp:scriptlet><![CDATA[
+ writer.write(encodedSourceRows);
+ encodedSourceRows = null;
+ ]]></jsp:scriptlet>
+ </tbody>
+ </table>
+ </div>
</div>
- <jsp:scriptlet>
- <![CDATA[
- String listHeightValue = (String) component.getAttributes().get("listsHeight");
- if (listHeightValue != null) {
- contentContainerStyle = contentContainerStyle.concat("height:").concat(HtmlUtil.qualifySize(listHeightValue)).concat(";");
- variables.setVariable("contentContainerStyle", contentContainerStyle);
- }
- ]]>
- </jsp:scriptlet>
- <div id="#{clientId}contentBox" class="rich-shuttle-list-content" style="#{contentContainerStyle}">
- <table id="#{clientId}internal_tab" class="rich-shuttle-internal-tab" cellpadding="0" cellspacing="0">
- <tbody id="#{clientId}tbody">
- <jsp:scriptlet><![CDATA[
- writer.write(encodedSourceRows);
- encodedSourceRows = null;
- ]]></jsp:scriptlet>
- </tbody>
- </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </td>
+ <td>
+ <div class="rich-shuttle-controls">
+ <jsp:scriptlet><![CDATA[
+ encodeShuttleControlsFacets(context, component, sourceSelectionState, targetSelectionState);
+ ]]></jsp:scriptlet>
+ </div>
+
+ </td>
+ <td>
+ <div class="rich-shuttle-target-items" >
+ <input type="hidden" value=":" style="display: none;" name="#{clientId}" />
+
+ <input id="#{clientId}tlFocusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
+
+ <table id="#{clientId}tlTable" cellpadding="0" cellspacing="0" class="rich-shuttle-body">
+ <tbody>
+ <tr>
+ <td style="border:0px;padding : 0px;">
+ <div id="#{clientId}tlHeaderBox" class="rich-shuttle-list">
+ <jsp:scriptlet>
+ <![CDATA[
+ String trContentContainerStyle = "";
+ String targetListWidthValue = (String) component.getAttributes().get("targetListWidth");
+ if (targetListWidthValue != null) {
+ trContentContainerStyle = trContentContainerStyle.concat("width:").concat(HtmlUtil.qualifySize(targetListWidthValue)).concat(";");
+ variables.setVariable("trContentContainerStyle", trContentContainerStyle);
+ }
+ ]]>
+ </jsp:scriptlet>
+ <div class="rich-shuttle-list-header" style="#{trContentContainerStyle}">
+ <table id="#{clientId}tlInternal_header_tab" class="rich-shuttle-internal-header-tab" cellpadding="0" cellspacing="0">
+ <f:call name="encodeTLHeader"/>
+ </table>
+ </div>
+ <jsp:scriptlet>
+ <![CDATA[
+ if (listHeightValue != null) {
+ trContentContainerStyle = trContentContainerStyle.concat("height:").concat(HtmlUtil.qualifySize(listHeightValue)).concat(";");
+ variables.setVariable("trContentContainerStyle", trContentContainerStyle);
+ }
+ ]]>
+ </jsp:scriptlet>
+ <div id="#{clientId}tlContentBox" class="rich-shuttle-list-content" style="#{trContentContainerStyle}">
+ <table id="#{clientId}tlInternal_tab" class="rich-shuttle-internal-tab" cellpadding="0" cellspacing="0">
+ <tbody id="#{clientId}tlTbody">
+ <jsp:scriptlet><![CDATA[
+ writer.write(encodedTargetRows);
+ encodedTargetRows = null;
+ ]]></jsp:scriptlet>
+ </tbody>
+ </table>
+ </div>
</div>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </td>
- <td>
- <div class="rich-shuttle-controls">
- <jsp:scriptlet><![CDATA[
- encodeShuttleControlsFacets(context, component, sourceSelectionState, targetSelectionState);
- ]]></jsp:scriptlet>
- </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </td>
+ <td>
+ <div class="rich-shuttle-controls">
+ <jsp:scriptlet><![CDATA[
+ encodeTLControlsFacets(context, component, targetSelectionState);
+ ]]></jsp:scriptlet>
+ </div>
- </td>
- <td>
- <div class="rich-shuttle-target-items" >
- <input type="hidden" value=":" style="display: none;" name="#{clientId}" />
-
- <input id="#{clientId}tlFocusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;" name="focusKeeper"/>
-
- <table id="#{clientId}tlTable" cellpadding="0" cellspacing="0" class="rich-shuttle-body">
- <tbody>
- <tr>
- <td style="border:0px;padding : 0px;">
- <div id="#{clientId}tlHeaderBox" class="rich-shuttle-list">
- <jsp:scriptlet>
- <![CDATA[
- String trContentContainerStyle = "";
- String targetListWidthValue = (String) component.getAttributes().get("targetListWidth");
- if (targetListWidthValue != null) {
- trContentContainerStyle = trContentContainerStyle.concat("width:").concat(HtmlUtil.qualifySize(targetListWidthValue)).concat(";");
- variables.setVariable("trContentContainerStyle", trContentContainerStyle);
- }
- ]]>
- </jsp:scriptlet>
- <div class="rich-shuttle-list-header" style="#{trContentContainerStyle}">
- <table id="#{clientId}tlInternal_header_tab" class="rich-shuttle-internal-header-tab" cellpadding="0" cellspacing="0">
- <f:call name="encodeTLHeader"/>
- </table>
- </div>
- <jsp:scriptlet>
- <![CDATA[
- if (listHeightValue != null) {
- trContentContainerStyle = trContentContainerStyle.concat("height:").concat(HtmlUtil.qualifySize(listHeightValue)).concat(";");
- variables.setVariable("trContentContainerStyle", trContentContainerStyle);
- }
- ]]>
- </jsp:scriptlet>
- <div id="#{clientId}tlContentBox" class="rich-shuttle-list-content" style="#{trContentContainerStyle}">
- <table id="#{clientId}tlInternal_tab" class="rich-shuttle-internal-tab" cellpadding="0" cellspacing="0">
- <tbody id="#{clientId}tlTbody">
- <jsp:scriptlet><![CDATA[
- writer.write(encodedTargetRows);
- encodedTargetRows = null;
- ]]></jsp:scriptlet>
- </tbody>
- </table>
- </div>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </td>
- <td>
- <div class="rich-shuttle-controls">
- <jsp:scriptlet><![CDATA[
- encodeTLControlsFacets(context, component, targetSelectionState);
- ]]></jsp:scriptlet>
- </div>
- </td>
- </tr>
- </table>
- </vcp:body>
- <f:clientId var="cId"/>
- <script type="text/javascript">
- var clientId = '#{cId}';
- Event.onReady(function() {
- var cotrolsIdPrefix = [['up', 'disup'], ['down', 'disdown'], ['last', 'dislast'], ['first','disfirst']];
- var listShuttleCotrolsIdPrefix = [['copy', 'discopy'], ['copyAll', 'discopyAll'], ['remove', 'disremove'], ['removeAll','disremoveAll']];
- var listShuttle = new Richfaces.ListShuttle(new Richfaces.OrderingList('#{cId}', '#{cId}tlInternal_tab', '#{cId}tlInternal_header_tab', '#{cId}tlFocusKeeper', cotrolsIdPrefix, '#{cId}sortLabel', function() {#{component.attributes['onorderchanged']}}),
- new Richfaces.ListBase('#{cId}', '#{cId}internal_tab', '#{cId}internal_header_tab', '#{cId}focusKeeper'),
- "#{cId}", listShuttleCotrolsIdPrefix, "#{switchByClick}");
- var sourceLayoutManager = new LayoutManager('#{cId}internal_header_tab', '#{cId}internal_tab');
- var targetLayoutManager = new LayoutManager('#{cId}tlInternal_header_tab', '#{cId}tlInternal_tab');
- sourceLayoutManager.widthSynchronization();
- targetLayoutManager.widthSynchronization();
- });
- //setTimeout(init, 0);
- </script>
+ <script type="text/javascript">
+ var clientId = '#{clientId}';
+ Event.onReady(function() {
+ var cotrolsIdPrefix = [['up', 'disup'], ['down', 'disdown'], ['last', 'dislast'], ['first','disfirst']];
+ var listShuttleCotrolsIdPrefix = [['copy', 'discopy'], ['copyAll', 'discopyAll'], ['remove', 'disremove'], ['removeAll','disremoveAll']];
+ var listShuttle = new Richfaces.ListShuttle(new Richfaces.OrderingList('#{clientId}', '#{clientId}tlInternal_tab', '#{clientId}tlInternal_header_tab', '#{clientId}tlFocusKeeper', cotrolsIdPrefix, '#{clientId}sortLabel', function() {#{component.attributes['onorderchanged']}}),
+ new Richfaces.ListBase('#{clientId}', '#{clientId}internal_tab', '#{clientId}internal_header_tab', '#{clientId}focusKeeper'),
+ "#{clientId}", listShuttleCotrolsIdPrefix, "#{switchByClick}");
+ var sourceLayoutManager = new LayoutManager('#{clientId}internal_header_tab', '#{clientId}internal_tab');
+ var targetLayoutManager = new LayoutManager('#{clientId}tlInternal_header_tab', '#{clientId}tlInternal_tab');
+ sourceLayoutManager.widthSynchronization();
+ targetLayoutManager.widthSynchronization();
+ });
+ //setTimeout(init, 0);
+ </script>
+ </td>
+ </tr>
+ </vcp:body>
+ </tbody>
+ </table>
</f:root>
\ No newline at end of file
18 years, 5 months
JBoss Rich Faces SVN: r4519 - branches/3.1.x/samples/orderingListDemo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-12-05 19:04:30 -0500 (Wed, 05 Dec 2007)
New Revision: 4519
Modified:
branches/3.1.x/samples/orderingListDemo/src/main/webapp/pages/index.jsp
Log:
AJAX re-rendering added to demos
Modified: branches/3.1.x/samples/orderingListDemo/src/main/webapp/pages/index.jsp
===================================================================
--- branches/3.1.x/samples/orderingListDemo/src/main/webapp/pages/index.jsp 2007-12-06 00:04:25 UTC (rev 4518)
+++ branches/3.1.x/samples/orderingListDemo/src/main/webapp/pages/index.jsp 2007-12-06 00:04:30 UTC (rev 4519)
@@ -180,6 +180,7 @@
</ol:orderingList>
</h:panelGroup>
</h:panelGrid>
+ <a4j:commandButton value="Ajax Submit" reRender="orderingList1" />
<h:commandButton value="Add item" action="#{demoBean.addItem}" />
<h:commandButton value="Submit" />
<h:commandButton value="Submit immediate" immediate="true" />
18 years, 5 months
JBoss Rich Faces SVN: r4518 - branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-12-05 19:04:25 -0500 (Wed, 05 Dec 2007)
New Revision: 4518
Modified:
branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
Log:
AJAX re-rendering added to demos
Modified: branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
===================================================================
--- branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages/index.jsp 2007-12-05 21:22:46 UTC (rev 4517)
+++ branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages/index.jsp 2007-12-06 00:04:25 UTC (rev 4518)
@@ -24,7 +24,7 @@
--%>
- <ls:listShuttle var="item" sourceValue="#{listShuttleDemoBean.source}" targetValue="#{listShuttleDemoBean.target}"
+ <ls:listShuttle id="listShuttle" var="item" sourceValue="#{listShuttleDemoBean.source}" targetValue="#{listShuttleDemoBean.target}"
orderControlsVisible="#{listShuttleDemoBean.orderControlsVisible}"
fastOrderControlsVisible="#{listShuttleDemoBean.fastOrderControlsVisible}"
moveControlsVisible="#{listShuttleDemoBean.moveControlsVisible}"
@@ -60,6 +60,8 @@
<h:selectBooleanCheckbox value="#{listShuttleDemoBean.fastMoveControlsVisible}" />
</h:panelGrid>
+ <a4j:status startText="...start..." />
+ <a4j:commandButton value="Ajax Submit" reRender="listShuttle" />
<h:commandButton value="Submit" />
<h:commandButton value="Submit Immediate" immediate="true" />
18 years, 5 months
JBoss Rich Faces SVN: r4516 - branches/3.1.x/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2007-12-05 16:22:25 -0500 (Wed, 05 Dec 2007)
New Revision: 4516
Modified:
branches/3.1.x/docs/userguide/en/src/main/docbook/included/orderingList.xml
Log:
http://jira.jboss.com/jira/browse/RF-1184 - add Skin Parameters Redefinition; add controlsPosition, controlsLayout attributes; start edit description of 'selection' attribute
Modified: branches/3.1.x/docs/userguide/en/src/main/docbook/included/orderingList.xml
===================================================================
--- branches/3.1.x/docs/userguide/en/src/main/docbook/included/orderingList.xml 2007-12-05 20:28:05 UTC (rev 4515)
+++ branches/3.1.x/docs/userguide/en/src/main/docbook/included/orderingList.xml 2007-12-05 21:22:25 UTC (rev 4516)
@@ -94,20 +94,25 @@
<!-- attributes of component orderingList -->
- <para> The <emphasis>
+ <para>The <emphasis>
<property> "value"</property>
</emphasis> and <emphasis>
<property>"var" </property>
- </emphasis> attributes are used to access the values of a list. </para>
-
- <para>The <emphasis>
- <property>"selection" </property>
- </emphasis> attribute is bound to a list, which stores a set of indexes for rows
- selected. If the index from a set is out of bounds, it should be ignored. </para>
+ </emphasis> attributes are used to access the values of a list.
+ </para>
+
<para>Controls rendering is based on the <emphasis>
- <property>"controlsType" </property>
- </emphasis> attribute. Possible types are button, link, none.</para>
+ <property>"controlsType" </property>
+ </emphasis> attribute. Possible types are button, link, none.
+ </para>
+
<para>
+ The <emphasis>
+ <property>"selection" </property>
+ </emphasis> attribute stores the collection of items selected by user. After submitting the form the current collection is placed in the object's property.
+ </para>
+
+ <para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
@@ -204,7 +209,7 @@
...]]></programlisting>
<para>The position of the controls relatively to a list could be customized with: <itemizedlist>
- <!--listitem>
+ <listitem>
<emphasis>
<property>"controlsPosition"</property>
</emphasis> attribute. Possible values: <itemizedlist>
@@ -213,8 +218,8 @@
list </listitem>
<listitem>top - controls could be rendered above the list </listitem>
<listitem>bottom - controls could be rendered below the list </listitem>
-
- </listitem-->
+ </itemizedlist>
+ </listitem>
<listitem><emphasis>
<property> "controlsHorizontalAlign"</property>
</emphasis> attribute. Possible values: <itemizedlist>
@@ -232,14 +237,13 @@
</listitem>
</itemizedlist>
</listitem>
- <!--listitem><emphasis>
+ <listitem><emphasis>
<property>"controlsLayout"</property>
</emphasis> attribute. Possible values: <itemizedlist>
<listitem>inline - controls defined one by one in line </listitem>
<listitem>block - controls defined in column </listitem>
- <listitem/>
</itemizedlist>
- </listitem-->
+ </listitem>
</itemizedlist>
</para>
@@ -357,7 +361,7 @@
<title>JavaScript API</title>
<table>
<title>JavaScript API</title>
- <tgroup cols="3">
+ <tgroup cols="2">
<thead>
<row>
<entry>Function</entry>
@@ -451,33 +455,145 @@
</para>
</section>
- <!--section>
+ <section>
<title>Skin Parameters Redefinition</title>
+ <table>
+ <title>Skin parameters redefinition for caption element</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>headerFamilyFont</entry>
+ <entry>font-family</entry>
+ </row>
+ <row>
+ <entry>headerSizeFont</entry>
+ <entry>font-size</entry>
+ </row>
+ <row>
+ <entry>headerWeightFont</entry>
+ <entry>font-weight</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
<table>
- <title>Skin parameters redefinition for a popup element</title>
-
+ <title>Skin parameters redefinition for row element</title>
<tgroup cols="2">
<thead>
<row>
<entry>Skin parameters</entry>
-
<entry>CSS properties</entry>
</row>
</thead>
-
<tbody>
<row>
+ <entry>headerGradientColor</entry>
+ <entry>background-color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for cell element</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>generalTextColor</entry>
+ <entry>color</entry>
+ </row>
+ <row>
+ <entry>generalFamilyFont</entry>
+ <entry>font-family</entry>
+ </row>
+ <row>
+ <entry>generalSizeFont</entry>
+ <entry>font-size</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for selected cell element</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>generalTextColor</entry>
+ <entry>color</entry>
+ </row>
+ <row>
+ <entry>generalFamilyFont</entry>
+ <entry>font-family</entry>
+ </row>
+ <row>
+ <entry>generalSizeFont</entry>
+ <entry>font-size</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for active cell element</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>generalFamilyFont</entry>
+ <entry>font-family</entry>
+ </row>
+ <row>
+ <entry>generalSizeFont</entry>
+ <entry>font-size</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for top, bottom, up, down controls and for controls in disabled state</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
<entry>panelBorderColor</entry>
-
<entry>border-color</entry>
</row>
-
</tbody>
</tgroup>
</table>
- </section-->
+ </section>
<section>
<title>Definition of Custom Style Classes</title>
18 years, 5 months
JBoss Rich Faces SVN: r4515 - in branches/3.1.x/ui/orderingList/src/main: resources/org/richfaces/renderkit/html/css and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-12-05 15:28:05 -0500 (Wed, 05 Dec 2007)
New Revision: 4515
Modified:
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListClickedGradient.java
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListHeaderGradient.java
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListSelectGradient.java
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
Log:
http://jira.jboss.com/jira/browse/RF-1508
Modified: branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListClickedGradient.java
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListClickedGradient.java 2007-12-05 20:18:32 UTC (rev 4514)
+++ branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListClickedGradient.java 2007-12-05 20:28:05 UTC (rev 4515)
@@ -39,7 +39,7 @@
}
public OrderingListClickedGradient() {
- super(7, 15, 9, Skin.generalBackgroundColor, "tabBackgroundColor");
+ super(7, 15, 9, "additionalBackgroundColor", "trimColor");
}
}
Modified: branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListHeaderGradient.java
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListHeaderGradient.java 2007-12-05 20:18:32 UTC (rev 4514)
+++ branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListHeaderGradient.java 2007-12-05 20:28:05 UTC (rev 4515)
@@ -30,6 +30,6 @@
*/
public class OrderingListHeaderGradient extends BaseGradient {
public OrderingListHeaderGradient() {
- super(8, 18, 9, Skin.generalBackgroundColor, "tabBackgroundColor");
+ super(8, 18, 9, "additionalBackgroundColor", "trimColor");
}
}
Modified: branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListSelectGradient.java
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListSelectGradient.java 2007-12-05 20:18:32 UTC (rev 4514)
+++ branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/html/gradientimages/OrderingListSelectGradient.java 2007-12-05 20:28:05 UTC (rev 4515)
@@ -29,6 +29,6 @@
*/
public class OrderingListSelectGradient extends BaseGradient {
public OrderingListSelectGradient() {
- super(11, 18, 18, "additionalBackgroundColor", "headerGradientColor");
+ super(11, 18, 18, "tableBackgroundColor", "additionalBackgroundColor");
}
}
Modified: branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-12-05 20:18:32 UTC (rev 4514)
+++ branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-12-05 20:28:05 UTC (rev 4515)
@@ -197,8 +197,8 @@
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.gradientimages.OrderingListHeaderGradient" />
</u:style>
- <u:style name="background-color" skin="tabBackgroundColor" />
- <u:style name="border-color" skin="tableBorderColor" />
+ <u:style name="background-color" skin="trimColor" />
+ <u:style name="border-color" skin="selectControlColor" />
<u:style name="border-width" skin="tableBorderWidth" />
<u:style name="font-family" skin="headerFamilyFont" />
<u:style name="font-size" skin="headerSizeFont" />
@@ -221,7 +221,7 @@
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.gradientimages.OrderingListHeaderGradient" />
</u:style>
- <u:style name="background-color" skin="headerBackgroundColor" />
+ <u:style name="background-color" skin="trimColor" />
<u:style name="color" skin="headerTextColor" />
<u:style name="font-family" skin="headerFamilyFont" />
<u:style name="font-size" skin="headerSizeFont" />
@@ -237,7 +237,7 @@
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.gradientimages.OrderingListHeaderGradient" />
</u:style>
- <u:style name="background-color" skin="headerBackgroundColor" />
+ <u:style name="background-color" skin="trimColor" />
<u:style name="color" skin="headerTextColor" />
<u:style name="font-family" skin="headerFamilyFont" />
<u:style name="font-size" skin="headerSizeFont" />
@@ -255,8 +255,8 @@
</u:selector>
<u:selector name=".rich-ordering-list-output">
- <u:style name="background-color" skin="generalBackgroundColor" />
- <u:style name="border-color" skin="panelBorderColor" />
+ <u:style name="background-color" skin="tableBackgroundColor" />
+ <u:style name="border-color" skin="tableBorderColor" />
</u:selector>
<u:selector name=".rich-ordering-list-cell, .rich-ordering-list-cell *">
@@ -264,6 +264,10 @@
<u:style name="font-family" skin="generalFamilyFont" />
<u:style name="font-size" skin="generalSizeFont" />
</u:selector>
+ <u:selector name=".rich-ordering-list-cell">
+ <u:style name="border-bottom-color" skin="tableBorderColor" />
+ <u:style name="border-top-color" skin="tableBackgroundColor" />
+ </u:selector>
<u:selector name=".rich-ordering-list-cell-selected, .rich-ordering-list-cell-selected *">
<u:style name="color" skin="generalTextColor"/>
@@ -315,7 +319,7 @@
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.gradientimages.OrderingListSelectGradient" />
</u:style>
- <u:style name="background-color" skin="headerGradientColor" />
+ <u:style name="background-color" skin="additionalBackgroundColor" />
</u:selector>
}
18 years, 5 months