JBoss Rich Faces SVN: r16493 - in root/framework/trunk/impl/src/test: resources/javascript and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-02-25 07:04:05 -0500 (Thu, 25 Feb 2010)
New Revision: 16493
Added:
root/framework/trunk/impl/src/test/resources/javascript/qunit/qunit.css
root/framework/trunk/impl/src/test/resources/javascript/qunit/qunit.js
root/framework/trunk/impl/src/test/resources/javascript/richfaces-client-api.html
root/framework/trunk/impl/src/test/resources/javascript/richfaces-event-qunit.js
root/framework/trunk/impl/src/test/resources/javascript/richfaces-qunit.js
Removed:
root/framework/trunk/impl/src/test/resources/javascript/qunit/testrunner.js
root/framework/trunk/impl/src/test/resources/javascript/qunit/testsuite.css
Modified:
root/framework/trunk/impl/src/test/java/org/richfaces/javascript/QUnitTest.java
root/framework/trunk/impl/src/test/resources/javascript/4_0_0.html
Log:
qunit texts + event api tests
Modified: root/framework/trunk/impl/src/test/java/org/richfaces/javascript/QUnitTest.java
===================================================================
--- root/framework/trunk/impl/src/test/java/org/richfaces/javascript/QUnitTest.java 2010-02-25 05:57:19 UTC (rev 16492)
+++ root/framework/trunk/impl/src/test/java/org/richfaces/javascript/QUnitTest.java 2010-02-25 12:04:05 UTC (rev 16493)
@@ -55,11 +55,18 @@
webClient_.closeAllWindows();
webClient_ = null;
}
+
+ protected void runTest(URL url, String query) throws Exception{
+ String urlStr = url.toExternalForm() + query;
+ URL newURL = new URL(urlStr);
+ runTest(newURL);
+ }
protected void runTest(URL url) throws Exception {
+
HtmlPage page = loadPage(url);
HtmlElement doc = page.getDocumentElement();
- HtmlElement tests = (HtmlElement) doc.getElementById("tests");
+ HtmlElement tests = (HtmlElement) doc.getElementById("qunit-tests");
Iterator<HtmlElement> iter = tests.getChildElements().iterator();
if (!iter.hasNext()) {
@@ -109,5 +116,6 @@
@Test
public void test() throws Exception {
runTest(getClass().getClassLoader().getResource("javascript/4_0_0.html"));
+ runTest(getClass().getClassLoader().getResource("javascript/richfaces-client-api.html"), "?richfaces-event");
}
}
Modified: root/framework/trunk/impl/src/test/resources/javascript/4_0_0.html
===================================================================
--- root/framework/trunk/impl/src/test/resources/javascript/4_0_0.html 2010-02-25 05:57:19 UTC (rev 16492)
+++ root/framework/trunk/impl/src/test/resources/javascript/4_0_0.html 2010-02-25 12:04:05 UTC (rev 16493)
@@ -4,10 +4,10 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery Test Suite</title>
- <link type="text/css" rel="Stylesheet" media="screen" href="qunit/testsuite.css" />
+ <link type="text/css" rel="Stylesheet" media="screen" href="qunit/qunit.css" />
<script type="text/javascript" src="../../classes/META-INF/resources/jquery.js"></script>
<script type="text/javascript" src="../../classes/META-INF/resources/richfaces.js"></script>
- <script type="text/javascript" src="qunit/testrunner.js"></script>
+ <script type="text/javascript" src="qunit/qunit.js"></script>
<script type="text/javascript">
var jsf = {};
jQuery(document).ready(function(){
@@ -158,10 +158,10 @@
</script>
</head>
<body>
- <h1>RichFaces QUnit tests</h1>
- <h2 id="banner"></h2>
- <h2 id="userAgent"></h2>
- <ol id="tests"></ol>
+ <h1 id="qunit-header">RichFaces QUnit tests</h1>
+ <h2 id="qunit-banner"></h2>
+ <h2 id="qunit-userAgent"></h2>
+ <ol id="qunit-tests"></ol>
<div id="main">
<form />
<span id="pushElt" />
Added: root/framework/trunk/impl/src/test/resources/javascript/qunit/qunit.css
===================================================================
--- root/framework/trunk/impl/src/test/resources/javascript/qunit/qunit.css (rev 0)
+++ root/framework/trunk/impl/src/test/resources/javascript/qunit/qunit.css 2010-02-25 12:04:05 UTC (rev 16493)
@@ -0,0 +1,119 @@
+
+ol#qunit-tests {
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ margin:0;
+ padding:0;
+ list-style-position:inside;
+
+ font-size: smaller;
+}
+ol#qunit-tests li{
+ padding:0.4em 0.5em 0.4em 2.5em;
+ border-bottom:1px solid #fff;
+ font-size:small;
+ list-style-position:inside;
+}
+ol#qunit-tests li ol{
+ box-shadow: inset 0px 2px 13px #999;
+ -moz-box-shadow: inset 0px 2px 13px #999;
+ -webkit-box-shadow: inset 0px 2px 13px #999;
+ margin-top:0.5em;
+ margin-left:0;
+ padding:0.5em;
+ background-color:#fff;
+ border-radius:15px;
+ -moz-border-radius: 15px;
+ -webkit-border-radius: 15px;
+}
+ol#qunit-tests li li{
+ border-bottom:none;
+ margin:0.5em;
+ background-color:#fff;
+ list-style-position: inside;
+ padding:0.4em 0.5em 0.4em 0.5em;
+}
+
+ol#qunit-tests li li.pass{
+ border-left:26px solid #C6E746;
+ background-color:#fff;
+ color:#5E740B;
+ }
+ol#qunit-tests li li.fail{
+ border-left:26px solid #EE5757;
+ background-color:#fff;
+ color:#710909;
+}
+ol#qunit-tests li.pass{
+ background-color:#D2E0E6;
+ color:#528CE0;
+}
+ol#qunit-tests li.fail{
+ background-color:#EE5757;
+ color:#000;
+}
+ol#qunit-tests li strong {
+ cursor:pointer;
+}
+h1#qunit-header{
+ background-color:#0d3349;
+ margin:0;
+ padding:0.5em 0 0.5em 1em;
+ color:#fff;
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ border-top-right-radius:15px;
+ border-top-left-radius:15px;
+ -moz-border-radius-topright:15px;
+ -moz-border-radius-topleft:15px;
+ -webkit-border-top-right-radius:15px;
+ -webkit-border-top-left-radius:15px;
+ text-shadow: rgba(0, 0, 0, 0.5) 4px 4px 1px;
+}
+h2#qunit-banner{
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ height:5px;
+ margin:0;
+ padding:0;
+}
+h2#qunit-banner.qunit-pass{
+ background-color:#C6E746;
+}
+h2#qunit-banner.qunit-fail, #qunit-testrunner-toolbar {
+ background-color:#EE5757;
+}
+#qunit-testrunner-toolbar {
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ padding:0;
+ /*width:80%;*/
+ padding:0em 0 0.5em 2em;
+ font-size: small;
+}
+h2#qunit-userAgent {
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ background-color:#2b81af;
+ margin:0;
+ padding:0;
+ color:#fff;
+ font-size: small;
+ padding:0.5em 0 0.5em 2.5em;
+ text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
+}
+p#qunit-testresult{
+ font-family:"Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+ margin:0;
+ font-size: small;
+ color:#2b81af;
+ border-bottom-right-radius:15px;
+ border-bottom-left-radius:15px;
+ -moz-border-radius-bottomright:15px;
+ -moz-border-radius-bottomleft:15px;
+ -webkit-border-bottom-right-radius:15px;
+ -webkit-border-bottom-left-radius:15px;
+ background-color:#D2E0E6;
+ padding:0.5em 0.5em 0.5em 2.5em;
+}
+strong b.fail{
+ color:#710909;
+ }
+strong b.pass{
+ color:#5E740B;
+ }
Added: root/framework/trunk/impl/src/test/resources/javascript/qunit/qunit.js
===================================================================
--- root/framework/trunk/impl/src/test/resources/javascript/qunit/qunit.js (rev 0)
+++ root/framework/trunk/impl/src/test/resources/javascript/qunit/qunit.js 2010-02-25 12:04:05 UTC (rev 16493)
@@ -0,0 +1,1043 @@
+/*
+ * QUnit - A JavaScript Unit Testing Framework
+ *
+ * http://docs.jquery.com/QUnit
+ *
+ * Copyright (c) 2009 John Resig, Jörn Zaefferer
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ */
+
+(function(window) {
+
+var QUnit = {
+
+ // Initialize the configuration options
+ init: function() {
+ config = {
+ stats: { all: 0, bad: 0 },
+ moduleStats: { all: 0, bad: 0 },
+ started: +new Date,
+ blocking: false,
+ autorun: false,
+ assertions: [],
+ filters: [],
+ queue: []
+ };
+
+ var tests = id("qunit-tests"),
+ banner = id("qunit-banner"),
+ result = id("qunit-testresult");
+
+ if ( tests ) {
+ tests.innerHTML = "";
+ }
+
+ if ( banner ) {
+ banner.className = "";
+ }
+
+ if ( result ) {
+ result.parentNode.removeChild( result );
+ }
+ },
+
+ // call on start of module test to prepend name to all tests
+ module: function(name, testEnvironment) {
+ config.currentModule = name;
+
+ synchronize(function() {
+ if ( config.currentModule ) {
+ QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all );
+ }
+
+ config.currentModule = name;
+ config.moduleTestEnvironment = testEnvironment;
+ config.moduleStats = { all: 0, bad: 0 };
+
+ QUnit.moduleStart( name, testEnvironment );
+ });
+ },
+
+ asyncTest: function(testName, expected, callback) {
+ if ( arguments.length === 2 ) {
+ callback = expected;
+ expected = 0;
+ }
+
+ QUnit.test(testName, expected, callback, true);
+ },
+
+ test: function(testName, expected, callback, async) {
+ var name = testName, testEnvironment, testEnvironmentArg;
+
+ if ( arguments.length === 2 ) {
+ callback = expected;
+ expected = null;
+ }
+ // is 2nd argument a testEnvironment?
+ if ( expected && typeof expected === 'object') {
+ testEnvironmentArg = expected;
+ expected = null;
+ }
+
+ if ( config.currentModule ) {
+ name = config.currentModule + " module: " + name;
+ }
+
+ if ( !validTest(name) ) {
+ return;
+ }
+
+ synchronize(function() {
+ QUnit.testStart( testName );
+
+ testEnvironment = extend({
+ setup: function() {},
+ teardown: function() {}
+ }, config.moduleTestEnvironment);
+ if (testEnvironmentArg) {
+ extend(testEnvironment,testEnvironmentArg);
+ }
+
+ // allow utility functions to access the current test environment
+ QUnit.current_testEnvironment = testEnvironment;
+
+ config.assertions = [];
+ config.expected = expected;
+
+ try {
+ if ( !config.pollution ) {
+ saveGlobal();
+ }
+
+ testEnvironment.setup.call(testEnvironment);
+ } catch(e) {
+ QUnit.ok( false, "Setup failed on " + name + ": " + e.message );
+ }
+
+ if ( async ) {
+ QUnit.stop();
+ }
+
+ try {
+ callback.call(testEnvironment);
+ } catch(e) {
+ fail("Test " + name + " died, exception and test follows", e, callback);
+ QUnit.ok( false, "Died on test #" + (config.assertions.length + 1) + ": " + e.message );
+ // else next test will carry the responsibility
+ saveGlobal();
+
+ // Restart the tests if they're blocking
+ if ( config.blocking ) {
+ start();
+ }
+ }
+ });
+
+ synchronize(function() {
+ try {
+ checkPollution();
+ testEnvironment.teardown.call(testEnvironment);
+ } catch(e) {
+ QUnit.ok( false, "Teardown failed on " + name + ": " + e.message );
+ }
+
+ try {
+ QUnit.reset();
+ } catch(e) {
+ fail("reset() failed, following Test " + name + ", exception and reset fn follows", e, reset);
+ }
+
+ if ( config.expected && config.expected != config.assertions.length ) {
+ QUnit.ok( false, "Expected " + config.expected + " assertions, but " + config.assertions.length + " were run" );
+ }
+
+ var good = 0, bad = 0,
+ tests = id("qunit-tests");
+
+ config.stats.all += config.assertions.length;
+ config.moduleStats.all += config.assertions.length;
+
+ if ( tests ) {
+ var ol = document.createElement("ol");
+ ol.style.display = "none";
+
+ for ( var i = 0; i < config.assertions.length; i++ ) {
+ var assertion = config.assertions[i];
+
+ var li = document.createElement("li");
+ li.className = assertion.result ? "pass" : "fail";
+ li.appendChild(document.createTextNode(assertion.message || "(no message)"));
+ ol.appendChild( li );
+
+ if ( assertion.result ) {
+ good++;
+ } else {
+ bad++;
+ config.stats.bad++;
+ config.moduleStats.bad++;
+ }
+ }
+
+ var b = document.createElement("strong");
+ b.innerHTML = name + " <b style='color:black;'>(<b class='fail'>" + bad + "</b>, <b class='pass'>" + good + "</b>, " + config.assertions.length + ")</b>";
+
+ addEvent(b, "click", function() {
+ var next = b.nextSibling, display = next.style.display;
+ next.style.display = display === "none" ? "block" : "none";
+ });
+
+ addEvent(b, "dblclick", function(e) {
+ var target = e && e.target ? e.target : window.event.srcElement;
+ if ( target.nodeName.toLowerCase() === "strong" ) {
+ var text = "", node = target.firstChild;
+
+ while ( node.nodeType === 3 ) {
+ text += node.nodeValue;
+ node = node.nextSibling;
+ }
+
+ text = text.replace(/(^\s*|\s*$)/g, "");
+
+ if ( window.location ) {
+ window.location.href = window.location.href.match(/^(.+?)(\?.*)?$/)[1] + "?" + encodeURIComponent(text);
+ }
+ }
+ });
+
+ var li = document.createElement("li");
+ li.className = bad ? "fail" : "pass";
+ li.appendChild( b );
+ li.appendChild( ol );
+ tests.appendChild( li );
+
+ if ( bad ) {
+ var toolbar = id("qunit-testrunner-toolbar");
+ if ( toolbar ) {
+ toolbar.style.display = "block";
+ id("qunit-filter-pass").disabled = null;
+ id("qunit-filter-missing").disabled = null;
+ }
+ }
+
+ } else {
+ for ( var i = 0; i < config.assertions.length; i++ ) {
+ if ( !config.assertions[i].result ) {
+ bad++;
+ config.stats.bad++;
+ config.moduleStats.bad++;
+ }
+ }
+ }
+
+ QUnit.testDone( testName, bad, config.assertions.length );
+
+ if ( !window.setTimeout && !config.queue.length ) {
+ done();
+ }
+ });
+
+ if ( window.setTimeout && !config.doneTimer ) {
+ config.doneTimer = window.setTimeout(function(){
+ if ( !config.queue.length ) {
+ done();
+ } else {
+ synchronize( done );
+ }
+ }, 13);
+ }
+ },
+
+ /**
+ * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.
+ */
+ expect: function(asserts) {
+ config.expected = asserts;
+ },
+
+ /**
+ * Asserts true.
+ * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
+ */
+ ok: function(a, msg) {
+ QUnit.log(a, msg);
+
+ config.assertions.push({
+ result: !!a,
+ message: msg
+ });
+ },
+
+ /**
+ * Checks that the first two arguments are equal, with an optional message.
+ * Prints out both actual and expected values.
+ *
+ * Prefered to ok( actual == expected, message )
+ *
+ * @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." );
+ *
+ * @param Object actual
+ * @param Object expected
+ * @param String message (optional)
+ */
+ equal: function(actual, expected, message) {
+ push(expected == actual, actual, expected, message);
+ },
+
+ notEqual: function(actual, expected, message) {
+ push(expected != actual, actual, expected, message);
+ },
+
+ deepEqual: function(a, b, message) {
+ push(QUnit.equiv(a, b), a, b, message);
+ },
+
+ notDeepEqual: function(a, b, message) {
+ push(!QUnit.equiv(a, b), a, b, message);
+ },
+
+ strictEqual: function(actual, expected, message) {
+ push(expected === actual, actual, expected, message);
+ },
+
+ notStrictEqual: function(actual, expected, message) {
+ push(expected !== actual, actual, expected, message);
+ },
+
+ start: function() {
+ // A slight delay, to avoid any current callbacks
+ if ( window.setTimeout ) {
+ window.setTimeout(function() {
+ if ( config.timeout ) {
+ clearTimeout(config.timeout);
+ }
+
+ config.blocking = false;
+ process();
+ }, 13);
+ } else {
+ config.blocking = false;
+ process();
+ }
+ },
+
+ stop: function(timeout) {
+ config.blocking = true;
+
+ if ( timeout && window.setTimeout ) {
+ config.timeout = window.setTimeout(function() {
+ QUnit.ok( false, "Test timed out" );
+ QUnit.start();
+ }, timeout);
+ }
+ },
+
+ /**
+ * Resets the test setup. Useful for tests that modify the DOM.
+ */
+ reset: function() {
+ if ( window.jQuery ) {
+ jQuery("#main").html( config.fixture );
+ jQuery.event.global = {};
+ jQuery.ajaxSettings = extend({}, config.ajaxSettings);
+ }
+ },
+
+ /**
+ * Trigger an event on an element.
+ *
+ * @example triggerEvent( document.body, "click" );
+ *
+ * @param DOMElement elem
+ * @param String type
+ */
+ triggerEvent: function( elem, type, event ) {
+ if ( document.createEvent ) {
+ event = document.createEvent("MouseEvents");
+ event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,
+ 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+ elem.dispatchEvent( event );
+
+ } else if ( elem.fireEvent ) {
+ elem.fireEvent("on"+type);
+ }
+ },
+
+ // Safe object type checking
+ is: function( type, obj ) {
+ return Object.prototype.toString.call( obj ) === "[object "+ type +"]";
+ },
+
+ // Logging callbacks
+ done: function(failures, total) {},
+ log: function(result, message) {},
+ testStart: function(name) {},
+ testDone: function(name, failures, total) {},
+ moduleStart: function(name, testEnvironment) {},
+ moduleDone: function(name, failures, total) {}
+};
+
+// Backwards compatibility, deprecated
+QUnit.equals = QUnit.equal;
+QUnit.same = QUnit.deepEqual;
+
+// Maintain internal state
+var config = {
+ // The queue of tests to run
+ queue: [],
+
+ // block until document ready
+ blocking: true
+};
+
+// Load paramaters
+(function() {
+ var location = window.location || { search: "", protocol: "file:" },
+ GETParams = location.search.slice(1).split('&');
+
+ for ( var i = 0; i < GETParams.length; i++ ) {
+ GETParams[i] = decodeURIComponent( GETParams[i] );
+ if ( GETParams[i] === "noglobals" ) {
+ GETParams.splice( i, 1 );
+ i--;
+ config.noglobals = true;
+ } else if ( GETParams[i].search('=') > -1 ) {
+ GETParams.splice( i, 1 );
+ i--;
+ }
+ }
+
+ // restrict modules/tests by get parameters
+ config.filters = GETParams;
+
+ // Figure out if we're running the tests from a server or not
+ QUnit.isLocal = !!(location.protocol === 'file:');
+})();
+
+// Expose the API as global variables, unless an 'exports'
+// object exists, in that case we assume we're in CommonJS
+if ( typeof exports === "undefined" || typeof require === "undefined" ) {
+ extend(window, QUnit);
+ window.QUnit = QUnit;
+} else {
+ extend(exports, QUnit);
+ exports.QUnit = QUnit;
+}
+
+if ( typeof document === "undefined" || document.readyState === "complete" ) {
+ config.autorun = true;
+}
+
+addEvent(window, "load", function() {
+ // Initialize the config, saving the execution queue
+ var oldconfig = extend({}, config);
+ QUnit.init();
+ extend(config, oldconfig);
+
+ config.blocking = false;
+
+ var userAgent = id("qunit-userAgent");
+ if ( userAgent ) {
+ userAgent.innerHTML = navigator.userAgent;
+ }
+
+ var toolbar = id("qunit-testrunner-toolbar");
+ if ( toolbar ) {
+ toolbar.style.display = "none";
+
+ var filter = document.createElement("input");
+ filter.type = "checkbox";
+ filter.id = "qunit-filter-pass";
+ filter.disabled = true;
+ addEvent( filter, "click", function() {
+ var li = document.getElementsByTagName("li");
+ for ( var i = 0; i < li.length; i++ ) {
+ if ( li[i].className.indexOf("pass") > -1 ) {
+ li[i].style.display = filter.checked ? "none" : "";
+ }
+ }
+ });
+ toolbar.appendChild( filter );
+
+ var label = document.createElement("label");
+ label.setAttribute("for", "qunit-filter-pass");
+ label.innerHTML = "Hide passed tests";
+ toolbar.appendChild( label );
+
+ var missing = document.createElement("input");
+ missing.type = "checkbox";
+ missing.id = "qunit-filter-missing";
+ missing.disabled = true;
+ addEvent( missing, "click", function() {
+ var li = document.getElementsByTagName("li");
+ for ( var i = 0; i < li.length; i++ ) {
+ if ( li[i].className.indexOf("fail") > -1 && li[i].innerHTML.indexOf('missing test - untested code is broken code') > - 1 ) {
+ li[i].parentNode.parentNode.style.display = missing.checked ? "none" : "block";
+ }
+ }
+ });
+ toolbar.appendChild( missing );
+
+ label = document.createElement("label");
+ label.setAttribute("for", "qunit-filter-missing");
+ label.innerHTML = "Hide missing tests (untested code is broken code)";
+ toolbar.appendChild( label );
+ }
+
+ var main = id('main');
+ if ( main ) {
+ config.fixture = main.innerHTML;
+ }
+
+ if ( window.jQuery ) {
+ config.ajaxSettings = window.jQuery.ajaxSettings;
+ }
+
+ QUnit.start();
+});
+
+function done() {
+ if ( config.doneTimer && window.clearTimeout ) {
+ window.clearTimeout( config.doneTimer );
+ config.doneTimer = null;
+ }
+
+ if ( config.queue.length ) {
+ config.doneTimer = window.setTimeout(function(){
+ if ( !config.queue.length ) {
+ done();
+ } else {
+ synchronize( done );
+ }
+ }, 13);
+
+ return;
+ }
+
+ config.autorun = true;
+
+ // Log the last module results
+ if ( config.currentModule ) {
+ QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all );
+ }
+
+ var banner = id("qunit-banner"),
+ tests = id("qunit-tests"),
+ html = ['Tests completed in ',
+ +new Date - config.started, ' milliseconds.<br/>',
+ '<span class="passed">', config.stats.all - config.stats.bad, '</span> tests of <span class="total">', config.stats.all, '</span> passed, <span class="failed">', config.stats.bad,'</span> failed.'].join('');
+
+ if ( banner ) {
+ banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass");
+ }
+
+ if ( tests ) {
+ var result = id("qunit-testresult");
+
+ if ( !result ) {
+ result = document.createElement("p");
+ result.id = "qunit-testresult";
+ result.className = "result";
+ tests.parentNode.insertBefore( result, tests.nextSibling );
+ }
+
+ result.innerHTML = html;
+ }
+
+ QUnit.done( config.stats.bad, config.stats.all );
+}
+
+function validTest( name ) {
+ var i = config.filters.length,
+ run = false;
+
+ if ( !i ) {
+ return true;
+ }
+
+ while ( i-- ) {
+ var filter = config.filters[i],
+ not = filter.charAt(0) == '!';
+
+ if ( not ) {
+ filter = filter.slice(1);
+ }
+
+ if ( name.indexOf(filter) !== -1 ) {
+ return !not;
+ }
+
+ if ( not ) {
+ run = true;
+ }
+ }
+
+ return run;
+}
+
+function push(result, actual, expected, message) {
+ message = message || (result ? "okay" : "failed");
+ QUnit.ok( result, result ? message + ": " + expected : message + ", expected: " + QUnit.jsDump.parse(expected) + " result: " + QUnit.jsDump.parse(actual) );
+}
+
+function synchronize( callback ) {
+ config.queue.push( callback );
+
+ if ( config.autorun && !config.blocking ) {
+ process();
+ }
+}
+
+function process() {
+ while ( config.queue.length && !config.blocking ) {
+ config.queue.shift()();
+ }
+}
+
+function saveGlobal() {
+ config.pollution = [];
+
+ if ( config.noglobals ) {
+ for ( var key in window ) {
+ config.pollution.push( key );
+ }
+ }
+}
+
+function checkPollution( name ) {
+ var old = config.pollution;
+ saveGlobal();
+
+ var newGlobals = diff( old, config.pollution );
+ if ( newGlobals.length > 0 ) {
+ ok( false, "Introduced global variable(s): " + newGlobals.join(", ") );
+ config.expected++;
+ }
+
+ var deletedGlobals = diff( config.pollution, old );
+ if ( deletedGlobals.length > 0 ) {
+ ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") );
+ config.expected++;
+ }
+}
+
+// returns a new Array with the elements that are in a but not in b
+function diff( a, b ) {
+ var result = a.slice();
+ for ( var i = 0; i < result.length; i++ ) {
+ for ( var j = 0; j < b.length; j++ ) {
+ if ( result[i] === b[j] ) {
+ result.splice(i, 1);
+ i--;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+function fail(message, exception, callback) {
+ if ( typeof console !== "undefined" && console.error && console.warn ) {
+ console.error(message);
+ console.error(exception);
+ console.warn(callback.toString());
+
+ } else if ( window.opera && opera.postError ) {
+ opera.postError(message, exception, callback.toString);
+ }
+}
+
+function extend(a, b) {
+ for ( var prop in b ) {
+ a[prop] = b[prop];
+ }
+
+ return a;
+}
+
+function addEvent(elem, type, fn) {
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, fn, false );
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, fn );
+ } else {
+ fn();
+ }
+}
+
+function id(name) {
+ return !!(typeof document !== "undefined" && document && document.getElementById) &&
+ document.getElementById( name );
+}
+
+// Test for equality any JavaScript type.
+// Discussions and reference: http://philrathe.com/articles/equiv
+// Test suites: http://philrathe.com/tests/equiv
+// Author: Philippe Rathé <prathe(a)gmail.com>
+QUnit.equiv = function () {
+
+ var innerEquiv; // the real equiv function
+ var callers = []; // stack to decide between skip/abort functions
+
+
+ // Determine what is o.
+ function hoozit(o) {
+ if (QUnit.is("String", o)) {
+ return "string";
+
+ } else if (QUnit.is("Boolean", o)) {
+ return "boolean";
+
+ } else if (QUnit.is("Number", o)) {
+
+ if (isNaN(o)) {
+ return "nan";
+ } else {
+ return "number";
+ }
+
+ } else if (typeof o === "undefined") {
+ return "undefined";
+
+ // consider: typeof null === object
+ } else if (o === null) {
+ return "null";
+
+ // consider: typeof [] === object
+ } else if (QUnit.is( "Array", o)) {
+ return "array";
+
+ // consider: typeof new Date() === object
+ } else if (QUnit.is( "Date", o)) {
+ return "date";
+
+ // consider: /./ instanceof Object;
+ // /./ instanceof RegExp;
+ // typeof /./ === "function"; // => false in IE and Opera,
+ // true in FF and Safari
+ } else if (QUnit.is( "RegExp", o)) {
+ return "regexp";
+
+ } else if (typeof o === "object") {
+ return "object";
+
+ } else if (QUnit.is( "Function", o)) {
+ return "function";
+ } else {
+ return undefined;
+ }
+ }
+
+ // Call the o related callback with the given arguments.
+ function bindCallbacks(o, callbacks, args) {
+ var prop = hoozit(o);
+ if (prop) {
+ if (hoozit(callbacks[prop]) === "function") {
+ return callbacks[prop].apply(callbacks, args);
+ } else {
+ return callbacks[prop]; // or undefined
+ }
+ }
+ }
+
+ var callbacks = function () {
+
+ // for string, boolean, number and null
+ function useStrictEquality(b, a) {
+ if (b instanceof a.constructor || a instanceof b.constructor) {
+ // to catch short annotaion VS 'new' annotation of a declaration
+ // e.g. var i = 1;
+ // var j = new Number(1);
+ return a == b;
+ } else {
+ return a === b;
+ }
+ }
+
+ return {
+ "string": useStrictEquality,
+ "boolean": useStrictEquality,
+ "number": useStrictEquality,
+ "null": useStrictEquality,
+ "undefined": useStrictEquality,
+
+ "nan": function (b) {
+ return isNaN(b);
+ },
+
+ "date": function (b, a) {
+ return hoozit(b) === "date" && a.valueOf() === b.valueOf();
+ },
+
+ "regexp": function (b, a) {
+ return hoozit(b) === "regexp" &&
+ a.source === b.source && // the regex itself
+ a.global === b.global && // and its modifers (gmi) ...
+ a.ignoreCase === b.ignoreCase &&
+ a.multiline === b.multiline;
+ },
+
+ // - skip when the property is a method of an instance (OOP)
+ // - abort otherwise,
+ // initial === would have catch identical references anyway
+ "function": function () {
+ var caller = callers[callers.length - 1];
+ return caller !== Object &&
+ typeof caller !== "undefined";
+ },
+
+ "array": function (b, a) {
+ var i;
+ var len;
+
+ // b could be an object literal here
+ if ( ! (hoozit(b) === "array")) {
+ return false;
+ }
+
+ len = a.length;
+ if (len !== b.length) { // safe and faster
+ return false;
+ }
+ for (i = 0; i < len; i++) {
+ if ( ! innerEquiv(a[i], b[i])) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ "object": function (b, a) {
+ var i;
+ var eq = true; // unless we can proove it
+ var aProperties = [], bProperties = []; // collection of strings
+
+ // comparing constructors is more strict than using instanceof
+ if ( a.constructor !== b.constructor) {
+ return false;
+ }
+
+ // stack constructor before traversing properties
+ callers.push(a.constructor);
+
+ for (i in a) { // be strict: don't ensures hasOwnProperty and go deep
+
+ aProperties.push(i); // collect a's properties
+
+ if ( ! innerEquiv(a[i], b[i])) {
+ eq = false;
+ break;
+ }
+ }
+
+ callers.pop(); // unstack, we are done
+
+ for (i in b) {
+ bProperties.push(i); // collect b's properties
+ }
+
+ // Ensures identical properties name
+ return eq && innerEquiv(aProperties.sort(), bProperties.sort());
+ }
+ };
+ }();
+
+ innerEquiv = function () { // can take multiple arguments
+ var args = Array.prototype.slice.apply(arguments);
+ if (args.length < 2) {
+ return true; // end transition
+ }
+
+ return (function (a, b) {
+ if (a === b) {
+ return true; // catch the most you can
+ } else if (a === null || b === null || typeof a === "undefined" || typeof b === "undefined" || hoozit(a) !== hoozit(b)) {
+ return false; // don't lose time with error prone cases
+ } else {
+ return bindCallbacks(a, callbacks, [b, a]);
+ }
+
+ // apply transition with (1..n) arguments
+ })(args[0], args[1]) && arguments.callee.apply(this, args.splice(1, args.length -1));
+ };
+
+ return innerEquiv;
+
+}();
+
+/**
+ * jsDump
+ * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
+ * Licensed under BSD (http://www.opensource.org/licenses/bsd-license.php)
+ * Date: 5/15/2008
+ * @projectDescription Advanced and extensible data dumping for Javascript.
+ * @version 1.0.0
+ * @author Ariel Flesler
+ * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}
+ */
+QUnit.jsDump = (function() {
+ function quote( str ) {
+ return '"' + str.toString().replace(/"/g, '\\"') + '"';
+ };
+ function literal( o ) {
+ return o + '';
+ };
+ function join( pre, arr, post ) {
+ var s = jsDump.separator(),
+ base = jsDump.indent(),
+ inner = jsDump.indent(1);
+ if ( arr.join )
+ arr = arr.join( ',' + s + inner );
+ if ( !arr )
+ return pre + post;
+ return [ pre, inner + arr, base + post ].join(s);
+ };
+ function array( arr ) {
+ var i = arr.length, ret = Array(i);
+ this.up();
+ while ( i-- )
+ ret[i] = this.parse( arr[i] );
+ this.down();
+ return join( '[', ret, ']' );
+ };
+
+ var reName = /^function (\w+)/;
+
+ var jsDump = {
+ parse:function( obj, type ) { //type is used mostly internally, you can fix a (custom)type in advance
+ var parser = this.parsers[ type || this.typeOf(obj) ];
+ type = typeof parser;
+
+ return type == 'function' ? parser.call( this, obj ) :
+ type == 'string' ? parser :
+ this.parsers.error;
+ },
+ typeOf:function( obj ) {
+ var type;
+ if ( obj === null ) {
+ type = "null";
+ } else if (typeof obj === "undefined") {
+ type = "undefined";
+ } else if (QUnit.is("RegExp", obj)) {
+ type = "regexp";
+ } else if (QUnit.is("Date", obj)) {
+ type = "date";
+ } else if (QUnit.is("Function", obj)) {
+ type = "function";
+ } else if (QUnit.is("Array", obj)) {
+ type = "array";
+ } else if (QUnit.is("Window", obj) || QUnit.is("global", obj)) {
+ type = "window";
+ } else if (QUnit.is("HTMLDocument", obj)) {
+ type = "document";
+ } else if (QUnit.is("HTMLCollection", obj) || QUnit.is("NodeList", obj)) {
+ type = "nodelist";
+ } else if (/^\[object HTML/.test(Object.prototype.toString.call( obj ))) {
+ type = "node";
+ } else {
+ type = typeof obj;
+ }
+ return type;
+ },
+ separator:function() {
+ return this.multiline ? this.HTML ? '<br />' : '\n' : this.HTML ? ' ' : ' ';
+ },
+ indent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing
+ if ( !this.multiline )
+ return '';
+ var chr = this.indentChar;
+ if ( this.HTML )
+ chr = chr.replace(/\t/g,' ').replace(/ /g,' ');
+ return Array( this._depth_ + (extra||0) ).join(chr);
+ },
+ up:function( a ) {
+ this._depth_ += a || 1;
+ },
+ down:function( a ) {
+ this._depth_ -= a || 1;
+ },
+ setParser:function( name, parser ) {
+ this.parsers[name] = parser;
+ },
+ // The next 3 are exposed so you can use them
+ quote:quote,
+ literal:literal,
+ join:join,
+ //
+ _depth_: 1,
+ // This is the list of parsers, to modify them, use jsDump.setParser
+ parsers:{
+ window: '[Window]',
+ document: '[Document]',
+ error:'[ERROR]', //when no parser is found, shouldn't happen
+ unknown: '[Unknown]',
+ 'null':'null',
+ undefined:'undefined',
+ 'function':function( fn ) {
+ var ret = 'function',
+ name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE
+ if ( name )
+ ret += ' ' + name;
+ ret += '(';
+
+ ret = [ ret, this.parse( fn, 'functionArgs' ), '){'].join('');
+ return join( ret, this.parse(fn,'functionCode'), '}' );
+ },
+ array: array,
+ nodelist: array,
+ arguments: array,
+ object:function( map ) {
+ var ret = [ ];
+ this.up();
+ for ( var key in map )
+ ret.push( this.parse(key,'key') + ': ' + this.parse(map[key]) );
+ this.down();
+ return join( '{', ret, '}' );
+ },
+ node:function( node ) {
+ var open = this.HTML ? '<' : '<',
+ close = this.HTML ? '>' : '>';
+
+ var tag = node.nodeName.toLowerCase(),
+ ret = open + tag;
+
+ for ( var a in this.DOMAttrs ) {
+ var val = node[this.DOMAttrs[a]];
+ if ( val )
+ ret += ' ' + a + '=' + this.parse( val, 'attribute' );
+ }
+ return ret + close + open + '/' + tag + close;
+ },
+ functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function
+ var l = fn.length;
+ if ( !l ) return '';
+
+ var args = Array(l);
+ while ( l-- )
+ args[l] = String.fromCharCode(97+l);//97 is 'a'
+ return ' ' + args.join(', ') + ' ';
+ },
+ key:quote, //object calls it internally, the key part of an item in a map
+ functionCode:'[code]', //function calls it internally, it's the content of the function
+ attribute:quote, //node calls it internally, it's an html attribute value
+ string:quote,
+ date:quote,
+ regexp:literal, //regex
+ number:literal,
+ 'boolean':literal
+ },
+ DOMAttrs:{//attributes to dump from nodes, name=>realName
+ id:'id',
+ name:'name',
+ 'class':'className'
+ },
+ HTML:true,//if true, entities are escaped ( <, >, \t, space and \n )
+ indentChar:' ',//indentation unit
+ multiline:true //if true, items in a collection, are separated by a \n, else just a space.
+ };
+
+ return jsDump;
+})();
+
+})(this);
Deleted: root/framework/trunk/impl/src/test/resources/javascript/qunit/testrunner.js
===================================================================
--- root/framework/trunk/impl/src/test/resources/javascript/qunit/testrunner.js 2010-02-25 05:57:19 UTC (rev 16492)
+++ root/framework/trunk/impl/src/test/resources/javascript/qunit/testrunner.js 2010-02-25 12:04:05 UTC (rev 16493)
@@ -1,780 +0,0 @@
-/*
- * QUnit - jQuery unit testrunner
- *
- * http://docs.jquery.com/QUnit
- *
- * Copyright (c) 2008 John Resig, J��rn Zaefferer
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * $Id: testrunner.js 6173 2009-02-02 20:09:32Z jeresig $
- */
-
-(function($) {
-
-// Tests for equality any JavaScript type and structure without unexpected results.
-// Discussions and reference: http://philrathe.com/articles/equiv
-// Test suites: http://philrathe.com/tests/equiv
-// Author: Philippe Rathӊ <prathe(a)gmail.com>
-var equiv = function () {
-
- var innerEquiv; // the real equiv function
- var callers = []; // stack to decide between skip/abort functions
-
- // Determine what is o.
- function hoozit(o) {
- if (typeof o === "string") {
- return "string";
-
- } else if (typeof o === "boolean") {
- return "boolean";
-
- } else if (typeof o === "number") {
-
- if (isNaN(o)) {
- return "nan";
- } else {
- return "number";
- }
-
- } else if (typeof o === "undefined") {
- return "undefined";
-
- // consider: typeof null === object
- } else if (o === null) {
- return "null";
-
- // consider: typeof [] === object
- } else if (o instanceof Array) {
- return "array";
-
- // consider: typeof new Date() === object
- } else if (o instanceof Date) {
- return "date";
-
- // consider: /./ instanceof Object;
- // /./ instanceof RegExp;
- // typeof /./ === "function"; // => false in IE and Opera,
- // true in FF and Safari
- } else if (o instanceof RegExp) {
- return "regexp";
-
- } else if (typeof o === "object") {
- return "object";
-
- } else if (o instanceof Function) {
- return "function";
- }
- }
-
- // Call the o related callback with the given arguments.
- function bindCallbacks(o, callbacks, args) {
- var prop = hoozit(o);
- if (prop) {
- if (hoozit(callbacks[prop]) === "function") {
- return callbacks[prop].apply(callbacks, args);
- } else {
- return callbacks[prop]; // or undefined
- }
- }
- }
-
- var callbacks = function () {
-
- // for string, boolean, number and null
- function useStrictEquality(b, a) {
- return a === b;
- }
-
- return {
- "string": useStrictEquality,
- "boolean": useStrictEquality,
- "number": useStrictEquality,
- "null": useStrictEquality,
- "undefined": useStrictEquality,
-
- "nan": function (b) {
- return isNaN(b);
- },
-
- "date": function (b, a) {
- return hoozit(b) === "date" && a.valueOf() === b.valueOf();
- },
-
- "regexp": function (b, a) {
- return hoozit(b) === "regexp" &&
- a.source === b.source && // the regex itself
- a.global === b.global && // and its modifers (gmi) ...
- a.ignoreCase === b.ignoreCase &&
- a.multiline === b.multiline;
- },
-
- // - skip when the property is a method of an instance (OOP)
- // - abort otherwise,
- // initial === would have catch identical references anyway
- "function": function () {
- var caller = callers[callers.length - 1];
- return caller !== Object &&
- typeof caller !== "undefined";
- },
-
- "array": function (b, a) {
- var i;
- var len;
-
- // b could be an object literal here
- if ( ! (hoozit(b) === "array")) {
- return false;
- }
-
- len = a.length;
- if (len !== b.length) { // safe and faster
- return false;
- }
- for (i = 0; i < len; i++) {
- if( ! innerEquiv(a[i], b[i])) {
- return false;
- }
- }
- return true;
- },
-
- "object": function (b, a) {
- var i;
- var eq = true; // unless we can proove it
- var aProperties = [], bProperties = []; // collection of strings
-
- // comparing constructors is more strict than using instanceof
- if ( a.constructor !== b.constructor) {
- return false;
- }
-
- // stack constructor before traversing properties
- callers.push(a.constructor);
-
- for (i in a) { // be strict: don't ensures hasOwnProperty and go deep
-
- aProperties.push(i); // collect a's properties
-
- if ( ! innerEquiv(a[i], b[i])) {
- eq = false;
- }
- }
-
- callers.pop(); // unstack, we are done
-
- for (i in b) {
- bProperties.push(i); // collect b's properties
- }
-
- // Ensures identical properties name
- return eq && innerEquiv(aProperties.sort(), bProperties.sort());
- }
- };
- }();
-
- innerEquiv = function () { // can take multiple arguments
- var args = Array.prototype.slice.apply(arguments);
- if (args.length < 2) {
- return true; // end transition
- }
-
- return (function (a, b) {
- if (a === b) {
- return true; // catch the most you can
-
- } else if (typeof a !== typeof b || a === null || b === null || typeof a === "undefined" || typeof b === "undefined") {
- return false; // don't lose time with error prone cases
-
- } else {
- return bindCallbacks(a, callbacks, [b, a]);
- }
-
- // apply transition with (1..n) arguments
- })(args[0], args[1]) && arguments.callee.apply(this, args.splice(1, args.length -1));
- };
-
- return innerEquiv;
-}(); // equiv
-
-var GETParams = $.map( location.search.slice(1).split('&'), decodeURIComponent ),
- ngindex = $.inArray("noglobals", GETParams),
- noglobals = ngindex !== -1;
-
-if( noglobals )
- GETParams.splice( ngindex, 1 );
-
-var config = {
- stats: {
- all: 0,
- bad: 0
- },
- queue: [],
- // block until document ready
- blocking: true,
- //restrict modules/tests by get parameters
- filters: GETParams,
- isLocal: !!(window.location.protocol == 'file:')
-};
-
-// public API as global methods
-$.extend(window, {
- test: test,
- module: module,
- expect: expect,
- ok: ok,
- equals: equals,
- start: start,
- stop: stop,
- reset: reset,
- isLocal: config.isLocal,
- same: function(a, b, message) {
- push(equiv(a, b), a, b, message);
- },
- QUnit: {
- equiv: equiv,
- ok: ok,
- done: function(failures, total){},
- log: function(result, message){}
- },
- // legacy methods below
- isSet: isSet,
- isObj: isObj,
- compare: function() {
- throw "compare is deprecated - use same() instead";
- },
- compare2: function() {
- throw "compare2 is deprecated - use same() instead";
- },
- serialArray: function() {
- throw "serialArray is deprecated - use jsDump.parse() instead";
- },
- q: q,
- t: t,
- url: url,
- triggerEvent: triggerEvent
-});
-
-$(window).load(function() {
- $('#userAgent').html(navigator.userAgent);
- var head = $('<div class="testrunner-toolbar"><label for="filter-pass">Hide passed tests</label></div>').insertAfter("#userAgent");
- $('<input type="checkbox" id="filter-pass" />').attr("disabled", true).prependTo(head).click(function() {
- $('li.pass')[this.checked ? 'hide' : 'show']();
- });
- $('<input type="checkbox" id="filter-missing">').attr("disabled", true).appendTo(head).click(function() {
- $("li.fail:contains('missing test - untested code is broken code')").parent('ol').parent('li.fail')[this.checked ? 'hide' : 'show']();
- });
- $("#filter-missing").after('<label for="filter-missing">Hide missing tests (untested code is broken code)</label>');
- runTest();
-});
-
-function synchronize(callback) {
- config.queue.push(callback);
- if(!config.blocking) {
- process();
- }
-}
-
-function process() {
- while(config.queue.length && !config.blocking) {
- config.queue.shift()();
- }
-}
-
-function stop(timeout) {
- config.blocking = true;
- if (timeout)
- config.timeout = setTimeout(function() {
- QUnit.ok( false, "Test timed out" );
- start();
- }, timeout);
-}
-function start() {
- // A slight delay, to avoid any current callbacks
- setTimeout(function() {
- if(config.timeout)
- clearTimeout(config.timeout);
- config.blocking = false;
- process();
- }, 13);
-}
-
-function validTest( name ) {
- var i = config.filters.length,
- run = false;
-
- if( !i )
- return true;
-
- while( i-- ){
- var filter = config.filters[i],
- not = filter.charAt(0) == '!';
- if( not )
- filter = filter.slice(1);
- if( name.indexOf(filter) != -1 )
- return !not;
- if( not )
- run = true;
- }
- return run;
-}
-
-function runTest() {
- config.blocking = false;
- var started = +new Date;
- config.fixture = document.getElementById('main').innerHTML;
- config.ajaxSettings = $.ajaxSettings;
- synchronize(function() {
- $('<p id="testresult" class="result"/>').html(['Tests completed in ',
- +new Date - started, ' milliseconds.<br/>',
- '<span class="bad">', config.stats.bad, '</span> tests of <span class="all">', config.stats.all, '</span> failed.']
- .join(''))
- .appendTo("body");
- $("#banner").addClass(config.stats.bad ? "fail" : "pass");
- QUnit.done( config.stats.bad, config.stats.all );
- });
-}
-
-var pollution;
-
-function saveGlobal(){
- pollution = [ ];
-
- if( noglobals )
- for( var key in window )
- pollution.push(key);
-}
-function checkPollution( name ){
- var old = pollution;
- saveGlobal();
-
- if( pollution.length > old.length ){
- ok( false, "Introduced global variable(s): " + diff(old, pollution).join(", ") );
- config.expected++;
- }
-}
-
-function diff( clean, dirty ){
- return $.grep( dirty, function(name){
- return $.inArray( name, clean ) == -1;
- });
-}
-
-function test(name, callback) {
- if(config.currentModule)
- name = config.currentModule + " module: " + name;
- var lifecycle = $.extend({
- setup: function() {},
- teardown: function() {}
- }, config.moduleLifecycle);
-
- if ( !validTest(name) )
- return;
-
- synchronize(function() {
- config.assertions = [];
- config.expected = null;
- try {
- if( !pollution )
- saveGlobal();
- lifecycle.setup();
- } catch(e) {
- QUnit.ok( false, "Setup failed on " + name + ": " + e.message );
- }
- })
- synchronize(function() {
- try {
- callback();
- } catch(e) {
- if( typeof console != "undefined" && console.error && console.warn ) {
- console.error("Test " + name + " died, exception and test follows");
- console.error(e);
- console.warn(callback.toString());
- }
- QUnit.ok( false, "Died on test #" + (config.assertions.length + 1) + ": " + e.message );
- // else next test will carry the responsibility
- saveGlobal();
- }
- });
- synchronize(function() {
- try {
- checkPollution();
- lifecycle.teardown();
- } catch(e) {
- QUnit.ok( false, "Teardown failed on " + name + ": " + e.message );
- }
- })
- synchronize(function() {
- try {
- reset();
- } catch(e) {
- if( typeof console != "undefined" && console.error && console.warn ) {
- console.error("reset() failed, following Test " + name + ", exception and reset fn follows");
- console.error(e);
- console.warn(reset.toString());
- }
- }
-
- if(config.expected && config.expected != config.assertions.length) {
- QUnit.ok( false, "Expected " + config.expected + " assertions, but " + config.assertions.length + " were run" );
- }
-
- var good = 0, bad = 0;
- var ol = $("<ol/>").hide();
- config.stats.all += config.assertions.length;
- for ( var i = 0; i < config.assertions.length; i++ ) {
- var assertion = config.assertions[i];
- $("<li/>").addClass(assertion.result ? "pass" : "fail").text(assertion.message || "(no message)").appendTo(ol);
- assertion.result ? good++ : bad++;
- }
- config.stats.bad += bad;
-
- var b = $("<strong/>").html(name + " <b style='color:black;'>(<b class='fail'>" + bad + "</b>, <b class='pass'>" + good + "</b>, " + config.assertions.length + ")</b>")
- .click(function(){
- $(this).next().toggle();
- })
- .dblclick(function(event) {
- var target = $(event.target).filter("strong").clone();
- if ( target.length ) {
- target.children().remove();
- location.href = location.href.match(/^(.+?)(\?.*)?$/)[1] + "?" + encodeURIComponent($.trim(target.text()));
- }
- });
-
- $("<li/>").addClass(bad ? "fail" : "pass").append(b).append(ol).appendTo("#tests");
-
- if(bad) {
- $("#filter-pass").attr("disabled", null);
- $("#filter-missing").attr("disabled", null);
- }
- });
-}
-
-// call on start of module test to prepend name to all tests
-function module(name, lifecycle) {
- config.currentModule = name;
- config.moduleLifecycle = lifecycle;
-}
-
-/**
- * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.
- */
-function expect(asserts) {
- config.expected = asserts;
-}
-
-/**
- * Resets the test setup. Useful for tests that modify the DOM.
- */
-function reset() {
- $("#main").html( config.fixture );
- $.event.global = {};
- $.ajaxSettings = $.extend({}, config.ajaxSettings);
-}
-
-/**
- * Asserts true.
- * @example ok( $("a").size() > 5, "There must be at least 5 anchors" );
- */
-function ok(a, msg) {
- QUnit.log(a, msg);
-
- config.assertions.push({
- result: !!a,
- message: msg
- });
-}
-
-/**
- * Asserts that two arrays are the same
- */
-function isSet(a, b, msg) {
- function serialArray( a ) {
- var r = [];
-
- if ( a && a.length )
- for ( var i = 0; i < a.length; i++ ) {
- var str = a[i].nodeName;
- if ( str ) {
- str = str.toLowerCase();
- if ( a[i].id )
- str += "#" + a[i].id;
- } else
- str = a[i];
- r.push( str );
- }
-
- return "[ " + r.join(", ") + " ]";
- }
- var ret = true;
- if ( a && b && a.length != undefined && a.length == b.length ) {
- for ( var i = 0; i < a.length; i++ )
- if ( a[i] != b[i] )
- ret = false;
- } else
- ret = false;
- QUnit.ok( ret, !ret ? (msg + " expected: " + serialArray(b) + " result: " + serialArray(a)) : msg );
-}
-
-/**
- * Asserts that two objects are equivalent
- */
-function isObj(a, b, msg) {
- var ret = true;
-
- if ( a && b ) {
- for ( var i in a )
- if ( a[i] != b[i] )
- ret = false;
-
- for ( i in b )
- if ( a[i] != b[i] )
- ret = false;
- } else
- ret = false;
-
- QUnit.ok( ret, msg );
-}
-
-/**
- * Returns an array of elements with the given IDs, eg.
- * @example q("main", "foo", "bar")
- * @result [<div id="main">, <span id="foo">, <input id="bar">]
- */
-function q() {
- var r = [];
- for ( var i = 0; i < arguments.length; i++ )
- r.push( document.getElementById( arguments[i] ) );
- return r;
-}
-
-/**
- * Asserts that a select matches the given IDs
- * @example t("Check for something", "//[a]", ["foo", "baar"]);
- * @result returns true if "//[a]" return two elements with the IDs 'foo' and 'baar'
- */
-function t(a,b,c) {
- var f = $(b);
- var s = "";
- for ( var i = 0; i < f.length; i++ )
- s += (s && ",") + '"' + f[i].id + '"';
- isSet(f, q.apply(q,c), a + " (" + b + ")");
-}
-
-/**
- * Add random number to url to stop IE from caching
- *
- * @example url("data/test.html")
- * @result "data/test.html?10538358428943"
- *
- * @example url("data/test.php?foo=bar")
- * @result "data/test.php?foo=bar&10538358345554"
- */
-function url(value) {
- return value + (/\?/.test(value) ? "&" : "?") + new Date().getTime() + "" + parseInt(Math.random()*100000);
-}
-
-/**
- * Checks that the first two arguments are equal, with an optional message.
- * Prints out both actual and expected values.
- *
- * Prefered to ok( actual == expected, message )
- *
- * @example equals( $.format("Received {0} bytes.", 2), "Received 2 bytes." );
- *
- * @param Object actual
- * @param Object expected
- * @param String message (optional)
- */
-function equals(actual, expected, message) {
- push(expected == actual, actual, expected, message);
-}
-
-function push(result, actual, expected, message) {
- message = message || (result ? "okay" : "failed");
- QUnit.ok( result, result ? message + ": " + expected : message + ", expected: " + jsDump.parse(expected) + " result: " + jsDump.parse(actual) );
-}
-
-/**
- * Trigger an event on an element.
- *
- * @example triggerEvent( document.body, "click" );
- *
- * @param DOMElement elem
- * @param String type
- */
-function triggerEvent( elem, type, event ) {
- if ( $.browser.mozilla || $.browser.opera ) {
- event = document.createEvent("MouseEvents");
- event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,
- 0, 0, 0, 0, 0, false, false, false, false, 0, null);
- elem.dispatchEvent( event );
- } else if ( $.browser.msie ) {
- elem.fireEvent("on"+type);
- }
-}
-
-})(jQuery);
-
-/**
- * jsDump
- * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
- * Licensed under BSD (http://www.opensource.org/licenses/bsd-license.php)
- * Date: 5/15/2008
- * @projectDescription Advanced and extensible data dumping for Javascript.
- * @version 1.0.0
- * @author Ariel Flesler
- * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}
- */
-(function(){
- function quote( str ){
- return '"' + str.toString().replace(/"/g, '\\"') + '"';
- };
- function literal( o ){
- return o + '';
- };
- function join( pre, arr, post ){
- var s = jsDump.separator(),
- base = jsDump.indent();
- inner = jsDump.indent(1);
- if( arr.join )
- arr = arr.join( ',' + s + inner );
- if( !arr )
- return pre + post;
- return [ pre, inner + arr, base + post ].join(s);
- };
- function array( arr ){
- var i = arr.length, ret = Array(i);
- this.up();
- while( i-- )
- ret[i] = this.parse( arr[i] );
- this.down();
- return join( '[', ret, ']' );
- };
-
- var reName = /^function (\w+)/;
-
- var jsDump = window.jsDump = {
- parse:function( obj, type ){//type is used mostly internally, you can fix a (custom)type in advance
- var parser = this.parsers[ type || this.typeOf(obj) ];
- type = typeof parser;
-
- return type == 'function' ? parser.call( this, obj ) :
- type == 'string' ? parser :
- this.parsers.error;
- },
- typeOf:function( obj ){
- var type = typeof obj,
- f = 'function';//we'll use it 3 times, save it
- return type != 'object' && type != f ? type :
- !obj ? 'null' :
- obj.exec ? 'regexp' :// some browsers (FF) consider regexps functions
- obj.getHours ? 'date' :
- obj.scrollBy ? 'window' :
- obj.nodeName == '#document' ? 'document' :
- obj.nodeName ? 'node' :
- obj.item ? 'nodelist' : // Safari reports nodelists as functions
- obj.callee ? 'arguments' :
- obj.call || obj.constructor != Array && //an array would also fall on this hack
- (obj+'').indexOf(f) != -1 ? f : //IE reports functions like alert, as objects
- 'length' in obj ? 'array' :
- type;
- },
- separator:function(){
- return this.multiline ? this.HTML ? '<br />' : '\n' : this.HTML ? ' ' : ' ';
- },
- indent:function( extra ){// extra can be a number, shortcut for increasing-calling-decreasing
- if( !this.multiline )
- return '';
- var chr = this.indentChar;
- if( this.HTML )
- chr = chr.replace(/\t/g,' ').replace(/ /g,' ');
- return Array( this._depth_ + (extra||0) ).join(chr);
- },
- up:function( a ){
- this._depth_ += a || 1;
- },
- down:function( a ){
- this._depth_ -= a || 1;
- },
- setParser:function( name, parser ){
- this.parsers[name] = parser;
- },
- // The next 3 are exposed so you can use them
- quote:quote,
- literal:literal,
- join:join,
- //
- _depth_: 1,
- // This is the list of parsers, to modify them, use jsDump.setParser
- parsers:{
- window: '[Window]',
- document: '[Document]',
- error:'[ERROR]', //when no parser is found, shouldn't happen
- unknown: '[Unknown]',
- 'null':'null',
- undefined:'undefined',
- 'function':function( fn ){
- var ret = 'function',
- name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE
- if( name )
- ret += ' ' + name;
- ret += '(';
-
- ret = [ ret, this.parse( fn, 'functionArgs' ), '){'].join('');
- return join( ret, this.parse(fn,'functionCode'), '}' );
- },
- array: array,
- nodelist: array,
- arguments: array,
- object:function( map ){
- var ret = [ ];
- this.up();
- for( var key in map )
- ret.push( this.parse(key,'key') + ': ' + this.parse(map[key]) );
- this.down();
- return join( '{', ret, '}' );
- },
- node:function( node ){
- var open = this.HTML ? '<' : '<',
- close = this.HTML ? '>' : '>';
-
- var tag = node.nodeName.toLowerCase(),
- ret = open + tag;
-
- for( var a in this.DOMAttrs ){
- var val = node[this.DOMAttrs[a]];
- if( val )
- ret += ' ' + a + '=' + this.parse( val, 'attribute' );
- }
- return ret + close + open + '/' + tag + close;
- },
- functionArgs:function( fn ){//function calls it internally, it's the arguments part of the function
- var l = fn.length;
- if( !l ) return '';
-
- var args = Array(l);
- while( l-- )
- args[l] = String.fromCharCode(97+l);//97 is 'a'
- return ' ' + args.join(', ') + ' ';
- },
- key:quote, //object calls it internally, the key part of an item in a map
- functionCode:'[code]', //function calls it internally, it's the content of the function
- attribute:quote, //node calls it internally, it's an html attribute value
- string:quote,
- date:quote,
- regexp:literal, //regex
- number:literal,
- 'boolean':literal
- },
- DOMAttrs:{//attributes to dump from nodes, name=>realName
- id:'id',
- name:'name',
- 'class':'className'
- },
- HTML:false,//if true, entities are escaped ( <, >, \t, space and \n )
- indentChar:' ',//indentation unit
- multiline:true //if true, items in a collection, are separated by a \n, else just a space.
- };
-
-})();
\ No newline at end of file
Deleted: root/framework/trunk/impl/src/test/resources/javascript/qunit/testsuite.css
===================================================================
--- root/framework/trunk/impl/src/test/resources/javascript/qunit/testsuite.css 2010-02-25 05:57:19 UTC (rev 16492)
+++ root/framework/trunk/impl/src/test/resources/javascript/qunit/testsuite.css 2010-02-25 12:04:05 UTC (rev 16493)
@@ -1,120 +0,0 @@
-body, div, h1 { font-family: 'trebuchet ms', verdana, arial; margin: 0; padding: 0 }
-body {font-size: 10pt; }
-h1 { padding: 15px; font-size: large; background-color: #06b; color: white; }
-h1 a { color: white; }
-h2 { padding: 10px; background-color: #eee; color: black; margin: 0; font-size: small; font-weight: normal }
-
-.pass { color: green; }
-.fail { color: red; }
-p.result { margin-left: 1em; }
-
-#banner { height: 2em; border-bottom: 1px solid white; }
-h2.pass { background-color: green; }
-h2.fail { background-color: red; }
-
-div.testrunner-toolbar { background: #eee; border-top: 1px solid black; padding: 10px; }
-
-ol#tests > li > strong { cursor:pointer; }
-
-div#fx-tests h4 {
- background: red;
-}
-
-div#fx-tests h4.pass {
- background: green;
-}
-
-div#fx-tests div.box {
- background: red url(data/cow.jpg) no-repeat;
- overflow: hidden;
- border: 2px solid #000;
-}
-
-div#fx-tests div.overflow {
- overflow: visible;
-}
-
-div.inline {
- display: inline;
-}
-
-div.autoheight {
- height: auto;
-}
-
-div.autowidth {
- width: auto;
-}
-
-div.autoopacity {
- opacity: auto;
-}
-
-div.largewidth {
- width: 100px;
-}
-
-div.largeheight {
- height: 100px;
-}
-
-div.largeopacity {
- filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);
-}
-
-div.medwidth {
- width: 50px;
-}
-
-div.medheight {
- height: 50px;
-}
-
-div.medopacity {
- opacity: 0.5;
- filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50);
-}
-
-div.nowidth {
- width: 0px;
-}
-
-div.noheight {
- height: 0px;
-}
-
-div.noopacity {
- opacity: 0;
- filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
-}
-
-div.hidden {
- display: none;
-}
-
-div#fx-tests div.widewidth {
- background-repeat: repeat-x;
-}
-
-div#fx-tests div.wideheight {
- background-repeat: repeat-y;
-}
-
-div#fx-tests div.widewidth.wideheight {
- background-repeat: repeat;
-}
-
-div#fx-tests div.noback {
- background-image: none;
-}
-
-div.chain, div.chain div { width: 100px; height: 20px; position: relative; float: left; }
-div.chain div { position: absolute; top: 0px; left: 0px; }
-
-div.chain.test { background: red; }
-div.chain.test div { background: green; }
-
-div.chain.out { background: green; }
-div.chain.out div { background: red; display: none; }
-
-div#show-tests * { display: none; }
Added: root/framework/trunk/impl/src/test/resources/javascript/richfaces-client-api.html
===================================================================
--- root/framework/trunk/impl/src/test/resources/javascript/richfaces-client-api.html (rev 0)
+++ root/framework/trunk/impl/src/test/resources/javascript/richfaces-client-api.html 2010-02-25 12:04:05 UTC (rev 16493)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>jQuery Test Suite</title>
+ <link type="text/css" rel="Stylesheet" media="screen" href="qunit/qunit.css" />
+ <script type="text/javascript" src="../../classes/META-INF/resources/jquery.js"></script>
+ <script type="text/javascript" src="qunit/qunit.js"></script>
+ <script type="text/javascript" src="../../classes/META-INF/resources/richfaces.js"></script>
+ <script type="text/javascript" src="../../classes/META-INF/resources/richfaces-event.js"></script>
+ <script type="text/javascript" src="richfaces-qunit.js"></script>
+ <script type="text/javascript" src="richfaces-event-qunit.js"></script>
+ </head>
+ <body>
+ <h1 id="qunit-header">Richfaces Client API Tests</h1>
+ <h2 id="qunit-banner"></h2>
+ <h2 id="qunit-userAgent"></h2>
+ <ol id="qunit-tests"></ol>
+ <script type="text/javascript">
+ /*
+ var p;
+ if ((p=location.href.indexOf("?"))!=-1) {
+ var script = document.createElement("script");
+ script.setAttribute("src", location.href.substr(p+1)+".js");
+ script.setAttribute("type", "text/javascript");
+ var head = document.getElementsByTagName("head")[0]||document.documentElement;
+ head.appendChild(script);
+ }
+ */
+ </script>
+
+ <div id="testDiv" style="margin-top:10px; border:1px solid #a0a0a0">Main Test Div</div>
+ </body>
+</html>
Added: root/framework/trunk/impl/src/test/resources/javascript/richfaces-event-qunit.js
===================================================================
--- root/framework/trunk/impl/src/test/resources/javascript/richfaces-event-qunit.js (rev 0)
+++ root/framework/trunk/impl/src/test/resources/javascript/richfaces-event-qunit.js 2010-02-25 12:04:05 UTC (rev 16493)
@@ -0,0 +1,165 @@
+RichFaces.QUnit.run(function(){
+ module("richfaces-event");
+
+ var testData1 = {value1:"test1"};
+ var testData2 = {value2:"test2"};
+ var i = 0;
+ var id = "testElement";
+ var testDiv = document.getElementById("testDiv");
+
+ function createNextTestElement () {
+ var element = document.createElement("div");
+ var newId = id+(++i);
+ element.setAttribute("id",newId);
+ element.innerHTML = newId;
+ testDiv.appendChild(element);
+ return element;
+ }
+
+ function setupCallback(element) {
+
+ var domElement = element;
+ var callback = function (e, o, d) {
+ expect(6);
+ equals(e.type, "click");
+ equals(o, element);
+ equals(d, testData2);
+ equals(e.data.component, testData1);
+ equals(typeof e.data.fn, "function");
+ equals(this, testData1);
+ };
+ return callback;
+ }
+
+ function setupEmptyCallback() {
+
+ var callback = function (e, o) {
+ o.onEvent = true;
+ };
+ return callback;
+ }
+
+ // bind test
+ test("RichFaces.Event.bind", function() {
+ expect(2);
+ var element = createNextTestElement();
+ var elementId = element.id;
+ var fn = setupEmptyCallback(element);
+ var f = RichFaces.Event.bind("#"+elementId, "click", fn);
+ equals(typeof f, "function");
+ RichFaces.Event.fire("#"+elementId, "click");
+ ok(element.onEvent, "fire event");
+ });
+
+ // fire test
+ test("RichFaces.Event.fire", function() {
+ var element = createNextTestElement();
+ var elementId = element.id;
+ var fn = setupCallback(element);
+ var f = RichFaces.Event.bind("#"+elementId, "click", fn, testData1);
+ RichFaces.Event.fire("#"+elementId, "click", testData2);
+ });
+
+ // callHandler test
+ test("RichFaces.Event.callHandler", function() {
+ var element = createNextTestElement();
+ var elementId = element.id;
+ var fn = setupCallback(element);
+ var f = RichFaces.Event.bind("#"+elementId, "click", fn, testData1);
+ RichFaces.Event.callHandler("#"+elementId, "click", testData2);
+ });
+
+ // unbind test
+ test("RichFaces.Event.unbind", function() {
+ expect(1);
+ var element = createNextTestElement();
+ var elementId = element.id;
+ var fn = setupEmptyCallback();
+ var f = RichFaces.Event.bind("#"+elementId, "click", fn);
+ RichFaces.Event.unbind("#"+elementId, "click", f);
+ RichFaces.Event.callHandler("#"+elementId, "click");
+ ok(!element.onEvent, "unbind event");
+ });
+
+ // bindById test
+ test("RichFaces.Event.bindById", function() {
+ expect(2);
+ var element = createNextTestElement();
+ var elementId = element.id;
+ var fn = setupEmptyCallback(element);
+ var f = RichFaces.Event.bindById(elementId, "click", fn);
+ equals(typeof f, "function");
+ RichFaces.Event.fireById(elementId, "click");
+ ok(element.onEvent, "fire event");
+ });
+
+ // fireById test
+ test("RichFaces.Event.fireById", function() {
+ var element = createNextTestElement();
+ var elementId = element.id;
+ var fn = setupCallback(element);
+ var f = RichFaces.Event.bindById(elementId, "click", fn, testData1);
+ RichFaces.Event.fireById(elementId, "click", testData2);
+ });
+
+ // callHandlerById test
+ test("RichFaces.Event.callHandlerById", function() {
+ var element = createNextTestElement();
+ var elementId = element.id;
+ var fn = setupCallback(element);
+ var f = RichFaces.Event.bindById(elementId, "click", fn, testData1);
+ RichFaces.Event.callHandlerById(elementId, "click", testData2);
+ });
+
+ // unbindById test
+ test("RichFaces.Event.unbindById", function() {
+ expect(1);
+ var element = createNextTestElement();
+ var elementId = element.id;
+ var fn = setupEmptyCallback();
+ var f = RichFaces.Event.bindById(elementId, "click", fn);
+ RichFaces.Event.unbindById(elementId, "click", f);
+ RichFaces.Event.callHandlerById(elementId, "click");
+ ok(!element.onEvent, "unbind event");
+ });
+
+ // bindOne test
+ test("RichFaces.Event.bindOne", function() {
+ expect(3);
+ var element = createNextTestElement();
+ var elementId = element.id;
+ var fn = setupEmptyCallback(element);
+ var f = RichFaces.Event.bindOne("#"+elementId, "click", fn);
+ equals(typeof f, "function");
+ RichFaces.Event.fire("#"+elementId, "click");
+ ok(element.onEvent, "fire first event");
+ element.onEvent = false;
+ RichFaces.Event.fire("#"+elementId, "click");
+ ok(!element.onEvent, "fire second event");
+ });
+
+ // bindOneById test
+ test("RichFaces.Event.bindOneById", function() {
+ expect(3);
+ var element = createNextTestElement();
+ var elementId = element.id;
+ var fn = setupEmptyCallback(element);
+ var f = RichFaces.Event.bindOneById(elementId, "click", fn);
+ equals(typeof f, "function");
+ RichFaces.Event.fireById(elementId, "click");
+ ok(element.onEvent, "fire first event");
+ element.onEvent = false;
+ RichFaces.Event.fireById(elementId, "click");
+ ok(!element.onEvent, "fire second event");
+ });
+
+ // createNamespace
+ test("RichFaces.Event.createNamespace", function() {
+ expect(5);
+ equals(RichFaces.Event.createNamespace(), RichFaces.Event.RICH_NAMESPACE);
+ equals(RichFaces.Event.createNamespace("Component"), RichFaces.Event.RICH_NAMESPACE+"."+"Component");
+ equals(RichFaces.Event.createNamespace("Component", "id"), RichFaces.Event.RICH_NAMESPACE+".Component.id");
+ equals(RichFaces.Event.createNamespace("Component", "id", "prefix"), "prefix.Component.id");
+ equals(RichFaces.Event.createNamespace("", "id", "prefix"), "prefix.id");
+ });
+});
\ No newline at end of file
Added: root/framework/trunk/impl/src/test/resources/javascript/richfaces-qunit.js
===================================================================
--- root/framework/trunk/impl/src/test/resources/javascript/richfaces-qunit.js (rev 0)
+++ root/framework/trunk/impl/src/test/resources/javascript/richfaces-qunit.js 2010-02-25 12:04:05 UTC (rev 16493)
@@ -0,0 +1,13 @@
+window.RichFaces = window.RichFaces || {};
+RichFaces.QUnit = (function(){
+ var setTestHeader = function (header) {
+ var e = document.getElementById("qunit-header");
+ e.innerHTML = header;
+ };
+
+ return {
+ run: function (f) {
+ jQuery(document).ready(f);
+ }
+ };
+}());
\ No newline at end of file
14 years, 10 months
JBoss Rich Faces SVN: r16492 - root/docs/trunk/Component_Reference/en-US.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2010-02-25 00:57:19 -0500 (Thu, 25 Feb 2010)
New Revision: 16492
Modified:
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Introduction.xml
Log:
Renamed a4j:ajax to a4j:support
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml 2010-02-24 23:29:56 UTC (rev 16491)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml 2010-02-25 05:57:19 UTC (rev 16492)
@@ -75,7 +75,7 @@
</section>
<section id="sect-Component_Reference-Actions-a4jajax">
- <title><sgmltag><a4j:ajax></sgmltag></title>
+ <title><sgmltag><a4j:support></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -99,12 +99,12 @@
</listitem>
</itemizedlist>
<para>
- The <sgmltag><a4j:ajax></sgmltag> component allows Ajax capability to be added to any non-Ajax component. It is placed as a direct child to the component that requires Ajax support. The <sgmltag><a4j:ajax></sgmltag> component uses the common attributes listed in <xref linkend="chap-Component_Reference-Common_Ajax_attributes" />.
+ The <sgmltag><a4j:support></sgmltag> component allows Ajax capability to be added to any non-Ajax component. It is placed as a direct child to the component that requires Ajax support. The <sgmltag><a4j:support></sgmltag> component uses the common attributes listed in <xref linkend="chap-Component_Reference-Common_Ajax_attributes" />.
</para>
<note>
<title>Attaching JavaScript functions</title>
<para>
- When attaching the <sgmltag><a4j:ajax></sgmltag> component to non-Ajax JavaServer Faces command components, such as <sgmltag><h:commandButton></sgmltag> and <sgmltag><h:commandLink></sgmltag>, it is important to set <code>disabledDefault="true"</code>. If this attribute is not set, a non-Ajax request is sent after the Ajax request and the page is refreshed unexpectedly.
+ When attaching the <sgmltag><a4j:support></sgmltag> component to non-Ajax JavaServer Faces command components, such as <sgmltag><h:commandButton></sgmltag> and <sgmltag><h:commandLink></sgmltag>, it is important to set <code>disabledDefault="true"</code>. If this attribute is not set, a non-Ajax request is sent after the Ajax request and the page is refreshed unexpectedly.
</para>
</note>
</section>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Introduction.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Introduction.xml 2010-02-24 23:29:56 UTC (rev 16491)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Introduction.xml 2010-02-25 05:57:19 UTC (rev 16492)
@@ -17,7 +17,7 @@
<note>
<title>Ajax support</title>
<para>
- All components in the <classname>a4j</classname> library feature built-in Ajax support, so it is unnecessary to add the <sgmltag><a4j:ajax></sgmltag> behavior.
+ All components in the <classname>a4j</classname> library feature built-in Ajax support, so it is unnecessary to add the <sgmltag><a4j:support></sgmltag> behavior.
</para>
</note>
</section>
14 years, 10 months
JBoss Rich Faces SVN: r16491 - in root: cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-02-24 18:29:56 -0500 (Wed, 24 Feb 2010)
New Revision: 16491
Modified:
root/cdk/trunk/plugins/maven-cdk-plugin/
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/BaseRendererTest.java
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/CoercionsTest.java
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/GridRendererTest.java
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/InputRendererTest.java
root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/LinkRendererTest.java
root/framework/trunk/commons/src/test/java/org/richfaces/renderkit/RenderKitUtilsTest.java
Log:
JSFMock unit tests updated
Property changes on: root/cdk/trunk/plugins/maven-cdk-plugin
___________________________________________________________________
Name: svn:ignore
- target
.settings
.project
.classpath
.clover
+ target
.settings
.project
.classpath
.clover
bin
Modified: root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/BaseRendererTest.java
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/BaseRendererTest.java 2010-02-24 19:36:02 UTC (rev 16490)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/BaseRendererTest.java 2010-02-24 23:29:56 UTC (rev 16491)
@@ -24,17 +24,14 @@
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.same;
-import java.util.ArrayList;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponentBase;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.easymock.IAnswer;
-import org.jboss.test.faces.mock.FacesMock;
import org.jboss.test.faces.mock.MockFacesEnvironment;
import org.junit.After;
import org.junit.Before;
@@ -57,45 +54,25 @@
protected Map<String, Object> componentAttributes;
- protected List<UIComponent> childrenList;
-
- protected void replayAll() throws Exception {
- FacesMock.replay(environment, responseWriter, component);
- }
-
- protected void verifyAll() throws Exception {
- FacesMock.verify(environment, responseWriter, component);
- }
-
@Before
public void setUp() throws Exception {
environment = MockFacesEnvironment.createEnvironment();
facesContext = environment.getFacesContext();
- component = FacesMock.createMock(UIComponent.class);
+ component = environment.createMock(UIComponentBase.class);
componentAttributes = new HashMap<String, Object>();
expect(component.getAttributes()).andStubReturn(componentAttributes);
expect(component.getClientId(same(environment.getFacesContext()))).andStubReturn(CLIENT_ID);
- childrenList = new ArrayList<UIComponent>();
- expect(component.getChildCount()).andAnswer(new IAnswer<Integer>() {
- @Override
- public Integer answer() throws Throwable {
- return childrenList.size();
- }
- }).anyTimes();
- expect(component.getChildren()).andStubReturn(childrenList);
-
- responseWriter = FacesMock.createMock(ResponseWriter.class);
+ responseWriter = environment.createMock(ResponseWriter.class);
expect(environment.getFacesContext().getResponseWriter()).andStubReturn(responseWriter);
expect(responseWriter.getContentType()).andStubReturn("text/html");
}
@After
public void tearDown() throws Exception {
- verifyAll();
-
+ environment.verify();
environment.release();
environment = null;
@@ -103,7 +80,6 @@
facesContext = null;
component = null;
componentAttributes = null;
- childrenList = null;
}
}
Modified: root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/CoercionsTest.java
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/CoercionsTest.java 2010-02-24 19:36:02 UTC (rev 16490)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/CoercionsTest.java 2010-02-24 23:29:56 UTC (rev 16491)
@@ -43,7 +43,7 @@
public void testEncodeEnd() throws Exception {
responseWriter.writeText(eq("0"), EasyMock.<String>isNull());
- replayAll();
+ environment.replay();
CoercedRenderer renderer = new CoercedRenderer();
renderer.encodeEnd(facesContext, component);
@@ -55,7 +55,7 @@
responseWriter.writeText(eq(String.valueOf("test value".length())), EasyMock.<String>isNull());
- replayAll();
+ environment.replay();
CoercedRenderer renderer = new CoercedRenderer();
renderer.encodeEnd(facesContext, component);
@@ -69,7 +69,7 @@
responseWriter.writeText(eq("AnotherFlag"), EasyMock.<String>isNull());
responseWriter.writeText(eq("0"), EasyMock.<String>isNull());
- replayAll();
+ environment.replay();
CoercedRenderer renderer = new CoercedRenderer();
renderer.encodeEnd(facesContext, component);
@@ -83,7 +83,7 @@
responseWriter.writeText(eq("Flag"), EasyMock.<String>isNull());
responseWriter.writeText(eq("0"), EasyMock.<String>isNull());
- replayAll();
+ environment.replay();
CoercedRenderer renderer = new CoercedRenderer();
renderer.encodeEnd(facesContext, component);
Modified: root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/GridRendererTest.java
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/GridRendererTest.java 2010-02-24 19:36:02 UTC (rev 16490)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/GridRendererTest.java 2010-02-24 23:29:56 UTC (rev 16491)
@@ -24,6 +24,8 @@
import static org.easymock.EasyMock.eq;
import static org.easymock.EasyMock.same;
+import java.util.List;
+
import javax.faces.component.UIComponent;
import org.easymock.EasyMock;
@@ -40,8 +42,10 @@
@Before
public void setUp() throws Exception {
super.setUp();
- childrenList.add(new HtmlOutputTextStub("First child"));
- childrenList.add(new HtmlOutputTextStub("Second child"));
+
+ List<UIComponent> children = component.getChildren();
+ children.add(new HtmlOutputTextStub("First child"));
+ children.add(new HtmlOutputTextStub("Second child"));
}
@Test
@@ -50,7 +54,7 @@
responseWriter.writeAttribute(eq("id"), eq(CLIENT_ID), EasyMock.<String>isNull());
responseWriter.startElement(eq("tbody"), same(component));
- replayAll();
+ environment.replay();
GridRenderer renderer = new GridRenderer();
renderer.encodeBegin(facesContext, component);
@@ -79,7 +83,7 @@
responseWriter.endElement(eq("td"));
responseWriter.endElement(eq("tr"));
- replayAll();
+ environment.replay();
GridRenderer renderer = new GridRenderer();
renderer.encodeChildren(facesContext, component);
@@ -90,7 +94,7 @@
responseWriter.endElement(eq("tbody"));
responseWriter.endElement(eq("table"));
- replayAll();
+ environment.replay();
GridRenderer renderer = new GridRenderer();
renderer.encodeEnd(facesContext, component);
Modified: root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/InputRendererTest.java
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/InputRendererTest.java 2010-02-24 19:36:02 UTC (rev 16490)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/InputRendererTest.java 2010-02-24 23:29:56 UTC (rev 16491)
@@ -24,6 +24,10 @@
import static org.easymock.EasyMock.eq;
import static org.easymock.EasyMock.same;
+import java.util.List;
+
+import javax.faces.component.UIComponent;
+
import org.easymock.EasyMock;
import org.junit.Before;
import org.junit.Test;
@@ -39,7 +43,9 @@
@Before
public void setUp() throws Exception {
super.setUp();
- childrenList.add(new HtmlOutputTextStub("Single child"));
+
+ List<UIComponent> children = component.getChildren();
+ children.add(new HtmlOutputTextStub("Single child"));
}
@Test
@@ -47,7 +53,7 @@
responseWriter.startElement(eq("span"), same(component));
responseWriter.writeAttribute(eq("id"), eq(CLIENT_ID), EasyMock.<String>isNull());
- replayAll();
+ environment.replay();
InputRenderer renderer = new InputRenderer();
renderer.encodeBegin(facesContext, component);
@@ -57,7 +63,7 @@
public void testEncodeChildrenDefaultComponent() throws Exception {
responseWriter.writeText(eq("Single child"), EasyMock.<String>isNull());
- replayAll();
+ environment.replay();
InputRenderer renderer = new InputRenderer();
renderer.encodeChildren(facesContext, component);
@@ -74,7 +80,7 @@
responseWriter.endElement(eq("span"));
- replayAll();
+ environment.replay();
InputRenderer renderer = new InputRenderer();
renderer.encodeEnd(facesContext, component);
@@ -91,7 +97,7 @@
responseWriter.endElement(eq("span"));
- replayAll();
+ environment.replay();
InputRenderer renderer = new InputRenderer();
renderer.encodeEnd(facesContext, component);
@@ -113,7 +119,7 @@
responseWriter.endElement(eq("span"));
- replayAll();
+ environment.replay();
InputRenderer renderer = new InputRenderer();
renderer.encodeEnd(facesContext, component);
@@ -135,7 +141,7 @@
responseWriter.endElement(eq("span"));
- replayAll();
+ environment.replay();
InputRenderer renderer = new InputRenderer();
renderer.encodeEnd(facesContext, component);
Modified: root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/LinkRendererTest.java
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/LinkRendererTest.java 2010-02-24 19:36:02 UTC (rev 16490)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/src/it/renderer-template-test/src/test/java/org/richfaces/cdk/LinkRendererTest.java 2010-02-24 23:29:56 UTC (rev 16491)
@@ -24,6 +24,10 @@
import static org.easymock.EasyMock.eq;
import static org.easymock.EasyMock.same;
+import java.util.List;
+
+import javax.faces.component.UIComponent;
+
import org.easymock.EasyMock;
import org.junit.Before;
import org.junit.Test;
@@ -41,7 +45,9 @@
@Before
public void setUp() throws Exception {
super.setUp();
- childrenList.add(new HtmlOutputTextStub("Child text"));
+
+ List<UIComponent> children = component.getChildren();
+ children.add(new HtmlOutputTextStub("Child text"));
}
private void initializeBasePathAttributes() {
@@ -61,7 +67,7 @@
public void testEncodeBeginBasePath() throws Exception {
initializeBasePathAttributes();
- replayAll();
+ environment.replay();
CommandLinkRenderer renderer = new CommandLinkRenderer();
renderer.encodeBegin(facesContext, component);
@@ -73,7 +79,7 @@
responseWriter.writeText(eq("Child text"), EasyMock.<String>isNull());
- replayAll();
+ environment.replay();
CommandLinkRenderer renderer = new CommandLinkRenderer();
renderer.encodeChildren(facesContext, component);
@@ -103,7 +109,7 @@
responseWriter.endElement(eq("a"));
- replayAll();
+ environment.replay();
CommandLinkRenderer renderer = new CommandLinkRenderer();
renderer.encodeEnd(facesContext, component);
@@ -111,7 +117,7 @@
@Test
public void testEncodeBeginShortPath() throws Exception {
- replayAll();
+ environment.replay();
CommandLinkRenderer renderer = new CommandLinkRenderer();
renderer.encodeBegin(facesContext, component);
@@ -121,7 +127,7 @@
public void testEncodeChildrenShortPath() throws Exception {
responseWriter.writeText(eq("Child text"), EasyMock.<String>isNull());
- replayAll();
+ environment.replay();
CommandLinkRenderer renderer = new CommandLinkRenderer();
renderer.encodeChildren(facesContext, component);
@@ -137,7 +143,7 @@
responseWriter.writeText(eq("value: ; differentValue: ; anotherValue: ;"), EasyMock.<String>isNull());
responseWriter.endElement(eq("a"));
- replayAll();
+ environment.replay();
CommandLinkRenderer renderer = new CommandLinkRenderer();
renderer.encodeEnd(facesContext, component);
Modified: root/framework/trunk/commons/src/test/java/org/richfaces/renderkit/RenderKitUtilsTest.java
===================================================================
--- root/framework/trunk/commons/src/test/java/org/richfaces/renderkit/RenderKitUtilsTest.java 2010-02-24 19:36:02 UTC (rev 16490)
+++ root/framework/trunk/commons/src/test/java/org/richfaces/renderkit/RenderKitUtilsTest.java 2010-02-24 23:29:56 UTC (rev 16491)
@@ -90,7 +90,7 @@
facesContext = facesEnvironment.getFacesContext();
externalContext = facesEnvironment.getExternalContext();
- responseWriter = FacesMock.createMock(ResponseWriter.class);
+ responseWriter = facesEnvironment.createMock(ResponseWriter.class);
expect(facesContext.getResponseWriter()).andStubReturn(responseWriter);
expect(responseWriter.getContentType()).andStubReturn("application/xhtml+xml");
@@ -112,28 +112,8 @@
this.createdMocks = null;
}
- private void replay(Object... objects) {
- FacesMock.replay(facesEnvironment, responseWriter);
- for (Object object : createdMocks) {
- FacesMock.replay(object);
- }
- for (Object object : objects) {
- FacesMock.replay(object);
- }
- }
-
- private void verify(Object... objects) {
- FacesMock.verify(facesEnvironment, responseWriter);
- for (Object object : createdMocks) {
- FacesMock.verify(object);
- }
- for (Object object : objects) {
- FacesMock.verify(object);
- }
- }
-
private UIComponent createMockComponent() {
- UIComponent component = FacesMock.createMock(UIComponent.class);
+ UIComponent component = facesEnvironment.createMock(UIComponent.class);
expect(component.getAttributes()).andStubReturn(componentAttributes);
expect(component.getClientId(same(facesContext))).andStubReturn(CLIENT_ID);
createdMocks.add(component);
@@ -141,7 +121,7 @@
}
private ClientBehaviorHolder createMockClientBehaviorHolder() {
- UIComponent component = FacesMock.createMock(MockClientBehaviorHolder.class);
+ UIComponent component = facesEnvironment.createMock(MockClientBehaviorHolder.class);
expect(component.getClientId(same(facesContext))).andStubReturn(CLIENT_ID);
expect(component.getAttributes()).andStubReturn(componentAttributes);
ClientBehaviorHolder behaviorHolder = (ClientBehaviorHolder) component;
@@ -253,15 +233,15 @@
responseWriter.writeAttribute(eq("xml:lang"), eq("ru"), EasyMock.<String>isNull());
responseWriter.writeAttribute(eq("class"), eq("rich-component"), EasyMock.<String>isNull());
- replay();
+ facesEnvironment.replay();
RenderKitUtils.renderPassThroughAttributes(facesContext, component, knownAttributes);
- verify();
+ facesEnvironment.verify();
}
private ClientBehavior createClientBehavior(String handlerData, Set<ClientBehaviorHint> hints) {
- ClientBehavior behavior = FacesMock.createMock(ClientBehavior.class);
+ ClientBehavior behavior = facesEnvironment.createMock(ClientBehavior.class);
expect(behavior.getScript(EasyMock.<ClientBehaviorContext> notNull())).andStubReturn(
MessageFormat.format("prompt({0})", handlerData));
@@ -308,11 +288,11 @@
responseWriter.writeAttribute(eq("onmousemove"), eq("alert(mousemove)"), EasyMock.<String>isNull());
responseWriter.writeAttribute(eq("oncontextmenu"), eq("prompt(contextmenu)"), EasyMock.<String>isNull());
- replay();
+ facesEnvironment.replay();
RenderKitUtils.renderPassThroughAttributes(facesContext, component, knownAttributes);
- verify();
+ facesEnvironment.verify();
}
private UIComponent setupBehaviorsTestForDisabledComponent() throws IOException {
@@ -343,11 +323,11 @@
responseWriter.writeAttribute(eq("style"), eq("color:green"), EasyMock.<String>isNull());
- replay();
+ facesEnvironment.replay();
RenderKitUtils.renderPassThroughAttributes(facesContext, component, knownAttributes);
- verify();
+ facesEnvironment.verify();
}
@Test
@@ -361,20 +341,20 @@
eq("alert(mousemove)"), EasyMock.<String>isNull());
responseWriter.writeAttribute(eq("style"), eq("color:green"), EasyMock.<String>isNull());
- replay();
+ facesEnvironment.replay();
RenderKitUtils.renderPassThroughAttributes(facesContext, component, knownAttributes);
- verify();
+ facesEnvironment.verify();
}
public void checkDisabled(Object attributeValue, boolean expectedValue) throws Exception {
componentAttributes.put("disabled", attributeValue);
UIComponent component = createMockComponent();
- replay();
+ facesEnvironment.replay();
assertTrue(expectedValue == RenderKitUtils.isDisabled(component));
- verify();
+ facesEnvironment.verify();
}
@Test
@@ -431,11 +411,11 @@
expectLastCall();
}
- replay();
+ facesEnvironment.replay();
RenderKitUtils.decodeBehaviors(facesContext, component);
- verify();
+ facesEnvironment.verify();
}
@Test
@@ -448,11 +428,11 @@
expectLastCall();
}
- replay();
+ facesEnvironment.replay();
RenderKitUtils.decodeBehaviors(facesContext, component);
- verify();
+ facesEnvironment.verify();
}
@Test
@@ -461,11 +441,11 @@
//nothing should be called - clientId is not matched
- replay();
+ facesEnvironment.replay();
RenderKitUtils.decodeBehaviors(facesContext, component);
- verify();
+ facesEnvironment.verify();
}
@Test
@@ -474,11 +454,11 @@
//nothing should be called - no behavior event information was submitted
- replay();
+ facesEnvironment.replay();
RenderKitUtils.decodeBehaviors(facesContext, component);
- verify();
+ facesEnvironment.verify();
}
@Test
@@ -487,10 +467,10 @@
//nothing should be called - no context menu behaviors were created
- replay();
+ facesEnvironment.replay();
RenderKitUtils.decodeBehaviors(facesContext, component);
- verify();
+ facesEnvironment.verify();
}
}
\ No newline at end of file
14 years, 10 months
JBoss Rich Faces SVN: r16490 - root/ui-sandbox/trunk/components.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-02-24 14:36:02 -0500 (Wed, 24 Feb 2010)
New Revision: 16490
Modified:
root/ui-sandbox/trunk/components/pom.xml
Log:
Modified: root/ui-sandbox/trunk/components/pom.xml
===================================================================
--- root/ui-sandbox/trunk/components/pom.xml 2010-02-24 19:35:07 UTC (rev 16489)
+++ root/ui-sandbox/trunk/components/pom.xml 2010-02-24 19:36:02 UTC (rev 16490)
@@ -18,5 +18,7 @@
<modules>
<module>tables</module>
+ <module>datascroller</module>
+
</modules>
</project>
\ No newline at end of file
14 years, 10 months
JBoss Rich Faces SVN: r16489 - in root/ui-sandbox/trunk/components/datascroller: api and 20 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-02-24 14:35:07 -0500 (Wed, 24 Feb 2010)
New Revision: 16489
Added:
root/ui-sandbox/trunk/components/datascroller/api/
root/ui-sandbox/trunk/components/datascroller/api/pom.xml
root/ui-sandbox/trunk/components/datascroller/api/src/
root/ui-sandbox/trunk/components/datascroller/api/src/main/
root/ui-sandbox/trunk/components/datascroller/api/src/main/java/
root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/
root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/
root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/event/
root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/event/DataScrollerEvent.java
root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/event/DataScrollerListener.java
root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/event/DataScrollerSource.java
root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/event/RenderPhaseComponentVisitor.java
root/ui-sandbox/trunk/components/datascroller/pom.xml
root/ui-sandbox/trunk/components/datascroller/ui/
root/ui-sandbox/trunk/components/datascroller/ui/pom.xml
root/ui-sandbox/trunk/components/datascroller/ui/src/
root/ui-sandbox/trunk/components/datascroller/ui/src/main/
root/ui-sandbox/trunk/components/datascroller/ui/src/main/config/
root/ui-sandbox/trunk/components/datascroller/ui/src/main/config/faces-config.xml
root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/
root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/
root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/
root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/component/
root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/component/README
root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/component/RenderPhaseDataScrollerVisitor.java
root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/component/UIDataScroller.java
root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/component/html/
root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/component/html/HtmlDataScroller.java
root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/renderkit/
root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/renderkit/ControlsState.java
root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java
root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/taglib/
root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/taglib/DatascrollerTagHandler.java
root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/
root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/
root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/datascroller.taglib.xml
root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/resources/
root/ui-sandbox/trunk/components/datascroller/ui/src/main/tempates/
root/ui-sandbox/trunk/components/datascroller/ui/src/main/tempates/datascroller.template.xml
Log:
Added: root/ui-sandbox/trunk/components/datascroller/api/pom.xml
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/api/pom.xml (rev 0)
+++ root/ui-sandbox/trunk/components/datascroller/api/pom.xml 2010-02-24 19:35:07 UTC (rev 16489)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <parent>
+ <groupId>org.richfaces.sandbox.ui.components</groupId>
+ <artifactId>datascroller</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>${parent.artifactId}-api</artifactId>
+ <name>richfaces datascroller api</name>
+
+ <dependencies>
+ </dependencies>
+
+</project>
\ No newline at end of file
Added: root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/event/DataScrollerEvent.java
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/event/DataScrollerEvent.java (rev 0)
+++ root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/event/DataScrollerEvent.java 2010-02-24 19:35:07 UTC (rev 16489)
@@ -0,0 +1,90 @@
+/**
+ * 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.event;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.FacesListener;
+
+/**
+ * @author Wesley Hales
+ */
+public class DataScrollerEvent extends ActionEvent {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 2657353903701932561L;
+ private String oldScrolVal;
+ private String newScrolVal;
+ private int page;
+
+ /**
+ * Creates a new ScrollerEvent.
+ *
+ * @param component the source of the event
+ * @param thisOldScrolVal the previously showing item identifier
+ * @param thisNewScrolVal the currently showing item identifier
+ */
+ public DataScrollerEvent(UIComponent component, String thisOldScrolVal, String thisNewScrolVal, int page) {
+ super(component);
+ oldScrolVal = thisOldScrolVal;
+ newScrolVal = thisNewScrolVal;
+ this.page = page;
+ }
+
+ public String getOldScrolVal() {
+ return oldScrolVal;
+ }
+
+ public String getNewScrolVal() {
+ return newScrolVal;
+ }
+
+ /**
+ * @since 3.2
+ * @return new page or <code>-1</code> if not applicable
+ */
+ public int getPage() {
+ return page;
+ }
+
+ public boolean isAppropriateListener(FacesListener listener){
+ return super.isAppropriateListener(listener) || (listener instanceof DataScrollerListener);
+ }
+
+ /**
+ * Delivers this event to the SliderListener.
+ *
+ * @param listener the slider listener
+ */
+ public void processListener(FacesListener listener){
+ if (listener instanceof DataScrollerListener) {
+ DataScrollerListener dataScrollerListener = (DataScrollerListener) listener;
+ dataScrollerListener.processScroller(this);
+ }
+
+ if (super.isAppropriateListener(listener)) {
+ super.processListener(listener);
+ }
+ }
+}
Added: root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/event/DataScrollerListener.java
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/event/DataScrollerListener.java (rev 0)
+++ root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/event/DataScrollerListener.java 2010-02-24 19:35:07 UTC (rev 16489)
@@ -0,0 +1,31 @@
+/**
+ * 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.event;
+
+import javax.faces.event.FacesListener;
+
+
+public interface DataScrollerListener extends FacesListener {
+
+ public void processScroller(org.richfaces.event.DataScrollerEvent event);
+
+}
Added: root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/event/DataScrollerSource.java
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/event/DataScrollerSource.java (rev 0)
+++ root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/event/DataScrollerSource.java 2010-02-24 19:35:07 UTC (rev 16489)
@@ -0,0 +1,47 @@
+/**
+ * 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.event;
+
+public interface DataScrollerSource {
+
+ /**
+ * Adds a DataScrollerListener to this DataScrollerSource.
+ *
+ * @param listener the Scroler listener to be added
+ */
+ public void addScrollerListener(org.richfaces.event.DataScrollerListener listener);
+
+ /**
+ * Removes a DataFilterSliderListener from this DataScrollerSourceSource.
+ *
+ * @param listener the Scroler listener to be removed
+ */
+ public void removeScrollerListener(DataScrollerListener listener);
+
+ /**
+ * Returns all ScrollerListeners for this DataScrollerSource.
+ *
+ * @return the Scroler listener array
+ */
+ public DataScrollerListener[] getScrollerListeners();
+
+}
Added: root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/event/RenderPhaseComponentVisitor.java
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/event/RenderPhaseComponentVisitor.java (rev 0)
+++ root/ui-sandbox/trunk/components/datascroller/api/src/main/java/org/richfaces/event/RenderPhaseComponentVisitor.java 2010-02-24 19:35:07 UTC (rev 16489)
@@ -0,0 +1,36 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.event;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.PhaseEvent;
+
+public interface RenderPhaseComponentVisitor {
+
+ Object beforeRoot(PhaseEvent event);
+
+ void beforeComponent(UIComponent component, PhaseEvent event, Object state);
+
+ void afterComponent(UIComponent component, PhaseEvent event, Object state);
+
+ void afterRoot(PhaseEvent event, Object state);
+
+}
Added: root/ui-sandbox/trunk/components/datascroller/pom.xml
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/pom.xml (rev 0)
+++ root/ui-sandbox/trunk/components/datascroller/pom.xml 2010-02-24 19:35:07 UTC (rev 16489)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <parent>
+ <groupId>org.richfaces.sandbox.ui</groupId>
+ <artifactId>components</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.sandbox.ui.components</groupId>
+ <artifactId>datascroller</artifactId>
+ <packaging>pom</packaging>
+
+ <name>richfaces datascroller</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <modules>
+ <module>api</module>
+ <module>ui</module>
+ </modules>
+
+</project>
\ No newline at end of file
Added: root/ui-sandbox/trunk/components/datascroller/ui/pom.xml
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/ui/pom.xml (rev 0)
+++ root/ui-sandbox/trunk/components/datascroller/ui/pom.xml 2010-02-24 19:35:07 UTC (rev 16489)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <parent>
+ <groupId>org.richfaces.sandbox.ui.components</groupId>
+ <artifactId>datascroller</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>${parent.artifactId}-ui</artifactId>
+ <name>richfaces datascroller ui</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <version>${project.version}</version>
+ <artifactId>${parent.artifactId}-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <version>${project.version}</version>
+ <artifactId>${parent.artifactId}-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>richfaces-impl</artifactId>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
Added: root/ui-sandbox/trunk/components/datascroller/ui/src/main/config/faces-config.xml
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/ui/src/main/config/faces-config.xml (rev 0)
+++ root/ui-sandbox/trunk/components/datascroller/ui/src/main/config/faces-config.xml 2010-02-24 19:35:07 UTC (rev 16489)
@@ -0,0 +1,45 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+JBoss, Home of Professional Open Source
+Copyright ${year}, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+
+This software 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 software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ version="2.0">
+
+ <component>
+ <component-type>org.richfaces.DataScroller</component-type>
+ <component-class>org.richfaces.component.html.HtmlDataScroller</component-class>
+ <component-extension>
+ <cdk:generate xmlns:cdk="http://richfaces.org/cdk/extensions">false</cdk:generate>
+ </component-extension>
+ </component>
+
+ <render-kit>
+ <render-kit-id>HTML_BASIC</render-kit-id>
+ <renderer>
+ <component-family>org.richfaces.DataScroller</component-family>
+ <renderer-type>org.richfaces.DataScrollerRenderer</renderer-type>
+ <renderer-class>org.richfaces.renderkit.html.DataScrollerRenderer</renderer-class>
+ </renderer>
+ </render-kit>
+</faces-config>
\ No newline at end of file
Added: root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/component/README
===================================================================
Added: root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/component/RenderPhaseDataScrollerVisitor.java
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/component/RenderPhaseDataScrollerVisitor.java (rev 0)
+++ root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/component/RenderPhaseDataScrollerVisitor.java 2010-02-24 19:35:07 UTC (rev 16489)
@@ -0,0 +1,232 @@
+/**
+ * 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.component;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.el.Expression;
+import javax.el.ValueExpression;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIData;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+
+import org.ajax4jsf.Messages;
+import org.richfaces.component.util.MessageUtil;
+import org.richfaces.event.RenderPhaseComponentVisitor;
+import org.richfaces.log.RichfacesLogger;
+import org.slf4j.Logger;
+
+
+/**
+ * Created 08.03.2008
+ * @author Nick Belaevski
+ * @since 3.2
+ */
+
+public class RenderPhaseDataScrollerVisitor implements RenderPhaseComponentVisitor {
+
+ private class State {
+
+ private ComponentConnections connections;
+ private LinkedList<UIComponent> components;
+
+ private State(LinkedList<UIComponent> components,
+ ComponentConnections connections) {
+ this.components = components;
+ this.connections = connections;
+ }
+ }
+
+ private static final class ComponentConnections {
+ private final Map<UIData, List<UIDataScroller>> map =
+ new HashMap<UIData, List<UIDataScroller>>();
+
+ public void addConnection(UIData one, UIDataScroller multi) {
+ List<UIDataScroller> list = map.get(one);
+ if (list == null) {
+ list = new ArrayList<UIDataScroller>(1);
+ map.put(one, list);
+ }
+
+ list.add(multi);
+ }
+
+ public Iterator<Entry<UIData, List<UIDataScroller>>> iterator() {
+ return map.entrySet().iterator();
+ }
+
+ @Override
+ public String toString() {
+ return this.getClass().getSimpleName() + ": " + map;
+ }
+ }
+
+ private static final Logger log = RichfacesLogger.COMPONENTS.getLogger();
+
+ public Object beforeRoot(PhaseEvent event) {
+ return new State(new LinkedList<UIComponent>(), new ComponentConnections());
+ }
+
+ public void beforeComponent(UIComponent component, PhaseEvent event, Object object) {
+ State state = (State) object;
+ state.components.addLast(component);
+
+ if (component instanceof UIDataScroller && isRendered(state.components)) {
+ UIDataScroller datascroller = (UIDataScroller) component;
+ UIData dataTable = datascroller.getDataTable();
+
+ state.connections.addConnection(dataTable, datascroller);
+ }
+ }
+
+ public void afterComponent(UIComponent component, PhaseEvent event, Object object) {
+ State state = (State) object;
+ state.components.removeLast();
+ }
+
+ public void afterRoot(PhaseEvent event, Object object) {
+ State state = (State) object;
+ FacesContext facesContext = event.getFacesContext();
+ Iterator<Entry<UIData, List<UIDataScroller>>> entries =
+ state.connections.iterator();
+
+ while (entries.hasNext()) {
+ Entry<UIData, List<UIDataScroller>> entry = entries.next();
+ List<UIDataScroller> scrollers = entry.getValue();
+ if (!scrollers.isEmpty()) {
+ List<Object> values = new ArrayList<Object>(scrollers.size());
+
+ UIData data = entry.getKey();
+ UIDataScroller activeComponent = null;
+
+ Map<String, Object> attributes = data.getAttributes();
+ Object pageValue = attributes.get(UIDataScroller.SCROLLER_STATE_ATTRIBUTE);
+
+ if (pageValue == null) {
+ boolean valid = true;
+
+ for (UIDataScroller datascroller : scrollers) {
+ Object nextPageValue = null;
+
+ if (datascroller.isLocalPageSet()) {
+ nextPageValue = datascroller.getPage();
+ attributes.put(UIDataScroller.SCROLLER_STATE_ATTRIBUTE, nextPageValue);
+ datascroller.resetLocalPage();
+ } else {
+ nextPageValue = datascroller.getValueExpression("page");
+ }
+
+ if (!values.isEmpty() && !same(values.get(values.size() - 1), nextPageValue)) {
+ valid = false;
+ }
+
+ values.add(nextPageValue);
+
+ if (nextPageValue != null) {
+ activeComponent = datascroller;
+ pageValue = nextPageValue;
+ }
+ }
+
+ if (!valid) {
+ StringBuilder builder = new StringBuilder("\n[");
+ Iterator<UIDataScroller> scrollerItr = scrollers.iterator();
+ Iterator<Object> valueItr = values.iterator();
+
+ while (scrollerItr.hasNext()) {
+ UIDataScroller next = scrollerItr.next();
+ builder.append(MessageUtil.getLabel(facesContext, next));
+ builder.append(": ");
+
+ Object value = valueItr.next();
+ if (value instanceof Expression) {
+ builder.append(((Expression) value).getExpressionString());
+ } else {
+ builder.append(value);
+ }
+
+ builder.append(scrollerItr.hasNext() ? ",\n" : "]");
+ }
+
+ String formattedMessage = Messages.getMessage(Messages.DATASCROLLER_PAGES_DIFFERENT,
+ new Object[] {MessageUtil.getLabel(facesContext, data), builder});
+
+
+ log.error(formattedMessage);
+ }
+
+ }
+
+ if (activeComponent == null) {
+ activeComponent = scrollers.get(scrollers.size() - 1);
+ }
+
+ if (pageValue != null) {
+ activeComponent.setupFirstRowValue();
+ }
+ }
+ }
+ }
+
+ private static boolean isRendered(List<UIComponent> components) {
+ boolean rendered;
+
+ for (UIComponent component : components) {
+ rendered = false;
+
+ try {
+ rendered = component.isRendered();
+ } catch (Exception e) {
+ //ignore that
+ if (log.isDebugEnabled()) {
+ log.debug(e.getLocalizedMessage(), e);
+ }
+ }
+
+ if (!rendered) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ private static boolean same(Object o1, Object o2) {
+ if (o1 instanceof ValueExpression && o2 instanceof ValueExpression) {
+ ValueExpression ve1 = (ValueExpression) o1;
+ ValueExpression ve2 = (ValueExpression) o2;
+
+ if (same(ve1.getExpressionString(), ve2.getExpressionString()) && same(ve1.getExpectedType(), ve2.getExpectedType())) {
+ return true;
+ }
+ }
+
+ return (o1 != null && o1.equals(o2)) || (o1 == null && o2 == null);
+ }
+}
Added: root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/component/UIDataScroller.java
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/component/UIDataScroller.java (rev 0)
+++ root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/component/UIDataScroller.java 2010-02-24 19:35:07 UTC (rev 16489)
@@ -0,0 +1,539 @@
+package org.richfaces.component;
+
+import java.util.Map;
+
+import javax.el.ELException;
+import javax.el.MethodExpression;
+import javax.el.ValueExpression;
+import javax.faces.FacesException;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponentBase;
+import javax.faces.component.UIData;
+import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.FacesEvent;
+
+import org.ajax4jsf.Messages;
+import org.ajax4jsf.renderkit.RendererUtils;
+import org.richfaces.component.util.MessageUtil;
+import org.richfaces.event.DataScrollerEvent;
+import org.richfaces.event.DataScrollerListener;
+import org.richfaces.event.DataScrollerSource;
+import org.richfaces.log.RichfacesLogger;
+import org.slf4j.Logger;
+
+
+public abstract class UIDataScroller extends UIComponentBase implements DataScrollerSource {
+
+ public static final String COMPONENT_TYPE = "org.richfaces.DataScroller";
+
+ private static final Logger log = RichfacesLogger.COMPONENTS.getLogger();
+
+
+ public static final String LAST_PAGE_MODE_FULL = "full";
+
+ public static final String LAST_PAGE_MODE_SHORT = "short";
+
+
+ public static final String FIRST_FACET_NAME = "first";
+
+ public static final String LAST_FACET_NAME = "last";
+
+ public static final String NEXT_FACET_NAME = "next";
+
+ public static final String PREVIOUS_FACET_NAME = "previous";
+
+ public static final String FAST_FORWARD_FACET_NAME = "fastforward";
+
+ public static final String FAST_REWIND_FACET_NAME = "fastrewind";
+
+ public static final String FIRST_DISABLED_FACET_NAME = "first_disabled";
+
+ public static final String LAST_DISABLED_FACET_NAME = "last_disabled";
+
+ public static final String NEXT_DISABLED_FACET_NAME = "next_disabled";
+
+ public static final String PREVIOUS_DISABLED_FACET_NAME = "previous_disabled";
+
+ public static final String FAST_FORWARD_DISABLED_FACET_NAME = "fastforward_disabled";
+
+ public static final String FAST_REWIND_DISABLED_FACET_NAME = "fastrewind_disabled";
+
+
+ private Integer page;
+
+
+ public void addScrollerListener(DataScrollerListener listener) {
+ addFacesListener(listener);
+ }
+
+ public DataScrollerListener[] getScrollerListeners() {
+ return (DataScrollerListener[]) getFacesListeners(DataScrollerListener.class);
+ }
+
+ public void removeScrollerListener(DataScrollerListener listener) {
+ removeFacesListener(listener);
+ }
+
+
+ public void broadcast(FacesEvent event) throws AbortProcessingException {
+ super.broadcast(event);
+ if (event instanceof DataScrollerEvent) {
+ DataScrollerEvent dataScrollerEvent = (DataScrollerEvent) event;
+
+ updateModel(dataScrollerEvent.getPage());
+
+ FacesContext context = getFacesContext();
+
+ MethodExpression scrollerListener = getScrollerListener();
+ if (scrollerListener != null) {
+ scrollerListener.invoke(context.getELContext(), new Object[]{event});
+ }
+ }
+ }
+
+
+
+ public abstract MethodExpression getScrollerListener();
+
+ public abstract void setScrollerListener(MethodExpression scrollerListener);
+
+ public abstract void setFor(String f);
+
+ public abstract String getFor();
+
+ public abstract int getFastStep();
+
+ public abstract void setFastStep(int FastStep);
+
+ public abstract int getMaxPages();
+
+ public abstract void setMaxPages(int maxPages);
+
+ public abstract String getSelectedStyleClass();
+
+ public abstract void setSelectedStyleClass(String selectedStyleClass);
+
+ public abstract String getSelectedStyle();
+
+ public abstract void setSelectedStyle(String selectedStyle);
+
+ public abstract String getStyleClass();
+
+ public abstract void setStyleClass(String styleClass);
+
+ public abstract String getStyle();
+
+ public abstract void setStyle(String styleClass);
+
+ public abstract String getBoundaryControls();
+
+ public abstract void setBoundaryControls(String boundaryControls);
+
+ public abstract String getFastControls();
+
+ public abstract void setFastControls(String fastControls);
+
+ public abstract String getStepControls();
+
+ public abstract void setStepControls(String stepControls);
+
+ public abstract String getInactiveStyleClass();
+
+ public abstract void setInactiveStyleClass(String inactiveStyleClass);
+
+ public abstract String getInactiveStyle();
+
+ public abstract void setInactiveStyle(String inactiveStyle);
+
+ public abstract String getLastPageMode();
+
+ public abstract void setLastPageMode(String lastPageMode);
+
+ /**
+ * Finds the dataTable which id is mapped to the "for" property
+ *
+ * @return the dataTable component
+ */
+
+ public UIData getDataTable() {
+ String forAttribute = getFor();
+ UIComponent forComp;
+
+ if (forAttribute == null) {
+ forComp = this;
+
+ while ((forComp = forComp.getParent()) != null) {
+ if (forComp instanceof UIData) {
+ setFor(forComp.getId());
+ return (UIData) forComp;
+ }
+ }
+ throw new FacesException("could not find dataTable for datascroller " + this.getId());
+
+ } else {
+ forComp = RendererUtils.getInstance().findComponentFor(this, forAttribute);
+ }
+
+ if (forComp == null) {
+ throw new IllegalArgumentException("could not find dataTable with id '" + forAttribute + "'");
+ } else if (!(forComp instanceof UIData)) {
+
+ throw new IllegalArgumentException( "component with id '" + forAttribute
+ + "' must be of type " + UIData.class.getName()
+ + ", not type "
+ + forComp.getClass().getName());
+ }
+
+ return (UIData) forComp;
+ }
+
+ private int getFastStepOrDefault() {
+ int step = getFastStep();
+ return step <= 0 ? 1 : step;
+ }
+
+ public int getPageForFacet(String facetName) {
+ if (facetName == null) {
+ throw new NullPointerException();
+ }
+
+ int newPage = 1;
+ int pageCount = getPageCount();
+
+ if (FIRST_FACET_NAME.equals(facetName)) {
+ newPage = 1;
+ } else if (PREVIOUS_FACET_NAME.equals(facetName)) {
+ newPage = getPage() - 1;
+ } else if (NEXT_FACET_NAME.equals(facetName)) {
+ newPage = getPage() + 1;
+ } else if (LAST_FACET_NAME.equals(facetName)) {
+ newPage = pageCount > 0 ? pageCount : 1;
+ } else if (FAST_FORWARD_FACET_NAME.equals(facetName)) {
+ newPage = getPage() + getFastStepOrDefault();
+ } else if (FAST_REWIND_FACET_NAME.equals(facetName)) {
+ newPage = getPage() - getFastStepOrDefault();
+ } else {
+ try {
+ newPage = Integer.parseInt(facetName.toString());
+ } catch (NumberFormatException e) {
+ throw new FacesException(e.getLocalizedMessage(), e);
+ }
+ }
+
+ if (newPage >= 1 && newPage <= pageCount) {
+ return newPage;
+ } else {
+ return 0;
+ }
+ }
+
+ public int getPageCount(UIData data) {
+ int rowCount = getRowCount(data);
+ int rows = getRows(data);
+ return getPageCount(data, rowCount, rows);
+ }
+
+ public int getPageCount(UIData data, int rowCount, int rows) {
+ int pageCount;
+ if (rows > 0) {
+ pageCount = rows <= 0 ? 1 : rowCount / rows;
+ if (rowCount % rows > 0) {
+ pageCount++;
+ }
+ if (pageCount == 0) {
+ pageCount = 1;
+ }
+ } else {
+ rows = 1;
+ pageCount = 1;
+ }
+ return pageCount;
+ }
+
+ /** @return the page count of the uidata */
+ public int getPageCount() {
+ return getPageCount(getDataTable());
+ }
+
+ public int getRowCount(UIData data) {
+ int rowCount = data.getRowCount();
+ if (rowCount >= 0) {
+ return rowCount;
+ }
+
+ return BinarySearch.search(data);
+ }
+
+ /** @return int */
+ public int getRowCount() {
+ //xxx nick -> alex - scrollable models can return -1 here
+ //let's implement "dychotomic" discovery
+ // setPage(1)... if isPageAvailable() setPage(2) then 4, 8, etc.
+ // setPage() { setRowIndex(pageIdx * rows); }
+ // isPageAvailable() { return isRowAvailable() }
+ //return getUIData().getRowCount();
+ return getRowCount(getDataTable());
+ }
+
+ public int getRows(UIData data) {
+ int row = 0;
+ row = data.getRows();
+ if (row == 0) {
+ row = getRowCount(data);
+ }
+
+ return row;
+ }
+
+ // facet getter methods
+ public UIComponent getFirst() {
+ return getFacet(FIRST_FACET_NAME);
+ }
+
+ public UIComponent getLast() {
+ return getFacet(LAST_FACET_NAME);
+ }
+
+ public UIComponent getNext() {
+ return getFacet(NEXT_FACET_NAME);
+ }
+
+ public UIComponent getFastForward() {
+ return getFacet(FAST_FORWARD_FACET_NAME);
+ }
+
+ public UIComponent getFastRewind() {
+ return getFacet(FAST_REWIND_FACET_NAME);
+ }
+
+ public UIComponent getPrevious() {
+ return getFacet(PREVIOUS_FACET_NAME);
+ }
+
+ private static boolean isRendered(UIComponent component) {
+ UIComponent c = component;
+ while (c != null) {
+ if (!c.isRendered()) {
+ return false;
+ }
+
+ c = c.getParent();
+ }
+
+ return true;
+ }
+
+
+ public void setupFirstRowValue() {
+ UIData dataTable = getDataTable();
+ if (isRendered()) {
+ int rowCount = getRowCount(dataTable);
+ int rows = getRows(dataTable);
+
+ Integer pageCount = getPageCount(dataTable, rowCount, rows);
+
+ int page = getPage();
+ int newPage = -1;
+ if (page < 1) {
+ newPage = 1;
+ } else if (page > pageCount) {
+ newPage = (pageCount != 0 ? pageCount : 1);
+ }
+
+ if (newPage != -1) {
+ FacesContext context = getFacesContext();
+ Object label = MessageUtil.getLabel(context, this);
+ String formattedMessage = Messages.getMessage(Messages.DATASCROLLER_PAGE_MISSING,
+ new Object[] {label, page, pageCount, newPage});
+
+ log.warn(formattedMessage);
+
+ page = newPage;
+ dataTable.getAttributes().put(SCROLLER_STATE_ATTRIBUTE, page);
+ }
+
+ if (isRendered(dataTable)) {
+ int first;
+
+ String lastPageMode = getLastPageMode();
+ if (lastPageMode == null) {
+ lastPageMode = LAST_PAGE_MODE_SHORT;
+ } else if (!LAST_PAGE_MODE_SHORT.equals(lastPageMode) &&
+ !LAST_PAGE_MODE_FULL.equals(lastPageMode)) {
+
+ throw new IllegalArgumentException("Illegal value of 'lastPageMode' attribute: '" + lastPageMode + "'");
+ }
+
+ if (page != pageCount || LAST_PAGE_MODE_SHORT.equals(lastPageMode)) {
+ first = (page - 1) * rows;
+ } else {
+ first = rowCount - rows;
+ if (first < 0) {
+ first = 0;
+ }
+ }
+
+ dataTable.setFirst(first);
+ }
+ }
+ }
+
+ public void setPage(int newPage) {
+ this.page = newPage;
+ }
+
+ public int getPage() {
+ Map<String, Object> attributes = getDataTable().getAttributes();
+ Integer state = (Integer) attributes.get(SCROLLER_STATE_ATTRIBUTE);
+ if (state != null) {
+ return state;
+ }
+
+ if (this.page != null) {
+ return page;
+ }
+
+ ValueExpression ve = getValueExpression("page");
+ if (ve != null) {
+ try {
+ Integer pageObject = (Integer) ve.getValue(getFacesContext().getELContext());
+
+ if (pageObject != null) {
+ return pageObject;
+ } else {
+ return 1;
+ }
+ } catch (ELException e) {
+ throw new FacesException(e);
+ }
+ } else {
+ return 1;
+ }
+ }
+
+ private void updateModel(int newPage) {
+ UIData dataTable = getDataTable();
+
+ if (isRendered(dataTable)) {
+ dataTable.setFirst((newPage - 1) * getRows(dataTable));
+ }
+
+ Map<String, Object> attributes = dataTable.getAttributes();
+ attributes.put(SCROLLER_STATE_ATTRIBUTE, newPage);
+
+ FacesContext context = getFacesContext();
+ ValueExpression ve = getValueExpression("page");
+ if (ve != null) {
+ try {
+ ve.setValue(context.getELContext(), newPage);
+ attributes.remove(SCROLLER_STATE_ATTRIBUTE);
+ } catch (ELException e) {
+ String messageStr = e.getMessage();
+ Throwable result = e.getCause();
+ while (null != result &&
+ result.getClass().isAssignableFrom(ELException.class)) {
+ messageStr = result.getMessage();
+ result = result.getCause();
+ }
+ FacesMessage message;
+ if (null == messageStr) {
+ message =
+ MessageUtil.getMessage(context, UIInput.UPDATE_MESSAGE_ID,
+ new Object[] { MessageUtil.getLabel(
+ context, this) });
+ } else {
+ message = new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ messageStr,
+ messageStr);
+ }
+ context.getExternalContext().log(message.getSummary(), result);
+ context.addMessage(getClientId(context), message);
+ context.renderResponse();
+ } catch (IllegalArgumentException e) {
+ FacesMessage message =
+ MessageUtil.getMessage(context, UIInput.UPDATE_MESSAGE_ID,
+ new Object[] { MessageUtil.getLabel(
+ context, this) });
+ context.getExternalContext().log(message.getSummary(), e);
+ context.addMessage(getClientId(context), message);
+ context.renderResponse();
+ } catch (Exception e) {
+ FacesMessage message =
+ MessageUtil.getMessage(context, UIInput.UPDATE_MESSAGE_ID,
+ new Object[] { MessageUtil.getLabel(
+ context, this) });
+ context.getExternalContext().log(message.getSummary(), e);
+ context.addMessage(getClientId(context), message);
+ context.renderResponse();
+ }
+ }
+ }
+
+ static class BinarySearch {
+
+ public static int search(UIData data) {
+ int rowIndex = data.getRowIndex();
+ try {
+ int n = 1;
+ int k = 2;
+ for (; ;) {
+ data.setRowIndex(k - 1);
+ if (data.isRowAvailable()) {
+ n = k;
+ k = k * 2;
+ } else {
+ break;
+ }
+ }
+
+ while (n < k) {
+ int kk = Math.round((n + k) / 2) + 1;
+ data.setRowIndex(kk - 1);
+ if (data.isRowAvailable()) {
+ n = kk;
+ } else {
+ k = kk - 1;
+ }
+ }
+
+ data.setRowIndex(k - 1);
+ if (data.isRowAvailable()) {
+ return k;
+ } else {
+ return 0;
+ }
+ } finally {
+ data.setRowIndex(rowIndex);
+ }
+ }
+ }
+
+ public Object saveState(FacesContext context) {
+ return new Object[] {
+ super.saveState(context),
+ page
+ };
+
+ }
+
+ public void restoreState(FacesContext context, Object object) {
+ Object[] state = (Object[]) object;
+
+ super.restoreState(context, state[0]);
+ page = (Integer) state[1];
+ }
+
+ public static final String SCROLLER_STATE_ATTRIBUTE = COMPONENT_TYPE + ":page";
+
+ public boolean isLocalPageSet() {
+ return page != null;
+ }
+
+ public void resetLocalPage() {
+ page = null;
+ }
+
+}
Added: root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/component/html/HtmlDataScroller.java
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/component/html/HtmlDataScroller.java (rev 0)
+++ root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/component/html/HtmlDataScroller.java 2010-02-24 19:35:07 UTC (rev 16489)
@@ -0,0 +1,162 @@
+package org.richfaces.component.html;
+
+import javax.el.MethodExpression;
+
+import org.richfaces.component.UIDataScroller;
+
+public class HtmlDataScroller extends UIDataScroller{
+
+ public static final String COMPONENT_FAMILY = "org.richfaces.DataScroller";
+
+ protected enum PropertyKeys {
+ boundaryControls, data, fastControls, fastStep, forComponent, handleValue, inactiveStyle, selectStyle,
+ inactiveStyleClass, selectStyleClass, scrollerListener, lastPageMode, maxPages, pageIndexVar, pagesVar, renderIfSinglePage,
+ style, styleClass, stepControls
+ }
+
+ @Override
+ public String getBoundaryControls() {
+ return (String)getStateHelper().eval(PropertyKeys.boundaryControls);
+ }
+
+ @Override
+ public String getFastControls() {
+ return (String)getStateHelper().eval(PropertyKeys.fastControls);
+ }
+
+ @Override
+ public int getFastStep() {
+ return (Integer)getStateHelper().eval(PropertyKeys.fastStep, 0);
+ }
+
+ @Override
+ public String getFor() {
+ return (String)getStateHelper().eval(PropertyKeys.forComponent);
+ }
+
+ @Override
+ public String getInactiveStyle() {
+ return (String)getStateHelper().eval(PropertyKeys.inactiveStyle);
+ }
+
+ @Override
+ public String getInactiveStyleClass() {
+ return (String)getStateHelper().eval(PropertyKeys.inactiveStyleClass);
+ }
+
+ @Override
+ public String getLastPageMode() {
+ return (String)getStateHelper().eval(PropertyKeys.lastPageMode);
+ }
+
+ @Override
+ public int getMaxPages() {
+ return (Integer)getStateHelper().eval(PropertyKeys.maxPages,0);
+ }
+
+ @Override
+ public String getSelectedStyle() {
+ return (String)getStateHelper().eval(PropertyKeys.selectStyle);
+ }
+
+ @Override
+ public String getSelectedStyleClass() {
+ return (String)getStateHelper().eval(PropertyKeys.selectStyleClass);
+ }
+
+ @Override
+ public String getStepControls() {
+ return (String)getStateHelper().eval(PropertyKeys.selectStyleClass);
+ }
+
+ @Override
+ public String getStyle() {
+ return (String)getStateHelper().eval(PropertyKeys.selectStyle);
+ }
+
+ @Override
+ public String getStyleClass() {
+ return (String)getStateHelper().eval(PropertyKeys.selectStyleClass);
+ }
+
+ @Override
+ public MethodExpression getScrollerListener() {
+ return (MethodExpression)getStateHelper().eval(PropertyKeys.scrollerListener);
+ }
+
+ @Override
+ public void setBoundaryControls(String boundaryControls) {
+ getStateHelper().put(PropertyKeys.boundaryControls, boundaryControls);
+ }
+
+ @Override
+ public void setFastControls(String fastControls) {
+ getStateHelper().put(PropertyKeys.fastControls, fastControls);
+ }
+
+ @Override
+ public void setFastStep(int fastStep) {
+ getStateHelper().put(PropertyKeys.fastStep, fastStep);
+ }
+
+ @Override
+ public void setFor(String f) {
+ getStateHelper().put(PropertyKeys.forComponent, f);
+ }
+
+ @Override
+ public void setInactiveStyle(String inactiveStyle) {
+ getStateHelper().put(PropertyKeys.inactiveStyle, inactiveStyle);
+ }
+
+ @Override
+ public void setInactiveStyleClass(String inactiveStyleClass) {
+ getStateHelper().put(PropertyKeys.inactiveStyleClass, inactiveStyleClass);
+ }
+
+ @Override
+ public void setLastPageMode(String lastPageMode) {
+ getStateHelper().put(PropertyKeys.inactiveStyle, lastPageMode);
+ }
+
+ @Override
+ public void setMaxPages(int maxPages) {
+ getStateHelper().put(PropertyKeys.maxPages, maxPages);
+ }
+
+ @Override
+ public void setSelectedStyle(String selectedStyle) {
+ getStateHelper().put(PropertyKeys.selectStyle, selectedStyle);
+ }
+
+ @Override
+ public void setSelectedStyleClass(String selectedStyleClass) {
+ getStateHelper().put(PropertyKeys.selectStyleClass, selectedStyleClass);
+ }
+
+ @Override
+ public void setStepControls(String stepControls) {
+ getStateHelper().put(PropertyKeys.stepControls, stepControls);
+ }
+
+ @Override
+ public void setStyle(String style) {
+ getStateHelper().put(PropertyKeys.style, style);
+ }
+
+ @Override
+ public void setStyleClass(String styleClass) {
+ getStateHelper().put(PropertyKeys.styleClass, styleClass);
+ }
+
+ @Override
+ public void setScrollerListener(MethodExpression scrollerListener) {
+ getStateHelper().put(PropertyKeys.scrollerListener, scrollerListener);
+ }
+
+ @Override
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+}
Added: root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/renderkit/ControlsState.java
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/renderkit/ControlsState.java (rev 0)
+++ root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/renderkit/ControlsState.java 2010-02-24 19:35:07 UTC (rev 16489)
@@ -0,0 +1,128 @@
+/**
+ * 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;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com
+ *
+ */
+public class ControlsState {
+
+ private boolean firstRendered = true;
+ private boolean firstEnabled = true;
+
+ private boolean lastRendered = true;
+ private boolean lastEnabled = true;
+
+ private boolean previousRendered = true;
+ private boolean previousEnabled = true;
+
+ private boolean nextRendered = true;
+ private boolean nextEnabled = true;
+
+ private boolean fastRewindRendered = true;
+ private boolean fastRewindEnabled = true;
+
+ private boolean fastForwardRendered = true;
+ private boolean fastForwardEnabled = true;
+
+ private boolean controlsSeparatorRendered = false;
+
+ public boolean isFirstRendered() {
+ return firstRendered;
+ }
+ public void setFirstRendered(boolean firstRendered) {
+ this.firstRendered = firstRendered;
+ }
+ public boolean isFirstEnabled() {
+ return firstEnabled;
+ }
+ public void setFirstEnabled(boolean firstEnabled) {
+ this.firstEnabled = firstEnabled;
+ }
+ public boolean isLastRendered() {
+ return lastRendered;
+ }
+ public void setLastRendered(boolean lastRendered) {
+ this.lastRendered = lastRendered;
+ }
+ public boolean isLastEnabled() {
+ return lastEnabled;
+ }
+ public void setLastEnabled(boolean lastEnabled) {
+ this.lastEnabled = lastEnabled;
+ }
+ public boolean isPreviousRendered() {
+ return previousRendered;
+ }
+ public void setPreviousRendered(boolean previousRendered) {
+ this.previousRendered = previousRendered;
+ }
+ public boolean isPreviousEnabled() {
+ return previousEnabled;
+ }
+ public void setPreviousEnabled(boolean previousEnabled) {
+ this.previousEnabled = previousEnabled;
+ }
+ public boolean isNextRendered() {
+ return nextRendered;
+ }
+ public void setNextRendered(boolean nextRendered) {
+ this.nextRendered = nextRendered;
+ }
+ public boolean isNextEnabled() {
+ return nextEnabled;
+ }
+ public void setNextEnabled(boolean nextEnabled) {
+ this.nextEnabled = nextEnabled;
+ }
+ public boolean isFastRewindRendered() {
+ return fastRewindRendered;
+ }
+ public void setFastRewindRendered(boolean fastRewindRendered) {
+ this.fastRewindRendered = fastRewindRendered;
+ }
+ public boolean isFastRewindEnabled() {
+ return fastRewindEnabled;
+ }
+ public void setFastRewindEnabled(boolean fastRewindEnabled) {
+ this.fastRewindEnabled = fastRewindEnabled;
+ }
+ public boolean isFastForwardRendered() {
+ return fastForwardRendered;
+ }
+ public void setFastForwardRendered(boolean fastForwardRendered) {
+ this.fastForwardRendered = fastForwardRendered;
+ }
+ public boolean isFastForwardEnabled() {
+ return fastForwardEnabled;
+ }
+ public void setFastForwardEnabled(boolean fastForwardEnabled) {
+ this.fastForwardEnabled = fastForwardEnabled;
+ }
+ public boolean isControlsSeparatorRendered() {
+ return controlsSeparatorRendered;
+ }
+ public void setControlsSeparatorRendered(boolean controlsSeparatorRendered) {
+ this.controlsSeparatorRendered = controlsSeparatorRendered;
+ }
+}
Added: root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java (rev 0)
+++ root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java 2010-02-24 19:35:07 UTC (rev 16489)
@@ -0,0 +1,318 @@
+/**
+ * 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;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIParameter;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.render.Renderer;
+
+import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.renderkit.AjaxRendererUtils;
+import org.richfaces.component.UIDataScroller;
+import org.richfaces.event.DataScrollerEvent;
+
+
+public class DataScrollerBaseRenderer extends Renderer {
+
+ public void doDecode(FacesContext context, UIComponent component) {
+ Map paramMap = getParamMap(context);
+ String clientId = component.getClientId(context);
+ String param = (String) paramMap.get(clientId);
+ if (param != null) {
+ UIDataScroller scroller = (UIDataScroller) component;
+ int newPage = scroller.getPageForFacet(param);
+ int page = scroller.getPage();
+ if (newPage != 0 && newPage != page) {
+ DataScrollerEvent event = new DataScrollerEvent(scroller,
+ String.valueOf(page), param, newPage);
+ event.queue();
+
+ }
+
+ if (AjaxRendererUtils.isAjaxRequest(context)) {
+ AjaxContext.getCurrentInstance(context)
+ .addAreasToProcessFromComponent(context, component);
+ }
+
+ new AjaxEvent(component).queue();
+ }
+ }
+
+ public ControlsState getControlsState(FacesContext context,
+ UIDataScroller datascroller, int pageIndex, int pageCount) {
+ int minPageIdx = 1;
+ int maxPageIdx = pageCount;
+ int fastStep = datascroller.getFastStep();
+ if (fastStep <= 1) {
+ fastStep = 1;
+ }
+
+ boolean useFirst = true;
+ boolean useLast = true;
+
+ boolean useBackFast = true;
+ boolean useForwFast = true;
+
+ ControlsState controlsState = new ControlsState();
+
+ if (pageIndex <= minPageIdx) {
+ useFirst = false;
+ }
+
+ if (pageIndex >= maxPageIdx) {
+ useLast = false;
+ }
+
+ if (pageIndex - fastStep < minPageIdx) {
+ useBackFast = false;
+ }
+
+ if (pageIndex + fastStep > maxPageIdx) {
+ useForwFast = false;
+ }
+
+ boolean isAuto;
+ String boundaryControls = datascroller.getBoundaryControls();
+ String stepControls = datascroller.getStepControls();
+ String fastControls = datascroller.getFastControls();
+
+ if ((isAuto = "auto".equals(boundaryControls)) || "show".equals(
+ boundaryControls)) {
+ if (isAuto) {
+ controlsState.setFirstRendered(useFirst);
+ controlsState.setLastRendered(useLast);
+ }
+
+ controlsState.setFirstEnabled(useFirst);
+ controlsState.setLastEnabled(useLast);
+ } else {
+ controlsState.setFirstRendered(false);
+ controlsState.setLastRendered(false);
+ }
+
+ if ((isAuto = "auto".equals(stepControls)) || "show".equals(
+ stepControls)) {
+ if (isAuto) {
+ controlsState.setPreviousRendered(useFirst);
+ controlsState.setNextRendered(useLast);
+ }
+
+ controlsState.setPreviousEnabled(useFirst);
+ controlsState.setNextEnabled(useLast);
+ } else {
+ controlsState.setPreviousRendered(false);
+ controlsState.setNextRendered(false);
+ }
+
+ if ((isAuto = "auto".equals(fastControls)) || "show".equals(
+ fastControls)) {
+ if (isAuto) {
+ controlsState.setFastForwardRendered(useForwFast);
+ controlsState.setFastRewindRendered(useBackFast);
+ }
+
+ controlsState.setFastForwardEnabled(useForwFast);
+ controlsState.setFastRewindEnabled(useBackFast);
+ } else {
+ controlsState.setFastForwardRendered(false);
+ controlsState.setFastRewindRendered(false);
+ }
+
+ UIComponent controlsSeparatorFacet = datascroller.getFacet("controlsSeparator");
+ if (controlsSeparatorFacet != null && controlsSeparatorFacet.isRendered()) {
+ controlsState.setControlsSeparatorRendered(true);
+ }
+
+ return controlsState;
+ }
+
+ public void renderPager(FacesContext context, UIComponent component, int pageIndex, int count)
+ throws IOException {
+ ResponseWriter out = context.getResponseWriter();
+ UIDataScroller scroller = (UIDataScroller) component;
+ int currentPage = pageIndex;
+
+ int maxPages = scroller.getMaxPages();
+ if (maxPages <= 1) {
+ maxPages = 1;
+ }
+
+ int pageCount = count;
+ if (pageCount <= 1) {
+ return;
+ }
+
+ int delta = maxPages / 2;
+
+ int pages;
+ int start;
+ if (pageCount > maxPages && currentPage > delta) {
+ pages = maxPages;
+ start = currentPage - pages / 2 - 1;
+ if (start + pages > pageCount) {
+ start = pageCount - pages;
+ }
+ } else {
+ pages = pageCount < maxPages ? pageCount : maxPages;
+ start = 0;
+ }
+
+ for (int i = start, size = start + pages; i < size; i++) {
+
+ boolean isCurrentPage = (i + 1 == currentPage);
+ String styleClass;
+ String style;
+ if (isCurrentPage) {
+ styleClass = scroller.getSelectedStyleClass();
+ style = scroller.getSelectedStyle();
+ } else {
+ styleClass = scroller.getInactiveStyleClass();
+ style = scroller.getInactiveStyle();
+ }
+ if (styleClass==null){
+ styleClass="";
+ }
+
+ out.startElement("td", component);
+
+ if (isCurrentPage) {
+ out.writeAttribute("class", "rich-datascr-act "+
+ styleClass, null);
+ } else {
+ out.writeAttribute("class", "rich-datascr-inact "+
+ styleClass, null);
+ out.writeAttribute("onclick", getOnClick(Integer.toString(i + 1)), null);
+ }
+ if (null != style) out.writeAttribute("style", style, null);
+ out.writeText(Integer.toString(i + 1), null);
+ //renderChild(context, link);
+ out.endElement("td");
+ }
+
+ }
+
+ public Object getOnClick(String string) {
+ return "Event.fire(this, 'rich:datascroller:onscroll', {'page': '" + string + "'});";
+ }
+
+ public void renderPages(FacesContext context, UIComponent component, int pageIndex, int count)
+ throws IOException {
+ UIDataScroller scroller = (UIDataScroller) component;
+ int currentPage = pageIndex;
+
+ int pageCount = count;
+ if (pageCount <= 1) {
+ pageCount = 1;
+ }
+ String varName = (String) scroller.getAttributes().get("pageIndexVar");
+ if (varName != null && varName.length() > 0) {
+ context.getExternalContext()
+ .getRequestMap().put(varName, new Integer(currentPage));
+ }
+ varName = (String) scroller.getAttributes().get("pagesVar");
+ if (varName != null && varName.length() > 0) {
+ context.getExternalContext()
+ .getRequestMap().put(varName, new Integer(pageCount));
+ }
+ }
+
+ private Map getParamMap(FacesContext context) {
+ return context.getExternalContext().getRequestParameterMap();
+ }
+
+ //get UIParameter's Map
+ protected Map getParameters(FacesContext context, UIComponent component){
+ Map parameters = new HashMap();
+
+ if(component instanceof UIDataScroller){
+ UIDataScroller datascroller = (UIDataScroller)component;
+ List children = datascroller.getChildren();
+ for (Iterator iterator = children.iterator(); iterator.hasNext();) {
+ UIComponent child = (UIComponent) iterator.next();
+ if(child instanceof UIParameter) {
+ UIParameter param = (UIParameter)child;
+ String name = param.getName();
+ if (name != null) {
+ parameters.put(name, param.getValue());
+ }
+ }
+ }
+ }
+
+ return parameters;
+ }
+
+ /**
+ public String getSubmitFunction(FacesContext context, UIComponent component) {
+ JSFunctionDefinition definition = new JSFunctionDefinition("event");
+
+ JSFunction function = AjaxRendererUtils.buildAjaxFunction(component,
+ context);
+ Map eventOptions = AjaxRendererUtils.buildEventOptions(context,
+ component, true);
+ Map parameters = (Map) eventOptions.get("parameters");
+
+ Map params = getParameters(context,component);
+ if(!params.isEmpty()){
+ parameters.putAll(params);
+ }
+
+ parameters.put(component.getClientId(context), new JSLiteral("event.memo.page"));
+
+ function.addParameter(eventOptions);
+ StringBuffer buffer = new StringBuffer();
+ function.appendScript(buffer);
+ buffer.append("; return false;");
+
+ String onPageChange = (String) component.getAttributes().get("onpagechange");
+ if (onPageChange != null && onPageChange.length() != 0) {
+ JSFunctionDefinition onPageChangeDef = new JSFunctionDefinition("event");
+ onPageChangeDef.addToBody(onPageChange);
+ onPageChangeDef.addToBody("; return true;");
+
+ definition.addToBody("if (");
+ definition.addToBody(onPageChangeDef.toScript());
+ definition.addToBody("(event)) {");
+ definition.addToBody(buffer.toString());
+ definition.addToBody("}");
+ } else {
+ definition.addToBody(buffer.toString());
+ }
+
+ return definition.toScript();
+ }
+ */
+
+ /** Creates HtmlAjaxCommandLink sets its id, value and reRender and UIParameter */
+ public boolean getRendersChildren() {
+ return true;
+ }
+}
Added: root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/taglib/DatascrollerTagHandler.java
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/taglib/DatascrollerTagHandler.java (rev 0)
+++ root/ui-sandbox/trunk/components/datascroller/ui/src/main/java/org/richfaces/taglib/DatascrollerTagHandler.java 2010-02-24 19:35:07 UTC (rev 16489)
@@ -0,0 +1,93 @@
+/**
+ * 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.taglib;
+
+import javax.el.ValueExpression;
+import javax.faces.view.facelets.ComponentConfig;
+import javax.faces.view.facelets.ComponentHandler;
+import javax.faces.view.facelets.FaceletContext;
+import javax.faces.view.facelets.MetaRule;
+import javax.faces.view.facelets.MetaRuleset;
+import javax.faces.view.facelets.Metadata;
+import javax.faces.view.facelets.MetadataTarget;
+import javax.faces.view.facelets.TagAttribute;
+
+import org.richfaces.component.UIDataScroller;
+
+
+/**
+ * Created 11.03.2008
+ * @author Nick Belaevski
+ * @since 3.2
+ */
+
+public class DatascrollerTagHandler extends ComponentHandler {
+
+ private static final MetaRule pageRule = new MetaRule() {
+
+ public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+ if ("page".equals(name)) {
+ return new PageMapper(attribute);
+ } else {
+ return null;
+ }
+ }
+
+ };
+
+ private static final class PageMapper extends Metadata {
+
+ private final TagAttribute page;
+
+ /**
+ * @param attribute
+ */
+ public PageMapper(TagAttribute attribute) {
+ page = attribute;
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.facelets.tag.Metadata#applyMetadata(com.sun.facelets.FaceletContext, java.lang.Object)
+ */
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ UIDataScroller datascroller = (UIDataScroller) instance;
+ ValueExpression ve = page.getValueExpression(ctx, int.class);
+ if (ve.isLiteralText()) {
+ Integer value = (Integer) ve.getValue(ctx.getFacesContext().getELContext());
+ datascroller.setPage(value);
+ } else {
+ datascroller.setValueExpression("page", ve);
+ }
+ }
+
+ }
+
+ public DatascrollerTagHandler(ComponentConfig config) {
+ super(config);
+ }
+
+ protected MetaRuleset createMetaRuleset(Class type) {
+ MetaRuleset ruleset = super.createMetaRuleset(type);
+ ruleset.addRule(pageRule);
+ return ruleset;
+ }
+}
Added: root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/datascroller.taglib.xml
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/datascroller.taglib.xml (rev 0)
+++ root/ui-sandbox/trunk/components/datascroller/ui/src/main/resources/META-INF/datascroller.taglib.xml 2010-02-24 19:35:07 UTC (rev 16489)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<facelet-taglib version="2.0" xmlns="http://java.sun.com/xml/ns/javaee" id="a4j">
+ <namespace>http://richfaces.org/datascroller</namespace>
+ <tag>
+ <tag-name>dataScroller</tag-name>
+ <component>
+ <component-type>org.richfaces.DataScroller</component-type>
+ <renderer-type>org.richfaces.DataScrollerRenderer</renderer-type>
+ </component>
+ </tag>
+</facelet-taglib>
Added: root/ui-sandbox/trunk/components/datascroller/ui/src/main/tempates/datascroller.template.xml
===================================================================
--- root/ui-sandbox/trunk/components/datascroller/ui/src/main/tempates/datascroller.template.xml (rev 0)
+++ root/ui-sandbox/trunk/components/datascroller/ui/src/main/tempates/datascroller.template.xml 2010-02-24 19:35:07 UTC (rev 16489)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<cdk:root xmlns="http://richfaces.org/cdk/xhtml-el" xmlns:cdk="http://richfaces.org/cdk/core"
+ xmlns:c="http://richfaces.org/cdk/jstl/core" xmlns:cc="http://richfaces.org/cdk/jsf/composite"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee">
+
+ <cc:interface>
+ <cdk:class>org.richfaces.renderkit.html.DataScrollerRenderer</cdk:class>
+ <cdk:superclass>org.richfaces.renderkit.DataScrollerBaseRenderer</cdk:superclass>
+ <cdk:component-family>org.richfaces.DataScroller</cdk:component-family>
+ <cdk:renderer-type>org.richfaces.DataScroller</cdk:renderer-type>
+ </cc:interface>
+
+ <cc:implementation>
+ <div id="#{clientId}" class="#{component.attributes['styleClass']}" style="#{component.attributes['style']}">
+ <table>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </cc:implementation>
+</cdk:root>
\ No newline at end of file
14 years, 10 months
JBoss Rich Faces SVN: r16487 - root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-02-24 08:39:26 -0500 (Wed, 24 Feb 2010)
New Revision: 16487
Added:
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/tables.faces-config.xml
Removed:
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/faces-config.xml
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/tables.taglib.xml
Log:
Deleted: root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/faces-config.xml
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/faces-config.xml 2010-02-24 13:38:01 UTC (rev 16486)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/faces-config.xml 2010-02-24 13:39:26 UTC (rev 16487)
@@ -1,96 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
-JBoss, Home of Professional Open Source
-Copyright ${year}, Red Hat, Inc. and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-
-This software 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 software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site: http://www.fsf.org.
--->
-<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
- version="2.0">
-
- <component>
- <component-type>org.richfaces.DataTable</component-type>
- <component-class>org.richfaces.component.html.HtmlDataTable</component-class>
- <component-extension>
- <cdk:generate xmlns:cdk="http://richfaces.org/cdk/extensions">false</cdk:generate>
- </component-extension>
- </component>
-
- <component>
- <component-type>org.richfaces.ExtendedDataTable</component-type>
- <component-class>org.richfaces.component.html.HtmlExtendedDataTable</component-class>
- <component-extension>
- <cdk:generate xmlns:cdk="http://richfaces.org/cdk/extensions">false</cdk:generate>
- </component-extension>
- </component>
- <component>
- <component-type>org.richfaces.Column</component-type>
- <component-class>org.richfaces.component.html.HtmlColumn</component-class>
- <component-extension>
- <cdk:generate xmlns:cdk="http://richfaces.org/cdk/extensions">false</cdk:generate>
- </component-extension>
- </component>
- <component>
- <component-type>org.richfaces.ColumnGroup</component-type>
- <component-class>org.richfaces.component.html.HtmlColumnGroup</component-class>
- <component-extension>
- <cdk:generate xmlns:cdk="http://richfaces.org/cdk/extensions">false</cdk:generate>
- </component-extension>
- </component>
- <component>
- <component-type>org.richfaces.SubTable</component-type>
- <component-class>org.richfaces.component.html.HtmlSubTable</component-class>
- <component-extension>
- <cdk:generate xmlns:cdk="http://richfaces.org/cdk/extensions">false</cdk:generate>
- </component-extension>
- </component>
- <component>
- <component-type>org.richfaces.ToggleControl</component-type>
- <component-class>org.richfaces.component.html.HtmlToggleControl</component-class>
- <component-extension>
- <cdk:generate xmlns:cdk="http://richfaces.org/cdk/extensions">false</cdk:generate>
- </component-extension>
- </component>
-
- <render-kit>
- <render-kit-id>HTML_BASIC</render-kit-id>
- <renderer>
- <component-family>org.richfaces.Data</component-family>
- <renderer-type>org.richfaces.DataTableRenderer</renderer-type>
- <renderer-class>org.richfaces.renderkit.DataTableRenderer</renderer-class>
- </renderer>
- <renderer>
- <component-family>org.richfaces.Data</component-family>
- <renderer-type>org.richfaces.SubTableRenderer</renderer-type>
- <renderer-class>org.richfaces.renderkit.SubTableRenderer</renderer-class>
- </renderer>
- <renderer>
- <component-family>org.richfaces.Column</component-family>
- <renderer-type>org.richfaces.ColumnGroupRenderer</renderer-type>
- <renderer-class>org.richfaces.renderkit.ColumnGroupRenderer</renderer-class>
- </renderer>
- <renderer>
- <component-family>org.richfaces.Data</component-family>
- <renderer-type>org.richfaces.ExtendedDataTableRenderer</renderer-type>
- <renderer-class>org.richfaces.renderkit.ExtendedDataTableRenderer</renderer-class>
- </renderer>
- </render-kit>
-</faces-config>
\ No newline at end of file
Added: root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/tables.faces-config.xml
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/tables.faces-config.xml (rev 0)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/tables.faces-config.xml 2010-02-24 13:39:26 UTC (rev 16487)
@@ -0,0 +1,96 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+JBoss, Home of Professional Open Source
+Copyright ${year}, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+
+This software 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 software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ version="2.0">
+
+ <component>
+ <component-type>org.richfaces.DataTable</component-type>
+ <component-class>org.richfaces.component.html.HtmlDataTable</component-class>
+ <component-extension>
+ <cdk:generate xmlns:cdk="http://richfaces.org/cdk/extensions">false</cdk:generate>
+ </component-extension>
+ </component>
+
+ <component>
+ <component-type>org.richfaces.ExtendedDataTable</component-type>
+ <component-class>org.richfaces.component.html.HtmlExtendedDataTable</component-class>
+ <component-extension>
+ <cdk:generate xmlns:cdk="http://richfaces.org/cdk/extensions">false</cdk:generate>
+ </component-extension>
+ </component>
+ <component>
+ <component-type>org.richfaces.Column</component-type>
+ <component-class>org.richfaces.component.html.HtmlColumn</component-class>
+ <component-extension>
+ <cdk:generate xmlns:cdk="http://richfaces.org/cdk/extensions">false</cdk:generate>
+ </component-extension>
+ </component>
+ <component>
+ <component-type>org.richfaces.ColumnGroup</component-type>
+ <component-class>org.richfaces.component.html.HtmlColumnGroup</component-class>
+ <component-extension>
+ <cdk:generate xmlns:cdk="http://richfaces.org/cdk/extensions">false</cdk:generate>
+ </component-extension>
+ </component>
+ <component>
+ <component-type>org.richfaces.SubTable</component-type>
+ <component-class>org.richfaces.component.html.HtmlSubTable</component-class>
+ <component-extension>
+ <cdk:generate xmlns:cdk="http://richfaces.org/cdk/extensions">false</cdk:generate>
+ </component-extension>
+ </component>
+ <component>
+ <component-type>org.richfaces.ToggleControl</component-type>
+ <component-class>org.richfaces.component.html.HtmlToggleControl</component-class>
+ <component-extension>
+ <cdk:generate xmlns:cdk="http://richfaces.org/cdk/extensions">false</cdk:generate>
+ </component-extension>
+ </component>
+
+ <render-kit>
+ <render-kit-id>HTML_BASIC</render-kit-id>
+ <renderer>
+ <component-family>org.richfaces.Data</component-family>
+ <renderer-type>org.richfaces.DataTableRenderer</renderer-type>
+ <renderer-class>org.richfaces.renderkit.DataTableRenderer</renderer-class>
+ </renderer>
+ <renderer>
+ <component-family>org.richfaces.Data</component-family>
+ <renderer-type>org.richfaces.SubTableRenderer</renderer-type>
+ <renderer-class>org.richfaces.renderkit.SubTableRenderer</renderer-class>
+ </renderer>
+ <renderer>
+ <component-family>org.richfaces.Column</component-family>
+ <renderer-type>org.richfaces.ColumnGroupRenderer</renderer-type>
+ <renderer-class>org.richfaces.renderkit.ColumnGroupRenderer</renderer-class>
+ </renderer>
+ <renderer>
+ <component-family>org.richfaces.Data</component-family>
+ <renderer-type>org.richfaces.ExtendedDataTableRenderer</renderer-type>
+ <renderer-class>org.richfaces.renderkit.ExtendedDataTableRenderer</renderer-class>
+ </renderer>
+ </render-kit>
+</faces-config>
\ No newline at end of file
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/tables.taglib.xml
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/tables.taglib.xml 2010-02-24 13:38:01 UTC (rev 16486)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/tables.taglib.xml 2010-02-24 13:39:26 UTC (rev 16487)
@@ -46,4 +46,5 @@
<renderer-type>org.richfaces.ToggleControlRenderer</renderer-type>
</component>
</tag>
+
</facelet-taglib>
14 years, 10 months
JBoss Rich Faces SVN: r16486 - in root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces: renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-02-24 08:38:01 -0500 (Wed, 24 Feb 2010)
New Revision: 16486
Removed:
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIDataScroller.java
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/DataScrollerRenderBase.java
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
Log:
Deleted: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIDataScroller.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIDataScroller.java 2010-02-24 05:13:20 UTC (rev 16485)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UIDataScroller.java 2010-02-24 13:38:01 UTC (rev 16486)
@@ -1,9 +0,0 @@
-package org.richfaces.component;
-
-import javax.faces.component.UIComponentBase;
-
-public abstract class UIDataScroller extends UIComponentBase {
-
- public abstract String getForId();
-
-}
Deleted: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/DataScrollerRenderBase.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/DataScrollerRenderBase.java 2010-02-24 05:13:20 UTC (rev 16485)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/DataScrollerRenderBase.java 2010-02-24 13:38:01 UTC (rev 16486)
@@ -1,28 +0,0 @@
-package org.richfaces.renderkit;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.renderkit.RendererBase;
-import org.richfaces.component.UIDataScroller;
-import org.richfaces.component.UISubTable;
-
-public class DataScrollerRenderBase extends RendererBase{
-
- @Override
- protected void doDecode(FacesContext context, UIComponent component) {
-
- }
-
- protected UISubTable findComponent(FacesContext context, UIDataScroller ds) {
- String forId = ds.getForId();
-
- if (forId != null && forId.length() > 0) {
- UIComponent subTable = getUtils().findComponentFor(context, ds, forId);
- if (subTable instanceof UISubTable) {
- return (UISubTable) subTable;
- }
- }
- return null;
- }
-}
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2010-02-24 05:13:20 UTC (rev 16485)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2010-02-24 13:38:01 UTC (rev 16486)
@@ -19,7 +19,6 @@
import org.richfaces.component.Row;
import org.richfaces.component.UIDataTable;
import org.richfaces.component.UIDataTableBase;
-import org.richfaces.component.UISubTable;
import org.richfaces.event.SortingEvent;
import org.richfaces.model.SortMode;
14 years, 10 months
JBoss Rich Faces SVN: r16485 - in root/docs/trunk: Component_Development_Kit_Guide/en-US and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2010-02-24 00:13:20 -0500 (Wed, 24 Feb 2010)
New Revision: 16485
Modified:
root/docs/trunk/Component_Development_Kit_Guide/en-US/Author_Group.xml
root/docs/trunk/Component_Development_Kit_Guide/publican.cfg
root/docs/trunk/Component_Reference/en-US/Author_Group.xml
root/docs/trunk/Component_Reference/en-US/Preface.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Common_features.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Containers.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Drag_and_drop.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Functionality_extension.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Functions.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Layout_and_appearance.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Menus_and_toolbars.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Output_and_messages.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Panels_and_containers.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Portals.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Processing_management.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Resources.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Rich_inputs.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Selection_and_ordering.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Tables_and_grids.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Trees.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Validation.xml
root/docs/trunk/Component_Reference/publican.cfg
root/docs/trunk/Developer_Guide/en-US/Author_Group.xml
root/docs/trunk/Developer_Guide/en-US/Revision_History.xml
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Advanced_features.xml
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Basic_concepts.xml
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Getting_started_with_RichFaces.xml
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-RichFaces_overview.xml
root/docs/trunk/Developer_Guide/publican.cfg
root/docs/trunk/Migration_Guide/en-US/Author_Group.xml
root/docs/trunk/Migration_Guide/publican.cfg
Log:
Fixed issues with author names, standardized Component Reference, prepared Developer Guide for review
Modified: root/docs/trunk/Component_Development_Kit_Guide/en-US/Author_Group.xml
===================================================================
--- root/docs/trunk/Component_Development_Kit_Guide/en-US/Author_Group.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Development_Kit_Guide/en-US/Author_Group.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -3,16 +3,59 @@
<!ENTITY % BOOK_ENTITIES SYSTEM "Component_Development_Kit_Guide.ent">
%BOOK_ENTITIES;
]>
-
<authorgroup>
<author>
<firstname>Sean</firstname>
<surname>Rogers</surname>
+ <contrib>Documentation lead for 4.0</contrib>
<affiliation>
- <orgname>Red Hat</orgname>
+ <shortaffil>Red Hat</shortaffil>
+ <jobtitle>Content Author</jobtitle>
<orgdiv>Engineering Content Services</orgdiv>
</affiliation>
<email>serogers(a)redhat.com</email>
</author>
+ <collab>
+ <collabname>Svetlana Mukhina</collabname>
+ <affiliation>
+ <orgname>Exadel</orgname>
+ <orgdiv>Documentation</orgdiv>
+ </affiliation>
+ </collab>
+ <collab>
+ <collabname>Anastasiya Bogachuk</collabname>
+ <affiliation>
+ <orgname>Exadel</orgname>
+ <orgdiv>Documentation</orgdiv>
+ </affiliation>
+ </collab>
+ <collab>
+ <collabname>Gleb Galkin</collabname>
+ <affiliation>
+ <orgname>Exadel</orgname>
+ <orgdiv>Documentation</orgdiv>
+ </affiliation>
+ </collab>
+ <collab>
+ <collabname>Mikhail Sorokin</collabname>
+ <affiliation>
+ <orgname>Exadel</orgname>
+ <orgdiv>Documentation</orgdiv>
+ </affiliation>
+ </collab>
+ <collab>
+ <collabname>Alexander Tsebro</collabname>
+ <affiliation>
+ <orgname>Exadel</orgname>
+ <orgdiv>Documentation</orgdiv>
+ </affiliation>
+ </collab>
+ <collab>
+ <collabname>Olga Chikvina</collabname>
+ <affiliation>
+ <orgname>Exadel</orgname>
+ <orgdiv>Documentation</orgdiv>
+ </affiliation>
+ </collab>
</authorgroup>
Modified: root/docs/trunk/Component_Development_Kit_Guide/publican.cfg
===================================================================
--- root/docs/trunk/Component_Development_Kit_Guide/publican.cfg 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Development_Kit_Guide/publican.cfg 2010-02-24 05:13:20 UTC (rev 16485)
@@ -4,4 +4,4 @@
show_remarks: 1
debug: 1
xml_lang: en-US
-
+#brand: jboss-community-richfaces
Modified: root/docs/trunk/Component_Reference/en-US/Author_Group.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/Author_Group.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/Author_Group.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -1,5 +1,7 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE authorgroup PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "Component_Reference.ent">
+%BOOK_ENTITIES;
]>
<authorgroup>
<author>
@@ -7,70 +9,53 @@
<surname>Rogers</surname>
<contrib>Documentation lead for 4.0</contrib>
<affiliation>
- <orgname>Red Hat</orgname>
+ <shortaffil>Red Hat</shortaffil>
+ <jobtitle>Content Author</jobtitle>
<orgdiv>Engineering Content Services</orgdiv>
</affiliation>
<email>serogers(a)redhat.com</email>
</author>
- <author>
- <firstname>Svetlana</firstname>
- <surname>Mukhina</surname>
- <contrib>Documentation lead for 3.3</contrib>
+ <collab>
+ <collabname>Svetlana Mukhina</collabname>
<affiliation>
<orgname>Exadel</orgname>
<orgdiv>Documentation</orgdiv>
</affiliation>
- <email>smukhina(a)exadel.com</email>
- </author>
- <author>
- <firstname>Anastasiya</firstname>
- <surname>Bogachuk</surname>
- <contrib>Documentation for 3.3</contrib>
+ </collab>
+ <collab>
+ <collabname>Anastasiya Bogachuk</collabname>
<affiliation>
<orgname>Exadel</orgname>
<orgdiv>Documentation</orgdiv>
</affiliation>
- <email>abogachuk(a)exadel.com</email>
- </author>
- <author>
- <firstname>Gleb</firstname>
- <surname>Galkin</surname>
- <contrib>Documentation for 3.3</contrib>
+ </collab>
+ <collab>
+ <collabname>Gleb Galkin</collabname>
<affiliation>
<orgname>Exadel</orgname>
<orgdiv>Documentation</orgdiv>
</affiliation>
- <email>ggalkin(a)exadel.com</email>
- </author>
- <author>
- <firstname>Mikhail</firstname>
- <surname>Sorokin</surname>
- <contrib>Documentation for 3.3</contrib>
+ </collab>
+ <collab>
+ <collabname>Mikhail Sorokin</collabname>
<affiliation>
<orgname>Exadel</orgname>
<orgdiv>Documentation</orgdiv>
</affiliation>
- <email>msorokin(a)exadel.com</email>
- </author>
- <author>
- <firstname>Alexander</firstname>
- <surname>Tsebro</surname>
- <contrib>Documentation for 3.3</contrib>
+ </collab>
+ <collab>
+ <collabname>Alexander Tsebro</collabname>
<affiliation>
<orgname>Exadel</orgname>
<orgdiv>Documentation</orgdiv>
</affiliation>
- <email>atsebro(a)exadel.com</email>
- </author>
- <author>
- <firstname>Olga</firstname>
- <surname>Chikvina</surname>
- <contrib>Documentation for 3.3</contrib>
+ </collab>
+ <collab>
+ <collabname>Olga Chikvina</collabname>
<affiliation>
<orgname>Exadel</orgname>
<orgdiv>Documentation</orgdiv>
</affiliation>
- <email>ochikvina(a)exadel.com</email>
- </author>
+ </collab>
</authorgroup>
Modified: root/docs/trunk/Component_Reference/en-US/Preface.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/Preface.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/Preface.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -3,13 +3,23 @@
]>
<preface id="pref-Component_Reference-Preface">
<title>Preface</title>
- <!-- FOR JDOCBOOK --><xi:include href="Common_Content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><!-- FOR PUBLICAN --><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="fallback_content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- </xi:fallback>
+ <!--FOR JDOCBOOK-->
+ <xi:include href="Common_Content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <!--FOR PUBLICAN-->
+ <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include href="fallback_content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ </xi:fallback>
</xi:include>
- <!-- PUBLICAN'S ORIGINAL XINCLUDES --><xi:include href="Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="Common_Content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><!-- FOR JDOCBOOK --><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="fallback_content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- </xi:fallback>
+ <!--PUBLICAN'S ORIGINAL XINCLUDES-->
+ <xi:include href="Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include href="Common_Content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <!--FOR JDOCBOOK-->
+ <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include href="fallback_content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ </xi:fallback>
+ </xi:include>
+ </xi:fallback>
</xi:include>
- </xi:fallback>
- </xi:include>
</preface>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -7,7 +7,7 @@
This chapter details the basic components that respond to a user action and submit an Ajax request.
</para>
<section id="sect-Component_Reference-Actions-a4jactionParam">
- <title><a4j:actionParam></title>
+ <title><sgmltag><a4j:actionParam></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -47,7 +47,7 @@
<xref linkend="exam-Component_Reference-a4jactionParam-a4jactionParam_example" /> shows a simple implementation along with the accompanying managed bean. When the <guibutton>Set name to Alex</guibutton> button is pressed, the application sets the <varname>name</varname> parameter of the bean to <literal>Alex</literal>, and displays the name in the output field.
</para>
<example id="exam-Component_Reference-a4jactionParam-a4jactionParam_example">
- <title><a4j:actionParam> example</title>
+ <title><sgmltag><a4j:actionParam></sgmltag> example</title>
<programlisting language="XML" role="XML">
<xi:include href="extras/exam-Component_Reference-a4jactionParam-a4jactionParam_example.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
@@ -75,7 +75,29 @@
</section>
<section id="sect-Component_Reference-Actions-a4jajax">
- <title>a4j:ajax</title>
+ <title><sgmltag><a4j:ajax></sgmltag></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.Support</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.ajax4jsf.AjaxSupport</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.HtmlAjaxSupport</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.components.AjaxSupportRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
The <sgmltag><a4j:ajax></sgmltag> component allows Ajax capability to be added to any non-Ajax component. It is placed as a direct child to the component that requires Ajax support. The <sgmltag><a4j:ajax></sgmltag> component uses the common attributes listed in <xref linkend="chap-Component_Reference-Common_Ajax_attributes" />.
</para>
@@ -88,7 +110,7 @@
</section>
<section id="sect-Component_Reference-Actions-a4jajaxListener">
- <title>a4j:ajaxListener</title>
+ <title><sgmltag><a4j:ajaxListener></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -118,7 +140,7 @@
</section>
<section id="sect-Component_Reference-Actions-a4jcommandButton">
- <title><a4j:commandButton></title>
+ <title><sgmltag><a4j:commandButton></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -156,7 +178,7 @@
</section>
<section id="sect-Component_Reference-Actions-a4jcommandLink">
- <title><a4j:commandLink></title>
+ <title><sgmltag><a4j:commandLink></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -188,7 +210,7 @@
</section>
<section id="sect-Component_Reference-Actions-a4jhtmlCommandLink">
- <title><a4j:htmlCommandLink></title>
+ <title><sgmltag><a4j:htmlCommandLink></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -220,7 +242,7 @@
</section>
<section id="sect-Component_Reference-Actions-a4jjsFunction">
- <title><a4j:jsFunction></title>
+ <title><sgmltag><a4j:jsFunction></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -250,7 +272,7 @@
The <sgmltag><a4j:jsFunction></sgmltag> component has all the common Ajax action attributes as listed in <xref linkend="chap-Component_Reference-Common_Ajax_attributes" />; the <varname>action</varname> and <varname>actionListener</varname> attributes can be invoked and parts of the page can be re-rendered after a successful call to the JavaScript function. <xref linkend="exam-Component_Reference-a4jjsFunction-a4jjsFunction_example" /> shows how an Ajax request can be initiated from the JavaScript and a partial page update performed. The JavaScript function can be invoked with the data returned by the Ajax response.
</para>
<example id="exam-Component_Reference-a4jjsFunction-a4jjsFunction_example">
- <title><a4j:jsFunction> example</title>
+ <title><sgmltag><a4j:jsFunction></sgmltag> example</title>
<programlisting language="XML" role="XML">
<xi:include href="extras/exam-Component_Reference-a4jjsFunction-a4jjsFunction_example.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" />
@@ -265,7 +287,7 @@
</section>
<section id="sect-Component_Reference-Actions-a4jpoll">
- <title><a4j:poll></title>
+ <title><sgmltag><a4j:poll></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -303,7 +325,7 @@
</section>
<section id="sect-Component_Reference-Actions-a4jpush">
- <title><a4j:push></title>
+ <title><sgmltag><a4j:push></sgmltag></title>
<itemizedlist>
<listitem>
<para>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Common_features.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Common_features.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Common_features.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -13,7 +13,7 @@
</para>
<variablelist>
<varlistentry>
- <term>disabled</term>
+ <term><varname>disabled</varname></term>
<listitem>
<para>
Specifies whether the component is disabled, which disallows user interaction.
@@ -21,7 +21,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term>focus</term>
+ <term><varname>focus</varname></term>
<listitem>
<para>
References the <varname>id</varname> of an element on which to focus after a request is completed on the client side.
@@ -29,7 +29,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term>height</term>
+ <term><varname>height</varname></term>
<listitem>
<para>
The height of the component in pixels.
@@ -37,7 +37,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term>dir</term>
+ <term><varname>dir</varname></term>
<listitem>
<para>
Specifies the direction in which to display text that does not inherit its writing direction. Valid values are <literal>LTR</literal> (left-to-right) and <literal>RTL</literal> (right-to-left).
@@ -45,7 +45,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term>style</term>
+ <term><varname>style</varname></term>
<listitem>
<para>
Specifies Cascading Style Sheet (<acronym>CSS</acronym>) styles to apply to the component.
@@ -53,7 +53,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term>styleClass</term>
+ <term><varname>styleClass</varname></term>
<listitem>
<para>
Specifies one or more <acronym>CSS</acronym> class names to apply to the component.
@@ -61,7 +61,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term>width</term>
+ <term><varname>width</varname></term>
<listitem>
<para>
The width of the component in pixels.
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Containers.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Containers.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Containers.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -7,7 +7,7 @@
This chapter details those components in the <classname>a4j</classname> tag library which define an area used as a container or wrapper for other components.
</para>
<section id="sect-Component_Reference-Containers-a4jform">
- <title><a4j:form></title>
+ <title><sgmltag><a4j:form></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -54,7 +54,7 @@
</section>
<section id="sect-Component_Reference-Containers-a4jinclude">
- <title>a4j:include</title>
+ <title><sgmltag><a4j:include></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -110,7 +110,7 @@
</section>
<section id="sect-Component_Reference-Containers-a4joutputPanel">
- <title><a4j:outputPanel></title>
+ <title><sgmltag><a4j:outputPanel></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -162,7 +162,7 @@
</section>
<section id="sect-Component_Reference-Containers-a4jregion">
- <title><a4j:region></title>
+ <title><sgmltag><a4j:region></sgmltag></title>
<itemizedlist>
<listitem>
<para>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Drag_and_drop.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Drag_and_drop.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Drag_and_drop.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -7,42 +7,42 @@
Incomplete
</para>
<section id="sect-Component_Reference-Drag_and_drop-richdragIndicator">
- <title>rich:dragIndicator</title>
+ <title><sgmltag><rich:dragIndicator></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Drag_and_drop-richdragSupport">
- <title>rich:dragSupport</title>
+ <title><sgmltag><rich:dragSupport></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Drag_and_drop-richdropSupport">
- <title>rich:dropSupport</title>
+ <title><sgmltag><rich:dropSupport></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Drag_and_drop-richdragListener">
- <title>rich:dragListener</title>
+ <title><sgmltag><rich:dragListener></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Drag_and_drop-richdropListener">
- <title>rich:dropListener</title>
+ <title><sgmltag><rich:dropListener></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Drag_and_drop-richdndParam">
- <title>rich:dndParam</title>
+ <title><sgmltag><rich:dndParam></sgmltag></title>
<para>
Incomplete
</para>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Functionality_extension.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Functionality_extension.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Functionality_extension.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -7,28 +7,28 @@
Incomplete
</para>
<section id="sect-Component_Reference-Functionality_extension-richcomponentControl">
- <title>rich:componentControl</title>
+ <title><sgmltag><rich:componentControl></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Functionality_extension-richgmap">
- <title>rich:gmap</title>
+ <title><sgmltag><rich:gmap></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Functionality_extension-richhotkey">
- <title>rich:hotkey</title>
+ <title><sgmltag><rich:hotkey></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Functionality_extension-richvirtualEarth">
- <title>rich:virtualEarth</title>
+ <title><sgmltag><rich:virtualEarth></sgmltag></title>
<para>
Incomplete
</para>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Functions.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Functions.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Functions.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -7,35 +7,35 @@
Incomplete
</para>
<section id="sect-Component_Reference-Functions-richclientID">
- <title><rich:clientID></title>
+ <title><sgmltag><rich:clientID></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Functions-richcomponent">
- <title><rich:component></title>
+ <title><sgmltag><rich:component></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Functions-richelement">
- <title><rich:element></title>
+ <title><sgmltag><rich:element></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Functions-richfindComponent">
- <title><rich:findComponent></title>
+ <title><sgmltag><rich:findComponent></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Functions-richisUserInRole">
- <title><rich:isUserInRole></title>
+ <title><sgmltag><rich:isUserInRole></sgmltag></title>
<para>
Incomplete
</para>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Layout_and_appearance.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Layout_and_appearance.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Layout_and_appearance.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -7,49 +7,49 @@
Incomplete
</para>
<section id="sect-Component_Reference-Layout_and_appearance-richeffect">
- <title>rich:effect</title>
+ <title><sgmltag><rich:effect></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Layout_and_appearance-richjQuery">
- <title>rich:jQuery</title>
+ <title><sgmltag><rich:jQuery></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Layout_and_appearance-richseparator">
- <title>rich:separator</title>
+ <title><sgmltag><rich:separator></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Layout_and_appearance-richspacer">
- <title>rich:spacer</title>
+ <title><sgmltag><rich:spacer></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Layout_and_appearance-richpage">
- <title>rich:page</title>
+ <title><sgmltag><rich:page></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Layout_and_appearance-richlayout">
- <title>rich:layout</title>
+ <title><sgmltag><rich:layout></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Layout_and_appearance-richlayoutPanel">
- <title>rich:layoutPanel</title>
+ <title><sgmltag><rich:layoutPanel></sgmltag></title>
<para>
Incomplete
</para>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Menus_and_toolbars.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Menus_and_toolbars.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Menus_and_toolbars.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -7,42 +7,42 @@
Incomplete
</para>
<section id="sect-Component_Reference-Menus_and_toolbars-richcontextMenu">
- <title>rich:contextMenu</title>
+ <title><sgmltag><rich:contextMenu></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Menus_and_toolbars-richdropDownMenu">
- <title>rich:dropDownMenu</title>
+ <title><sgmltag><rich:dropDownMenu></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Menus_and_toolbars-richmenuGroup">
- <title>rich:menuGroup</title>
+ <title><sgmltag><rich:menuGroup></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Menus_and_toolbars-richmenuItem">
- <title>rich:menuItem</title>
+ <title><sgmltag><rich:menuItem></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Menus_and_toolbars-richmenuSeparator">
- <title>rich:menuSeparator</title>
+ <title><sgmltag><rich:menuSeparator></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Menus_and_toolbars-richpanelMenu">
- <title><rich:panelMenu></title>
+ <title><sgmltag><rich:panelMenu></sgmltag></title>
<para>
The <classname><rich:panelMenu></classname> component can be used in conjunction with <classname><rich:panelMenuItem></classname> and <classname><rich:panelMenuGroup></classname> to create an expanding, hierarchical menu. The <classname><rich:panelMenu></classname> component's appearance can be highly customized, and the hierarchy can stretch to any number of sub-levels.
</para>
@@ -75,7 +75,7 @@
</section>
<section id="sect-Component_Reference-Menus_and_toolbars-richpanelMenuGroup">
- <title><rich:panelMenuGroup></title>
+ <title><sgmltag><rich:panelMenuGroup></sgmltag></title>
<para>
The <classname><rich:panelMenuGroup></classname> component defines a group of <classname><rich:panelMenuItem></classname> components inside a <classname><rich:panelMenu></classname>.
</para>
@@ -86,7 +86,7 @@
Icons for the menu group can be chosen from a set of standard icons. There are three attributes that relate to the different menu states that the icon represents: <code>iconExpanded</code>, <code>iconCollapsed</code>, and <code>iconDisabled</code>. The standard icons are shown in <xref linkend="figu-Component_Reference-richpanelMenuGroup-Standard_icons" />.
</para>
<figure id="figu-Component_Reference-richpanelMenuGroup-Standard_icons">
- <title>Standard icons</title>
+ <title><sgmltag><Standard icons></sgmltag></title>
<mediaobject>
<imageobject>
<imagedata fileref="images/figu-Component_Reference-richpanelMenuGroup-Standard_icons.png" format="PNG" />
@@ -110,7 +110,7 @@
</section>
<section id="sect-Component_Reference-Menus_and_toolbars-richpanelMenuItem">
- <title><rich:panelMenuItem></title>
+ <title><sgmltag><rich:panelMenuItem></sgmltag></title>
<para>
The <classname><rich:panelMenuItem></classname> component represents a single item inside a <classname><rich:panelMenuGroup></classname> component, which is in turn part of a <classname><rich:panelMenu></classname> component.
</para>
@@ -145,14 +145,14 @@
</section>
<section id="sect-Component_Reference-Menus_and_toolbars-richtoolBar">
- <title>rich:toolBar</title>
+ <title><sgmltag><rich:toolBar></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Menus_and_toolbars-richtoolBarGroup">
- <title>rich:toolBarGroup</title>
+ <title><sgmltag><rich:toolBarGroup></sgmltag></title>
<para>
Incomplete
</para>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Output_and_messages.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Output_and_messages.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Output_and_messages.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -7,35 +7,35 @@
Incomplete
</para>
<section id="sect-Component_Reference-Output_and_messages-richmessage">
- <title>rich:message</title>
+ <title><sgmltag><rich:message></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Output_and_messages-richmessages">
- <title>rich:messages</title>
+ <title><sgmltag><rich:messages></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Output_and_messages-richpaint2D">
- <title>rich:paint2D</title>
+ <title><sgmltag><rich:paint2D></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Output_and_messages-richprogressBar">
- <title>rich:progressBar</title>
+ <title><sgmltag><rich:progressBar></sgmltag></title>
<para>
The <sgmltag><rich:progressBar></sgmltag> component displays a progress bar to indicate the status of a process to the user. It can update either through Ajax or on the client side, and the look and feel can be fully customized.
</para>
</section>
<section id="sect-Component_Reference-Output_and_messages-richtoolTip">
- <title>rich:toolTip</title>
+ <title><sgmltag><rich:toolTip></sgmltag></title>
<para>
Incomplete
</para>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Panels_and_containers.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Panels_and_containers.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Panels_and_containers.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -7,7 +7,7 @@
This chapter details those components which act as panels and containers to hold groups of other components.
</para>
<section id="sect-Component_Reference-Panels_and_containers-richmodalPanel">
- <title><rich:modalPanel></title>
+ <title><sgmltag><rich:modalPanel></sgmltag></title>
<para>
The <sgmltag><rich:modalPanel></sgmltag> component provides a modal panel or window that blocks interaction with the rest of the application while active. It can be easily positioned on the screen, dragged to a new position by the user, and re-sized.
</para>
@@ -24,7 +24,7 @@
If <code>showWhenRendered="true"</code> then the modal panel will display when the page is first loaded.
</para>
<example id="exam-Component_Reference-richmodalPanel-richmodalPanel_example">
- <title><rich:modalPanel> example</title>
+ <title><sgmltag><rich:modalPanel></sgmltag> example</title>
<programlisting language="XML" role="XML">
<a onclick="Richfaces.showModalPanel('pnl');" href="#">Show ModalPanel</a>
@@ -38,7 +38,7 @@
</section>
<section id="sect-Component_Reference-Panels_and_containers-richpanel">
- <title><rich:panel></title>
+ <title><sgmltag><rich:panel></sgmltag></title>
<para>
The <sgmltag><rich:panel></sgmltag> component is a bordered panel with an optional header.
</para>
@@ -48,21 +48,21 @@
</section>
<section id="sect-Component_Reference-Panels_and_containers-richpanelBar">
- <title><rich:panelBar></title>
+ <title><sgmltag><rich:panelBar></sgmltag></title>
<para>
The <sgmltag><rich:panelBar></sgmltag> is a series of panels stacked on top of each other, each collapsed such that only the header of the panel is showing. When the header of a panel is clicked, it is expanded to show the content of the panel. Clicking on a different header will collapse the previous panel and epand the selected one. Another name for the component is "accordion". Each panel in contained in a <sgmltag><rich:panelBar></sgmltag> component is a <sgmltag><rich:panelBarItem></sgmltag> component.
</para>
</section>
<section id="sect-Component_Reference-Panels_and_containers-richpanelBarItem">
- <title><rich:panelBarItem></title>
+ <title><sgmltag><rich:panelBarItem></sgmltag></title>
<para>
The <sgmltag><rich:panelBarItem></sgmltag> component is a panel for use with the <sgmltag><rich:panelBar></sgmltag> component.
</para>
</section>
<section id="sect-Component_Reference-Panels_and_containers-richsimpleTogglePanel">
- <title><rich:simpleTogglePanel></title>
+ <title><sgmltag><rich:simpleTogglePanel></sgmltag></title>
<para>
The <sgmltag><rich:simpleTogglePanel></sgmltag> component is a collapsible panel that shows or hides content when the header bar is activated. It is a simplified version of <sgmltag><rich:togglePanel></sgmltag> component.
</para>
@@ -98,7 +98,7 @@
</section>
<section id="sect-Component_Reference-Panels_and_containers-richtabPanel">
- <title><rich:tabPanel></title>
+ <title><sgmltag><rich:tabPanel></sgmltag></title>
<para>
The <sgmltag><rich:tabPanel></sgmltag> component provides a set of tabbed panels for displaying one panel of content at a time. The tabs can be highly customized and themed.
</para>
@@ -137,7 +137,7 @@
</section>
<section id="sect-Component_Reference-Panels_and_containers-richtab">
- <title><rich:tab></title>
+ <title><sgmltag><rich:tab></sgmltag></title>
<para>
The <sgmltag><rich:tab></sgmltag> component represents an individual tab inside a <sgmltag><rich:tabPanel></sgmltag> component, including the tab's content. Clicking on the tab header will bring its corresponding content to the front of other tabs.
</para>
@@ -156,7 +156,7 @@
</section>
<section id="sect-Component_Reference-Panels_and_containers-richtogglePanel">
- <title><rich:togglePanel></title>
+ <title><sgmltag><rich:togglePanel></sgmltag></title>
<para>
The <sgmltag><rich:togglePanel></sgmltag> component is a wrapper component with named facets. Each facet is displayed after activating a corresponding <sgmltag><rich:toggleControl></sgmltag> component.
</para>
@@ -187,7 +187,7 @@
</section>
<section id="sect-Component_Reference-Panels_and_containers-richtoggleControl">
- <title><rich:toggleControl></title>
+ <title><sgmltag><rich:toggleControl></sgmltag></title>
<para>
The <sgmltag><rich:toggleControl></sgmltag> component works with a <sgmltag><rich:togglePanel></sgmltag> component to switch between panel states. It can be located either inside or outside the <sgmltag><rich:togglePanel></sgmltag> component, and can be used to switch to a specific state or cycle through a set of states.
</para>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Portals.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Portals.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Portals.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -7,7 +7,7 @@
Incomplete
</para>
<section id="sect-Component_Reference-Portals-a4jportlet">
- <title>a4j:portlet</title>
+ <title><sgmltag><a4j:portlet></sgmltag></title>
<para>
Incomplete
</para>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Processing_management.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Processing_management.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Processing_management.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -7,7 +7,7 @@
This chapter covers those components that manage the processing of information, requests, and updates.
</para>
<section id="sect-Component_Reference-Processing_management-a4jqueue">
- <title><a4j:queue></title>
+ <title><sgmltag><a4j:queue></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -96,7 +96,7 @@
</section>
<section id="sect-Component_Reference-Processing_management-a4jlog">
- <title><a4j:log></title>
+ <title><sgmltag><a4j:log></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -171,7 +171,7 @@
</section>
<section id="sect-Component_Reference-Processing_management-a4jstatus">
- <title><a4j:status></title>
+ <title><sgmltag><a4j:status></sgmltag></title>
<itemizedlist>
<listitem>
<para>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Resources.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Resources.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Resources.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -7,7 +7,7 @@
This chapter covers those components used to handle and manage resources and beans.
</para>
<section id="sect-Component_Reference-Resources-a4jloadBundle">
- <title><a4j:loadBundle></title>
+ <title><sgmltag><a4j:loadBundle></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -85,7 +85,7 @@
</section>
<section id="sect-Component_Reference-Resources-a4jloadScript">
- <title><a4j:loadScript></title>
+ <title><sgmltag><a4j:loadScript></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -124,7 +124,7 @@
</section>
<section id="sect-Component_Reference-Resources-a4jloadStyle">
- <title><a4j:loadStyle></title>
+ <title><sgmltag><a4j:loadStyle></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -163,7 +163,7 @@
</section>
<section id="sect-Component_Reference-Resources-a4jkeepAlive">
- <title><a4j:keepAlive></title>
+ <title><sgmltag><a4j:keepAlive></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -200,7 +200,7 @@
</section>
<section id="sect-Component_Reference-Resources-a4jmediaOutput">
- <title><a4j:mediaOutput></title>
+ <title><sgmltag><a4j:mediaOutput></sgmltag></title>
<itemizedlist>
<listitem>
<para>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Rich_inputs.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Rich_inputs.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Rich_inputs.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -7,7 +7,7 @@
This chapter details rich components for user input and interaction.
</para>
<section id="sect-Component_Reference-Rich_inputs-richCalendar">
- <title><rich:Calendar></title>
+ <title><sgmltag><rich:Calendar></sgmltag></title>
<para>
The <sgmltag><rich:calendar></sgmltag> component allows the user to enter a date and time through an in-line or pop-up calendar. The pop-up calendar can navigate through months and years, and its look and feel can be highly customized.
</para>
@@ -84,7 +84,7 @@
</section>
<section id="sect-Component_Reference-Rich_inputs-richcolorPicker">
- <title><rich:colorPicker></title>
+ <title><sgmltag><rich:colorPicker></sgmltag></title>
<para>
The <sgmltag><rich:colorPicker></sgmltag> component allows the selection of a color, either by picking the color from the spectrum, defining it through decimal or hexadecimal <acronym>RGB</acronym> (red-green-blue) values, or defining it through <acronym>HSB</acronym> (hue-saturation-brightness) values. The <sgmltag><rich:colorPicker></sgmltag> component can appear either in-line with a pop-up or flat, and the look and feel can be highly customized.
</para>
@@ -100,7 +100,7 @@
</section>
<section id="sect-Component_Reference-Rich_inputs-richcomboBox">
- <title><rich:comboBox></title>
+ <title><sgmltag><rich:comboBox></sgmltag></title>
<para>
The <sgmltag><rich:comboBox></sgmltag> component is a typical combo-box with built-in Ajax capabilities. It supports client-side suggestions, browser-like selection, Seam entity converter support, and customization of the look and feel.
</para>
@@ -125,7 +125,7 @@
Using the JSF components <sgmltag><f:selectItem></sgmltag> and <sgmltag><f:selectItems></sgmltag> to define a list of items:
</para>
<example id="exam-Component_Reference-richcomboBox-Defining_list_items_for_richinplaceSelect">
- <title>Defining list items for <rich:inplaceSelect></title>
+ <title>Defining list items for <sgmltag><rich:inplaceSelect></sgmltag></title>
<programlisting language="XML" role="XML">
<rich:comboBox value="#{bean.item}" valueChangeListener="#{bean.selectionChanged}" >
@@ -160,14 +160,14 @@
</section>
<section id="sect-Component_Reference-Rich_inputs-richeditor">
- <title><rich:editor></title>
+ <title><sgmltag><rich:editor></sgmltag></title>
<para>
The <sgmltag><rich:editor></sgmltag> component provides a fully-featured word processor. It features manageable global configurations, and support for Seam text, custom plug-ins, and a customized look and feel. The editor is fully based on the TinyMCE JavaScript editor control, supporting all TinyMCE's parameters, and is adapted for the <acronym>JSF</acronym> environment with some additional capabilities.
</para>
</section>
<section id="sect-Component_Reference-Rich_inputs-richfileUpload">
- <title><rich:fileUpload></title>
+ <title><sgmltag><rich:fileUpload></sgmltag></title>
<para>
The <sgmltag><rich:fileUpload></sgmltag> component allows the user to upload files to a server. It features multiple uploads, automatic uploads, progress bars, restrictions on file types and sizes to be uploaded, and an embedded flash module.
</para>
@@ -178,7 +178,7 @@
Basic usage requires the <varname>uploadData</varname> attribute, pointing to the collection of uploaded files.
</para>
<example id="exam-Component_Reference-richfileUpload-Basic_usage_of_richfileUpload">
- <title>Basic usage of <rich:fileUpload></title>
+ <title>Basic usage of <sgmltag><rich:fileUpload></sgmltag></title>
<programlisting language="XML" role="XML">
<rich:fileUpload uploadData="#{bean.data}" />
@@ -249,7 +249,7 @@
</section>
<section id="sect-Component_Reference-Rich_inputs-richinplaceInput">
- <title><rich:inplaceInput></title>
+ <title><sgmltag><rich:inplaceInput></sgmltag></title>
<para>
The <sgmltag><rich:inplaceInput></sgmltag> component allows information to be entered in-line in blocks of text, improving readability of the text. Changes can be rendered either in-line or for the whole block, and inputs can be focused with keyboard navigation. The component has three functional states: the "view" state, where the component displays its initial setting, such as "click to edit"; the "edit" state, where the user can input text; and the "changed" state, where the new value for the component has been confirmed but can be edited again if required.
</para>
@@ -293,7 +293,7 @@
</section>
<section id="sect-Component_Reference-Rich_inputs-richinplaceSelect">
- <title><rich:inplaceSelect></title>
+ <title><sgmltag><rich:inplaceSelect></sgmltag></title>
<para>
The <sgmltag><rich:inplaceSelect></sgmltag> component is similar to the <sgmltag><rich:inplaceInput></sgmltag> component, but the uses a drop-down selection box to enter text instead of a regular text field. Changes can be rendered either in-line or for the whole block, and inputs can be focused with keyboard navigation. The component has three functional states: the "view" state, where the component displays its initial setting, such as "click to edit"; the "edit" state, where the user can select a value from a drop-down list; and the "changed" state, where the new value for the component has been confirmed but can be edited again if required.
</para>
@@ -304,7 +304,7 @@
Basic usage requires the <varname>value</varname> attribute to point to the expression for the current value of the component and a list of items. The list of items can be defined using the JSF components <sgmltag><f:selectItem/></sgmltag> and <sgmltag><f:selectItems/></sgmltag>.
</para>
<example id="exam-Component_Reference-richinplaceSelect-Defining_list_items_for_richinplaceSelect">
- <title>Defining list items for <rich:inplaceSelect></title>
+ <title>Defining list items for <sgmltag><rich:inplaceSelect></sgmltag></title>
<programlisting language="XML" role="XML">
<rich:inplaceSelect value="#{bean.inputValue}" defaultLabel="click to edit" >
@@ -350,7 +350,7 @@
</section>
<section id="sect-Component_Reference-Rich_inputs-richinputNumberSlider">
- <title><rich:inputNumberSlider></title>
+ <title><sgmltag><rich:inputNumberSlider></sgmltag></title>
<para>
The <sgmltag><rich:inputNumberSlider></sgmltag> component provides a slider for changing numerical values. Optional features include a tool-tip to display the value while sliding, and a text field for typing the numerical value which can then be validated against the slider's range.
</para>
@@ -363,7 +363,7 @@
</section>
<section id="sect-Component_Reference-Rich_inputs-richinputNumberSpinner">
- <title><rich:inputNumberSpinner></title>
+ <title><sgmltag><rich:inputNumberSpinner></sgmltag></title>
<para>
The <sgmltag><rich:inputNumberSpinner></sgmltag> component is a single-line input field with buttons to increase and decrease a numerical value. The value can be changed using the corresponding directional keys on a keyboard, or by typing into the field.
</para>
@@ -379,7 +379,7 @@
</section>
<section id="sect-Component_Reference-Rich_inputs-richsuggestionBox">
- <title><rich:suggestionBox></title>
+ <title><sgmltag><rich:suggestionBox></sgmltag></title>
<para>
The <sgmltag><rich:suggestionBox></sgmltag> component adds a feature-rich drop-down list of suggestions to any text input component.
</para>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Selection_and_ordering.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Selection_and_ordering.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Selection_and_ordering.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -8,7 +8,7 @@
</para>
<section id="sect-Component_Reference-Trees-richlistShuttle">
- <title>rich:listShuttle</title>
+ <title><sgmltag><rich:listShuttle></sgmltag></title>
<para>
The <sgmltag><rich:listShuttle></sgmltag> component is used for moving select items from one list into another. Items can optionally be re-ordered. It supports selection of multiple items, keyboard usage, and a customizable look and feel.
</para>
@@ -18,14 +18,14 @@
</section>
<section id="sect-Component_Reference-Trees-richorderingList">
- <title>rich:orderingList</title>
+ <title><sgmltag><rich:orderingList></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Trees-richpickList">
- <title>rich:pickList</title>
+ <title><sgmltag><rich:pickList></sgmltag></title>
<para>
Incomplete
</para>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Tables_and_grids.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Tables_and_grids.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Tables_and_grids.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -7,7 +7,7 @@
This chapter covers all components related to the display of tables and grids.
</para>
<section id="sect-Component_Reference-Tables_and_grids-richcolumn">
- <title>rich:column</title>
+ <title><sgmltag><rich:column></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -143,7 +143,7 @@
</section>
<section id="sect-Component_Reference-Tables_and_grids-richcolumnGroup">
- <title>rich:columnGroup</title>
+ <title><sgmltag><rich:columnGroup></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -227,7 +227,7 @@
</section>
<section id="sect-Component_Reference-Tables_and_grids-richcolumns">
- <title>rich:columns</title>
+ <title><sgmltag><rich:columns></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -269,7 +269,7 @@
The <sgmltag><rich:columns></sgmltag> component can be used alongside <sgmltag><rich:column></sgmltag> components.
</para>
<example id="exam-Component_Reference-richcolumns-Using_richcolumns_and_richcolumn_together">
- <title>Using <rich:columns> and <rich:column> together</title>
+ <title>Using <sgmltag><rich:columns></sgmltag> and <sgmltag><rich:column></sgmltag> together</title>
<programlisting language="XML" role="XML">
<rich:dataTable value="#{dataTableScrollerBean.model}" var="model" width="500px" rows="5">
<f:facet name="header">
@@ -302,14 +302,14 @@
</section>
<section id="sect-Component_Reference-Trees-richdataDefinitionList">
- <title>rich:dataDefinitionList</title>
+ <title><sgmltag><rich:dataDefinitionList></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Tables_and_grids-richdataFilterSlider">
- <title>rich:dataFilterSlider</title>
+ <title><sgmltag><rich:dataFilterSlider></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -352,7 +352,7 @@
</section>
<section id="sect-Component_Reference-Tables_and_grids-richdataGrid">
- <title>rich:dataGrid</title>
+ <title><sgmltag><rich:dataGrid></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -384,7 +384,7 @@
The <sgmltag><rich:dataGrid></sgmltag> component is used to arrange data objects in a grid. Values in the grid can be updated dynamically from the data model, and Ajax updates can be limited to specific rows. The component supports <literal>header</literal>, <literal>footer</literal>, and <literal>caption</literal> facets.
</para>
<figure id="figu-Component_Reference-richdataGrid-The_richdataGrid_component">
- <title>The rich:dataGrid component</title>
+ <title>The <sgmltag><rich:dataGrid></sgmltag> component</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/figu-Component_Reference-richdataGrid-The_richdataGrid_component.png" format="PNG" />
@@ -400,7 +400,7 @@
The <sgmltag><rich:dataGrid></sgmltag> component requires the <varname>value</varname> attribute, which points to the data model, and the <varname>var</varname> attribute, which holds the current variable for the collection of data. The number of columns for the grid is specifed with the <varname>columns</varname> attribute, and the number of elements to layout among the columns is determined with the <varname>elements</varname> attribute. The <varname>first</varname> attribute references the zero-based element in the data model from which the grid starts.
</para>
<example id="exam-Component_Reference-richdataGrid-richdataGrid_example">
- <title>rich:dataGrid example</title>
+ <title><sgmltag><rich:dataGrid></sgmltag> example</title>
<programlisting language="XML" role="XML">
<xi:include parse="text" href="extras/exam-Component_Reference-richdataGrid-richdataGrid_example.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" />
</programlisting>
@@ -439,49 +439,49 @@
</section>
<section id="sect-Component_Reference-Trees-richdataList">
- <title>rich:dataList</title>
+ <title><sgmltag><rich:dataList></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Trees-richdataOrderedList">
- <title>rich:dataOrderedList</title>
+ <title><sgmltag><rich:dataOrderedList></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Tables_and_grids-richdataScroller">
- <title>rich:dataScroller</title>
+ <title><sgmltag><rich:dataScroller></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Tables_and_grids-richdataTable">
- <title>rich:dataTable</title>
+ <title><sgmltag><rich:dataTable></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Tables_and_grids-richextendedDataTable">
- <title>rich:extendedDataTable</title>
+ <title><sgmltag><rich:extendedDataTable></sgmltag></title>
<para>
* Combined with rich:scrollableDataTable
</para>
</section>
<section id="sect-Component_Reference-Tables_and_grids-richrepeat">
- <title>rich:repeat</title>
+ <title><sgmltag><rich:repeat></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Tables_and_grids-richsubTable">
- <title>rich:subTable</title>
+ <title><sgmltag><rich:subTable></sgmltag></title>
<para>
Incomplete
</para>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Trees.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Trees.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Trees.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -8,42 +8,42 @@
</para>
<section id="sect-Component_Reference-Trees-richchangeExpandListener">
- <title>rich:changeExpandListener</title>
+ <title><sgmltag><rich:changeExpandListener></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Trees-richnodeSelectListener">
- <title>rich:nodeSelectListener</title>
+ <title><sgmltag><rich:nodeSelectListener></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Trees-richrecursiveTreeNodesAdapter">
- <title>rich:recursiveTreeNodesAdapter</title>
+ <title><sgmltag><rich:recursiveTreeNodesAdapter></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Trees-richtree">
- <title>rich:tree</title>
+ <title><sgmltag><rich:tree></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Trees-richtreeNode">
- <title>rich:treeNode</title>
+ <title><sgmltag><rich:treeNode></sgmltag></title>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Trees-richtreeNodesAdapter">
- <title>rich:treeNodesAdapter</title>
+ <title><sgmltag><rich:treeNodesAdapter></sgmltag></title>
<para>
Incomplete
</para>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Validation.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Validation.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Validation.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -7,7 +7,7 @@
This chapter covers those components that validate user input. The components enhance <acronym>JSF</acronym> validation capabilities with Ajax support and the use of <application>Hibernate</application> validators.
</para>
<section id="sect-Component_Reference-Validation-richajaxValidator">
- <title><rich:ajaxValidator></title>
+ <title><sgmltag><rich:ajaxValidator></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -69,7 +69,7 @@
</programlisting>
<blockquote>
<figure id="figu-Component_Reference-richajaxValidator-richajaxValidator_example_result">
- <title>rich:ajaxValidator example result</title>
+ <title><sgmltag><rich:ajaxValidator></sgmltag> example result</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/figu-Component_Reference-richajaxValidator-richajaxValidator_example_result.png" format="PNG" />
@@ -86,7 +86,7 @@
</section>
<section id="sect-Component_Reference-Validation-richbeanValidator">
- <title><rich:beanValidator></title>
+ <title><sgmltag><rich:beanValidator></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -138,7 +138,7 @@
</programlisting>
<blockquote>
<figure id="figu-Component_Reference-richbeanValidator-richbeanValidator_example_result">
- <title>rich:beanValidator example result</title>
+ <title><sgmltag><rich:beanValidator></sgmltag> example result</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/figu-Component_Reference-richbeanValidator-richbeanValidator_example_result.png" format="PNG" />
@@ -155,7 +155,7 @@
</section>
<section id="sect-Component_Reference-Validation-richgraphValidator">
- <title><rich:graphValidator></title>
+ <title><sgmltag><rich:graphValidator></sgmltag></title>
<itemizedlist>
<listitem>
<para>
@@ -207,7 +207,7 @@
</programlisting>
<blockquote>
<figure id="figu-Component_Reference-richgraphValidator-richgraphValidator_example_result">
- <title>rich:graphValidator example result</title>
+ <title><sgmltag><rich:graphValidator></sgmltag> example result</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/figu-Component_Reference-richgraphValidator-richgraphValidator_example_result.png" format="PNG" />
@@ -232,7 +232,7 @@
</programlisting>
<blockquote>
<figure id="figu-Component_Reference-richgraphValidator-Result_from_using_the_value_attribute">
- <title>Result from using the value attribute</title>
+ <title>Result from using the <varname>value</varname> attribute</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/figu-Component_Reference-richgraphValidator-Result_from_using_the_value_attribute.png" format="PNG" />
Modified: root/docs/trunk/Component_Reference/publican.cfg
===================================================================
--- root/docs/trunk/Component_Reference/publican.cfg 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Component_Reference/publican.cfg 2010-02-24 05:13:20 UTC (rev 16485)
@@ -4,4 +4,4 @@
show_remarks: 1
debug: 1
xml_lang: en-US
-
+#brand: jboss-community-richfaces
Modified: root/docs/trunk/Developer_Guide/en-US/Author_Group.xml
===================================================================
--- root/docs/trunk/Developer_Guide/en-US/Author_Group.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Developer_Guide/en-US/Author_Group.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -1,5 +1,7 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE authorgroup PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "Developer_Guide.ent">
+%BOOK_ENTITIES;
]>
<authorgroup>
<author>
@@ -7,70 +9,53 @@
<surname>Rogers</surname>
<contrib>Documentation lead for 4.0</contrib>
<affiliation>
- <orgname>Red Hat</orgname>
+ <shortaffil>Red Hat</shortaffil>
+ <jobtitle>Content Author</jobtitle>
<orgdiv>Engineering Content Services</orgdiv>
</affiliation>
<email>serogers(a)redhat.com</email>
</author>
- <author>
- <firstname>Svetlana</firstname>
- <surname>Mukhina</surname>
- <contrib>Documentation lead for 3.3</contrib>
+ <collab>
+ <collabname>Svetlana Mukhina</collabname>
<affiliation>
<orgname>Exadel</orgname>
<orgdiv>Documentation</orgdiv>
</affiliation>
- <email>smukhina(a)exadel.com</email>
- </author>
- <author>
- <firstname>Anastasiya</firstname>
- <surname>Bogachuk</surname>
- <contrib>Documentation for 3.3</contrib>
+ </collab>
+ <collab>
+ <collabname>Anastasiya Bogachuk</collabname>
<affiliation>
<orgname>Exadel</orgname>
<orgdiv>Documentation</orgdiv>
</affiliation>
- <email>abogachuk(a)exadel.com</email>
- </author>
- <author>
- <firstname>Gleb</firstname>
- <surname>Galkin</surname>
- <contrib>Documentation for 3.3</contrib>
+ </collab>
+ <collab>
+ <collabname>Gleb Galkin</collabname>
<affiliation>
<orgname>Exadel</orgname>
<orgdiv>Documentation</orgdiv>
</affiliation>
- <email>ggalkin(a)exadel.com</email>
- </author>
- <author>
- <firstname>Mikhail</firstname>
- <surname>Sorokin</surname>
- <contrib>Documentation for 3.3</contrib>
+ </collab>
+ <collab>
+ <collabname>Mikhail Sorokin</collabname>
<affiliation>
<orgname>Exadel</orgname>
<orgdiv>Documentation</orgdiv>
</affiliation>
- <email>msorokin(a)exadel.com</email>
- </author>
- <author>
- <firstname>Alexander</firstname>
- <surname>Tsebro</surname>
- <contrib>Documentation for 3.3</contrib>
+ </collab>
+ <collab>
+ <collabname>Alexander Tsebro</collabname>
<affiliation>
<orgname>Exadel</orgname>
<orgdiv>Documentation</orgdiv>
</affiliation>
- <email>atsebro(a)exadel.com</email>
- </author>
- <author>
- <firstname>Olga</firstname>
- <surname>Chikvina</surname>
- <contrib>Documentation for 3.3</contrib>
+ </collab>
+ <collab>
+ <collabname>Olga Chikvina</collabname>
<affiliation>
<orgname>Exadel</orgname>
<orgdiv>Documentation</orgdiv>
</affiliation>
- <email>ochikvina(a)exadel.com</email>
- </author>
+ </collab>
</authorgroup>
Modified: root/docs/trunk/Developer_Guide/en-US/Revision_History.xml
===================================================================
--- root/docs/trunk/Developer_Guide/en-US/Revision_History.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Developer_Guide/en-US/Revision_History.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -6,16 +6,19 @@
<simpara>
<revhistory>
<revision>
- <revnumber>1.0</revnumber>
- <date></date>
+ <revnumber>0.1</revnumber>
+ <date>Mon Feb 15 2010</date>
<author>
- <firstname></firstname>
- <surname></surname>
- <email></email>
+ <firstname>Sean</firstname>
+ <surname>Rogers</surname>
+ <email>serogers(a)redhat.com</email>
</author>
<revdescription>
<simplelist>
- <member></member>
+ <member>First draft of <xref linkend="chap-Developer_Guide-Introduction" /></member>
+ <member>First draft of <xref linkend="chap-Developer_Guide-Getting_started_with_RichFaces" /></member>
+ <member>First draft of <xref linkend="chap-Developer_Guide-RichFaces_overview" /></member>
+ <member>First draft of <xref linkend="chap-Developer_Guide-Basic_concepts" /></member>
</simplelist>
</revdescription>
</revision>
Modified: root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Advanced_features.xml
===================================================================
--- root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Advanced_features.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Advanced_features.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -211,6 +211,17 @@
<param-value>true</param-value>
</context-param>
</programlisting>
+ <note>
+ <title>MyFaces compatibility</title>
+ <para>
+ Custom error handlers for the <methodname>onError</methodname> and <methodname>onExpire</methodname> events do not work under MyFaces. MyFaces handles exceptions through its internal debug page. Use the following code in the <filename>web.xml</filename> file to prevent this behavior in MyFaces:
+ </para>
+<programlisting language="XML" role="XML"><context-param>
+ <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
+ <param-value>false</param-value>
+</context-param>
+</programlisting>
+ </note>
<section id="sect-Developer_Guide-Advanced_features-Handling_request_errors">
<title>Handling request errors</title>
<para>
@@ -282,17 +293,6 @@
</variablelist>
</para>
</section>
- <note>
- <title>MyFaces compatibility</title>
- <para>
- Custom error handlers for the <methodname>onError</methodname> and <methodname>onExpire</methodname> events do not work under MyFaces. MyFaces handles exceptions through its internal debug page. Use the following code in the <filename>web.xml</filename> file to prevent this behavior in MyFaces:
- </para>
-<programlisting language="XML" role="XML"><context-param>
- <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
- <param-value>false</param-value>
-</context-param>
-</programlisting>
- </note>
</section>
<section id="sect-Developer_Guide-Advanced_features-Managing_states" status="draft">
Modified: root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Basic_concepts.xml
===================================================================
--- root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Basic_concepts.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Basic_concepts.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -4,7 +4,7 @@
<chapter id="chap-Developer_Guide-Basic_concepts">
<title>Basic concepts</title>
<para>
- This chapter covers the basic concepts for using RichFaces in conjunction with Ajax and JavaServer Faces.
+ Read this chapter for the basic concepts of using RichFaces in conjunction with Ajax and JavaServer Faces.
</para>
<section id="sect-Developer_Guide-Basic_concepts-Sending_an_Ajax_request">
<title>Sending an Ajax request</title>
@@ -24,7 +24,7 @@
</listitem>
<listitem>
<para>
- The <sgmltag><a4j:ajax></sgmltag> tag allows you to add Ajax functionality to standard JSF components and send Ajax request on a chosen JavaScript event, such as <varname>onkeyup</varname> or <varname>onmouseover</varname>, for example.
+ The <sgmltag><a4j:support></sgmltag> tag allows you to add Ajax functionality to standard JSF components and send Ajax request on a chosen JavaScript event, such as <varname>onkeyup</varname> or <varname>onmouseover</varname>, for example.
</para>
</listitem>
<listitem>
Modified: root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Getting_started_with_RichFaces.xml
===================================================================
--- root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Getting_started_with_RichFaces.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Getting_started_with_RichFaces.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -340,8 +340,7 @@
<title>Generate project from archetype</title>
<para>
The project can now be generated with the <filename>maven-archetype-jsfwebapp</filename> archetype. Create a new directory for your project, then run the following Maven command:
-<screen>
-mvn archetype:generate -DarchetypeGroupId=org.richfaces.cdk -DarchetypeArtifactId=maven-archetype-jsfwebapp -DarchetypeVersion=4.0.0-SNAPSHOT -DgroupId=<replaceable>org.docs.richfaces</replaceable> -DartifactId=<replaceable>jsf-app</replaceable>
+<screen>mvn archetype:generate -DarchetypeGroupId=org.richfaces.cdk -DarchetypeArtifactId=maven-archetype-jsfwebapp -DarchetypeVersion=4.0.0-SNAPSHOT -DgroupId=<replaceable>org.docs.richfaces</replaceable> -DartifactId=<replaceable>jsf-app</replaceable>
</screen>
</para>
<para>
@@ -459,17 +458,17 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
- <version>3.3.3-SNAPSHOT</version>
+ <version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.3.3-SNAPSHOT</version>
+ <version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui</artifactId>
- <version>3.3.3-SNAPSHOT</version>
+ <version>4.0.0</version>
</dependency>
</dependencies>
</programlisting>
@@ -515,7 +514,7 @@
<section id="sect-Developer_Guide-Getting_started_with_RichFaces-Using_RichFaces_in_existing_JSF2_projects">
<title>Using RichFaces in existing JSF2 projects</title>
<para>
- RichFaces can be added to existing JSF2 projects by adding references to the RichFaces libraries. Refer to <xref linkend="step-Developer_Guide-Creating_a_project-Add_the_RichFaces_libraries_to_the_project" /> and <xref linkend="step-Developer_Guide-Creating_a_project-Reference_the_tag_libraries" /> for details.
+ RichFaces can be added to existing JSF2 projects by adding references to the RichFaces libraries. Refer to <xref linkend="step-Developer_Guide-Creating_a_project-Add_the_RichFaces_libraries_to_the_project" /> and <xref linkend="step-Developer_Guide-Creating_a_project-Reference_the_tag_libraries" /> in <xref linkend="sect-Developer_Guide-Getting_started_with_RichFaces-Creating_a_project" /> for details.
</para>
</section>
Modified: root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-RichFaces_overview.xml
===================================================================
--- root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-RichFaces_overview.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-RichFaces_overview.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -13,7 +13,7 @@
<title>Request processing flow</title>
<mediaobject>
<imageobject>
- <imagedata contentwidth="660" fileref="images/figu-Developer_Guide-RichFaces_overview-Request_processing_flow.png" format="PNG" width="444" />
+ <imagedata fileref="images/figu-Developer_Guide-RichFaces_overview-Request_processing_flow.png" format="PNG" width="450" contentwidth="150mm" />
</imageobject>
<textobject>
<para>
@@ -67,7 +67,7 @@
<title>Request processing sequences</title>
<mediaobject>
<imageobject>
- <imagedata contentwidth="660" fileref="images/figu-Developer_Guide-RichFaces_overview-Request_processing_sequences.png" format="PNG" width="444" />
+ <imagedata fileref="images/figu-Developer_Guide-RichFaces_overview-Request_processing_sequences.png" format="PNG" width="450" contentwidth="150mm" />
</imageobject>
<textobject>
<para>
@@ -83,7 +83,7 @@
<title>Resource request sequence</title>
<mediaobject>
<imageobject>
- <imagedata contentwidth="660" fileref="images/figu-Developer_Guide-RichFaces_overview-Resource_request_sequence.png" format="PNG" width="444" />
+ <imagedata fileref="images/figu-Developer_Guide-RichFaces_overview-Resource_request_sequence.png" format="PNG" width="450" contentwidth="150mm" />
</imageobject>
<textobject>
<para>
@@ -97,7 +97,7 @@
<section id="sect-Developer_Guide-Architecture-Ajax_Action_Components">
<title>Ajax Action Components</title>
<para>
- The RichFaces framework includes several Ajax Action Components: <sgmltag><a4j:commandButton></sgmltag>, <sgmltag><a4j:commandLink></sgmltag>, <sgmltag><a4j:poll></sgmltag>, <sgmltag><a4j:ajax></sgmltag>, and more. Use Ajax Action Components to send Ajax requests from the client side.
+ The RichFaces framework includes several Ajax Action Components: <sgmltag><a4j:commandButton></sgmltag>, <sgmltag><a4j:commandLink></sgmltag>, <sgmltag><a4j:poll></sgmltag>, <sgmltag><a4j:support></sgmltag>, and more. Use Ajax Action Components to send Ajax requests from the client side.
</para>
</section>
Modified: root/docs/trunk/Developer_Guide/publican.cfg
===================================================================
--- root/docs/trunk/Developer_Guide/publican.cfg 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Developer_Guide/publican.cfg 2010-02-24 05:13:20 UTC (rev 16485)
@@ -4,3 +4,4 @@
show_remarks: 1
debug: 1
xml_lang: en-US
+#brand: jboss-community-richfaces
Modified: root/docs/trunk/Migration_Guide/en-US/Author_Group.xml
===================================================================
--- root/docs/trunk/Migration_Guide/en-US/Author_Group.xml 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Migration_Guide/en-US/Author_Group.xml 2010-02-24 05:13:20 UTC (rev 16485)
@@ -7,11 +7,54 @@
<author>
<firstname>Sean</firstname>
<surname>Rogers</surname>
+ <contrib>Documentation lead for 4.0</contrib>
<affiliation>
- <orgname>Red Hat</orgname>
+ <shortaffil>Red Hat</shortaffil>
+ <jobtitle>Content Author</jobtitle>
<orgdiv>Engineering Content Services</orgdiv>
</affiliation>
<email>serogers(a)redhat.com</email>
</author>
+ <collab>
+ <collabname>Svetlana Mukhina</collabname>
+ <affiliation>
+ <orgname>Exadel</orgname>
+ <orgdiv>Documentation</orgdiv>
+ </affiliation>
+ </collab>
+ <collab>
+ <collabname>Anastasiya Bogachuk</collabname>
+ <affiliation>
+ <orgname>Exadel</orgname>
+ <orgdiv>Documentation</orgdiv>
+ </affiliation>
+ </collab>
+ <collab>
+ <collabname>Gleb Galkin</collabname>
+ <affiliation>
+ <orgname>Exadel</orgname>
+ <orgdiv>Documentation</orgdiv>
+ </affiliation>
+ </collab>
+ <collab>
+ <collabname>Mikhail Sorokin</collabname>
+ <affiliation>
+ <orgname>Exadel</orgname>
+ <orgdiv>Documentation</orgdiv>
+ </affiliation>
+ </collab>
+ <collab>
+ <collabname>Alexander Tsebro</collabname>
+ <affiliation>
+ <orgname>Exadel</orgname>
+ <orgdiv>Documentation</orgdiv>
+ </affiliation>
+ </collab>
+ <collab>
+ <collabname>Olga Chikvina</collabname>
+ <affiliation>
+ <orgname>Exadel</orgname>
+ <orgdiv>Documentation</orgdiv>
+ </affiliation>
+ </collab>
</authorgroup>
-
Modified: root/docs/trunk/Migration_Guide/publican.cfg
===================================================================
--- root/docs/trunk/Migration_Guide/publican.cfg 2010-02-22 17:18:55 UTC (rev 16484)
+++ root/docs/trunk/Migration_Guide/publican.cfg 2010-02-24 05:13:20 UTC (rev 16485)
@@ -4,4 +4,4 @@
show_remarks: 1
debug: 1
xml_lang: en-US
-
+#brand: jboss-community-richfaces
14 years, 10 months
JBoss Rich Faces SVN: r16484 - branches/enterprise/3.3.1.SP1_RFPL-394/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-02-22 12:18:55 -0500 (Mon, 22 Feb 2010)
New Revision: 16484
Modified:
branches/enterprise/3.3.1.SP1_RFPL-394/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js
Log:
RFPL-394
Modified: branches/enterprise/3.3.1.SP1_RFPL-394/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js
===================================================================
--- branches/enterprise/3.3.1.SP1_RFPL-394/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js 2010-02-22 13:17:31 UTC (rev 16483)
+++ branches/enterprise/3.3.1.SP1_RFPL-394/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js 2010-02-22 17:18:55 UTC (rev 16484)
@@ -331,7 +331,7 @@
processKeyDown: function(event) {
if ($(this.prefix + ":n").rows.length > 0) {
- if(!event.shiftKey) {
+ if(!event.shiftKey && (event.keyCode || event.charCode) != 16) {
this.shiftRow = null;
}
var range, rowIndex;
@@ -435,7 +435,7 @@
this.startRow = this.shiftRow;
}
if (((this.startRow <= rowIndex) && (this.firstIndex <= this.startRow || rowIndex < this.firstIndex))
- || (this.startRow > rowIndex && this.firstIndex < this.startRow && rowIndex < this.firstIndex)) {
+ || (this.startRow > rowIndex && this.firstIndex <= this.startRow && rowIndex < this.firstIndex)) {
this.endRow = rowIndex;
} else {
this.endRow = this.startRow;
14 years, 10 months