JBoss Rich Faces SVN: r5364 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-01-14 13:53:55 -0500 (Mon, 14 Jan 2008)
New Revision: 5364
Added:
trunk/docs/userguide/en/src/main/docbook/included/columns.desc.xml
Log:
http://jira.jboss.com/jira/browse/RF-1199 - add description
Added: trunk/docs/userguide/en/src/main/docbook/included/columns.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/columns.desc.xml (rev 0)
+++ trunk/docs/userguide/en/src/main/docbook/included/columns.desc.xml 2008-01-14 18:53:55 UTC (rev 5364)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>columns</keyword>
+ </keywordset>
+ </sectioninfo>
+ <section>
+ <title>Description</title>
+ <para>The <emphasis role="bold">
+ <property><rich:columns></property>
+ </emphasis> is a component, that allow you to create a dynamic set of columns from your model.</para>
+ <figure>
+ <title><rich:columns> component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref=""/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ <section>
+ <title>Key Features</title>
+ <itemizedlist>
+ <listitem>Highly customizable look and feel</listitem>
+
+ </itemizedlist>
+ </section>
+</section>
17 years
JBoss Rich Faces SVN: r5363 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-01-14 13:53:37 -0500 (Mon, 14 Jan 2008)
New Revision: 5363
Added:
trunk/docs/userguide/en/src/main/docbook/included/columns.xml
Log:
http://jira.jboss.com/jira/browse/RF-1199 - add Creating the Component with a Page Tag, Creating the Component Dynamically Using Java, Details of Usage
Added: trunk/docs/userguide/en/src/main/docbook/included/columns.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/columns.xml (rev 0)
+++ trunk/docs/userguide/en/src/main/docbook/included/columns.xml 2008-01-14 18:53:37 UTC (rev 5363)
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>rich:orderingList</keyword>
+ <keyword>orderingList</keyword>
+ </keywordset>
+ </sectioninfo>
+ <table>
+ <title>Component identification parameters</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Name</entry>
+
+ <entry>Value</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>component-type</entry>
+ <entry>org.richfaces.Column</entry>
+ </row>
+ <!--row>
+ <entry>component-class</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>component-family</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry>renderer-type</entry>
+ <entry></entry>
+ </row-->
+ <row>
+ <entry>tag-class</entry>
+ <entry>org.richfaces.taglib.ColumnsTagHandler</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <section>
+ <title>Creating the Component with a Page Tag</title>
+ <para>Here is a simple example as it could be used on a page: </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:dataTable value="#{bean.model}" var="var" id="tb">
+ <rich:columns value="#{bean.columns}" var="col">
+ <h:outputText value="#{var.property1}" />
+ </rich:columns>
+</rich:dataTable>
+...]]></programlisting>
+ </section>
+ <section>
+ <title>Creating the Component Dynamically Using Java</title>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlColumns;
+...
+HtmlColumns myColumns = new HtmlColumns();
+...]]></programlisting>
+ </section>
+ <section>
+ <title>Details of Usage</title>
+ <para>The <emphasis role="bold">
+ <property><rich:columns></property>
+ </emphasis> component gets a list from data model and outputs corresponding set of columns inside
+ <emphasis role="bold"><property><rich:dataTable></property></emphasis> on a page.
+ </para>
+ </section>
+
+
+ </section>
\ No newline at end of file
17 years
JBoss Rich Faces SVN: r5362 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-01-14 13:53:02 -0500 (Mon, 14 Jan 2008)
New Revision: 5362
Modified:
trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
Log:
http://jira.jboss.com/jira/browse/RF-920 - add CSS role to the example
Modified: trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2008-01-14 18:51:48 UTC (rev 5361)
+++ trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2008-01-14 18:53:02 UTC (rev 5362)
@@ -249,8 +249,8 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML"><![CDATA[...
-<!--Styles for cells -->
+ <programlisting role="CSS"><![CDATA[...
+<!-- Styles for cells -->
<style>
.width100{
width:100%;
@@ -258,8 +258,10 @@
.talign{
text-align:center;
}
-</style>
-
+</style>
+ ...]]></programlisting>
+
+ <programlisting role="XML"><![CDATA[...
<rich:calendar id="myCalendar" popup="true" locale="#{calendarBean.locale}" value="#{bean.date}"
preloadRangeBegin="#{bean.date}" preloadRangeEnd="#{bean.date}" selectedDate="#{bean.date}" cellWidth="40px" cellHeight="40px">
17 years
JBoss Rich Faces SVN: r5361 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-01-14 13:51:48 -0500 (Mon, 14 Jan 2008)
New Revision: 5361
Modified:
trunk/docs/userguide/en/src/main/docbook/included/jQuery.xml
Log:
http://jira.jboss.com/jira/browse/RF-920 - add CSS role to the example
Modified: trunk/docs/userguide/en/src/main/docbook/included/jQuery.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/jQuery.xml 2008-01-14 18:00:54 UTC (rev 5360)
+++ trunk/docs/userguide/en/src/main/docbook/included/jQuery.xml 2008-01-14 18:51:48 UTC (rev 5361)
@@ -117,14 +117,15 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
+ <programlisting role="CSS"><![CDATA[...
+<style>
+ .odd {
+ background-color: #FFC;
+ }
+</style>
+...]]></programlisting>
+
<programlisting role="XML"><![CDATA[...
- <style>
- .odd {
- background-color: #FFC;
- }
- </style>
- ...
-
<rich:table id="customList" ...>
...
</rich:table>
17 years
JBoss Rich Faces SVN: r5360 - trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-01-14 13:00:54 -0500 (Mon, 14 Jan 2008)
New Revision: 5360
Modified:
trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/css/progressBar.xcss
Log:
fix permanent state
Modified: trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/css/progressBar.xcss
===================================================================
--- trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/css/progressBar.xcss 2008-01-14 17:47:23 UTC (rev 5359)
+++ trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/css/progressBar.xcss 2008-01-14 18:00:54 UTC (rev 5360)
@@ -13,7 +13,7 @@
.rich-progress-bar-base{text-align : center; position : absolute; height : 16px; width : 200px; font-weight : bold;}
.rich-progress-bar-remained{background : #F1F1F1; border : 1px solid #cccccc; color : #000000;}
.rich-progress-bar-completed{background : #FF9409; color : #FFFFFF;; background-repeat : repeat-x; repeat-y;}
-.rich-progress-bar-permanent{background : #FF9409; color : #FFFFFF;; background-repeat : repeat-x; repeat-y;}
+.rich-progress-bar-permanent{background : #FF9409; color : #FFFFFF;; background-repeat : repeat-x; repeat-y; height : 16px; width : 200px;}
</f:verbatim>
17 years
JBoss Rich Faces SVN: r5359 - in trunk/ui: menu-components/src/main/resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-01-14 12:47:23 -0500 (Mon, 14 Jan 2008)
New Revision: 5359
Modified:
trunk/ui/dropdown-menu/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
http://jira.jboss.com/jira/browse/RF-1498
Modified: trunk/ui/dropdown-menu/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java
===================================================================
--- trunk/ui/dropdown-menu/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java 2008-01-14 17:11:49 UTC (rev 5358)
+++ trunk/ui/dropdown-menu/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java 2008-01-14 17:47:23 UTC (rev 5359)
@@ -67,6 +67,7 @@
subMenuOptions.addEventHandler("onopen");
subMenuOptions.addEventHandler("onclose");
subMenuOptions.addOption("direction");
+ subMenuOptions.addOption("highlightParent", Boolean.TRUE);
function.addParameter(subMenuOptions);
function.appendScript(buffer);
Modified: trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
--- trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-01-14 17:11:49 UTC (rev 5358)
+++ trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-01-14 17:47:23 UTC (rev 5359)
@@ -1069,6 +1069,7 @@
this.hideDelay=menuLayer.hideDelay;
}
+ this.highlightParent = options.highlightParent;
return this;
},
17 years
JBoss Rich Faces SVN: r5358 - in trunk/sandbox/ui/combobox/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-01-14 12:11:49 -0500 (Mon, 14 Jan 2008)
New Revision: 5358
Modified:
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
Log:
z-index is added to component
Modified: trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-01-14 17:00:00 UTC (rev 5357)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-01-14 17:11:49 UTC (rev 5358)
@@ -13,6 +13,9 @@
this.combobox = $(combobox);
this.field = $(fieldId);
+
+ //this.field.prevValue = null;
+
this.button = $(buttonId);
this.buttonBG = $(buttonBGId);
var fieldDem = Richfaces.ComboBoxList.getElemXY(this.field);
@@ -212,12 +215,39 @@
}
}
- if (((event.keyCode != Event.KEY_BACKSPACE) && (event.keyCode != Event.KEY_DELETE)) && isSearchSuccessful) {
+ if (this.isValueSet(event) && isSearchSuccessful) {
this.setValue();
}
}
},
+ wasTextDeleted : function(event) {
+ if ((event.keyCode == Event.KEY_BACKSPACE)
+ || (event.keyCode == Event.KEY_DELETE)
+ || (event.ctrlKey && (event.keyCode == 88))) {
+ return true;
+ }
+ return false;
+ },
+
+ isValueSet : function(event) {
+ /*if (this.field.prevValue) {
+ if (this.field.prevValue.toLowerCase() != this.field.value.toLowerCase()) {
+ return true;
+ }
+ return false;
+ }
+ return true;*/
+ if (this.wasTextDeleted(event)
+ || (event.keyCode == 17)
+ || event.altKey
+ || event.ctrlKey
+ || event.shiftKey) {
+ return false;
+ }
+ return true;
+ },
+
setValue : function(toSetOnly) {
if (!this.comboList.activeItem) {
return;
@@ -230,6 +260,7 @@
this.field.value = "";
}
}
+ this.field.prevValue = value;
this.field.value = value;
this.comboList.doSelectItem(this.comboList.activeItem);
this.combobox.fire("rich:onitemselected", {});
@@ -240,6 +271,7 @@
if (this.directInputSuggestions) {
var startInd = this.field.value.length;
var endInd = value.length;
+ //this.field.prevValue = this.field.value;
this.field.value = value;
Richfaces.ComboBox.textboxSelect(this.field, startInd, endInd);
}
@@ -625,9 +657,23 @@
oRange.select();
} else if (Prototype.Browser.Gecko) {
oTextbox.setSelectionRange(iStart, iEnd);
+ } else {
+ //FIXME
+ oTextbox.setSelectionRange(iStart, iEnd);
}
}
+Richfaces.ComboBox.getSelectedText = function(oTextbox) {
+ if (window.getSelection) {
+ return window.getSelection().text;
+ } else if (document.selection) {
+ // should come last; Opera!
+ return document.selection.createRange();
+ } else {
+ //TODO
+ }
+}
+
Richfaces.ComboBox.SPECIAL_KEYS = [
Event.KEY_RETURN, Event.KEY_UP, Event.KEY_DOWN, Event.KEY_RIGHT, Event.KEY_LEFT
]
\ No newline at end of file
Modified: trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-14 17:00:00 UTC (rev 5357)
+++ trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-14 17:11:49 UTC (rev 5358)
@@ -191,7 +191,7 @@
</jsp:scriptlet>
<div id="#{clientId}" class="rich-combobox-font rich-combobox-shell #{styleClass}" style="width:#{listWidth}; #{style}"
x:passThruWithExclusions="value,name,type,id,styleClass,class,style,size,autocomplete,disabled,onchange">
- <div class="rich-combobox-font rich-combobox-shell" style="width:#{width}">
+ <div class="rich-combobox-font rich-combobox-shell" style="width:#{width};z-index:1;">
<input id="comboboxField#{clientId}"
name="comboboxField#{clientId}"
disabled="#{disabled}"
@@ -214,8 +214,8 @@
</div>
<div id="listParent#{clientId}" class="rich-combobox-list-cord #{listClass}" style="display:none; #{listStyle};">
- <iframe class="rich-combobox-list-scroll rich-combobox-list-position" frameborder="0" style="width:#{listWidth};"/>
- <div id="listPosition#{clientId}" class="rich-combobox-list-position" style="width:#{listWidth};">
+ <iframe class="rich-combobox-list-scroll rich-combobox-list-position" frameborder="0" style="width:#{listWidth};z-index:2;background-color:white;"/>
+ <div id="listPosition#{clientId}" class="rich-combobox-list-position" style="width:#{listWidth};z-index:3;">
<div id="listDecoration#{clientId}" class="rich-combobox-list-decoration">
<div id="list#{clientId}" class="rich-combobox-list-scroll" style="width:#{listWidth};">
<f:call name="encodeItems"/>
17 years
JBoss Rich Faces SVN: r5357 - in trunk/sandbox/samples/progressBarDemo: src/main/java/org/richfaces/sandbox/samples and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-01-14 12:00:00 -0500 (Mon, 14 Jan 2008)
New Revision: 5357
Modified:
trunk/sandbox/samples/progressBarDemo/pom.xml
trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java
trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/faces-config.xml
trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
Log:
Skin & component customization added to sample
Modified: trunk/sandbox/samples/progressBarDemo/pom.xml
===================================================================
--- trunk/sandbox/samples/progressBarDemo/pom.xml 2008-01-14 16:59:06 UTC (rev 5356)
+++ trunk/sandbox/samples/progressBarDemo/pom.xml 2008-01-14 17:00:00 UTC (rev 5357)
@@ -29,5 +29,11 @@
<artifactId>progressBar</artifactId>
<version>3.2.0-SNAPSHOT</version>
</dependency>
+
+ <dependency>
+ <groupId>org.richfaces.samples</groupId>
+ <artifactId>skins</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java 2008-01-14 16:59:06 UTC (rev 5356)
+++ trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java 2008-01-14 17:00:00 UTC (rev 5357)
@@ -22,19 +22,17 @@
package org.richfaces.sandbox.samples;
-import java.math.BigDecimal;
-import java.math.BigInteger;
import java.util.Date;
-import javax.faces.event.ActionEvent;
-
/**
* @author $Autor$
*
*/
public class Bean {
- private Boolean enabled = false;
+ private boolean enabled = false;
+ private boolean permanent = false;
+ private boolean determined = true;
private Integer value = 0;
@@ -66,16 +64,32 @@
/**
* @return the enabled
*/
- public Boolean getEnabled() {
+ public boolean getEnabled() {
return enabled;
}
/**
* @param enabled the enabled to set
*/
- public void setEnabled(Boolean enabled) {
+ public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
+
+ public boolean isPermanent() {
+ return permanent;
+ }
+
+ public void setPermanent(boolean permanent) {
+ this.permanent = permanent;
+ }
+
+ public boolean isDetermined() {
+ return determined;
+ }
+
+ public void setDetermined(boolean determined) {
+ this.determined = determined;
+ }
Modified: trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/faces-config.xml 2008-01-14 16:59:06 UTC (rev 5356)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/WEB-INF/faces-config.xml 2008-01-14 17:00:00 UTC (rev 5357)
@@ -18,4 +18,9 @@
<to-view-id>/faces/pages/index.jsp</to-view-id>
</navigation-case>
</navigation-rule>
+ <managed-bean>
+ <managed-bean-name>skinBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.SkinBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
</faces-config>
Modified: trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp 2008-01-14 16:59:06 UTC (rev 5356)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp 2008-01-14 17:00:00 UTC (rev 5357)
@@ -23,13 +23,18 @@
<body>
<f:view>
+ <h:form>
+ <h:selectOneRadio binding="#{skinBean.component}" />
+ <h:commandLink action="#{skinBean.change}" value="set skin" />
+ </h:form>
<h:form>
<progressBar:progressBar value="#{bean.value}" enabled="#{bean.enabled}" id="progrs"
interval="500"
reRender="per1"
styleClass="main"
- determined="true"
+ permanent="#{bean.permanent}"
+ determined="#{bean.determined}"
reRenderAfterComplete="per2"
mode="client">
<f:facet name="initial">
@@ -49,6 +54,17 @@
Enabled: <h:selectBooleanCheckbox value="#{bean.enabled}" id="flag">
<a4j:support event="onclick" reRender="progrs"></a4j:support>
</h:selectBooleanCheckbox>
+
+ <f:verbatim><br /></f:verbatim>
+
+ Permanent: <h:selectBooleanCheckbox value="#{bean.permanent}" id="flag1">
+ <a4j:support event="onclick" reRender="progrs"></a4j:support>
+ </h:selectBooleanCheckbox>
+ <f:verbatim><br /></f:verbatim>
+
+ Determined: <h:selectBooleanCheckbox value="#{bean.determined}" id="flag2">
+ <a4j:support event="onclick" reRender="progrs"></a4j:support>
+ </h:selectBooleanCheckbox>
</h:form>
<script>
var pr = new ProgressBar('j_id_jsp_2009877409_1:progrs');
17 years
JBoss Rich Faces SVN: r5356 - trunk/sandbox/ui/progressBAR/src/main/java/org/richfaces/renderkit/html/images.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-01-14 11:59:06 -0500 (Mon, 14 Jan 2008)
New Revision: 5356
Modified:
trunk/sandbox/ui/progressBAR/src/main/java/org/richfaces/renderkit/html/images/ProgressBarAnimatedBg.java
Log:
ProgressBarAnimatedBg made repeatable forever
Modified: trunk/sandbox/ui/progressBAR/src/main/java/org/richfaces/renderkit/html/images/ProgressBarAnimatedBg.java
===================================================================
--- trunk/sandbox/ui/progressBAR/src/main/java/org/richfaces/renderkit/html/images/ProgressBarAnimatedBg.java 2008-01-14 16:32:51 UTC (rev 5355)
+++ trunk/sandbox/ui/progressBAR/src/main/java/org/richfaces/renderkit/html/images/ProgressBarAnimatedBg.java 2008-01-14 16:59:06 UTC (rev 5356)
@@ -61,6 +61,11 @@
}
@Override
+ protected int getRepeat() {
+ return 0;
+ }
+
+ @Override
protected int getNumberOfFrames() {
return NUMBER_OF_FRAMES;
}
17 years
JBoss Rich Faces SVN: r5355 - in trunk/sandbox/ui/combobox/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-01-14 11:32:51 -0500 (Mon, 14 Jan 2008)
New Revision: 5355
Modified:
trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
Log:
add support for buttonIcon, buttonDisabledIcon, buttonNormalIcon
Modified: trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml
===================================================================
--- trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml 2008-01-14 15:51:30 UTC (rev 5354)
+++ trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml 2008-01-14 16:32:51 UTC (rev 5355)
@@ -134,6 +134,12 @@
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
+ <name>buttonIconNormal</name>
+ <classname>java.lang.String</classname>
+ <description>URI</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
<name>defaultLabel</name>
<classname>java.lang.String</classname>
<description></description>
Modified: trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-01-14 15:51:30 UTC (rev 5354)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-01-14 16:32:51 UTC (rev 5355)
@@ -85,19 +85,28 @@
buttonMouseOverHandler : function(e) {
var classCss = this.classes.BUTTON.CLASSES;
+ var iconStyles = this.classes.BUTTONICON.STYLE;
+
if (this.isActive()) {
this.button.className= classCss.ACTIVE + " " + classCss.HOVERED;
+ this.button.style.backgroundImage = iconStyles.ACTIVE
} else {
this.button.className = classCss.NORMAL + " " + classCss.HOVERED;
- }
+ this.button.style.backgroundImage = iconStyles.NORMAL;
+ }
},
buttonMouseOutHandler : function(e) {
+ var classCss = this.classes.BUTTON.CLASSES;
+ var iconStyles = this.classes.BUTTONICON.STYLE;
+
if (this.isActive()) {
- this.button.className= this.classes.BUTTON.CLASSES.ACTIVE;
+ this.button.className= classCss.ACTIVE;
+ this.button.style.backgroundImage = iconStyles.ACTIVE
} else {
- this.button.className = this.classes.BUTTON.CLASSES.NORMAL;
- }
+ this.button.className = classCss.NORMAL;
+ this.button.style.backgroundImage = iconStyles.NORMAL
+ }
},
listMouseMoveHandler : function(event) {
@@ -251,8 +260,12 @@
this.button.className = this.classes.BUTTON.CLASSES.ACTIVE + " " + this.classes.BUTTON.CLASSES.HOVERED;
} else {
this.button.className = this.classes.BUTTON.CLASSES.ACTIVE ;
- }
- this.field.className = this.classes.FIELD.CLASSES.ACTIVE;
+ }
+
+ var iconStyles = this.classes.BUTTONICON.STYLE;
+ this.button.style.backgroundImage = iconStyles.ACTIVE;
+
+ this.field.className = this.classes.FIELD.CLASSES.ACTIVE;
this.buttonBG.className = this.classes.BUTTONBG.CLASSES.ACTIVE;
this.isDisabled = false;
},
@@ -262,6 +275,9 @@
this.buttonBG.className = this.classes.BUTTONBG.CLASSES.DISABLED;
this.field.className = this.classes.FIELD.CLASSES.DISABLED;
+ var iconStyles = this.classes.BUTTONICON.STYLE;
+ this.button.style.backgroundImage = iconStyles.DISABLE
+
this.button.disabled = true;
this.field.disabled = true;
@@ -273,6 +289,9 @@
this.buttonBG.className = this.classes.BUTTONBG.CLASSES.NORMAL;
this.field.className = this.classes.FIELD.CLASSES.NORMAL;
+ var iconStyles = this.classes.BUTTONICON.STYLE;
+ this.button.style.backgroundImage = iconStyles.NORMAL
+
this.button.disabled = false;
this.field.disabled = false;
this.isDisabled = false;
Modified: trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-14 15:51:30 UTC (rev 5354)
+++ trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-14 16:32:51 UTC (rev 5355)
@@ -67,9 +67,6 @@
variables.setVariable("value", value);
Object inputStyle = component.getAttributes().get("inputStyle");
- if(inputStyle==null || inputStyle.equals("")) {
- inputStyle = "\"\"";
- }
variables.setVariable("inputStyle", inputStyle);
Object inputClass = component.getAttributes().get("inputClass");
@@ -79,9 +76,6 @@
variables.setVariable("inputClass", inputClass);
Object inputDisabledStyle = component.getAttributes().get("inputDisabledStyle");
- if(inputDisabledStyle==null || inputDisabledStyle.equals("")) {
- inputDisabledStyle = "\"\"";
- }
variables.setVariable("inputDisabledStyle", inputDisabledStyle);
Object inputDisabledClass = component.getAttributes().get("inputDisabledClass");
@@ -97,9 +91,6 @@
variables.setVariable("buttonDisabledClass", buttonDisabledClass);
Object buttonDisabledStyle = component.getAttributes().get("buttonDisabledStyle");
- if(buttonDisabledStyle==null || buttonDisabledStyle.equals("")) {
- buttonDisabledStyle = "\"\"";
- }
variables.setVariable("buttonDisabledStyle", buttonDisabledStyle);
Object buttonClass = component.getAttributes().get("buttonClass");
@@ -109,15 +100,9 @@
variables.setVariable("buttonClass", buttonClass);
Object buttonStyle = component.getAttributes().get("buttonStyle");
- if(buttonStyle==null || buttonStyle.equals("")) {
- buttonStyle = "\"\"";
- }
variables.setVariable("buttonStyle", buttonStyle);
Object listStyle = component.getAttributes().get("listStyle");
- if(listStyle==null || listStyle.equals("")) {
- listStyle = "\"\"";
- }
variables.setVariable("listStyle", listStyle);
Object listClass = component.getAttributes().get("listClass");
@@ -127,9 +112,6 @@
variables.setVariable("listClass", listClass);
Object listDisabledStyle = component.getAttributes().get("listDisabledStyle");
- if(listDisabledStyle==null || listDisabledStyle.equals("")) {
- listDisabledStyle = "\"\"";
- }
variables.setVariable("listDisabledStyle", listDisabledStyle);
Object listDisabledClass = component.getAttributes().get("listDisabledClass");
@@ -168,6 +150,27 @@
curWidth = width;
}
variables.setVariable("curWidth", curWidth);
+
+ String buttonIcon = (String)component.getAttributes().get("buttonIcon");
+ if (buttonIcon != null && !buttonIcon.equals("")) {
+ buttonIcon = "url('" + buttonIcon + "')";
+ }
+ variables.setVariable("buttonIcon", buttonIcon);
+
+ String buttonIconDisabled = (String)component.getAttributes().get("buttonIconDisabled");
+ if (buttonIconDisabled != null && !buttonIconDisabled.equals("")) {
+ buttonIconDisabled = "url('" + buttonIconDisabled + "')";
+ }
+ variables.setVariable("buttonIconDisabled", buttonIconDisabled);
+
+ String buttonIconNormal = (String)component.getAttributes().get("buttonIconNormal");
+ if (buttonIconNormal != null && !buttonIconNormal.equals("")) {
+ buttonIconNormal = "url('" + buttonIconNormal + "')";
+ }
+ variables.setVariable("buttonIconNormal", buttonIconNormal);
+
+
+
]]>
</jsp:scriptlet>
<jsp:scriptlet>
@@ -202,7 +205,7 @@
style="width:#{width}; #{inputStyle}"
/>
<input id="comboBoxButtonBG#{clientId}" readonly="true" type="text" value="" class="rich-combobox-font rich-combobox-button-background rich-combobox-button"/>
- <input id="comboboxButton#{clientId}" readonly="true" disabled="#{disabled}" type="text" value="" style="#{buttonStyle}"
+ <input id="comboboxButton#{clientId}" readonly="true" disabled="#{disabled}" type="text" value="" style="#{buttonStyle}; background-image: #{buttonIconNormal};"
class="rich-combobox-font-disabled rich-combobox-button-icon-disabled rich-combobox-button #{buttonDisabledClass}"
onmousedown="document.getElementById('comboBoxButtonBG#{clientId}').className='rich-combobox-font rich-combobox-button-pressed-background rich-combobox-button';"
onmouseup="document.getElementById('comboBoxButtonBG#{clientId}').className='rich-combobox-font rich-combobox-button-background rich-combobox-button';"/>
@@ -231,30 +234,35 @@
DISABLED : "rich-combobox-font-disabled rich-combobox-button-icon-disabled rich-combobox-button-disabled #{buttonDisabledClass}",
HOVERED : "rich-combobox-button-hovered"},
STYLE :
- {NORMAL: #{buttonDisabledStyle},
- ACTIVE: #{buttonStyle},
- DISABLED: #{buttonDisabledStyle}}
+ {NORMAL: "#{buttonDisabledStyle}",
+ ACTIVE: "#{buttonStyle}",
+ DISABLED: "#{buttonDisabledStyle}"}
},
BUTTONBG : {CLASSES :
{NORMAL:"rich-combobox-font-disabled rich-combobox-button-background-disabled rich-combobox-button-disabled",
ACTIVE: "rich-combobox-font rich-combobox-button-background rich-combobox-button",
DISABLED : "rich-combobox-font-disabled rich-combobox-button-background-disabled rich-combobox-button-disabled"}
- },
+ },
+ BUTTONICON : {STYLE :
+ {NORMAL: "#{buttonIconNormal}",
+ ACTIVE: "#{buttonIcon}",
+ DISABLED: "#{buttonIconDisabled}"}
+ },
FIELD : {CLASSES:
{NORMAL : "rich-combobox-font-disabled rich-combobox-input-default-disabled rich-combobox-input-disabled #{inputDisabledClass}",
ACTIVE : "rich-combobox-font rich-combobox-input-default rich-combobox-input #{inputClass}",
DISABLED : "rich-combobox-font-disabled rich-combobox-input-default-disabled rich-combobox-input-disabled #{inputDisabledClass}"},
STYLE :
- {NORMAL : #{inputDisabledStyle},
- ACTIVE : #{inputStyle},
- DISABLED : #{inputDisabledStyle}}
+ {NORMAL : "#{inputDisabledStyle}",
+ ACTIVE : "#{inputStyle}",
+ DISABLED : "#{inputDisabledStyle}"}
},
COMBO_LIST : {
LIST : {CLASSES :
{ACTIVE : "rich-combobox-list-cord rich-combobox-list-scroll rich-combobox-list-decoration rich-combobox-list-position #{listClass}",
DISABLED : "rich-combobox-list-cord rich-combobox-list-scroll rich-combobox-list-decoration rich-combobox-list-position #{listDisabledClass}"},
- STYLE : {ACTIVE: #{listStyle},
- DISABLED: #{listDisabledStyle}}
+ STYLE : {ACTIVE: "#{listStyle}",
+ DISABLED: "#{listDisabledStyle}"}
},
ITEM : {NORMAL : "rich-combobox-item rich-combobox-item-normal #{itemClass}",
SELECTED : "rich-combobox-item rich-combobox-item-selected #{itemSelectedClass}",
17 years