JBoss Rich Faces SVN: r10174 - trunk/ui/tooltip/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-08-21 20:37:07 -0400 (Thu, 21 Aug 2008)
New Revision: 10174
Modified:
trunk/ui/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx
trunk/ui/tooltip/src/main/templates/org/richfaces/htmltooltipblock.jspx
Log:
https://jira.jboss.org/jira/browse/RF-4267
Modified: trunk/ui/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx
===================================================================
--- trunk/ui/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx 2008-08-21 22:06:43 UTC (rev 10173)
+++ trunk/ui/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx 2008-08-22 00:37:07 UTC (rev 10174)
@@ -11,16 +11,6 @@
baseclass="org.richfaces.renderkit.html.ToolTipRenderer"
component="org.richfaces.component.UIToolTip" >
- <!-- h:styles>
- /org/richfaces/renderkit/html/css/tooltip.xcss
- </h:styles>
- <h:scripts>
- new org.ajax4jsf.framework.resource.PrototypeScript(),
- new org.ajax4jsf.framework.ajax.AjaxScript(),
- /org/richfaces/renderkit/html/scripts/utils.js,
- /org/richfaces/renderkit/html/scripts/tooltip.js
- </h:scripts-->
-
<f:clientid var="clientId"/>
<span id="#{clientId}" style="z-index:#{component.attributes['zorder']}; #{component.attributes['style']}"
class="dr-rich-tool-tip rich-tool-tip #{component.attributes['styleClass']}">
@@ -45,9 +35,4 @@
<f:call name="insertScript"/>
</span>
</span>
-
-
-
-
- <!-- f:call name="utils.encodeEndFormIfNessesary"/-->
</f:root>
Modified: trunk/ui/tooltip/src/main/templates/org/richfaces/htmltooltipblock.jspx
===================================================================
--- trunk/ui/tooltip/src/main/templates/org/richfaces/htmltooltipblock.jspx 2008-08-21 22:06:43 UTC (rev 10173)
+++ trunk/ui/tooltip/src/main/templates/org/richfaces/htmltooltipblock.jspx 2008-08-22 00:37:07 UTC (rev 10174)
@@ -11,16 +11,6 @@
baseclass="org.richfaces.renderkit.html.ToolTipRenderer"
component="org.richfaces.component.UIToolTip" >
- <!-- h:styles>
- /org/richfaces/renderkit/html/css/tooltip.xcss
- </h:styles>
- <h:scripts>
- new org.ajax4jsf.framework.resource.PrototypeScript(),
- new org.ajax4jsf.framework.ajax.AjaxScript(),
- /org/richfaces/renderkit/html/scripts/utils.js,
- /org/richfaces/renderkit/html/scripts/tooltip.js
- </h:scripts-->
-
<f:clientid var="clientId"/>
<div id="#{clientId}" style="position: absolute; display : none;z-index:#{component.attributes['zorder']}; #{component.attributes['style']}" class="dr-rich-tool-tip rich-tool-tip #{component.attributes['styleClass']}">
<f:call name="utils.encodePassThru" />
@@ -42,5 +32,4 @@
<f:call name="insertScript"/>
</span>
</div>
- <!-- f:call name="utils.encodeEndFormIfNessesary"/-->
</f:root>
17 years, 8 months
JBoss Rich Faces SVN: r10173 - in trunk/samples/richfaces-demo/src/main: webapp/richfaces/suggestionBox/examples and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-08-21 18:06:43 -0400 (Thu, 21 Aug 2008)
New Revision: 10173
Modified:
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/capitals/capitals.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml
Log:
Updated implementation of JS objects in suggestion demo
Modified: trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/capitals/capitals.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/capitals/capitals.xml 2008-08-21 19:18:25 UTC (rev 10172)
+++ trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/capitals/capitals.xml 2008-08-21 22:06:43 UTC (rev 10173)
@@ -4,255 +4,500 @@
<state>Alabama</state>
<name>Montgomery</name>
<timeZone>GMT-6</timeZone>
- <!-- data>
+ <data>
<item>Birmingham</item>
<item>Montgomery</item>
<item>Mobile</item>
- </data -->
+ </data>
</capital>
<capital>
<state>Alaska</state>
<name>Juneau</name>
<timeZone>GMT-9</timeZone>
+ <data>
+ <item>Anchorage</item>
+ <item>Fairbanks</item>
+ <item>Juneau</item>
+ </data>
</capital>
<capital>
<state>Arizona</state>
<name>Phoenix</name>
<timeZone>GMT-7</timeZone>
+ <data>
+ <item>Phoenix</item>
+ <item>Tucson</item>
+ <item>Mesa</item>
+ </data>
</capital>
<capital>
<state>Arkansas</state>
<name>Little Rock</name>
<timeZone>GMT-6</timeZone>
+ <data>
+ <item>Little Rock</item>
+ <item>Fort Smith</item>
+ <item>Fayetteville</item>
+ </data>
</capital>
<capital>
<state>California</state>
<name>Sacramento</name>
<timeZone>GMT-8</timeZone>
+ <data>
+ <item>Los Angeles</item>
+ <item>San Diego</item>
+ <item>San Jose</item>
+ </data>
</capital>
<capital>
<state>Colorado</state>
<name>Denver</name>
<timeZone>GMT-7</timeZone>
+ <data>
+ <item>Denver</item>
+ <item>Colorado Springs</item>
+ <item>Aurora</item>
+ </data>
</capital>
<capital>
<state>Connecticut</state>
<name>Hartford</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Bridgeport</item>
+ <item>New Haven</item>
+ <item>Hartford</item>
+ </data>
</capital>
<capital>
<state>Delaware</state>
<name>Dover</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Wilmington</item>
+ <item>Dover</item>
+ <item>Newark</item>
+ </data>
</capital>
<capital>
<state>Florida</state>
<name>Tallahassee</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Jacksonville</item>
+ <item>Miami</item>
+ <item>Tampa</item>
+ </data>
</capital>
<capital>
<state>Georgia</state>
<name>Atlanta</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Atlanta</item>
+ <item>Augusta</item>
+ <item>Columbus</item>
+ </data>
</capital>
<capital>
<state>Hawaii</state>
<name>Honolulu</name>
<timeZone>GMT-10</timeZone>
+ <data>
+ <item>Honolulu1</item>
+ <item>Hilo1</item>
+ <item>Kailua1</item>
+ </data>
</capital>
<capital>
<state>Idaho</state>
<name>Boise</name>
<timeZone>GMT-8</timeZone>
+ <data>
+ <item>Boise</item>
+ <item>Nampa</item>
+ <item>Meridian</item>
+ </data>
</capital>
<capital>
<state>Illinois</state>
<name>Springfield</name>
<timeZone>GMT-6</timeZone>
+ <data>
+ <item>Chicago</item>
+ <item>Aurora</item>
+ <item>Rockford</item>
+ </data>
</capital>
<capital>
<state>Indiana</state>
<name>Indianapolis</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Indianapolis</item>
+ <item>Fort Wayne</item>
+ <item>Evansville</item>
+ </data>
</capital>
<capital>
<state>Iowa</state>
<name>Des Moines</name>
<timeZone>GMT-6</timeZone>
+ <data>
+ <item>Des Moines</item>
+ <item>Cedar Rapids</item>
+ <item>Davenport</item>
+ </data>
</capital>
<capital>
<state>Kansas</state>
<name>Topeka</name>
<timeZone>GMT-6</timeZone>
+ <data>
+ <item>Wichita</item>
+ <item>Overland Park</item>
+ <item>Kansas City</item>
+ </data>
</capital>
<capital>
<state>Kentucky</state>
<name>Frankfort</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Louisville</item>
+ <item>Lexington</item>
+ <item>Owensboro</item>
+ </data>
</capital>
<capital>
<state>Louisiana</state>
<name>Baton Rouge</name>
<timeZone>GMT-6</timeZone>
+ <data>
+ <item>New Orleans</item>
+ <item>Baton Rouge</item>
+ <item>Shreveport</item>
+ </data>
</capital>
<capital>
<state>Maine</state>
<name>Augusta</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Portland</item>
+ <item>Lewiston</item>
+ <item>Bangor</item>
+ </data>
</capital>
<capital>
<state>Maryland</state>
<name>Annapolis</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Baltimore</item>
+ <item>Columbia</item>
+ <item>Silver Spring</item>
+ </data>
</capital>
<capital>
<state>Massachusetts</state>
<name>Boston</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Boston</item>
+ <item>Worcester</item>
+ <item>Springfield</item>
+ </data>
</capital>
<capital>
<state>Michigan</state>
<name>Lansing</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Detroit</item>
+ <item>Grand Rapids</item>
+ <item>Warren</item>
+ </data>
</capital>
<capital>
<state>Minnesota</state>
<name>St. Paul</name>
<timeZone>GMT-6</timeZone>
+ <data>
+ <item>Minneapolis</item>
+ <item>Saint Paul</item>
+ <item>Rochester</item>
+ </data>
</capital>
<capital>
<state>Mississippi</state>
<name>Jackson</name>
<timeZone>GMT-6</timeZone>
+ <data>
+ <item>Jackson</item>
+ <item>Gulfport</item>
+ <item>Biloxi</item>
+ </data>
</capital>
<capital>
<state>Missouri</state>
<name>Jefferson City</name>
<timeZone>GMT-6</timeZone>
+ <data>
+ <item>Kansas City</item>
+ <item>Saint Louis</item>
+ <item>Springfield</item>
+ </data>
</capital>
<capital>
<state>Montana</state>
<name>Helena</name>
<timeZone>GMT-7</timeZone>
+ <data>
+ <item>Billings</item>
+ <item>Missoula</item>
+ <item>Great Falls</item>
+ </data>
</capital>
<capital>
<state>Nebraska</state>
<name>Lincoln</name>
<timeZone>GMT-6</timeZone>
+ <data>
+ <item>Omaha</item>
+ <item>Lincoln</item>
+ <item>Bellevue</item>
+ </data>
</capital>
<capital>
<state>Nevada</state>
<name>Carson City</name>
<timeZone>GMT-8</timeZone>
+ <data>
+ <item>Las Vegas</item>
+ <item>Henderson</item>
+ <item>Reno</item>
+ </data>
</capital>
<capital>
<state>New Hampshire</state>
<name>Concord</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Manchester</item>
+ <item>Nashua</item>
+ <item>Concord</item>
+ </data>
</capital>
<capital>
<state>New Jersey</state>
<name>Trenton</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Newark</item>
+ <item>Jersey City</item>
+ <item>Paterson</item>
+ </data>
</capital>
<capital>
<state>New Mexico</state>
<name>Santa Fe</name>
<timeZone>GMT-7</timeZone>
+ <data>
+ <item>Albuquerque</item>
+ <item>Las Cruces</item>
+ <item>Santa Fe</item>
+ </data>
</capital>
<capital>
<state>New York</state>
<name>Albany</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>New York City</item>
+ <item>Buffalo</item>
+ <item>Rochester</item>
+ </data>
</capital>
<capital>
<state>North Carolina</state>
<name>Raleigh</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Charlotte</item>
+ <item>Raleigh</item>
+ <item>Greensboro</item>
+ </data>
</capital>
<capital>
<state>North Dakota</state>
<name>Bismarck</name>
<timeZone>GMT-6</timeZone>
+ <data>
+ <item>Fargo</item>
+ <item>Bismarck</item>
+ <item>Grand Forks</item>
+ </data>
</capital>
<capital>
<state>Ohio</state>
<name>Columbus</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Columbus</item>
+ <item>Cleveland</item>
+ <item>Cincinnati</item>
+ </data>
</capital>
<capital>
<state>Oklahoma</state>
<name>Oklahoma City</name>
<timeZone>GMT-6</timeZone>
+ <data>
+ <item>Oklahoma City</item>
+ <item>Tulsa</item>
+ <item>Norman</item>
+ </data>
</capital>
<capital>
<state>Oregon</state>
<name>Salem</name>
<timeZone>GMT-8</timeZone>
+ <data>
+ <item>Portland</item>
+ <item>Salem</item>
+ <item>Eugene</item>
+ </data>
</capital>
<capital>
<state>Pennsylvania</state>
<name>Harrisburg</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Philadelphia</item>
+ <item>Pittsburgh</item>
+ <item>Allentown</item>
+ </data>
</capital>
<capital>
<state>Rhode Island</state>
<name>Providence</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Providence</item>
+ <item>Warwick</item>
+ <item>Cranston</item>
+ </data>
</capital>
<capital>
<state>South Carolina</state>
<name>Columbia</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Columbia</item>
+ <item>Charleston</item>
+ <item>North Charleston</item>
+ </data>
</capital>
<capital>
<state>South Dakota</state>
<name>Pierre</name>
<timeZone>GMT-6</timeZone>
+ <data>
+ <item>Sioux Falls</item>
+ <item>Rapid City</item>
+ <item>Aberdeen</item>
+ </data>
</capital>
<capital>
<state>Tennessee</state>
<name>Nashville</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Memphis</item>
+ <item>Nashville</item>
+ <item>Knoxville</item>
+ </data>
</capital>
<capital>
<state>Texas</state>
<name>Austin</name>
<timeZone>GMT-6</timeZone>
+ <data>
+ <item>Houston</item>
+ <item>San Antonio</item>
+ <item>Dallas</item>
+ </data>
</capital>
<capital>
<state>Utah</state>
<name>Salt Lake City</name>
<timeZone>GMT-7</timeZone>
+ <data>
+ <item>Salt Lake City</item>
+ <item>Provo</item>
+ <item>West Valley City</item>
+ </data>
</capital>
<capital>
<state>Vermont</state>
<name>Montpelier</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Burlington</item>
+ <item>Rutland</item>
+ <item>South Burlington</item>
+ </data>
</capital>
<capital>
<state>Virginia</state>
<name>Richmond</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Virginia Beach</item>
+ <item>Norfolk</item>
+ <item>Chesapeake</item>
+ </data>
</capital>
<capital>
<state>Washington</state>
<name>Olympia</name>
<timeZone>GMT-8</timeZone>
+ <data>
+ <item>Seattle</item>
+ <item>Spokane</item>
+ <item>Tacoma</item>
+ </data>
</capital>
<capital>
<state>West Virginia</state>
<name>Charleston</name>
<timeZone>GMT-5</timeZone>
+ <data>
+ <item>Charleston</item>
+ <item>Huntington</item>
+ <item>Parkersburg</item>
+ </data>
</capital>
<capital>
<state>Wisconsin</state>
<name>Madison</name>
<timeZone>GMT-6</timeZone>
+ <data>
+ <item>Milwaukee</item>
+ <item>Madison</item>
+ <item>Green Bay</item>
+ </data>
</capital>
<capital>
<state>Wyoming</state>
<name>Cheyenne</name>
<timeZone>GMT-7</timeZone>
+ <data>
+ <item>Cheyenne</item>
+ <item>Casper</item>
+ <item>Laramie</item>
+ </data>
</capital>
-</capitals>
\ No newline at end of file
+</capitals>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml 2008-08-21 19:18:25 UTC (rev 10172)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml 2008-08-21 22:06:43 UTC (rev 10173)
@@ -7,20 +7,39 @@
<div id="myDiv"></div>
- <script type="text/javascript">
+ <script type="text/javascript">//<![CDATA[
function processObjectsChange(suggestionBox) {
var items = suggestionBox.getSelectedItems();
- if (items) {
- var html = items.collect(function(i) {
- return i.name;
- }).join('<br />');
+ if (items && items.length > 0) {
+ var html = "<table cellspaing='8'><thead>" +
+ "<tr><td>State</td><td>1st City</td><td>2nd City</td><td>3rd City</td></tr>" +
+ "</thead><tbody>";
+
+ for ( var i = 0; i < items.length; i++) {
+ html += "<tr>";
+
+ html += "<td>";
+ html += items[i].state;
+ html += "</td>";
+
+ var dataItems = items[i].data.items;
+ for ( var j = 0; j < dataItems.length; j++) {
+ html += "<td>";
+ html += dataItems[j];
+ html += "</td>";
+ }
+
+ html += "</tr>";
+ }
+
+ html += "</tbody></table>"
$('myDiv').innerHTML = html;
} else {
$('myDiv').innerHTML = "";
}
}
- </script>
+ //]]></script>
<h:form id="suggestionbox_form">
17 years, 8 months
JBoss Rich Faces SVN: r10172 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-08-21 15:18:25 -0400 (Thu, 21 Aug 2008)
New Revision: 10172
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml
Log:
Started implementation of JS objects in suggestion demo
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml 2008-08-21 19:09:08 UTC (rev 10171)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml 2008-08-21 19:18:25 UTC (rev 10172)
@@ -15,9 +15,9 @@
return i.name;
}).join('<br />');
- myDiv.innerHTML = html;
+ $('myDiv').innerHTML = html;
} else {
- myDiv.innerHTML = "";
+ $('myDiv').innerHTML = "";
}
}
</script>
17 years, 8 months
JBoss Rich Faces SVN: r10171 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-08-21 15:09:08 -0400 (Thu, 21 Aug 2008)
New Revision: 10171
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml
Log:
Started implementation of JS objects in suggestion demo
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml 2008-08-21 19:08:43 UTC (rev 10170)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml 2008-08-21 19:09:08 UTC (rev 10171)
@@ -5,6 +5,23 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
+ <div id="myDiv"></div>
+
+ <script type="text/javascript">
+ function processObjectsChange(suggestionBox) {
+ var items = suggestionBox.getSelectedItems();
+ if (items) {
+ var html = items.collect(function(i) {
+ return i.name;
+ }).join('<br />');
+
+ myDiv.innerHTML = html;
+ } else {
+ myDiv.innerHTML = "";
+ }
+ }
+ </script>
+
<h:form id="suggestionbox_form">
<p>
@@ -22,7 +39,9 @@
height="#{suggestionBox.height}"
shadowDepth="#{suggestionBox.shadowDepth}"
cellpadding="#{suggestionBox.cellpadding}"
- nothingLabel="No capitals found" columnClasses="center">
+ nothingLabel="No capitals found" columnClasses="center"
+ usingSuggestObjects="true"
+ onobjectchange="processObjectsChange(suggestion)">
<h:column>
<h:graphicImage value="#{result.stateFlag}" />
</h:column>
17 years, 8 months
JBoss Rich Faces SVN: r10170 - in trunk/samples/richfaces-demo/src/main: resources/org/richfaces/demo/capitals and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-08-21 15:08:43 -0400 (Thu, 21 Aug 2008)
New Revision: 10170
Added:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/capitals/CapitalData.java
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/capitals/Capital.java
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/capitals/capitals-rules.xml
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/capitals/capitals.xml
Log:
Started implementation of JS objects in suggestion demo
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/capitals/Capital.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/capitals/Capital.java 2008-08-21 18:58:59 UTC (rev 10169)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/capitals/Capital.java 2008-08-21 19:08:43 UTC (rev 10170)
@@ -11,7 +11,14 @@
private String name;
private String state;
private String timeZone;
+ private CapitalData data;
+ public CapitalData getData() {
+ return data;
+ }
+ public void setData(CapitalData data) {
+ this.data = data;
+ }
private final static String FILE_EXT = ".gif";
public Capital() {
}
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/capitals/CapitalData.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/capitals/CapitalData.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/capitals/CapitalData.java 2008-08-21 19:08:43 UTC (rev 10170)
@@ -0,0 +1,23 @@
+package org.richfaces.demo.capitals;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+public class CapitalData implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -3456988151970108426L;
+ private List<String> items = new ArrayList<String>();
+
+ public void addItem(String item) {
+ items.add(item);
+ }
+
+ public List<String> getItems() {
+ return items;
+ }
+
+}
Modified: trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/capitals/capitals-rules.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/capitals/capitals-rules.xml 2008-08-21 18:58:59 UTC (rev 10169)
+++ trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/capitals/capitals-rules.xml 2008-08-21 19:08:43 UTC (rev 10170)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
<!DOCTYPE digester-rules SYSTEM "digester-rules.dtd">
--->
+ -->
<digester-rules>
<pattern value="*/capital">
@@ -10,5 +10,14 @@
<bean-property-setter-rule pattern="state" propertyname="state"/>
<bean-property-setter-rule pattern="timeZone" propertyname="timeZone"/>
<set-next-rule methodname="addCapital"/>
+
+ <pattern value="data">
+ <object-create-rule classname="org.richfaces.demo.capitals.CapitalData" />
+ <set-next-rule methodname="setData"/>
+
+ <pattern value="item">
+ <call-method-rule methodname="addItem" paramcount="0" />
+ </pattern>
+ </pattern>
</pattern>
</digester-rules>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/capitals/capitals.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/capitals/capitals.xml 2008-08-21 18:58:59 UTC (rev 10169)
+++ trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/capitals/capitals.xml 2008-08-21 19:08:43 UTC (rev 10170)
@@ -4,6 +4,11 @@
<state>Alabama</state>
<name>Montgomery</name>
<timeZone>GMT-6</timeZone>
+ <!-- data>
+ <item>Birmingham</item>
+ <item>Montgomery</item>
+ <item>Mobile</item>
+ </data -->
</capital>
<capital>
<state>Alaska</state>
17 years, 8 months
JBoss Rich Faces SVN: r10169 - in trunk/ui/inplaceSelect/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-08-21 14:58:59 -0400 (Thu, 21 Aug 2008)
New Revision: 10169
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/css/inplaceselect.xcss
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
Log:
https://jira.jboss.org/jira/browse/RF-4225
Modified: trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/css/inplaceselect.xcss
===================================================================
--- trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/css/inplaceselect.xcss 2008-08-21 18:58:53 UTC (rev 10168)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/css/inplaceselect.xcss 2008-08-21 18:58:59 UTC (rev 10169)
@@ -21,7 +21,7 @@
}
.rich-inplace-select {
- /*position : relative; */
+ position : relative;
}
.rich-inplace-select-view{
Modified: trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-08-21 18:58:53 UTC (rev 10168)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-08-21 18:58:59 UTC (rev 10169)
@@ -169,7 +169,9 @@
this.cancel(event);
break;
case Event.KEY_TAB :
- this.save();
+ if (this.attributes.showControls) {
+ this.save();
+ }
break;
}
},
Modified: trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-08-21 18:58:53 UTC (rev 10168)
+++ trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-08-21 18:58:59 UTC (rev 10169)
@@ -93,7 +93,7 @@
</jsp:scriptlet>
<input id="#{clientId}inplaceTmpValue"
type="text"
- style='clip:rect(0px 0px 10px 10px)'
+ style='clip:rect(0px 0px 0px 0px)'
value="#{fieldLabel}"
autocomplete="off"
maxlength='#{component.attributes["inputMaxLength"]}'
17 years, 8 months
JBoss Rich Faces SVN: r10168 - in trunk/ui/inplaceInput/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-08-21 14:58:53 -0400 (Thu, 21 Aug 2008)
New Revision: 10168
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
Log:
https://jira.jboss.org/jira/browse/RF-4225
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-08-21 18:12:43 UTC (rev 10167)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-08-21 18:58:53 UTC (rev 10168)
@@ -176,7 +176,7 @@
this.bar.hide();
}
- this.tempValueKeeper.style.clip = 'rect(0px 0px 10px 10px)';
+ this.tempValueKeeper.style.clip = 'rect(0px 0px 0px 0px)';
},
/*endChangedState : function() {
Modified: trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
===================================================================
--- trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-08-21 18:12:43 UTC (rev 10167)
+++ trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-08-21 18:58:53 UTC (rev 10168)
@@ -88,7 +88,7 @@
<input id='#{clientId}tempValue'
class='rich-inplace-field'
- style='clip:rect(0px 0px 10px 10px)'
+ style='clip:rect(0px 0px 0px 0px)'
type='text'
autocomplete="off"
value='#{fieldValue}'
17 years, 8 months
JBoss Rich Faces SVN: r10167 - in trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html: scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-08-21 14:12:43 -0400 (Thu, 21 Aug 2008)
New Revision: 10167
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/css/inplaceinput.xcss
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
https://jira.jboss.org/jira/browse/RF-4246
Modified: trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/css/inplaceinput.xcss
===================================================================
--- trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/css/inplaceinput.xcss 2008-08-21 16:58:22 UTC (rev 10166)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/css/inplaceinput.xcss 2008-08-21 18:12:43 UTC (rev 10167)
@@ -13,7 +13,7 @@
.rich-inplace {
- /*position:relative;*/
+ position:relative;
}
.rich-inplace-changed {
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-08-21 16:58:22 UTC (rev 10166)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-08-21 18:12:43 UTC (rev 10167)
@@ -37,6 +37,7 @@
this.initEvents();
this["rich:destructor"] = "destroy";
+ this.skipSwitching = false;
},
//TODO: more cleanup here - remove references to DOM elements
@@ -106,11 +107,11 @@
return;
}
var el = (e.srcElement) ? e.srcElement : e.target;
+ this.edit();
if (el.id == this.inplaceInput.id) {
this.skipSwitching = true;
this.tempValueKeeper.focus();
}
- this.edit();
},
edit: function (){
@@ -170,7 +171,7 @@
*/
endEditableState : function() {
- this.inplaceInput.style.position = "";
+ //this.inplaceInput.style.position = "";
if (this.bar) {
this.bar.hide();
}
@@ -186,7 +187,7 @@
if (this.currentState == Richfaces.InplaceInput.STATES[1]) {
return;
}
- this.inplaceInput.style.position = "relative";
+ //this.inplaceInput.style.position = "relative";
this.changeState(Richfaces.InplaceInput.STATES[1]);
var textWidth= this.inplaceInput.offsetWidth;
var inputSize = this.setInputWidth(textWidth);
17 years, 8 months
JBoss Rich Faces SVN: r10166 - trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-08-21 12:58:22 -0400 (Thu, 21 Aug 2008)
New Revision: 10166
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
https://jira.jboss.org/jira/browse/RF-4263
Modified: trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-08-21 16:31:37 UTC (rev 10165)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-08-21 16:58:22 UTC (rev 10166)
@@ -540,9 +540,7 @@
},
resetFrame: function () {
- if (this.iframe) {
- this.iframe.src = "javascript:''";
- }
+ if (this.iframe && this.iframe.contentWindow.document && this.iframe.contentWindow.document.body) this.iframe.contentWindow.document.body.innerHTML = "";
},
initEvents : function() {
17 years, 8 months
JBoss Rich Faces SVN: r10165 - in trunk/test-applications/seleniumTest/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-08-21 12:31:37 -0400 (Thu, 21 Aug 2008)
New Revision: 10165
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/TogglePanelTest.java
Log:
TogglePanelTest refactoring
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml 2008-08-21 14:29:32 UTC (rev 10164)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/togglePanel/togglePanelTest.xhtml 2008-08-21 16:31:37 UTC (rev 10165)
@@ -43,11 +43,10 @@
<h:outputText value="Ajax two" />
</rich:toggleControl>
</h:panelGroup>
-
+
<h:panelGroup layout="block" styleClass="component_div" >
<rich:togglePanel id="panel_server" switchType="server" initialState="one"
- stateOrder="one,two"
- value="#{panelBean.panelValue}" >
+ stateOrder="one,two">
<f:facet name="one">
<h:outputText id="server_state_one" value="State One" />
</f:facet>
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/TogglePanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/TogglePanelTest.java 2008-08-21 14:29:32 UTC (rev 10164)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/TogglePanelTest.java 2008-08-21 16:31:37 UTC (rev 10165)
@@ -31,8 +31,9 @@
public class TogglePanelTest extends SeleniumTestBase {
@Test
- public void testTogglePanelComponent(Template template) {
+ public void testTogglePanelComponentAjaxMode(Template template) {
renderPage(template);
+
String parentId = getParentId() + "_form:";
String inputId = parentId + "_value";
@@ -45,11 +46,10 @@
String oneFacet = parentId + "ajax_state_one";
String twoFacet = parentId + "ajax_state_two";
- String cleanButton = parentId + "clean";
+ reset();
writeStatus("Click on ajax controlNext");
- clickById(controlNext);
- waitForAjaxCompletion();
+ clickAjaxCommandAndWait(controlNext);
// pause(6000, "panel_ajax");
AssertValueEquals(inputId, "ajax_next");
AssertTextEquals(outputId, "1");
@@ -84,19 +84,30 @@
getTextById(oneFacet);
Assert.fail("Both of 'one' and 'two' states were rendered for ajax toggle panel.");
} catch (SeleniumException se) {
-
}
+ }
- controlNext = parentId + "server_next";
- controlOne = parentId + "server_one";
- controlTwo = parentId + "server_two";
- oneFacet = parentId + "server_state_one";
- twoFacet = parentId + "server_state_two";
+ @Test
+ public void testTogglePanelComponentServerMode(Template template) {
+ renderPage(template);
+ String parentId = getParentId() + "_form:";
+
+ String inputId = parentId + "_value";
+ String outputId = parentId + "_value2";
+
+ String controlNext = parentId + "server_next";
+ String controlOne = parentId + "server_one";
+ String controlTwo = parentId + "server_two";
+ String oneFacet = parentId + "server_state_one";
+ String twoFacet = parentId + "server_state_two";
+
+ reset();
+
writeStatus("Click on controlNext");
clickCommandAndWait(controlNext);
AssertValueEquals(inputId, "server_next");
- AssertTextEquals(outputId, "2");
+ AssertTextEquals(outputId, "1");
Assert.assertTrue(isVisibleById(twoFacet));
try {
getTextById(oneFacet);
@@ -108,7 +119,7 @@
writeStatus("Click on server controlOne");
clickCommandAndWait(controlOne);
AssertValueEquals(inputId, "server_one");
- AssertTextEquals(outputId, "3");
+ AssertTextEquals(outputId, "2");
Assert.assertTrue(isVisibleById(oneFacet));
try {
getTextById(twoFacet);
@@ -120,21 +131,27 @@
writeStatus("Click on server controlTwo");
clickCommandAndWait(controlTwo);
AssertValueEquals(inputId, "server_two");
- AssertTextEquals(outputId, "4");
+ AssertTextEquals(outputId, "3");
Assert.assertTrue(isVisibleById(twoFacet));
try {
getTextById(oneFacet);
Assert.fail("Both of 'one' and 'two' states were rendered for server toggle panel.");
} catch (SeleniumException se) {
-
}
+ }
- controlNext = parentId + "client_next";
- controlOne = parentId + "client_one";
- controlTwo = parentId + "client_two";
- oneFacet = parentId + "client_state_one";
- twoFacet = parentId + "client_state_two";
+ @Test
+ public void testTogglePanelComponentClientMode(Template template) {
+ renderPage(template);
+ String parentId = getParentId() + "_form:";
+
+ String controlNext = parentId + "client_next";
+ String controlOne = parentId + "client_one";
+ String controlTwo = parentId + "client_two";
+ String oneFacet = parentId + "client_state_one";
+ String twoFacet = parentId + "client_state_two";
+
writeStatus("Click on client controlNext");
clickById(controlNext);
Assert.assertTrue(isVisibleById(twoFacet));
@@ -149,10 +166,11 @@
clickById(controlTwo);
Assert.assertTrue(isVisibleById(twoFacet));
Assert.assertFalse(isVisibleById(oneFacet));
+ }
+ private void reset() {
writeStatus("Clean bean values");
- clickById(cleanButton);
- waitForAjaxCompletion();
+ clickAjaxCommandAndWait(getParentId() + "_form:clean");
}
public String getTestUrl() {
17 years, 8 months