JBoss Rich Faces SVN: r6438 - management/design/userComponentCSS/markup.
by richfaces-svn-commits@lists.jboss.org
Author: admitriev
Date: 2008-02-29 05:08:20 -0500 (Fri, 29 Feb 2008)
New Revision: 6438
Added:
management/design/userComponentCSS/markup/rich-styles.css
Log:
Added: management/design/userComponentCSS/markup/rich-styles.css
===================================================================
--- management/design/userComponentCSS/markup/rich-styles.css (rev 0)
+++ management/design/userComponentCSS/markup/rich-styles.css 2008-02-29 10:08:20 UTC (rev 6438)
@@ -0,0 +1,112 @@
+/*border color styles*/
+
+.rich-box-border-1{ border-color : #4A75B5 /*headerBackgroundColor*/}
+.rich-box-border-2{ border-color : #FFFFFF /*headerTextColor*/}
+.rich-box-border-3{ border-color : #F3F2F2 /*generalBackgroundColor*/}
+.rich-box-border-4{ border-color : #000000 /*generalTextColor*/}
+.rich-box-border-5{ border-color : #EAF0F8 /*additionalBackgroundColor*/}
+.rich-box-border-6{ border-color : #C0C0C0 /*panelBorderColor*/}
+.rich-box-border-7{ border-color : #9FBDEB /*tabBackgroundColor*/}
+.rich-box-border-8{ border-color : #6A92CF /*tabDisabledTextColor*/}
+.rich-box-border-9{ border-color : #C6D6EA /*trimColor*/}
+.rich-box-border-10{ border-color : #FAE6B0 /*tipBackgroundColor*/}
+.rich-box-border-11{ border-color : #E5973E /*tipBorderColor*/}
+.rich-box-border-12{ border-color : #E79A00 /*selectControlColor*/}
+.rich-box-border-13{ border-color : #0078D0 /*generalLinkColor*/}
+.rich-box-border-14{ border-color : #0090FF /*hoverLinkColor*/}
+.rich-box-border-15{ border-color : #0090FF /*visitedLinkColor*/}
+.rich-box-border-16{ border-color : #FFFFFF /*tableBackgroundColor*/}
+.rich-box-border-17{ border-color : #cccccc /*tableFooterBackgroundColor*/}
+.rich-box-border-18{ border-color : #f1f1f1 /*tableSubfooterBackgroundColor*/}
+.rich-box-border-19{ border-color : #C0C0C0 /*tableBorderColor*/}
+.rich-box-border-20{ border-color : #F1F1F1 /*editorBackgroundColor*/}
+.rich-box-border-21{ border-color : #FEFFDA /*editBackgroundColor*/}
+
+
+/*background color styles*/
+
+.rich-box-background-1{ background-color : #4A75B5 /*headerBackgroundColor*/}
+.rich-box-background-2{ background-color : #FFFFFF /*headerTextColor*/}
+.rich-box-background-3{ background-color : #F3F2F2 /*generalBackgroundColor*/}
+.rich-box-background-4{ background-color : #000000 /*generalTextColor*/}
+.rich-box-background-5{ background-color : #EAF0F8 /*additionalBackgroundColor*/}
+.rich-box-background-6{ background-color : #C0C0C0 /*panelbackgroundColor*/}
+.rich-box-background-7{ background-color : #9FBDEB /*tabBackgroundColor*/}
+.rich-box-background-8{ background-color : #6A92CF /*tabDisabledTextColor*/}
+.rich-box-background-9{ background-color : #C6D6EA /*trimColor*/}
+.rich-box-background-10{ background-color : #FAE6B0 /*tipBackgroundColor*/}
+.rich-box-background-11{ background-color : #E5973E /*tipbackgroundColor*/}
+.rich-box-background-12{ background-color : #E79A00 /*selectControlColor*/}
+.rich-box-background-13{ background-color : #0078D0 /*generalLinkColor*/}
+.rich-box-background-14{ background-color : #0090FF /*hoverLinkColor*/}
+.rich-box-background-15{ background-color : #0090FF /*visitedLinkColor*/}
+.rich-box-background-16{ background-color : #FFFFFF /*tableBackgroundColor*/}
+.rich-box-background-17{ background-color : #cccccc /*tableFooterBackgroundColor*/}
+.rich-box-background-18{ background-color : #f1f1f1 /*tableSubfooterBackgroundColor*/}
+.rich-box-background-19{ background-color : #C0C0C0 /*tablebackgroundColor*/}
+.rich-box-background-20{ background-color : #F1F1F1 /*editorBackgroundColor*/}
+.rich-box-background-21{ background-color : #FEFFDA /*editBackgroundColor*/}
+
+
+/*text color styles*/
+
+.rich-text-color-1{ color : #4A75B5 /*headerBackgroundColor*/}
+.rich-text-color-2{ color : #FFFFFF /*headerTextColor*/}
+.rich-text-color-3{ color : #F3F2F2 /*generalBackgroundColor*/}
+.rich-text-color-4{ color : #000000 /*generalTextColor*/}
+.rich-text-color-5{ color : #EAF0F8 /*additionalBackgroundColor*/}
+.rich-text-color-6{ color : #C0C0C0 /*panelbackgroundColor*/}
+.rich-text-color-7{ color : #9FBDEB /*tabBackgroundColor*/}
+.rich-text-color-8{ color : #6A92CF /*tabDisabledTextColor*/}
+.rich-text-color-9{ color : #C6D6EA /*trimColor*/}
+.rich-text-color-10{ color : #FAE6B0 /*tipBackgroundColor*/}
+.rich-text-color-11{ color : #E5973E /*tipbackgroundColor*/}
+.rich-text-color-12{ color : #E79A00 /*selectControlColor*/}
+.rich-text-color-13{ color : #0078D0 /*generalLinkColor*/}
+.rich-text-color-14{ color : #0090FF /*hoverLinkColor*/}
+.rich-text-color-15{ color : #0090FF /*visitedLinkColor*/}
+.rich-text-color-16{ color : #FFFFFF /*tableBackgroundColor*/}
+.rich-text-color-17{ color : #cccccc /*tableFooterBackgroundColor*/}
+.rich-text-color-18{ color : #f1f1f1 /*tableSubfooterBackgroundColor*/}
+.rich-text-color-19{ color : #C0C0C0 /*tablebackgroundColor*/}
+.rich-text-color-20{ color : #F1F1F1 /*editorBackgroundColor*/}
+.rich-text-color-21{ color : #FEFFDA /*editBackgroundColor*/}
+
+
+/*font size styles*/
+
+.rich-font-size-1{ font-size : 11px /*generalSizeFont*/}
+.rich-font-size-2{ font-size : 11px /*headerSizeFont*/}
+.rich-font-size-3{ font-size : 11px /*buttonSizeFont=*/}
+
+
+/*font family styles*/
+
+.rich-font-family-1{ font-family : Arial, Verdana, sans-serif /*generalFamilyFont*/}
+.rich-font-family-1{ font-family : Arial, Verdana, sans-serif /*headerFamilyFont*/}
+.rich-font-family-1{ font-family : Arial, Verdana, sans-serif /*buttonFamilyFont*/}
+
+
+/*gradient styles*/
+
+.rich-gradient-1{ background-image : url(path); background-repeat : repeat-x /*headerBackgroundColor > headerGradientColor*/}
+.rich-gradient-2{ background-image : url(path); background-repeat : repeat-x /*headerGradientColor > headerBackgroundColor*/}
+.rich-gradient-3{ background-image : url(path); background-repeat : repeat-x /*tabBackgroundColor > generalBackgroundColor*/}
+.rich-gradient-4{ background-image : url(path); background-repeat : repeat-x /*generalBackgroundColor > tabBackgroundColor*/}
+.rich-gradient-5{ background-image : url(path); background-repeat : repeat-x /*additionalBackgroundColor > controlBackgroundColor*/}
+.rich-gradient-6{ background-image : url(path); background-repeat : repeat-x /*controlBackgroundColor > generalBackgroundColor*/}
+.rich-gradient-7{ background-image : url(path); background-repeat : repeat-x /*additionalBackgroundColor > tabBackgroundColor*/}
+.rich-gradient-8{ background-image : url(path); background-repeat : repeat-x /*tabBackgroundColor > additionalBackgroundColor*/}
+.rich-gradient-9{ background-image : url(path); background-repeat : repeat-x /*tabBackgroundColor > controlBackgroundColor*/}
+.rich-gradient-10{ background-image : url(path); background-repeat : repeat-x /*controlBackgroundColor > tabBackgroundColor*/}
+
+
+
+
+
+
+
+
+
+
+
16 years, 10 months
JBoss Rich Faces SVN: r6437 - trunk/framework/impl/src/main/javascript/ajaxjsf.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-02-28 20:12:59 -0500 (Thu, 28 Feb 2008)
New Revision: 6437
Added:
trunk/framework/impl/src/main/javascript/ajaxjsf/sarissa-table-utils.js
Modified:
trunk/framework/impl/src/main/javascript/ajaxjsf/sarissa.js
trunk/framework/impl/src/main/javascript/ajaxjsf/sarissa_ieemu_xpath.js
Log:
Update Sarissa JS library to version 0.9.9.3
Added: trunk/framework/impl/src/main/javascript/ajaxjsf/sarissa-table-utils.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/sarissa-table-utils.js (rev 0)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/sarissa-table-utils.js 2008-02-29 01:12:59 UTC (rev 6437)
@@ -0,0 +1,317 @@
+/*
+ * ====================================================================
+ * About Sarissa: http://dev.abiss.gr/sarissa
+ * ====================================================================
+ * Sarissa is an ECMAScript library acting as a cross-browser wrapper for native XML APIs.
+ * The library supports Gecko based browsers like Mozilla and Firefox,
+ * Internet Explorer (5.5+ with MSXML3.0+), Konqueror, Safari and Opera
+ * @author: @author: Copyright 2004-2007 Emmanouil Batsis, mailto: mbatsis at users full stop sourceforge full stop net
+ * ====================================================================
+ * Licence
+ * ====================================================================
+ * Sarissa is free software distributed under the GNU GPL version 2 (see <a href="gpl.txt">gpl.txt</a>) or higher,
+ * GNU LGPL version 2.1 (see <a href="lgpl.txt">lgpl.txt</a>) or higher and Apache Software License 2.0 or higher
+ * (see <a href="asl.txt">asl.txt</a>). This means you can choose one of the three and use that if you like. If
+ * you make modifications under the ASL, i would appreciate it if you submitted those.
+ * In case your copy of Sarissa does not include the license texts, you may find
+ * them online in various formats at <a href="http://www.gnu.org">http://www.gnu.org</a> and
+ * <a href="http://www.apache.org">http://www.apache.org</a>.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE
+ * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * Sort the table data based on the column corresponding to the given TH element (clickedElem).
+ * @memberOf Sarissa
+ * @param {Node} clickedElem the table heading (<code>th</code>) initiating the sort.
+ * @param {Function} iFunc the custom sort function if needed. Default (null) is case-sensitive sort.
+ * You can also use <code>Sarissa.SORT_IGNORE_CASE</code>, <code>Sarissa.SORT_DATE_US</code>,
+ * and <code>Sarissa.SORT_DATE_EU</code>
+ * @param {boolean} bSkipCache whether to skip the data cache and read table data all over again. Setting this
+ * to <code>true</code> means the cache for the table, if it exists, will not be updated either. Defaul is <code>false</code>
+ * @param {Function} oCallbac a callback function to be executed when the table is
+ * sorted and updated. The callback function may be used for effects for example. The parameters
+ * passed to the callback are the table as a DOM node and the sort column index (zero based <code>int</code>)
+ * @requires Sarissa sarissa.js
+ */
+Sarissa.sortHtmlTableData = function(clickedElem, iFunc, bSkipCache, oCallbac){
+ // get the table
+ var oTbl = clickedElem.parentNode.parentNode;
+ while(oTbl.nodeName.toLowerCase() != "table"){
+ oTbl = oTbl.parentNode;
+ }
+ // we need a table ID for the cache
+ if(!oTbl.id){
+ oTbl.id = "SarissaTable"+ (Sarissa.tableIdGenCount++);
+ }
+ // the column to sort on
+ var iColIndex = clickedElem.cellIndex;
+ var matrix;
+ // use the cache if available and permitted
+ if(!bSkipCache && Sarissa.tableDataCache[oTbl.id]){
+ matrix = Sarissa.tableDataCache[oTbl.id];
+ }
+ else{
+ // read table, skip any rows containing headings, cache if permitted
+ matrix = this.getArrayFromTableData(oTbl, null, null, "th");
+ if(!bSkipCache){
+ Sarissa.tableDataCache[oTbl.id] = matrix;
+ }
+ }
+ // init state persistence as needed
+ if(!Sarissa.tableColumnSortStates[oTbl.id]){
+ Sarissa.tableColumnSortStates[oTbl.id] = [];
+ }
+ // build a array to sort from the specific column data, adding
+ // original index info as a suffix
+ var sortedColumn = [];
+ for(var i=0; i < matrix.length;i++){
+ sortedColumn[i] = Sarissa.stripTags(matrix[i][iColIndex]) + "_mbns_" + i;
+ }
+ // sort the array
+ if(iFunc){
+ sortedColumn.sort(iFunc);
+ }
+ else{
+ sortedColumn.sort();
+ }
+ // persist column state
+ var sortOrder = Sarissa.tableColumnSortStates[oTbl.id][iColIndex];
+ if(sortOrder != "asc"){
+ Sarissa.tableColumnSortStates[oTbl.id][iColIndex] = "asc";
+ }
+ else{
+ sortedColumn.reverse();
+ Sarissa.tableColumnSortStates[oTbl.id][iColIndex] = "desc";
+ }
+ // create the sorted matrix based on sortedColumn
+ var sortedMatrix = [];
+ for(var j=0; j < matrix.length; j++){
+ var indexItem = sortedColumn[j];
+ var iRow = indexItem.substring(indexItem.indexOf("_mbns_")+6, indexItem.length);
+ sortedMatrix[j] = [];
+ for(var k=0; k < matrix[j].length; k++){
+ sortedMatrix[j][k] = matrix[iRow][k];
+ }
+ }
+ // update table data, skipping rows with headings
+ this.updateTableData(oTbl, sortedMatrix, null, null, "th");
+ if(oCallbac){
+ oCallbac(oTbl, iColIndex);
+ }
+};
+
+/**
+ * Used for generating table IDs, which are required for the cache and sort state persistance
+ * @memberOf Sarissa
+ * @private
+ */
+Sarissa.tableIdGenCount = 0;
+
+/**
+ * Used for persisting sort state per table column
+ * @memberOf Sarissa
+ * @private
+ */
+Sarissa.tableColumnSortStates = [];
+
+/**
+ * Used for caching table data.
+ * @memberOf Sarissa
+ */
+Sarissa.tableDataCache = [];
+
+/**
+ * Keep track of the cache size. The length property is not for associative arrays
+ * and I really dont want to add 50 lines and implement a PseudoHashMap right now :-)
+ * @memberOf Sarissa
+ * @private
+ */
+Sarissa.tableDataCacheSize = 0;
+
+/**
+ * The table data cache size, used for sorting HTML tables. You can change it, default is 5 (tables). When a
+ * table is cached exceeding the cache size, the oldest entry is disgarded from the cache.
+ * @memberOf Sarissa
+ */
+Sarissa.tableDataCacheMaxSize = 5;
+
+/**
+ * Updates the cache, discards oldest entry if cache size is exceeded.
+ * @memberOf Sarissa
+ * @private
+ */
+Sarissa.tableDataCachePut = function(sTableId, oArr){
+ if(Sarissa.tableDataCacheSize.length >= Sarissa.tableDataCacheMaxSize){
+ Sarissa.tableDataCache.shift();
+ Sarissa.tableDataCacheSize--;
+ }
+ Sarissa.tableDataCache[sTableId] = oArr;
+ Sarissa.tableDataCacheSize++;
+};
+/**
+ * Updates the cache of a specific table by reposition a column in the cached data.
+ * This is usefull if you use DHTML to visually reposition columns and need to
+ * synchronize the cache.
+ * @memberOf Sarissa
+ * @private
+ */
+Sarissa.tableDataCacheMoveColumn = function(sTableId, oldColumnIndex, newColumnIndex){
+ var oldMatrix = Sarissa.tableDataCache[sTableId];
+ var newMatrix = [];
+ // iterate rows
+ var oldRow, movedColumn, newRow;
+ for(var i=0; i<oldMatrix.length; i++){
+ oldRow = oldMatrix[i];
+ movedColumn = oldRow.splice(oldColumnIndex, 1);
+ newRow = [];
+ // reposition column value
+ for(var j=0;j<oldArr.length;J++){
+ if(j == newColumnIndex){
+ newRow.put(movedColumn);
+ }
+ newRow.put(oldRow[j]);
+ }
+ newMatrix[i] = newRow;
+ }
+ Sarissa.tableDataCache[sTableId] = newMatrix;
+};
+
+/**
+ * Function for case-insensitive sorting or simple comparison. Can be used as
+ * a parameter to <code>Array.sort()</code>.
+ * @memberOf Sarissa
+ * @param a a string
+ * @param b a string
+ * @return -1, 0 or 1 depending on whether <code>a</code> is "less than", equal or "greater than" <code>b</code>
+ */
+Sarissa.SORT_IGNORE_CASE = function(a, b){
+ var strA = a.toLowerCase(),
+ strB = b.toLowerCase();
+ if(strA < strB) return -1;
+ else if(strA > strB) return 1;
+ else return 0;
+};
+
+/**
+ * Function for comparing US dates. Can be used as
+ * a parameter to <code>Array.sort()</code>.
+ * @memberOf Sarissa
+ * @param a a string
+ * @param b a string
+ * @return -1, 0 or 1 depending on whether <code>a</code> is "less than", equal or "greater than" <code>b</code>
+ */
+Sarissa.SORT_DATE_US = function(a, b){
+ var datA = new Date(a.substring(0, a.lastIndexOf("_mbns_"))),
+ datB = new Date(b.substring(0, b.lastIndexOf("_mbns_")));
+ if(datA < datB) return -1;
+ else if(datA > datB) return 1;
+ else return 0;
+
+};
+
+/**
+ * Function for comparing EU dates. Can be used as
+ * a parameter to <code>Array.sort()</code>.
+ * @memberOf Sarissa
+ * @param a a string
+ * @param b a string
+ * @return -1, 0 or 1 depending on whether <code>a</code> is "less than", equal or "greater than" <code>b</code>
+ */
+Sarissa.SORT_DATE_EU = function(a, b){
+ var strA = a.substring(0, a.lastIndexOf("_mbns_")).split("/"),
+ strB = b.substring(0, b.lastIndexOf("_mbns_")).split("/"),
+ datA = new Date(strA[2], strA[1], strA[0]),
+ datB = new Date(strB[2], strB[1], strB[0]);
+ if(datA < datB) return -1;
+ else if(datA > datB) return 1;
+ else return 0;
+};
+
+/**
+ * Get the data of the given element as a two-dimensional array. The
+ * given XML or HTML Element must match the structure of an HTML table,
+ * although element names may be different.
+ * @memberOf Sarissa
+ * @param oElem an HTML or XML table. The method works out of the box
+ * for <code>table</code>, <code>tbody</code>, <code>thead</code>
+ * or <code>tfooter</code> elements. For custom XML tables, the
+ * <code>sRowName</code> <code>sCellName</code> must be used.
+ * @param sRowName the row element names. Default is <code>tr</code>
+ * @param sCellName the row element names. Default is <code>td</code>
+ * @param sHeadingName the heading element names. If you use this, rows with
+ * headings will be <strong>skipped</strong>. To skip headings when reading
+ * HTML tables use <code>th</code>
+ * @param bStripTags whether to strip markup from cell contents. Default is <code>false</code>
+ * @return a two-dimensional array with the data found in the given element's rows
+ */
+Sarissa.getArrayFromTableData = function(oElem, sRowName, sCellName, sHeadingName, bStripTags){
+ if(!sRowName){
+ sRowName = "tr"
+ }
+ if(!sCellName){
+ sCellName = "td"
+ }
+ if(!sHeadingName){
+ sHeadingName = "th"
+ }
+ var rows = oElem.getElementsByTagName(sRowName);
+ var matrix = [];
+ for(var i=0, j=0; i < rows.length; i++) {
+ // skip rows with headings
+ var row = rows[i];
+ if((!sHeadingName) || row.getElementsByTagName(sHeadingName).length == 0){
+ matrix[j] = [];
+ var cells = row.getElementsByTagName(sCellName);
+ for(var k=0; k < cells.length; k++){
+ matrix[j][k] = bStripTags ? Sarissa.stripTags(cells[k].innerHTML) : cells[k].innerHTML;
+ }
+ j++;
+ }
+ }
+ return matrix;
+};
+
+/**
+ * Update the data of the given element using the giventwo-dimensional array as a source. The
+ * given XML or HTML Element must match the structure of an HTML table.
+ * @memberOf Sarissa
+ * @param oElem an HTML or XML table. The method works out of the box
+ * for <code>table</code>, <code>tbody</code>, <code>thead</code>
+ * or <code>tfooter</code> elements. For custom XML tables, the
+ * <code>sRowName</code> <code>sCellName</code> must be used.
+ * @param sRowName the row element names. Default is <code>tr</code>
+ * @param sCellName the row element names. Default is <code>td</code>
+ * @param sHeadingName the heading element names. If you use this, rows with
+ * headings will be <strong>skipped</strong>. To skip headings when reading
+ * HTML tables use <code>th</code>
+ */
+Sarissa.updateTableData = function(oElem, newData, sRowName, sCellName, sHeadingName){
+ if(!sRowName){
+ sRowName = "tr"
+ }
+ if(!sCellName){
+ sCellName = "td"
+ }
+ var rows = oElem.getElementsByTagName(sRowName);
+ for(var i=0, j=0; i < newData.length && j < rows.length; j++){
+ // skip rows with headings
+ var row = rows[j];
+ if((!sHeadingName) || row.getElementsByTagName(sHeadingName).length == 0){
+ var cells = row.getElementsByTagName(sCellName);
+ for(var k=0; k < cells.length; k++){
+ cells[k].innerHTML = newData[i][k];
+ }
+ i++;
+ }
+ }
+};
+
+
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/sarissa.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/sarissa.js 2008-02-28 19:14:15 UTC (rev 6436)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/sarissa.js 2008-02-29 01:12:59 UTC (rev 6437)
@@ -1,11 +1,11 @@
-/**
+/*
* ====================================================================
* About Sarissa: http://dev.abiss.gr/sarissa
* ====================================================================
* Sarissa is an ECMAScript library acting as a cross-browser wrapper for native XML APIs.
* The library supports Gecko based browsers like Mozilla and Firefox,
* Internet Explorer (5.5+ with MSXML3.0+), Konqueror, Safari and Opera
- * @author: @author: Copyright 2004-2007 Emmanouil Batsis, mailto: mbatsis at users full stop sourceforge full stop net
+ * @author: Copyright 2004-2007 Emmanouil Batsis, mailto: mbatsis at users full stop sourceforge full stop net
* ====================================================================
* Licence
* ====================================================================
@@ -33,7 +33,7 @@
* @static
*/
function Sarissa(){}
-Sarissa.VERSION = "0.9.9";
+Sarissa.VERSION = "0.9.9.3";
Sarissa.PARSED_OK = "Document contains no parsing errors";
Sarissa.PARSED_EMPTY = "Document is empty";
Sarissa.PARSED_UNKNOWN_ERROR = "Not well-formed or other error";
@@ -117,18 +117,21 @@
_SARISSA_THREADEDDOM_PROGID = null;
_SARISSA_XSLTEMPLATE_PROGID = null;
_SARISSA_XMLHTTP_PROGID = null;
- if(!window.XMLHttpRequest){
- /**
- * Emulate XMLHttpRequest
- * @constructor
- */
- XMLHttpRequest = function() {
- if(!_SARISSA_XMLHTTP_PROGID){
- _SARISSA_XMLHTTP_PROGID = Sarissa.pickRecentProgID(["Msxml2.XMLHTTP.6.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"]);
- }
- return new ActiveXObject(_SARISSA_XMLHTTP_PROGID);
- };
- }
+ // commenting the condition out; we need to redefine XMLHttpRequest
+ // anyway as IE7 hardcodes it to MSXML3.0 causing version problems
+ // between different activex controls
+ //if(!window.XMLHttpRequest){
+ /**
+ * Emulate XMLHttpRequest
+ * @constructor
+ */
+ XMLHttpRequest = function() {
+ if(!_SARISSA_XMLHTTP_PROGID){
+ _SARISSA_XMLHTTP_PROGID = Sarissa.pickRecentProgID(["Msxml2.XMLHTTP.6.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"]);
+ }
+ return new ActiveXObject(_SARISSA_XMLHTTP_PROGID);
+ };
+ //}
// we dont need this anymore
//============================================
// Factory methods (IE)
@@ -164,7 +167,7 @@
// see non-IE version
Sarissa.getParseErrorText = function (oDoc) {
var parseErrorText = Sarissa.PARSED_OK;
- if(oDoc && oDoc.parseError && oDoc.parseError.errorCode && oDoc.parseError.errorCode !== 0){
+ if(oDoc && oDoc.parseError && oDoc.parseError.errorCode && oDoc.parseError.errorCode != 0){
parseErrorText = "XML Parsing Error: " + oDoc.parseError.reason +
"\nLocation: " + oDoc.parseError.url +
"\nLine Number " + oDoc.parseError.line + ", Column " +
@@ -187,8 +190,7 @@
oDoc.setProperty("SelectionNamespaces", sNsSet);
};
/**
- * An implementation of Mozilla's XSLTProcessor for IE.
- * Reuses the same XSLT stylesheet for multiple transforms
+ * A class that reuses the same XSLT stylesheet for multiple transforms.
* @constructor
*/
XSLTProcessor = function(){
@@ -219,7 +221,7 @@
catch(e){
// Ignore. "AllowDocumentFunction" is only supported in MSXML 3.0 SP4 and later.
}
- if(xslDoc.url && xslDoc.selectSingleNode("//xsl:*[local-name() = 'import' or local-name() = 'include']") !== null){
+ if(xslDoc.url && xslDoc.selectSingleNode("//xsl:*[local-name() = 'import' or local-name() = 'include']") != null){
converted.async = false;
converted.load(xslDoc.url);
}
@@ -351,7 +353,7 @@
XSLTProcessor.prototype.clearParameters = function(){
for(var nsURI in this.paramsSet){
for(var name in this.paramsSet[nsURI]){
- if(nsURI!==""){
+ if(nsURI!=""){
this.processor.addParameter(name, "", nsURI);
}else{
this.processor.addParameter(name, "");
@@ -389,7 +391,7 @@
Sarissa.__setReadyState__ = function(oDoc, iReadyState){
oDoc.readyState = iReadyState;
oDoc.readystate = iReadyState;
- if (oDoc.onreadystatechange !== null && typeof oDoc.onreadystatechange == "function") {
+ if (oDoc.onreadystatechange != null && typeof oDoc.onreadystatechange == "function") {
oDoc.onreadystatechange();
}
};
@@ -535,7 +537,7 @@
} else if(oDoc.getElementsByTagName("parsererror").length > 0){
var parsererror = oDoc.getElementsByTagName("parsererror")[0];
parseErrorText = Sarissa.getText(parsererror, true)+"\n";
- } else if(oDoc.parseError && oDoc.parseError.errorCode !== 0){
+ } else if(oDoc.parseError && oDoc.parseError.errorCode != 0){
parseErrorText = Sarissa.PARSED_UNKNOWN_ERROR;
}
return parseErrorText;
@@ -577,11 +579,12 @@
}
/**
- * Strips tags from the given markup string
+ * Strips tags from the given markup string. If the given string is
+ * <code>undefined</code>, <code>null</code> or empty, it is returned as is.
* @memberOf Sarissa
*/
Sarissa.stripTags = function (s) {
- return s.replace(/<[^>]+>/g,"");
+ return s?s.replace(/<[^>]+>/g,""):s;
};
/**
* <p>Deletes all child nodes of the given node</p>
@@ -605,7 +608,7 @@
*/
Sarissa.copyChildNodes = function(nodeFrom, nodeTo, bPreserveExisting) {
if(Sarissa._SARISSA_IS_SAFARI && nodeTo.nodeType == Node.DOCUMENT_NODE){ // SAFARI_OLD ??
- nodeTo = nodeTo.documentElement; //Appearantly there's a bug in safari where you can't appendChild to a document node
+ nodeTo = nodeTo.documentElement; //Apparently there's a bug in safari where you can't appendChild to a document node
}
if((!nodeFrom) || (!nodeTo)){
@@ -714,7 +717,7 @@
/** @private */
Sarissa.updateCursor = function(oTargetElement, sValue) {
- if(oTargetElement && oTargetElement.style && oTargetElement.style.cursor !== undefined ){
+ if(oTargetElement && oTargetElement.style && oTargetElement.style.cursor != undefined ){
oTargetElement.style.cursor = sValue;
}
};
@@ -729,7 +732,8 @@
* @param oTargetElement the element to update
* @param xsltproc (optional) the transformer to use on the returned
* content before updating the target element with it
- * @param callback (optional) a Function object to execute once the update is finished successfuly, called as <code>callback(oNode, oTargetElement)</code>
+ * @param callback (optional) a Function object to execute once the update is finished successfuly, called as <code>callback(sFromUrl, oTargetElement)</code>.
+ * In case an exception is thrown during execution, the callback is called as called as <code>callback(sFromUrl, oTargetElement, oException)</code>
* @param skipCache (optional) whether to skip any cache
*/
Sarissa.updateContentFromURI = function(sFromUrl, oTargetElement, xsltproc, callback, skipCache) {
@@ -737,12 +741,28 @@
Sarissa.updateCursor(oTargetElement, "wait");
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", sFromUrl, true);
- sarissa_dhtml_loadHandler = function() {
+ xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4) {
- Sarissa.updateContentFromNode(xmlhttp.responseXML, oTargetElement, xsltproc, callback);
+ try{
+ var oDomDoc = xmlhttp.responseXML;
+ if(oDomDoc && Sarissa.getParseErrorText(oDomDoc) == Sarissa.PARSED_OK){
+ Sarissa.updateContentFromNode(xmlhttp.responseXML, oTargetElement, xsltproc);
+ callback(sFromUrl, oTargetElement);
+ }
+ else{
+ throw Sarissa.getParseErrorText(oDomDoc);
+ }
+ }
+ catch(e){
+ if(callback){
+ callback(sFromUrl, oTargetElement, e);
+ }
+ else{
+ throw e;
+ }
+ }
}
};
- xmlhttp.onreadystatechange = sarissa_dhtml_loadHandler;
if (skipCache) {
var oldage = "Sat, 1 Jan 2000 00:00:00 GMT";
xmlhttp.setRequestHeader("If-Modified-Since", oldage);
@@ -751,7 +771,12 @@
}
catch(e){
Sarissa.updateCursor(oTargetElement, "auto");
- throw e;
+ if(callback){
+ callback(sFromUrl, oTargetElement, e);
+ }
+ else{
+ throw e;
+ }
}
};
@@ -765,15 +790,14 @@
* @param oTargetElement the element to update
* @param xsltproc (optional) the transformer to use on the given
* DOM node before updating the target element with it
- * @param callback (optional) a Function object to execute once the update is finished successfuly, called as <code>callback(oNode, oTargetElement)</code>
*/
-Sarissa.updateContentFromNode = function(oNode, oTargetElement, xsltproc, callback) {
+Sarissa.updateContentFromNode = function(oNode, oTargetElement, xsltproc) {
try {
Sarissa.updateCursor(oTargetElement, "wait");
Sarissa.clearChildNodes(oTargetElement);
// check for parsing errors
var ownerDoc = oNode.nodeType == Node.DOCUMENT_NODE?oNode:oNode.ownerDocument;
- if(ownerDoc.parseError && ownerDoc.parseError !== 0) {
+ if(ownerDoc.parseError && ownerDoc.parseError.errorCode != 0) {
var pre = document.createElement("pre");
pre.appendChild(document.createTextNode(Sarissa.getParseErrorText(ownerDoc)));
oTargetElement.appendChild(pre);
@@ -797,12 +821,9 @@
}
}
}
- if (callback) {
- callback(oNode, oTargetElement);
- }
}
catch(e) {
- throw e;
+ throw e;
}
finally{
Sarissa.updateCursor(oTargetElement, "auto");
@@ -861,7 +882,9 @@
* You can also pass a callback function to be executed when the update is finished. The function will be called as
* <code>functionName(oNode, oTargetElement);</code></p>
* <p>Here is an example of using this in a form element:</p>
- * <pre name="code" class="xml"><form action="/my/form/handler" method="post"
+ * <pre name="code" class="xml">
+ * <div id="targetId"> this content will be updated</div>
+ * <form action="/my/form/handler" method="post"
* onbeforesubmit="return Sarissa.updateContentFromForm(this, document.getElementById('targetId'));"><pre>
* <p>If JavaScript is supported, the form will not be submitted. Instead, Sarissa will
* scan the form and make an appropriate AJAX request, also adding a parameter
@@ -874,16 +897,18 @@
* @param oTargetElement the element to update
* @param xsltproc (optional) the transformer to use on the returned
* content before updating the target element with it
- * @param callback (optional) a Function object to execute once the update is finished successfuly, called as <code>callback(oNode, oTargetElement)</code>
- * @param skipCache (optional) whether to skip any cache
+ * @param callback (optional) a Function object to execute once the update is finished successfuly, called as <code>callback(oNode, oTargetElement)</code>.
+ * In case an exception occurs during excecution and a callback function was provided, the exception is cought and the callback is called as
+ * <code>callback(oForm, oTargetElement, exception)</code>
*/
Sarissa.updateContentFromForm = function(oForm, oTargetElement, xsltproc, callback) {
try{
- Sarissa.updateCursor(oTargetElement, "wait");
+ Sarissa.updateCursor(oTargetElement, "wait");
// build parameters from form fields
var params = Sarissa.formToQueryString(oForm) + "&" + Sarissa.REMOTE_CALL_FLAG + "=true";
var xmlhttp = new XMLHttpRequest();
- if(oForm.getAttribute("method") && oForm.getAttribute("method").toLowerCase() == "get") {
+ var bUseGet = oForm.getAttribute("method") && oForm.getAttribute("method").toLowerCase() == "get";
+ if(bUseGet) {
xmlhttp.open("GET", oForm.getAttribute("action")+"?"+params, true);
}
else{
@@ -892,17 +917,38 @@
xmlhttp.setRequestHeader("Content-length", params.length);
xmlhttp.setRequestHeader("Connection", "close");
}
- sarissa_dhtml_loadHandler = function() {
- if (xmlhttp.readyState == 4) {
- Sarissa.updateContentFromNode(xmlhttp.responseXML, oTargetElement, xsltproc, callback);
- }
+ xmlhttp.onreadystatechange = function() {
+ try{
+ if (xmlhttp.readyState == 4) {
+ var oDomDoc = xmlhttp.responseXML;
+ if(oDomDoc && Sarissa.getParseErrorText(oDomDoc) == Sarissa.PARSED_OK){
+ Sarissa.updateContentFromNode(xmlhttp.responseXML, oTargetElement, xsltproc);
+ callback(oForm, oTargetElement);
+ }
+ else{
+ throw Sarissa.getParseErrorText(oDomDoc);
+ }
+ }
+ }
+ catch(e){
+ if(callback){
+ callback(oForm, oTargetElement, e);
+ }
+ else{
+ throw e;
+ }
+ }
};
- xmlhttp.onreadystatechange = sarissa_dhtml_loadHandler;
- xmlhttp.send("");
+ xmlhttp.send(bUseGet?"":params);
}
catch(e){
Sarissa.updateCursor(oTargetElement, "auto");
- throw e;
+ if(callback){
+ callback(oForm, oTargetElement, e);
+ }
+ else{
+ throw e;
+ }
}
return false;
};
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/sarissa_ieemu_xpath.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/sarissa_ieemu_xpath.js 2008-02-28 19:14:15 UTC (rev 6436)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/sarissa_ieemu_xpath.js 2008-02-29 01:12:59 UTC (rev 6437)
@@ -3,7 +3,7 @@
* About
* ====================================================================
* Sarissa cross browser XML library - IE XPath Emulation
- * @version 0.9.9
+ * @version 0.9.9.3
* @author: Copyright 2004-2007 Emmanouil Batsis, mailto: mbatsis at users full stop sourceforge full stop net
*
* This script emulates Internet Explorer's selectNodes and selectSingleNode
@@ -44,7 +44,7 @@
this.length = i;
};
/** <p>Set an Array as the prototype object</p> */
- SarissaNodeList.prototype = new Array(0);
+ SarissaNodeList.prototype = [];
/** <p>Inherit the Array constructor </p> */
SarissaNodeList.prototype.constructor = Array;
/**
@@ -68,7 +68,7 @@
/** dummy, used to accept IE's stuff without throwing errors */
if(window.XMLDocument && (!XMLDocument.prototype.setProperty)){
XMLDocument.prototype.setProperty = function(x,y){};
- };
+ }
/**
* <p>Programmatically control namespace URI/prefix mappings for XPath
* queries.</p>
@@ -79,7 +79,7 @@
* are looking for elements in the null namespace. If you need to look
* for nodes in the default namespace, you need to map a prefix to it
* first like:</p>
- * <pre>Sarissa.setXpathNamespaces(oDoc, "xmlns:myprefix=&aposhttp://mynsURI&apos");</pre>
+ * <pre>Sarissa.setXpathNamespaces(oDoc, "xmlns:myprefix'http://mynsURI'");</pre>
* <p><b>Note 1 </b>: Use this method only if the source document features
* a default namespace (without a prefix), otherwise just use IE's setProperty
* (moz will rezolve non-default namespaces by itself). You will need to map that
@@ -96,8 +96,8 @@
Sarissa.setXpathNamespaces = function(oDoc, sNsSet) {
//oDoc._sarissa_setXpathNamespaces(sNsSet);
oDoc._sarissa_useCustomResolver = true;
- var namespaces = sNsSet.indexOf(" ")>-1?sNsSet.split(" "):new Array(sNsSet);
- oDoc._sarissa_xpathNamespaces = new Array(namespaces.length);
+ var namespaces = sNsSet.indexOf(" ")>-1?sNsSet.split(" "):[sNsSet];
+ oDoc._sarissa_xpathNamespaces = [];
for(var i=0;i < namespaces.length;i++){
var ns = namespaces[i];
var colonPos = ns.indexOf(":");
@@ -108,8 +108,8 @@
oDoc._sarissa_xpathNamespaces[prefix] = uri;
}else{
throw "Bad format on namespace declaration(s) given";
- };
- };
+ }
+ }
};
/**
* @private Flag to control whether a custom namespace resolver should
@@ -117,7 +117,7 @@
*/
XMLDocument.prototype._sarissa_useCustomResolver = false;
/** @private */
- XMLDocument.prototype._sarissa_xpathNamespaces = new Array();
+ XMLDocument.prototype._sarissa_xpathNamespaces = [];
/**
* <p>Extends the XMLDocument to emulate IE's selectNodes.</p>
* @argument sExpr the XPath expression to use
@@ -128,13 +128,21 @@
*/
XMLDocument.prototype.selectNodes = function(sExpr, contextNode, returnSingle){
var nsDoc = this;
- var nsresolver = this._sarissa_useCustomResolver
- ? function(prefix){
- var s = nsDoc._sarissa_xpathNamespaces[prefix];
- if(s)return s;
- else throw "No namespace URI found for prefix: '" + prefix+"'";
- }
- : this.createNSResolver(this.documentElement);
+ var nsresolver;
+ if(this._sarissa_useCustomResolver){
+ nsresolver = function(prefix){
+ var s = nsDoc._sarissa_xpathNamespaces[prefix];
+ if(s){
+ return s;
+ }
+ else {
+ throw "No namespace URI found for prefix: '" + prefix+"'";
+ }
+ };
+ }
+ else{
+ this.createNSResolver(this.documentElement);
+ }
var result = null;
if(!returnSingle){
var oResult = this.evaluate(sExpr,
@@ -143,16 +151,17 @@
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
var nodeList = new SarissaNodeList(oResult.snapshotLength);
nodeList.expr = sExpr;
- for(var i=0;i<nodeList.length;i++)
+ for(var i=0;i<nodeList.length;i++){
nodeList[i] = oResult.snapshotItem(i);
+ }
result = nodeList;
}
else {
- result = oResult = this.evaluate(sExpr,
+ result = this.evaluate(sExpr,
(contextNode?contextNode:this),
nsresolver,
XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
- };
+ }
return result;
};
/**
@@ -165,10 +174,12 @@
*/
Element.prototype.selectNodes = function(sExpr){
var doc = this.ownerDocument;
- if(doc.selectNodes)
+ if(doc.selectNodes){
return doc.selectNodes(sExpr, this);
- else
+ }
+ else{
throw "Method selectNodes is only supported by XML Elements";
+ }
};
/**
* <p>Extends the XMLDocument to emulate IE's selectSingleNode.</p>
@@ -190,10 +201,12 @@
*/
Element.prototype.selectSingleNode = function(sExpr){
var doc = this.ownerDocument;
- if(doc.selectSingleNode)
+ if(doc.selectSingleNode){
return doc.selectSingleNode(sExpr, this);
- else
+ }
+ else{
throw "Method selectNodes is only supported by XML Elements";
+ }
};
Sarissa.IS_ENABLED_SELECT_NODES = true;
-};
\ No newline at end of file
+}
\ No newline at end of file
16 years, 10 months
JBoss Rich Faces SVN: r6436 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vsukhov
Date: 2008-02-28 14:14:15 -0500 (Thu, 28 Feb 2008)
New Revision: 6436
Modified:
trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
trunk/docs/userguide/en/src/main/docbook/included/inputNumberSlider.xml
trunk/docs/userguide/en/src/main/docbook/included/inputNumberSpinner.xml
trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml
trunk/docs/userguide/en/src/main/docbook/included/panelBar.xml
trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml
trunk/docs/userguide/en/src/main/docbook/included/tabPanel.xml
trunk/docs/userguide/en/src/main/docbook/included/togglePanel.xml
Log:
http://jira.jboss.com/jira/browse/RF-2004 added information about label attribute in detail of usage.
http://jira.jboss.com/jira/browse/RF-2205 I've added additional information about Panel Menu mode attribute usage.
Modified: trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2008-02-28 19:03:43 UTC (rev 6435)
+++ trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2008-02-28 19:14:15 UTC (rev 6436)
@@ -210,7 +210,20 @@
</itemizedlist>
<para> By default, the <emphasis>
<property>"jointPoint"</property>
- </emphasis> attribute is set to "bottom-left".</para>
+ </emphasis> attribute is set to "bottom-left".</para>
+ <para>
+ The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute is a generic attribute.
+ The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute provides an association between a component, and the message that the component (indirectly) produced.
+ This attribute defines the parameters of localized error and informational messages that
+ occur as a result of conversion, validation, or other application actions during the request
+ processing lifecycle. With the help of this attribute you can replace the
+ last parameter substitution token shown in the messages. For example, {1} for “DoubleRangeValidator.MAXIMUM”, {2}
+ for “ShortConverter.SHORT”.
+ </para>
<para>The <emphasis role="bold">
<property><rich:calendar></property>
</emphasis> component allows to use <emphasis>
@@ -233,7 +246,7 @@
{elementId} elements. {weekNumber}, {weekDayLabel}, {weekDayLabelShort}, {weekDayNumber}
elements could be used for labels output, {isWeekend}, {elementId} - for additional processing
in JavaScript code.</para>
- <para>These elements are shown on the picture below.</para>
+ <para>These elements are shown on the picture below.</para>
<figure>
<title>Available elements</title>
@@ -406,7 +419,7 @@
<property>RICH_CALENDAR_CLOSE_LABEL</property>,
<property>RICH_CALENDAR_OK_LABEL</property>,
<property>RICH_CALENDAR_CLEAN_LABEL</property>,
- <property>RICH_CALENDAR_CANCEL_LABEL </property> there.
+ <property>RICH_CALENDAR_CANCEL_LABEL </property> there.
</para>
<para>You could also pack <property>org.richfaces.renderkit.calendar</property> <ulink url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
>resource</ulink> bundle with your JARs defining the same properties.
Modified: trunk/docs/userguide/en/src/main/docbook/included/inputNumberSlider.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/inputNumberSlider.xml 2008-02-28 19:03:43 UTC (rev 6435)
+++ trunk/docs/userguide/en/src/main/docbook/included/inputNumberSlider.xml 2008-02-28 19:14:15 UTC (rev 6436)
@@ -135,6 +135,19 @@
<listitem> onmouseout </listitem>
<listitem> etc. </listitem>
</itemizedlist>
+ <para>
+ The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute is a generic attribute.
+ The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute provides an association between a component, and the message that the component (indirectly) produced.
+ This attribute defines the parameters of localized error and informational messages that
+ occur as a result of conversion, validation, or other application actions during the request
+ processing lifecycle. With the help of this attribute you can replace the
+ last parameter substitution token shown in the messages. For example, {1} for “DoubleRangeValidator.MAXIMUM”, {2}
+ for “ShortConverter.SHORT”.
+ </para>
</section>
<section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/inputNumberSpinner.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/inputNumberSpinner.xml 2008-02-28 19:03:43 UTC (rev 6435)
+++ trunk/docs/userguide/en/src/main/docbook/included/inputNumberSpinner.xml 2008-02-28 19:14:15 UTC (rev 6436)
@@ -122,7 +122,19 @@
<listitem> onmouseout </listitem>
<listitem> etc. </listitem>
</itemizedlist>
-
+ <para>
+ The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute is a generic attribute.
+ The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute provides an association between a component, and the message that the component (indirectly) produced.
+ This attribute defines the parameters of localized error and informational messages that
+ occur as a result of conversion, validation, or other application actions during the request
+ processing lifecycle. With the help of this attribute you can replace the
+ last parameter substitution token shown in the messages. For example, {1} for “DoubleRangeValidator.MAXIMUM”, {2}
+ for “ShortConverter.SHORT”.
+ </para>
</section>
<section>
<title>Look-and-Feel Customization</title>
Modified: trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml 2008-02-28 19:03:43 UTC (rev 6435)
+++ trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml 2008-02-28 19:14:15 UTC (rev 6436)
@@ -299,6 +299,19 @@
<para>See also discussion about this problem on the <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4064191"
>RichFaces Users Forum</ulink>.</para>
+ <para>
+ The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute is a generic attribute.
+ The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute provides an association between a component, and the message that the component (indirectly) produced.
+ This attribute defines the parameters of localized error and informational messages that
+ occur as a result of conversion, validation, or other application actions during the request
+ processing lifecycle. With the help of this attribute you can replace the
+ last parameter substitution token shown in the messages. For example, {1} for “DoubleRangeValidator.MAXIMUM”, {2}
+ for “ShortConverter.SHORT”.
+ </para>
</section>
<section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/panelBar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelBar.xml 2008-02-28 19:03:43 UTC (rev 6435)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelBar.xml 2008-02-28 19:14:15 UTC (rev 6436)
@@ -88,6 +88,19 @@
<para><property>panelBar</property> could contain any number of child
<property>panelBarItem</property> components inside, which content is uploaded onto the
client and headers are controls to open the corresponding child element.</para>
+ <para>
+ The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute is a generic attribute.
+ The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute provides an association between a component, and the message that the component (indirectly) produced.
+ This attribute defines the parameters of localized error and informational messages that
+ occur as a result of conversion, validation, or other application actions during the request
+ processing lifecycle. With the help of this attribute you can replace the
+ last parameter substitution token shown in the messages. For example, {1} for “DoubleRangeValidator.MAXIMUM”, {2}
+ for “ShortConverter.SHORT”.
+ </para>
</section>
<section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml 2008-02-28 19:03:43 UTC (rev 6435)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml 2008-02-28 19:14:15 UTC (rev 6436)
@@ -113,7 +113,11 @@
<property>"mode"</property>
</emphasis> and <emphasis>
<property>"expandMode"</property>
- </emphasis> attributes could be used with three possible parameters.</para>
+ </emphasis> attributes could be used with three possible parameters. The <emphasis>
+ <property>"mode"</property>
+ </emphasis> attribute defines parameters for all included <emphasis role="bold">
+ <property><rich:panelMenuItem></property>
+ </emphasis> elements.</para>
<itemizedlist>
<listitem>
@@ -121,22 +125,46 @@
</listitem>
</itemizedlist>
- <para>Regular form submission request is used.</para>
-
+ <para>The common submission of the form is performed and a page is completely refreshed.</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+ <rich:panelMenu mode="server">
+ <rich:panelMenuGroup label="test Group" action="#{bean.action}">
+ <rich:panelMenuItem label="test" action="#{capitalsBean.action}">
+ <f:param value="test value" name="test"/>
+ </rich:panelMenuItem>
+ </rich:panelMenuGroup>
+ </rich:panelMenu>
+...]]></programlisting>
<itemizedlist>
<listitem>
<para>Ajax</para>
</listitem>
</itemizedlist>
- <para>Ajax submission is used for switching.</para>
-
+ <para>An Ajax form submission is performed, and additionally specified elements in the <emphasis>
+ <property>"reRender"</property>
+ </emphasis> attribute are reRendered.</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+ <rich:panelMenu mode="ajax">
+ <rich:panelMenuGroup label="test Group" action="#{bean.action}">
+ <rich:panelMenuItem label="test" reRender="test" action="#{capitalsBean.action}">
+ <f:param value="test value" name="test"/>
+ </rich:panelMenuItem>
+ </rich:panelMenuGroup>
+ </rich:panelMenu>
+...]]></programlisting>
<itemizedlist>
<listitem>
<para>None</para>
</listitem>
</itemizedlist>
-
+
<para><emphasis>
<property>"Action"</property>
</emphasis> and <emphasis>
@@ -149,7 +177,7 @@
</para>
<programlisting role="XML"><![CDATA[...
<rich:panelMenu event="onclick" submitMode="none">
- < rich:panelMenuItem label="Link to external page">
+ <rich:panelMenuItem label="Link to external page">
<h:outputLink ... >
<rich:panelMenuItem>
</rich:panelMenu>
@@ -193,7 +221,20 @@
<!--Nested panelMenu components-->
</rich:panelMenuGroup>
</rich:panelMenu>
-...]]></programlisting>
+ ...]]></programlisting>
+ <para>
+ The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute is a generic attribute.
+ The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute provides an association between a component, and the message that the component (indirectly) produced.
+ This attribute defines the parameters of localized error and informational messages that
+ occur as a result of conversion, validation, or other application actions during the request
+ processing lifecycle. With the help of this attribute you can replace the
+ last parameter substitution token shown in the messages. For example, {1} for “DoubleRangeValidator.MAXIMUM”, {2}
+ for “ShortConverter.SHORT”.
+ </para>
</section>
<section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/tabPanel.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tabPanel.xml 2008-02-28 19:03:43 UTC (rev 6435)
+++ trunk/docs/userguide/en/src/main/docbook/included/tabPanel.xml 2008-02-28 19:14:15 UTC (rev 6436)
@@ -141,7 +141,19 @@
</imageobject>
</mediaobject>
</figure>
-
+ <para>
+ The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute is a generic attribute.
+ The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute provides an association between a component, and the message that the component (indirectly) produced.
+ This attribute defines the parameters of localized error and informational messages that
+ occur as a result of conversion, validation, or other application actions during the request
+ processing lifecycle. With the help of this attribute you can replace the
+ last parameter substitution token shown in the messages. For example, {1} for “DoubleRangeValidator.MAXIMUM”, {2}
+ for “ShortConverter.SHORT”.
+ </para>
<para>Except the specific attributes, the component has all necessary attributes for JavaScript
events definition.</para>
<itemizedlist>
Modified: trunk/docs/userguide/en/src/main/docbook/included/togglePanel.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/togglePanel.xml 2008-02-28 19:03:43 UTC (rev 6435)
+++ trunk/docs/userguide/en/src/main/docbook/included/togglePanel.xml 2008-02-28 19:14:15 UTC (rev 6436)
@@ -136,7 +136,19 @@
]]></programlisting>
<para>The example shows a <property>togglePanel</property> initial state when the second facet
(panelB) is rendered and successive switching from the first to the second happens.</para>
-
+ <para>
+ The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute is a generic attribute.
+ The <emphasis>
+ <property>"label"</property>
+ </emphasis> attribute provides an association between a component, and the message that the component (indirectly) produced.
+ This attribute defines the parameters of localized error and informational messages that
+ occur as a result of conversion, validation, or other application actions during the request
+ processing lifecycle. With the help of this attribute you can replace the
+ last parameter substitution token shown in the messages. For example, {1} for “DoubleRangeValidator.MAXIMUM”, {2}
+ for “ShortConverter.SHORT”.
+ </para>
</section>
<section>
<title>Look-and-Feel Customization</title>
16 years, 10 months
JBoss Rich Faces SVN: r6435 - trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-02-28 14:03:43 -0500 (Thu, 28 Feb 2008)
New Revision: 6435
Modified:
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
navigation by tab
Modified: trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-02-28 17:55:29 UTC (rev 6434)
+++ trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-02-28 19:03:43 UTC (rev 6435)
@@ -18,7 +18,7 @@
switchingStatesHandler : function($super, e) {
var el = (e.srcElement) ? e.srcElement : e.target;
- if (el.id == this.inplaceInput.id) {
+ if ((el.id == this.inplaceInput.id) || (e.type == "focus")) {
$super(e);
} else {
this.tempValueKeeper.focus();
16 years, 10 months
JBoss Rich Faces SVN: r6434 - management/design/standardComponent.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-02-28 12:55:29 -0500 (Thu, 28 Feb 2008)
New Revision: 6434
Modified:
management/design/standardComponent/Func-Spec-StdControls.doc
Log:
Hyperlinks added
Modified: management/design/standardComponent/Func-Spec-StdControls.doc
===================================================================
(Binary files differ)
16 years, 10 months
JBoss Rich Faces SVN: r6433 - trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-02-28 12:49:23 -0500 (Thu, 28 Feb 2008)
New Revision: 6433
Modified:
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
openOnEdit attribute was added
Modified: trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-02-28 17:42:21 UTC (rev 6432)
+++ trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-02-28 17:49:23 UTC (rev 6433)
@@ -23,7 +23,11 @@
} else {
this.tempValueKeeper.focus();
}
- if (this.attributes.openOnEdit && !this.comboList.isList) {
+ },
+
+ startEditableState : function($super, textSize) {
+ $super(textSize);
+ if (this.attributes.openOnEdit) {
this.comboList.showWithDelay();
}
},
16 years, 10 months
JBoss Rich Faces SVN: r6432 - trunk/sandbox/ui/inplaceSelect/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-28 12:42:21 -0500 (Thu, 28 Feb 2008)
New Revision: 6432
Modified:
trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
Log:
add openOnEdit
Modified: trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-02-28 17:41:43 UTC (rev 6431)
+++ trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-02-28 17:42:21 UTC (rev 6432)
@@ -169,7 +169,7 @@
inputWidth : '#{component.attributes["selectWidth"]}',
minInputWidth : '#{component.attributes["minSelectWidth"]}',
maxInputWidth : '#{component.attributes["maxSelectWidth"]}',
- openOnEdit:'#{component.attributes["openOnEdit"]}'
+ openOnEdit:#{component.attributes["openOnEdit"]}
};
var richInplaceSelEvents = {oneditactivation : #{this:getAsEventHandler(context, component, "oneditactivation")},
16 years, 10 months
JBoss Rich Faces SVN: r6431 - trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-28 12:41:43 -0500 (Thu, 28 Feb 2008)
New Revision: 6431
Modified:
trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/css/inplaceinput.xcss
Log:
add inset styles
Modified: trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/css/inplaceinput.xcss
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/css/inplaceinput.xcss 2008-02-28 17:32:45 UTC (rev 6430)
+++ trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/css/inplaceinput.xcss 2008-02-28 17:41:43 UTC (rev 6431)
@@ -31,7 +31,8 @@
}
.rich-inplace-field {
- border:0px none;
+ border-width: 1px;
+ border-style: inset;
margin:0px;
padding:0px 0px 0px 0px;
}
@@ -160,6 +161,7 @@
<u:selector name=".rich-inplace-field">
<u:style name="background-color" skin="editBackgroundColor"/>
+ <u:style name="border-color" skin="panelBorderColor"/>
</u:selector>
16 years, 10 months
JBoss Rich Faces SVN: r6430 - trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-02-28 12:32:45 -0500 (Thu, 28 Feb 2008)
New Revision: 6430
Modified:
trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanComparator2.java
Log:
RF-1741
Modified: trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanComparator2.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanComparator2.java 2008-02-28 16:54:19 UTC (rev 6429)
+++ trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanComparator2.java 2008-02-28 17:32:45 UTC (rev 6430)
@@ -45,7 +45,7 @@
result = ((Comparator<Object>)p1).compare(w1.getWrappedObject(), w2.getWrappedObject());
} else if (p1 instanceof String && p2 instanceof String) {
result = ((String)p1).trim().compareToIgnoreCase(((String)p2).trim());
- } if (p1 instanceof Comparable && p2 instanceof Comparable) {
+ } else if (p1 instanceof Comparable && p2 instanceof Comparable) {
result = ((Comparable<Object>) p1).compareTo(p2);
} else if (p1 == null && p2 != null) {
result = 1;
16 years, 10 months
JBoss Rich Faces SVN: r6429 - Plan/3.2.0 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-02-28 11:54:19 -0500 (Thu, 28 Feb 2008)
New Revision: 6429
Modified:
trunk/test-applications/qa/Test Plan/3.2.0/TestPlan-RF-3.2.0.doc
Log:
Modified: trunk/test-applications/qa/Test Plan/3.2.0/TestPlan-RF-3.2.0.doc
===================================================================
(Binary files differ)
16 years, 10 months