JBoss Rich Faces SVN: r7158 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-03-25 06:34:11 -0400 (Tue, 25 Mar 2008)
New Revision: 7158
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/usage.xhtml
Log:
[RF-2661] Demo site: corrections of Simple Toggle Panel demo layout
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/usage.xhtml 2008-03-25 10:33:03 UTC (rev 7157)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/usage.xhtml 2008-03-25 10:34:11 UTC (rev 7158)
@@ -20,26 +20,28 @@
using the simpleTogglePanel control located to the right of the base text label by default.<br />
This is an example of the component with default look-n-feel:
</p>
- <div class="sample-container" >
-
- <ui:include src="/richfaces/simpleTogglePanel/examples/basic.xhtml"/>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath" value="/richfaces/simpleTogglePanel/examples/basic.xhtml"/>
- </ui:include>
- </div>
-
-
-
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">Simple Toggle Panel example</legend>
+ <div class="sample-container" >
+ <ui:include src="/richfaces/simpleTogglePanel/examples/basic.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/simpleTogglePanel/examples/basic.xhtml"/>
+ </ui:include>
+ </div>
+ </fieldset>
+ <br/><br/>
<p>The switchType attribute allows to select a toggle approach that can be 'client',
'server' or 'ajax'. The 'server' and 'ajax' types require to be surrounded with a form element such as <h:form> or <a4j:form>.
</p>
- <div class="sample-container" >
-
- <ui:include src="/richfaces/simpleTogglePanel/examples/difftypes.xhtml"/>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath" value="/richfaces/simpleTogglePanel/examples/difftypes.xhtml"/>
- </ui:include>
- </div>
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">Switch types example</legend>
+ <div class="sample-container">
+ <ui:include src="/richfaces/simpleTogglePanel/examples/difftypes.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/simpleTogglePanel/examples/difftypes.xhtml"/>
+ </ui:include>
+ </div>
+ </fieldset>
</ui:define>
</ui:composition>
16 years, 9 months
JBoss Rich Faces SVN: r7157 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-03-25 06:33:03 -0400 (Tue, 25 Mar 2008)
New Revision: 7157
Modified:
trunk/docs/userguide/en/src/main/docbook/included/pickList.xml
Log:
http://jira.jboss.com/jira/browse/RF-2174 - "moveControlsVerticalAlign" attribute added
Modified: trunk/docs/userguide/en/src/main/docbook/included/pickList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/pickList.xml 2008-03-25 10:18:03 UTC (rev 7156)
+++ trunk/docs/userguide/en/src/main/docbook/included/pickList.xml 2008-03-25 10:33:03 UTC (rev 7157)
@@ -100,7 +100,7 @@
<f:selectItem itemValue="Audi" itemLabel="Audi"/>
<f:selectItems value="#{pickBean.testList}"/>
</rich:pickList>
- ...]]></programlisting>
+...]]></programlisting>
<para>
The <emphasis> <property> "switchByClick"</property></emphasis> attribute provides an option to copy and remove items between lists by one click.
@@ -125,8 +125,8 @@
</rich:pickList>
...]]></programlisting>
<para>
- If you don't want to display labels on the buttons of move controls you need to set
- <emphasis> <property> "showButtonsLabel"</property></emphasis> to "false".
+ If you don't want to display labels on the buttons you need to set
+ <emphasis><property> "showButtonsLabel"</property></emphasis> to "false".
</para>
<figure>
<title>Move control buttons without labels</title>
@@ -137,10 +137,11 @@
</mediaobject>
</figure>
-
+ <para>
+ With the help of <emphasis><property>"moveControlsVerticalAlign"</property></emphasis> attribute
+ you can align <property>move controls</property> vertically.
+ </para>
-
-
<para>
The <emphasis role="bold">
<property><rich:pickList></property></emphasis>
@@ -172,7 +173,7 @@
<f:selectItem itemValue="Audi" itemLabel="Audi"/>
<f:selectItems value="#{pickBean.testList}"/>
</rich:pickList>
- ...]]></programlisting>
+...]]></programlisting>
<table>
<title>Keyboard usage for elements selection</title>
@@ -699,45 +700,6 @@
</table>
<table >
- <title>Classes names that define a button representation</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Class name</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>rich-list-picklist-button</entry>
- <entry>Defines styles for a button</entry>
- </row>
- <row>
- <entry>rich-list-picklist-button-disabled</entry>
- <entry>Defines styles for a disabled button</entry>
- </row>
- <row>
- <entry>rich-list-picklist-button-press</entry>
- <entry>Defines styles for a pressed button</entry>
- </row>
- <row>
- <entry>rich-list-picklist-button-light</entry>
- <entry>Defines styles for a button highlight</entry>
- </row>
- <row>
- <entry>rich-list-picklist-button-selection</entry>
- <entry>Defines styles for a button selection</entry>
- </row>
- <row>
- <entry>rich-list-picklist-button-content</entry>
- <entry>Defines styles for a button content</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
-
- <table >
<title>Classes names that define a source and target items representation</title>
<tgroup cols="2">
<thead>
@@ -868,6 +830,44 @@
</tgroup>
</table>
+ <table >
+ <title>Classes names that define a button representation</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>rich-list-picklist-button</entry>
+ <entry>Defines styles for a button</entry>
+ </row>
+ <row>
+ <entry>rich-list-picklist-button-disabled</entry>
+ <entry>Defines styles for a disabled button</entry>
+ </row>
+ <row>
+ <entry>rich-list-picklist-button-press</entry>
+ <entry>Defines styles for a pressed button</entry>
+ </row>
+ <row>
+ <entry>rich-list-picklist-button-light</entry>
+ <entry>Defines styles for a button highlight</entry>
+ </row>
+ <row>
+ <entry>rich-list-picklist-button-selection</entry>
+ <entry>Defines styles for a button selection</entry>
+ </row>
+ <row>
+ <entry>rich-list-picklist-button-content</entry>
+ <entry>Defines styles for a button content</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
<para>In order to redefine styles for all <emphasis role="bold">
<property><rich:pickList></property>
</emphasis> components on a page using CSS, it's enough to create classes with the
16 years, 9 months
JBoss Rich Faces SVN: r7156 - trunk/framework/api/src/main/java/org/richfaces/skin.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-25 06:18:03 -0400 (Tue, 25 Mar 2008)
New Revision: 7156
Modified:
trunk/framework/api/src/main/java/org/richfaces/skin/SkinFactory.java
Log:
http://jira.jboss.com/jira/browse/RF-995
Modified: trunk/framework/api/src/main/java/org/richfaces/skin/SkinFactory.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/skin/SkinFactory.java 2008-03-25 09:39:03 UTC (rev 7155)
+++ trunk/framework/api/src/main/java/org/richfaces/skin/SkinFactory.java 2008-03-25 10:18:03 UTC (rev 7156)
@@ -26,10 +26,12 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
+import javax.faces.FacesException;
import javax.faces.context.FacesContext;
import org.ajax4jsf.Messages;
@@ -89,17 +91,7 @@
Messages.SET_SKIN_FACTORY_INFO,
factoryClassName));
}
- Class<?> clazz = Class.forName(factoryClassName, false, loader);
- try {
- // try construct factory chain.
- Constructor<?> factoryConstructor = clazz
- .getConstructor(new Class[] { SkinFactory.class });
- instance = (SkinFactory) factoryConstructor
- .newInstance(new Object[] { instance });
- } catch (NoSuchMethodException e) {
- // no chain constructor - attempt default.
- instance = (SkinFactory) clazz.newInstance();
- }
+ instance = instantiateSkinFactory(factoryClassName, loader);
} catch (Exception e) {
log
.warn(
@@ -115,27 +107,58 @@
}
}
- if (instance == null) {
- try{
- // instantiate default implementation of SkinFactory - org.richfaces.skin.SkinFactoryImpl,
- // placed in the richfaces-impl.jar
- instance = (SkinFactory) Class.forName(DEFAULT_SKIN_FACTORY_IMPL_CLASS).newInstance();
- } catch (InstantiationException ie) {
- log.error(Messages.getMessage(Messages.CREATING_SKIN_FACTORY_ERROR), ie);
- } catch (IllegalAccessException iae) {
- log.error(Messages.getMessage(Messages.CREATING_SKIN_FACTORY_ERROR), iae);
- } catch (ClassNotFoundException cnfe) {
- log.error(Messages.getMessage(Messages.CREATING_SKIN_FACTORY_ERROR), cnfe);
- }
+ if (instance == null) {
+ // instantiate default implementation of SkinFactory - org.richfaces.skin.SkinFactoryImpl,
+ // placed in the richfaces-impl.jar
+ instance = instantiateSkinFactory(DEFAULT_SKIN_FACTORY_IMPL_CLASS, loader);
}
instances.put(loader, instance);
}
return instance;
}
+
+ /**
+ * Create new instance of class with given name with the help of given <code>ClassLoader</code>.
+ * Instantiated class should extend <code>SkinFactory</code> base class.
+ * @param factoryClassName - class name of SkinFactory
+ * @param classLoader - class loader
+ * @return - instantiated <code>SkinFactory</code>
+ * @throws FacesException - FacesException is thrown when instantiation fails;
+ * causing exception is wrapped into <code>FacesException</code>
+ */
+ private static SkinFactory instantiateSkinFactory(String factoryClassName, ClassLoader classLoader) throws FacesException {
+ SkinFactory instance = null;
+ try {
+ Class<?> clazz = Class.forName(factoryClassName, false, classLoader);
+ try {
+ // try construct factory chain.
+ Constructor<?> factoryConstructor = clazz.getConstructor(new Class[] { SkinFactory.class });
+ instance = (SkinFactory) factoryConstructor.newInstance(new Object[] { instance });
+ } catch (NoSuchMethodException e) {
+ // no chain constructor - attempt default.
+ instance = (SkinFactory) clazz.newInstance();
+ }
+ } catch (InvocationTargetException ite) {
+ log.error(Messages.getMessage(Messages.CREATING_SKIN_FACTORY_ERROR), ite);
+ throw new FacesException("Exception when creating instance of [" + SkinFactory.class.getName() + "]", ite);
+ } catch (InstantiationException ie) {
+ log.error(Messages.getMessage(Messages.CREATING_SKIN_FACTORY_ERROR), ie);
+ throw new FacesException("Exception when creating instance of [" + SkinFactory.class.getName() + "]", ie);
+ } catch (IllegalAccessException iae) {
+ log.error(Messages.getMessage(Messages.CREATING_SKIN_FACTORY_ERROR), iae);
+ throw new FacesException("Exception when creating instance of [" + SkinFactory.class.getName() + "]", iae);
+ } catch (ClassNotFoundException cnfe) {
+ log.error(Messages.getMessage(Messages.CREATING_SKIN_FACTORY_ERROR), cnfe);
+ throw new FacesException("Exception when creating instance of [" + SkinFactory.class.getName() + "]", cnfe);
+ }
+ return instance;
+ }
+
/**
* Get default {@link Skin} implementation.
+ *
* @param context
* @return
*/
16 years, 9 months
JBoss Rich Faces SVN: r7155 - in trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel: examples and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-03-25 05:39:03 -0400 (Tue, 25 Mar 2008)
New Revision: 7155
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel/examples/switchTypes.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel/usage.xhtml
Log:
[RF-2663] Demo site: corrections of Tab Panel demo layout
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel/examples/switchTypes.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel/examples/switchTypes.xhtml 2008-03-24 20:35:35 UTC (rev 7154)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel/examples/switchTypes.xhtml 2008-03-25 09:39:03 UTC (rev 7155)
@@ -4,8 +4,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <p>
- Here is an example of default tab panel with 3 tabs.
+ <p>Here is an example of default tab panel with 3 tabs.</p>
<rich:tabPanel>
<rich:tab label="First">
Here is tab #1
@@ -17,9 +16,8 @@
Here is tab #3
</rich:tab>
</rich:tabPanel>
- </p>
- <p>
- Here is an example of tab panel switched in "ajax" style. Second tab is disabled.
+ <br/><br/>
+ <p>Here is an example of tab panel switched in "ajax" style. Second tab is disabled.</p>
<rich:tabPanel switchType="ajax">
<rich:tab label="First">
Here is tab #1
@@ -31,9 +29,8 @@
Here is tab #3
</rich:tab>
</rich:tabPanel>
- </p>
- <p>
- Here is an example of tab panel switched completely on client.
+ <br/><br/>
+ <p>Here is an example of tab panel switched completely on client.</p>
<rich:tabPanel switchType="client">
<rich:tab label="First">
Here is tab #1
@@ -45,6 +42,5 @@
Here is tab #3
</rich:tab>
</rich:tabPanel>
- </p>
</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel/usage.xhtml 2008-03-24 20:35:35 UTC (rev 7154)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel/usage.xhtml 2008-03-25 09:39:03 UTC (rev 7155)
@@ -10,15 +10,16 @@
Tab panel is used to create "tabbed" pages. RichFaces tab panel can be switched in 3 ways: using "normal" server-side update, using "ajax" style update, when only tab panel area is updated on the page, and using "client" type, without any interaction with the server.
Note, that in case of a "client" switch type, all tabs are rendered at the same time.
</p>
- <div id="itme" class="sample-container">
-
- <ui:include src="/richfaces/tabPanel/examples/switchTypes.xhtml"/>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath" value="/richfaces/tabPanel/examples/switchTypes.xhtml"/>
- </ui:include>
-
- </div>
-
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">Tab Panel example</legend>
+ <div id="itme" class="sample-container">
+ <ui:include src="/richfaces/tabPanel/examples/switchTypes.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/tabPanel/examples/switchTypes.xhtml"/>
+ </ui:include>
+ </div>
+ </fieldset>
+
</ui:define>
</ui:composition>
16 years, 9 months
JBoss Rich Faces SVN: r7154 - in trunk/ui/menu-components/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-03-24 16:35:35 -0400 (Mon, 24 Mar 2008)
New Revision: 7154
Modified:
trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
trunk/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx
Log:
http://jira.jboss.com/jira/browse/RF-2716
Modified: trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
===================================================================
--- trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2008-03-24 20:31:43 UTC (rev 7153)
+++ trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2008-03-24 20:35:35 UTC (rev 7154)
@@ -27,7 +27,6 @@
import java.util.List;
import java.util.Map;
-import javax.faces.FacesException;
import javax.faces.component.UIComponent;
import javax.faces.component.UIParameter;
import javax.faces.context.ExternalContext;
@@ -78,7 +77,7 @@
// enqueue event here for this component or for component with Id
// taken from forId attribute
- String mode = menuItem.getSubmitMode();
+ String mode = resolveSubmitMode(menuItem);
if (!MenuComponent.MODE_NONE.equalsIgnoreCase(mode)) {
ActionEvent actionEvent = new ActionEvent(menuItem);
Modified: trunk/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx
===================================================================
--- trunk/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx 2008-03-24 20:31:43 UTC (rev 7153)
+++ trunk/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx 2008-03-24 20:35:35 UTC (rev 7154)
@@ -21,7 +21,7 @@
<jsp:scriptlet>
<![CDATA[
- String mode = ((org.richfaces.component.UIMenuItem)component).getSubmitMode();
+ String mode = resolveSubmitMode(component);
if (mode != null && !mode.equalsIgnoreCase("none")) org.richfaces.component.util.FormUtil.throwEnclFormReqExceptionIfNeed(context,component);
]]>
</jsp:scriptlet>
16 years, 9 months
JBoss Rich Faces SVN: r7153 - trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-24 16:31:43 -0400 (Mon, 24 Mar 2008)
New Revision: 7153
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
add destroy method
Modified: trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-03-24 20:26:01 UTC (rev 7152)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-03-24 20:31:43 UTC (rev 7153)
@@ -31,8 +31,14 @@
this.initHandlers();
this.initEvents();
+ this["rich:destructor"] = "destroy";
+
},
+ destroy: function() {
+ this.inplaceInput.component = null;
+ },
+
initHandlers : function() {
this.inplaceInput.observe(this.editEvent, function(e){this.switchingStatesHandler(e);}.bindAsEventListener(this));
this.inplaceInput.observe("mouseout", function(e){this.inplaceMouseOutHandler(e);}.bindAsEventListener(this));
16 years, 9 months
JBoss Rich Faces SVN: r7152 - in trunk/ui/dataTable/src/main: java/org/richfaces/component and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-03-24 16:26:01 -0400 (Mon, 24 Mar 2008)
New Revision: 7152
Modified:
trunk/ui/dataTable/src/main/config/component/columnAttributes.ent
trunk/ui/dataTable/src/main/java/org/richfaces/component/UIColumn.java
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/HeaderEncodeStrategy.java
trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss
Log:
http://jira.jboss.com/jira/browse/RF-2454
Modified: trunk/ui/dataTable/src/main/config/component/columnAttributes.ent
===================================================================
--- trunk/ui/dataTable/src/main/config/component/columnAttributes.ent 2008-03-24 20:05:16 UTC (rev 7151)
+++ trunk/ui/dataTable/src/main/config/component/columnAttributes.ent 2008-03-24 20:26:01 UTC (rev 7152)
@@ -105,3 +105,18 @@
<description>Event for filter input that forces the filtration (default = onchange)</description>
<defaultvalue>"onchange"</defaultvalue>
</property>
+<property>
+ <name>sortIcon</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+</property>
+<property>
+ <name>sortIconAscending</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+</property>
+<property>
+ <name>sortIconDescending</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+</property>
\ No newline at end of file
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/component/UIColumn.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/component/UIColumn.java 2008-03-24 20:05:16 UTC (rev 7151)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/component/UIColumn.java 2008-03-24 20:26:01 UTC (rev 7152)
@@ -54,6 +54,15 @@
public abstract String getFilterDefaultLabel();
public abstract void setFilterDefaultLabel(String label);
+ public abstract String getSortIcon();
+ public abstract void setSortIcon(String sortIcon);
+
+ public abstract String getSortIconAscending();
+ public abstract void setSortIconAscending(String sortIcon);
+
+ public abstract String getSortIconDescending();
+ public abstract void setSortIconDescending(String sortIcon);
+
public FilterField getFilterField(){
FilterField filterField = null;
MethodExpression filterMethod = getFilterMethod();
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-03-24 20:05:16 UTC (rev 7151)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-03-24 20:26:01 UTC (rev 7152)
@@ -28,7 +28,6 @@
import java.util.Map;
import java.util.Set;
-import javax.faces.FacesException;
import javax.faces.component.UIColumn;
import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
@@ -45,6 +44,9 @@
import org.richfaces.component.Row;
import org.richfaces.component.UIDataTable;
import org.richfaces.model.Ordering;
+import org.richfaces.renderkit.html.iconimages.DataTableIconSortNone;
+import org.richfaces.renderkit.html.images.TriangleIconDown;
+import org.richfaces.renderkit.html.images.TriangleIconUp;
/**
* @author shura
@@ -56,8 +58,6 @@
private static final String FILTER_INPUT_FACET_NAME = "filterValueInput";
- private static final String SPACER_PATH = "/org/richfaces/renderkit/html/images/spacer.gif";
-
/**
* Encode all table structure - colgroups definitions, caption, header,
* footer
@@ -138,7 +138,6 @@
String headerClass, String facetName, String element, int colCount)
throws IOException {
int t_colCount = 0;
- String spacerUrl = getResource(SPACER_PATH).getUri(context, null);
HeaderEncodeStrategy richEncodeStrategy = new RichHeaderEncodeStrategy();
HeaderEncodeStrategy simpleEncodeStrategy = new SimpleHeaderEncodeStrategy();
@@ -176,7 +175,7 @@
renderChild(context, facet);
}
- strategy.encodeEnd(context, writer, column, facetName, sortableColumn, spacerUrl);
+ strategy.encodeEnd(context, writer, column, facetName, sortableColumn);
writer.endElement(element);
@@ -550,7 +549,7 @@
}
public void encodeEnd(FacesContext context, ResponseWriter writer,
- UIComponent column, String facetName, boolean sortableColumn, String spacelUrl)
+ UIComponent column, String facetName, boolean sortableColumn)
throws IOException {
}
@@ -580,28 +579,41 @@
if (sortableColumn) {
writer.startElement(HTML.SPAN_ELEM, column);
-
- String spanClass = "";
- if (Ordering.ASCENDING.equals(col.getSortOrder())) {
- spanClass = "dr-table-header-sort-up dr-table-sortable-header";
- } else if (Ordering.DESCENDING.equals(col.getSortOrder())) {
- spanClass = "dr-table-header-sort-down dr-table-sortable-header";
- } else {
- spanClass = "dr-table-header-sort-none dr-table-sortable-header";
- }
- writer.writeAttribute(HTML.class_ATTRIBUTE, spanClass, null);
+ writer.writeAttribute(HTML.class_ATTRIBUTE, "dr-table-sortable-header", null);
}
}
public void encodeEnd(FacesContext context, ResponseWriter writer,
- UIComponent column, String facetName, boolean sortableColumn, String spacerUrl) throws IOException {
+ UIComponent column, String facetName, boolean sortableColumn) throws IOException {
org.richfaces.component.UIColumn col =
(org.richfaces.component.UIColumn) column;
if (sortableColumn) {
+ String imageUrl;
+ if (Ordering.ASCENDING.equals(col.getSortOrder())) {
+ if (null != col.getSortIconAscending()) {
+ imageUrl = col.getSortIconAscending();
+ } else {
+ imageUrl = getResource(TriangleIconUp.class.getName()).getUri(context, null);
+ }
+ } else if (Ordering.DESCENDING.equals(col.getSortOrder())) {
+ if (null != col.getSortIconDescending()) {
+ imageUrl = col.getSortIconDescending();
+ } else {
+ imageUrl = getResource(TriangleIconDown.class.getName()).getUri(context, null);
+ }
+ } else {
+ if (null != col.getSortIcon()) {
+ imageUrl = col.getSortIcon();
+ } else {
+ imageUrl = getResource(DataTableIconSortNone.class.getName()).getUri(context, null);
+ }
+ }
+
writer.startElement(HTML.IMG_ELEMENT, column);
- writer.writeAttribute(HTML.src_ATTRIBUTE, spacerUrl, null);
- writer.writeAttribute(HTML.width_ATTRIBUTE, "16", null);
- writer.writeAttribute(HTML.height_ATTRIBUTE, "1", null);
+ writer.writeAttribute(HTML.src_ATTRIBUTE, imageUrl, null);
+ writer.writeAttribute(HTML.width_ATTRIBUTE, "15", null);
+ writer.writeAttribute(HTML.height_ATTRIBUTE, "15", null);
+ writer.writeAttribute(HTML.class_ATTRIBUTE, "dr-table-header-sort-img", null);
writer.endElement(HTML.IMG_ELEMENT);
writer.endElement(HTML.SPAN_ELEM);
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/HeaderEncodeStrategy.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/HeaderEncodeStrategy.java 2008-03-24 20:05:16 UTC (rev 7151)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/HeaderEncodeStrategy.java 2008-03-24 20:26:01 UTC (rev 7152)
@@ -33,6 +33,6 @@
UIComponent column, String facetName, boolean sortableColumn) throws IOException;
public abstract void encodeEnd(FacesContext context, ResponseWriter writer,
- UIComponent column, String facetName, boolean sortableColumn, String spacerUrl) throws IOException;
+ UIComponent column, String facetName, boolean sortableColumn) throws IOException;
}
Modified: trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss
===================================================================
--- trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss 2008-03-24 20:05:16 UTC (rev 7151)
+++ trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss 2008-03-24 20:26:01 UTC (rev 7152)
@@ -115,26 +115,12 @@
.rich-inplace-edit, .rich-inplace-view {
cursor: default;
}
+
+ .dr-table-header-sort-img {
+ vertical-align: middle;
+ }
</f:verbatim>
-<u:selector name=".dr-table-header-sort-down" >
- <u:style name="background-image">
- <f:resource f:key="org.richfaces.renderkit.html.images.TriangleIconDown"/>
- </u:style>
-</u:selector>
-
-<u:selector name=".dr-table-header-sort-up" >
- <u:style name="background-image">
- <f:resource f:key="org.richfaces.renderkit.html.images.TriangleIconUp"/>
- </u:style>
-</u:selector>
-
-<u:selector name=".dr-table-header-sort-none" >
- <u:style name="background-image">
- <f:resource f:key="org.richfaces.renderkit.html.iconimages.DataTableIconSortNone"/>
- </u:style>
-</u:selector>
-
<u:selector name=".dr-table-footer" >
<u:style name="background-color" skin="tableFooterBackgroundColor"/> <!--tableFooterBackgroundColor-->
</u:selector>
16 years, 9 months
JBoss Rich Faces SVN: r7151 - trunk/framework/impl/src/main/javascript/prototype.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-24 16:05:16 -0400 (Mon, 24 Mar 2008)
New Revision: 7151
Modified:
trunk/framework/impl/src/main/javascript/prototype/patches.js
Log:
fix removing events
Modified: trunk/framework/impl/src/main/javascript/prototype/patches.js
===================================================================
--- trunk/framework/impl/src/main/javascript/prototype/patches.js 2008-03-24 19:18:22 UTC (rev 7150)
+++ trunk/framework/impl/src/main/javascript/prototype/patches.js 2008-03-24 20:05:16 UTC (rev 7151)
@@ -64,7 +64,7 @@
if (window.RichFaces && window.RichFaces.Memory) {
window.RichFaces.Memory.addCleaner("prototype", function(node) {
- var eventID = node._eventID;
+ var eventID = node._prototypeEventID;
if (eventID) {
var cache = Event.cache[eventID];
16 years, 9 months
JBoss Rich Faces SVN: r7150 - in trunk/ui/dataTable/src/main: java/org/richfaces/renderkit/html/iconimages and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-03-24 15:18:22 -0400 (Mon, 24 Mar 2008)
New Revision: 7150
Added:
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortNone.java
Modified:
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconBasic.java
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortAsc.java
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortDesc.java
trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss
Log:
http://jira.jboss.com/jira/browse/RF-2454
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-03-24 19:16:50 UTC (rev 7149)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-03-24 19:18:22 UTC (rev 7150)
@@ -586,6 +586,8 @@
spanClass = "dr-table-header-sort-up dr-table-sortable-header";
} else if (Ordering.DESCENDING.equals(col.getSortOrder())) {
spanClass = "dr-table-header-sort-down dr-table-sortable-header";
+ } else {
+ spanClass = "dr-table-header-sort-none dr-table-sortable-header";
}
writer.writeAttribute(HTML.class_ATTRIBUTE, spanClass, null);
}
@@ -599,6 +601,7 @@
writer.startElement(HTML.IMG_ELEMENT, column);
writer.writeAttribute(HTML.src_ATTRIBUTE, spacerUrl, null);
writer.writeAttribute(HTML.width_ATTRIBUTE, "16", null);
+ writer.writeAttribute(HTML.height_ATTRIBUTE, "1", null);
writer.endElement(HTML.IMG_ELEMENT);
writer.endElement(HTML.SPAN_ELEM);
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconBasic.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconBasic.java 2008-03-24 19:16:50 UTC (rev 7149)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconBasic.java 2008-03-24 19:18:22 UTC (rev 7150)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.richfaces.renderkit.html.iconimages;
import java.awt.Color;
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortAsc.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortAsc.java 2008-03-24 19:16:50 UTC (rev 7149)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortAsc.java 2008-03-24 19:18:22 UTC (rev 7150)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.richfaces.renderkit.html.iconimages;
import java.awt.Color;
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortDesc.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortDesc.java 2008-03-24 19:16:50 UTC (rev 7149)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortDesc.java 2008-03-24 19:18:22 UTC (rev 7150)
@@ -1,3 +1,24 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
package org.richfaces.renderkit.html.iconimages;
import java.awt.Color;
Added: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortNone.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortNone.java (rev 0)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/html/iconimages/DataTableIconSortNone.java 2008-03-24 19:18:22 UTC (rev 7150)
@@ -0,0 +1,61 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.GeneralPath;
+
+import org.ajax4jsf.resource.ResourceContext;
+import org.richfaces.renderkit.html.images.TriangleIconBase;
+
+public class DataTableIconSortNone extends TriangleIconBase {
+
+ public Dimension calculateDimensions() {
+ return new Dimension(13, 4);
+ }
+
+ protected void paintImage(ResourceContext context, Graphics2D g2d,
+ Color textColor, Color borderColor) {
+ g2d.translate(4, 3);
+
+ g2d.setColor(textColor);
+ g2d.drawLine(3, 1, 3, 1);
+ g2d.drawLine(2, 2, 4, 2);
+ g2d.drawLine(1, 3, 5, 3);
+
+ g2d.drawLine(3, 7, 3, 7);
+ g2d.drawLine(2, 6, 4, 6);
+ g2d.drawLine(1, 5, 5, 5);
+
+ g2d.setColor(borderColor);
+ g2d.drawLine(0, 3, 3, 0);
+ g2d.drawLine(3, 0, 6, 3);
+ g2d.drawLine(5, 4, 1, 4);
+
+ g2d.drawLine(0, 5, 3, 8);
+ g2d.drawLine(3, 8, 6, 5);
+ }
+
+}
Modified: trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss
===================================================================
--- trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss 2008-03-24 19:16:50 UTC (rev 7149)
+++ trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss 2008-03-24 19:18:22 UTC (rev 7150)
@@ -103,7 +103,7 @@
<f:verbatim>
.dr-table-sortable-header {
- background-position: right;
+ background-position: right center;
background-repeat: no-repeat;
white-space : nowrap;
}
@@ -129,6 +129,12 @@
</u:style>
</u:selector>
+<u:selector name=".dr-table-header-sort-none" >
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.iconimages.DataTableIconSortNone"/>
+ </u:style>
+</u:selector>
+
<u:selector name=".dr-table-footer" >
<u:style name="background-color" skin="tableFooterBackgroundColor"/> <!--tableFooterBackgroundColor-->
</u:selector>
16 years, 9 months
JBoss Rich Faces SVN: r7149 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vsukhov
Date: 2008-03-24 15:16:50 -0400 (Mon, 24 Mar 2008)
New Revision: 7149
Modified:
trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
Log:
http://jira.jboss.com/jira/browse/RF-1207 I've deleted information about form encoding
Modified: trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-03-24 19:15:50 UTC (rev 7148)
+++ trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-03-24 19:16:50 UTC (rev 7149)
@@ -186,7 +186,7 @@
<rich:fileUpload uploadData="#{bean.data}" addControlLabel="myLabel" autoclear="true" maxFilesQuantity="2" fileUploadListener="#{bean.listener}"
acceptedTypes="html" immediateUpload="true"/>
...]]></programlisting>
- <para>In order to encode form around <emphasis role="bold">
+ <!--para>In order to encode form around <emphasis role="bold">
<property><rich:fileUpload></property>
</emphasis> component you could confine this area by <emphasis role="bold">
<property><h:form></property>
@@ -218,7 +218,7 @@
<imagedata fileref="images/fileUpload11.png"/>
</imageobject>
</mediaobject>
- </figure>
+ </figure-->
<para>The <emphasis role="bold">
<property><rich:fileUpload></property>
</emphasis> provides using a number of handlers. The <emphasis>
16 years, 9 months