JBoss Rich Faces SVN: r9823 - trunk/framework/impl/src/main/java/org/ajax4jsf/request.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-07-30 06:46:45 -0400 (Wed, 30 Jul 2008)
New Revision: 9823
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/request/MultipartRequest.java
Log:
RF-4003
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/request/MultipartRequest.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/request/MultipartRequest.java 2008-07-30 08:22:27 UTC (rev 9822)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/request/MultipartRequest.java 2008-07-30 10:46:45 UTC (rev 9823)
@@ -55,6 +55,8 @@
private Map<String, Param> parameters = null;
private Map<String, Object> percentMap = null;
+
+ private Map<Object, Object> attributes = Collections.synchronizedMap(new HashMap<Object, Object>());
private enum ReadState {
BOUNDARY, HEADERS, DATA
@@ -271,14 +273,11 @@
}
}
- private HttpServletRequest request;
-
private boolean shouldStop = false;
public MultipartRequest(HttpServletRequest request,
boolean createTempFiles, int maxRequestSize, String uid) {
super(request);
- this.request = request;
this.createTempFiles = createTempFiles;
this.uid = uid;
@@ -297,7 +296,7 @@
String fileName = null;
try {
- if (request.getParameter("_richfaces_send_http_error") != null) {
+ if (getRequest().getParameter("_richfaces_send_http_error") != null) {
fileName = new String(name.getBytes(encoding), "UTF-8");
} else {
StringBuffer buffer = new StringBuffer();
@@ -335,13 +334,13 @@
}
public boolean parseRequest() {
- byte[] boundaryMarker = getBoundaryMarker(request.getContentType());
+ byte[] boundaryMarker = getBoundaryMarker(super.getContentType());
if (boundaryMarker == null) {
throw new FileUploadException("The request was rejected because "
+ "no multipart boundary was found");
}
- encoding = request.getCharacterEncoding();
+ encoding = getCharacterEncoding();
parameters = new HashMap<String, Param>();
@@ -355,7 +354,7 @@
ReadState readState = ReadState.BOUNDARY;
- InputStream input = request.getInputStream();
+ InputStream input = getInputStream();
if (!shouldStop) {
int read = input.read(buffer);
@@ -720,4 +719,25 @@
public void stop() {
shouldStop = true;
}
+
+
+ @Override
+ public Object getAttribute(String name) {
+ Object o = attributes.get(name);
+ if (o == null) {
+ getRequest().getAttribute(name);
+ }
+ return o;
+ }
+
+ @Override
+ public void setAttribute(String name, Object o) {
+ attributes.put(name, o);
+ getRequest().setAttribute(name, o);
+ }
+
+ @Override
+ public String getContentType() {
+ return "application/x-www-form-urlencoded";
+ }
}
16 years, 5 months
JBoss Rich Faces SVN: r9822 - trunk/test-applications/jsp/src/main/java/util/event.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-07-30 04:22:27 -0400 (Wed, 30 Jul 2008)
New Revision: 9822
Modified:
trunk/test-applications/jsp/src/main/java/util/event/Event.java
Log:
Modified: trunk/test-applications/jsp/src/main/java/util/event/Event.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/util/event/Event.java 2008-07-30 07:25:11 UTC (rev 9821)
+++ trunk/test-applications/jsp/src/main/java/util/event/Event.java 2008-07-30 08:22:27 UTC (rev 9822)
@@ -125,6 +125,7 @@
private String onitemmouseout;
private String onitemmouseover;
private String onitemmouseup;
+ private String onpagechange;
/* --- */
public String getOpened() {
@@ -139,6 +140,7 @@
public Event() {
/* Events for toolBar */
onitemclick = "showEvent('infoFormID:infoSubview:onitemclickInputID', 'onitemclick work!')";
+ onpagechange = "showEvent('infoFormID:infoSubview:onpagechangeInputID', 'onpagechange work!')";
onitemdblclick = "showEvent('infoFormID:infoSubview:onitemdblclickInputID', 'onitemdblclick work!')";
onitemkeydown = "showEvent('infoFormID:infoSubview:onitemkeydownInputID', 'onitemkeydown work!')";
onitemkeypress = "showEvent('infoFormID:infoSubview:onitemkeypressInputID', 'onitemkeypress work!')";
@@ -1386,4 +1388,12 @@
this.onitemmouseup = onitemmouseup;
}
+ public String getOnpagechange() {
+ return onpagechange;
+ }
+
+ public void setOnpagechange(String onpagechange) {
+ this.onpagechange = onpagechange;
+ }
+
}
\ No newline at end of file
16 years, 5 months
JBoss Rich Faces SVN: r9821 - trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-07-30 03:25:11 -0400 (Wed, 30 Jul 2008)
New Revision: 9821
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableDragDropRenderer.java
Log:
delete existing JS variable before creating new
Modified: trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableDragDropRenderer.java
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableDragDropRenderer.java 2008-07-30 07:23:41 UTC (rev 9820)
+++ trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableDragDropRenderer.java 2008-07-30 07:25:11 UTC (rev 9821)
@@ -48,7 +48,7 @@
private JSFunction preSendAjaxRequestFunction;
- private TableDragDropRenderer(FacesContext context) {
+ private TableDragDropRenderer(FacesContext context) {
super();
this.context = context;
}
@@ -109,7 +109,8 @@
*/
public void renderDragSupport(UIColumn column, String dragSourceId,
String indicatorId, String dragLabel) throws IOException {
- StringBuffer buffer = new StringBuffer();
+ String varName = "DnD_ExtSimpleDraggable_"+column.getId().replaceAll("[^A-Za-z0-9_]", "_");
+ StringBuffer buffer = new StringBuffer("delete " + varName + ";\nvar " + varName + " = ");
JSFunction function = new JSFunction("new DnD.ExtSimpleDraggable");
function.addParameter(dragSourceId);
String dragSourceScriptId = column.getClientId(context) + ":"
@@ -161,7 +162,8 @@
// DropzoneRendererContributor.getInstance();
DropzoneRendererContributor contributor = DropzoneRendererContributor
.getInstance();
- StringBuffer buffer = new StringBuffer();
+ String varName = "DnD_ExtSimpleDropZone_"+column.getId().replaceAll("[^A-Za-z0-9_]", "_") + (before?"L":"R");
+ StringBuffer buffer = new StringBuffer("delete " + varName + ";\nvar " + varName + " = ");
JSFunction function = new JSFunction("new DnD.ExtSimpleDropZone");
function.addParameter(dropTargetId);
ScriptOptions dropOptions = contributor.buildOptions(context, column);
16 years, 5 months
JBoss Rich Faces SVN: r9820 - trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-07-30 03:23:41 -0400 (Wed, 30 Jul 2008)
New Revision: 9820
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js
Log:
null all references to DOM elements on destroy
improve performance by changing "for" loops
Modified: trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2008-07-29 22:32:17 UTC (rev 9819)
+++ trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2008-07-30 07:23:41 UTC (rev 9820)
@@ -35,13 +35,44 @@
},
destroy: function() {
- var rows = this.tableB.rows;
- rowCount = rows.length;
- for(var i = 0; i < rowCount; i++) {
- this.header.removeListeners();
- Utils.DOM.Event.removeListeners(rows[i]);
- }
+ //var rows = this.tableB.rows;
+ //rowCount = rows.length;
+ //for(var i = 0; i < rowCount; i++) {
+ // Utils.DOM.Event.removeListeners(rows[i]);
+ //}
+
+ //remove listeners
+ this.selectionManager.removeListeners();
this.header.removeListeners();
+
+ var l = this.groupRows.length;
+ for(var i = 0; i < l; i++) {
+ Utils.DOM.Event.removeListeners(this.groupRows[i]);
+ }
+
+ var headerChildren = this.header.getColumnCells();
+ l = headerChildren.length;
+ for (var i=0; i<l-1; i++) {
+ Utils.DOM.Event.removeListeners(headerChildren[i]);
+ };
+
+ //null all references to DOM elements
+ delete this.selectionManager;
+ delete this.header;
+ delete this.footer;
+
+ $(this.id).component = null;
+ this.table = null;
+ this.splashScreen = null;
+ this.mainDiv = null;
+ this.outerDiv = null;
+ this.tableB = null;
+ this.fakeIeRow = null;
+ this.fakeIeBodyRow = null;
+ this.cols = null;
+ this.scrollingDiv = null;
+ this.groupRows = null;
+ this.groups = null;
},
/**
@@ -113,8 +144,8 @@
preSendAjaxRequest: function(){
//remove listeners
Event.stopObserving(window, 'resize', this.eventContainerResize);
- Event.stopObserving(document, 'mousemove', this.header.eventSepMouseMove);
- Event.stopObserving(document, 'mouseup', this.header.eventSepMouseUp);
+ //Event.stopObserving(document, 'mousemove', this.header.eventSepMouseMove);
+ //Event.stopObserving(document, 'mouseup', this.header.eventSepMouseUp);
//show splash screen
this.showSplashScreen();
},
@@ -205,7 +236,8 @@
//prevent IE from showing borders of cells
//which parents have been hidden :|
var cells = group[i].childNodes;
- for (var j=0; j<cells.length; j++) {
+ var l = cells.length;
+ for (var j = 0; j < l; j++) {
cells[j].style.borderStyle = sBorderStyle;
}
}
@@ -300,7 +332,6 @@
updateLayout: function() {
var table = this.table.getElement();
- this.grid = table;
var outerDiv = this.outerDiv.getElement();
var cols = this.getColumns();
var header = this.header;
@@ -349,7 +380,8 @@
newHeight -= this.header.getCaptionHeight();
ClientUILib.log(ClientUILogger.INFO, "footerHeight: " + footerHeight);
scrollingDiv.setStyle('height:'+ newHeight +'px;');
- for (var i=0; i<headerChildren.length-1; i++) {
+ var l = headerChildren.length;
+ for (var i=0; i < l-1; i++) {
var headerChild = headerChildren[i];
Utils.DOM.Event.removeListeners(headerChild);
Utils.DOM.Event.observe(headerChild,'mouseover',this.header.eventHeaderCellMouseOver);
Modified: trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2008-07-29 22:32:17 UTC (rev 9819)
+++ trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2008-07-30 07:23:41 UTC (rev 9820)
@@ -52,7 +52,8 @@
removeListeners: function() {
var columnCells = this.getColumnCells();
- for (var i=0; i<columnCells.length-1; i++) {
+ var l = columnCells.length;
+ for (var i = 0; i< l-1; i++) {
var headerChild = columnCells[i];
var headerChildChildren = headerChild.childElements();
var sepSpan = headerChildChildren[2];
@@ -65,7 +66,8 @@
getVisibleWidth: function() {
var sum = 0;
- for(var i=0; i<this.getColumnsNumber()-1; i++){
+ var l = this.getColumnsNumber();
+ for(var i = 0; i < l-1; i++){
sum += this.getColumnWidth(i);
}
return sum;
@@ -161,7 +163,8 @@
var columnCells = this.getColumnCells();
this._redrawTable(this.extDt.table.getElement());
this._redrawTable(this.extDt.tableB);
- for (var i=0; i<columnCells.length-1; i++) {
+ var l = columnCells.length;
+ for (var i=0; i<l-1; i++) {
var headerChild = columnCells[i];
var headerNextChild = columnCells[i+1];
var headerChildChildren = headerChild.childElements();
Modified: trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js 2008-07-29 22:32:17 UTC (rev 9819)
+++ trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js 2008-07-30 07:23:41 UTC (rev 9820)
@@ -69,7 +69,8 @@
getSelectedIdsQuantity: function() {
var number = 0;
- for (var i = 0; i < this.ranges.length; i++) {
+ var l = this.ranges.length;
+ for (var i = 0; i < l; i++) {
number+= this.ranges[i].size();
}
return number;
@@ -123,15 +124,17 @@
clone: function() {
var ret = Object.extend(new Object(),this);
- ret.ranges = new Array(ret.ranges.length);
- for (var i = 0; i < ret.ranges.length; i++) {
+ var l = ret.ranges.length;
+ ret.ranges = new Array(l);
+ for (var i = 0; i < l; i++) {
ret.ranges[i] = this.ranges[i].clone();
}
return ret;
},
each: function(iterator) {
- for (var i = 0; i < this.ranges.length; i++) {
+ var l = this.ranges.length;
+ for (var i = 0; i < l; i++) {
this.ranges[i].each(iterator);
}
},
@@ -151,7 +154,8 @@
}
this.ranges = new Array(rangeStrRArray.length);
var indexStrRArray;
- for(var i = 0; i < this.ranges.length; i++) {
+ var l = this.ranges.length;
+ for(var i = 0; i < l; i++) {
indexStrRArray = rangeStrRArray[i].split(",");
this.ranges[i] = new ExtendedDataTable.Range(parseInt(indexStrRArray[0]), parseInt(indexStrRArray[1]));
}
@@ -234,7 +238,8 @@
}.bind(this)
});
if (document.selection) {
- Event.observe(this.gridElement, "click", this.resetSelection.bindAsEventListener(this));
+ this.eventResetSelection = this.resetSelection.bindAsEventListener(this);
+ Event.observe(this.gridElement, "click", this.eventResetSelection);
}
this.eventLostFocus = this.processLostFocus.bindAsEventListener(this);
@@ -330,7 +335,8 @@
//prevent IE from showing borders of cells
//which parents have been hidden :|
var cells = nrows[i].childNodes;
- for (var j=0; j<cells.length; j++) {
+ var l = cells.length;
+ for (var j = 0; j < l; j++) {
cells[j].style.borderStyle = 'none';
}
}
@@ -360,6 +366,22 @@
}
},
+ removeListeners: function(){
+ Event.stopObserving(document, "keydown", this.eventKeyPress);
+ if (document.selection) {
+ Event.stopObserving(this.gridElement, "click", this.eventResetSelection);
+ }
+ Event.stopObserving(document, "click", this.eventLostFocus);
+ Event.stopObserving(this.gridElement, "click", this.eventPreventLostFocus);
+ if(this.options.selectionMode != "none") {
+ var nrows = $(this.prefix + ":n").rows;
+ var rowCount = nrows.length;
+ for(var i = 0; i < this.rowCount; i++) {
+ Utils.DOM.Event.removeListeners(nrows[i]);
+ }
+ }
+ },
+
/* getGridSelection: function() {
return this.selection.getRanges();
},*/
@@ -548,7 +570,8 @@
setSelection: function(range) {
//TODO test for extreemes - first rows, last rows, all rows
- for(var i = this.selection.ranges.length - 1;i >= 0;i--) {
+ var l = this.selection.ranges.length;
+ for(var i = l - 1;i >= 0; i--) {
var selection = this.selection.ranges[i].indexes;
if(selection == range) {
continue;
16 years, 5 months
JBoss Rich Faces SVN: r9819 - in trunk/framework/impl/src/main/java/org/ajax4jsf: xml/serializer and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-07-29 18:32:17 -0400 (Tue, 29 Jul 2008)
New Revision: 9819
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoParser.java
trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToHTMLStream.java
Log:
https://jira.jboss.org/jira/browse/RF-3607
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoParser.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoParser.java 2008-07-29 15:06:03 UTC (rev 9818)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoParser.java 2008-07-29 22:32:17 UTC (rev 9819)
@@ -360,14 +360,14 @@
// <title> or <base> in the head
if (!("title".equalsIgnoreCase(element.rawname) || "base"
.equalsIgnoreCase(element.rawname))) {
- insertResources();
+ insertResources(element.prefix, element.uri);
}
} else {
if (!haveHtml) {
insertStartElement("html");
}
insertStartElement("head");
- insertResources();
+ insertResources(element.prefix, element.uri);
insertEndElement("head");
}
@@ -411,12 +411,12 @@
}
}
if (!headParsed && "head".equalsIgnoreCase(element.rawname)) {
- insertResources();
+ insertResources(element.prefix, element.uri);
}
super.endElement(element, augs);
}
- private void insertResources() {
+ private void insertResources(String prefix, String uri) {
headParsed = true;
if (headEvents != null && headEvents.length > 0) {
@@ -429,14 +429,15 @@
SAXStartElementEvent startElementEvent = (SAXStartElementEvent) event;
String elementName = startElementEvent.getName();
- QName element = new QName(null, elementName, elementName, null);
+ QName element = new QName(prefix, elementName, elementName, uri);
stack.add(element);
XMLAttributes attrs = new XMLAttributesImpl();
for (Map.Entry<String, String> entry : startElementEvent.getAttributes().entrySet()) {
+
String name = entry.getKey();
String value = entry.getValue();
- attrs.addAttribute(new QName(null, name, name, null), "CDATA", value);
+ attrs.addAttribute(new QName(prefix, name, name, uri), "CDATA", value);
}
if (depth++ == 0) {
@@ -483,12 +484,12 @@
// <title> or <base> in the head
if (!("title".equalsIgnoreCase(name.rawname) || "base"
.equalsIgnoreCase(name.rawname))) {
- insertResources();
+ insertResources(name.prefix, name.uri);
}
} else if ("head".equalsIgnoreCase(name.rawname)) {
haveHead = true;
super.startElement(name, attributes, augmentation);
- insertResources();
+ insertResources(name.prefix, name.uri);
insertEndElement(name.rawname);
return;
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToHTMLStream.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToHTMLStream.java 2008-07-29 15:06:03 UTC (rev 9818)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/xml/serializer/ToHTMLStream.java 2008-07-29 22:32:17 UTC (rev 9819)
@@ -51,6 +51,8 @@
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
+import static org.ajax4jsf.xml.serializer.ToXHTMLStream.*;
+
/**
* This serializer takes a series of SAX or
* SAX-like events and writes its output
@@ -799,7 +801,7 @@
// if this element has a namespace then treat it like XML
- if (null != namespaceURI && namespaceURI.length() > 0)
+ if (null != namespaceURI && namespaceURI.length() > 0 && (!XHTML_NAMESPACE_URI.equals(namespaceURI)))
{
super.startElement(namespaceURI, localName, name, atts);
@@ -913,7 +915,7 @@
closeCDATA();
// if the element has a namespace, treat it like XML, not HTML
- if (null != namespaceURI && namespaceURI.length() > 0)
+ if (null != namespaceURI && namespaceURI.length() > 0 && (!XHTML_NAMESPACE_URI.equals(namespaceURI)))
{
super.endElement(namespaceURI, localName, name);
16 years, 5 months
JBoss Rich Faces SVN: r9818 - trunk/docs/cdkguide/en/src/main/docbook.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-07-29 11:06:03 -0400 (Tue, 29 Jul 2008)
New Revision: 9818
Modified:
trunk/docs/cdkguide/en/src/main/docbook/master.xml
Log:
https://jira.jboss.org/jira/browse/RF-3783 - Creating a Renderer section fixed
Modified: trunk/docs/cdkguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-07-29 13:38:19 UTC (rev 9817)
+++ trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-07-29 15:06:03 UTC (rev 9818)
@@ -84,15 +84,26 @@
</keywordset>
</sectioninfo>
<title>Creating a Renderer</title>
- <para> Renderer is responsible for the JSF component representation. It generates the
+ <para>
+ Component functionality typically centers around two actions:
+ <property>decoding</property> and <property>encoding</property> data.
+ Decoding is the process of converting incoming request parameters to the values of the component.
+ Encoding is converting the current values of the component into the corresponding markup. In the
+ following figure you can see decoding and encoding occur in the JSF lifecycle:
+ </para>
+ <!-- PIC -->
+ <para>
+ Thus, JSF components consist of two parts: the <property>component class</property> and the <property>renderer</property>.
+ The <property>component class</property> is responsible for the state and behavior of a UI component and will be discussed later in the <property>"Configuring component"</property> section.
+ </para>
+ <para>The <property>Renderer</property> is responsible for the JSF component representation. It generates the
appropriate client-side markup, such as HTML, WML, XUL, etc. Renderer is also
responsible for the converting information coming from the client to the proper type
for the component (for example, a string value from the request is converted to a
- strongly type <code>Date</code> object). </para>
+ strongly type <code>Date</code> object).
+ </para>
<para>
- It is necessary to create following renderer classes for the <emphasis role="bold">
- <property><inputDate></property>
- </emphasis> component:
+ It is necessary to create following renderer classes for the <emphasis role="bold"><property><inputDate></property></emphasis> component:
</para>
<itemizedlist>
<listitem>
16 years, 5 months
JBoss Rich Faces SVN: r9817 - in trunk/test-applications/jsp/src/main: webapp/DataFilterSlider and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-07-29 09:38:19 -0400 (Tue, 29 Jul 2008)
New Revision: 9817
Modified:
trunk/test-applications/jsp/src/main/java/dataGrid/DataGrid.java
trunk/test-applications/jsp/src/main/webapp/DataFilterSlider/DataFilterSlider.jsp
trunk/test-applications/jsp/src/main/webapp/DataFilterSlider/DataFilterSliderProperty.jsp
trunk/test-applications/jsp/src/main/webapp/DataGrid/DataGridProperty.jsp
Log:
changes in dataFilterSlider
Modified: trunk/test-applications/jsp/src/main/java/dataGrid/DataGrid.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/dataGrid/DataGrid.java 2008-07-29 13:37:11 UTC (rev 9816)
+++ trunk/test-applications/jsp/src/main/java/dataGrid/DataGrid.java 2008-07-29 13:38:19 UTC (rev 9817)
@@ -11,10 +11,10 @@
public class DataGrid {
- public static final String[] carMake = {"Mersedes-Benz", "Audi", "BMW", "Ford", "Ferrari"};
- public static final String[] carModel = {"S65AMG", "RS4", "M6", "GT40", "550 Maranello"};
- public static final String[] carMileage = {"0 km", "0 km", "0 km", "0 km", "0 km"};
- public static final String[] carPrice = {"125000 eur", "55000 eur", "75000 eur", "255000 eur", "246000 eur"};
+ public static final String[] carMake = {"Mersedes-Benz", "Audi", "BMW", "Ford", "Ferrari", "Jaguar", "Bently", "Rolls-Royse", "Bugatti", "Porshe"};
+ public static final String[] carModel = {"S65AMG", "RS4", "M6", "GT40", "550 Maranello", "XJ", "Brookland", "Phantom", "Veyron", "Carerra GT"};
+ public static final String[] carMileage = {"0 km", "0 km", "0 km", "0 km", "0 km", "123 km", "0 km", "250 km", "0 km", ""};
+ public static final String[] carPrice = {"125000 eur", "55000 eur", "75000 eur", "255000 eur", "246000 eur", "85000 usd", "430000 eur", "325000 eur", "1200000 eur", "750000 usd"};
public DataGrid() {
border = "2px";
Modified: trunk/test-applications/jsp/src/main/webapp/DataFilterSlider/DataFilterSlider.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DataFilterSlider/DataFilterSlider.jsp 2008-07-29 13:37:11 UTC (rev 9816)
+++ trunk/test-applications/jsp/src/main/webapp/DataFilterSlider/DataFilterSlider.jsp 2008-07-29 13:38:19 UTC (rev 9817)
@@ -22,11 +22,11 @@
onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}"
onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}"
onmouseup="#{event.onmouseup}"
- onSlideSubmit="true">
+ onchange="#{event.onchange}" onslide="#{event.onslide}" submitOnSlide="true" >
</rich:dataFilterSlider>
<h:panelGrid id="list-body">
- <h:dataTable id="carIndex" rows="10"
+ <h:dataTable id="carIndex" rows="10"
binding="#{inventoryList.carMakeIndexUIData}"
value="#{inventoryList.carMakeIndex}" var="category"
styleClass="list-table1" columnClasses="column-index"
@@ -42,7 +42,7 @@
</h:column>
</h:dataTable>
- <h:dataTable id="carList" rows="10"
+ <h:dataTable id="carList" rows="10" rendered="#{dfs.rendered}"
value="#{inventoryList.carInventory}" var="category"
rowClasses="list-row1, list-row2" columnClasses="column"
headerClass="list-header" styleClass="list-table2">
Modified: trunk/test-applications/jsp/src/main/webapp/DataFilterSlider/DataFilterSliderProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DataFilterSlider/DataFilterSliderProperty.jsp 2008-07-29 13:37:11 UTC (rev 9816)
+++ trunk/test-applications/jsp/src/main/webapp/DataFilterSlider/DataFilterSliderProperty.jsp 2008-07-29 13:38:19 UTC (rev 9817)
@@ -4,12 +4,10 @@
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="dataFilterSliderPropertySubviewID">
-<h:commandButton value="add test" action="#{dfs.addHtmlCalendar}"></h:commandButton>
+<h:commandButton value="add test" action="#{dfs.addHtmlDataFilterSlider}"></h:commandButton>
<h:panelGrid columns="2">
<h:outputText value="Rendered:" />
- <h:selectBooleanCheckbox value="#{dfs.rendered}" >
- <a4j:support event="onclick" reRender="p1"></a4j:support>
- </h:selectBooleanCheckbox>
+ <h:selectBooleanCheckbox value="#{dfs.rendered}" onchange="submit();" />
</h:panelGrid>
<br />
<br />
Modified: trunk/test-applications/jsp/src/main/webapp/DataGrid/DataGridProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DataGrid/DataGridProperty.jsp 2008-07-29 13:37:11 UTC (rev 9816)
+++ trunk/test-applications/jsp/src/main/webapp/DataGrid/DataGridProperty.jsp 2008-07-29 13:38:19 UTC (rev 9817)
@@ -32,9 +32,6 @@
<h:outputText value="first: " />
<h:inputText onchange="submit();" value="#{dataGrid.first}" />
- <h:outputText value="border: " />
- <h:inputText onchange="submit();" value="#{dataGrid.border}" />
-
<h:outputText value="cellspacing: " />
<h:inputText onchange="submit();" value="#{dataGrid.cellspacing}" />
16 years, 5 months
JBoss Rich Faces SVN: r9816 - in trunk/test-applications/facelets/src/main: java/dfs and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-07-29 09:37:11 -0400 (Tue, 29 Jul 2008)
New Revision: 9816
Modified:
trunk/test-applications/facelets/src/main/java/dataGrid/DataGrid.java
trunk/test-applications/facelets/src/main/java/dfs/DemoSliderBean.java
trunk/test-applications/facelets/src/main/webapp/DataFilterSlider/DataFilterSlider.xhtml
trunk/test-applications/facelets/src/main/webapp/DataFilterSlider/DataFilterSliderProperty.xhtml
Log:
some changes in dataFilterSlider
Modified: trunk/test-applications/facelets/src/main/java/dataGrid/DataGrid.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/dataGrid/DataGrid.java 2008-07-29 13:23:58 UTC (rev 9815)
+++ trunk/test-applications/facelets/src/main/java/dataGrid/DataGrid.java 2008-07-29 13:37:11 UTC (rev 9816)
@@ -11,10 +11,10 @@
public class DataGrid {
- public static final String[] carMake = {"Mersedes-Benz", "Audi", "BMW", "Ford", "Ferrari"};
- public static final String[] carModel = {"S65AMG", "RS4", "M6", "GT40", "550 Maranello"};
- public static final String[] carMileage = {"0 km", "0 km", "0 km", "0 km", "0 km"};
- public static final String[] carPrice = {"125000 eur", "55000 eur", "75000 eur", "255000 eur", "246000 eur"};
+ public static final String[] carMake = {"Mersedes-Benz", "Audi", "BMW", "Ford", "Ferrari", "Jaguar", "Bently", "Rolls-Royse", "Bugatti", "Porshe"};
+ public static final String[] carModel = {"S65AMG", "RS4", "M6", "GT40", "550 Maranello", "XJ", "Brookland", "Phantom", "Veyron", "Carerra GT"};
+ public static final String[] carMileage = {"0 km", "0 km", "0 km", "0 km", "0 km", "123 km", "0 km", "250 km", "0 km", ""};
+ public static final String[] carPrice = {"125000 eur", "55000 eur", "75000 eur", "255000 eur", "246000 eur", "85000 usd", "430000 eur", "325000 eur", "1200000 eur", "750000 usd"};
public DataGrid() {
border = "2px";
Modified: trunk/test-applications/facelets/src/main/java/dfs/DemoSliderBean.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/dfs/DemoSliderBean.java 2008-07-29 13:23:58 UTC (rev 9815)
+++ trunk/test-applications/facelets/src/main/java/dfs/DemoSliderBean.java 2008-07-29 13:37:11 UTC (rev 9816)
@@ -21,9 +21,12 @@
package dfs;
+import org.richfaces.component.html.HtmlDataFilterSlider;
import org.richfaces.event.DataFilterSliderEvent;
+import util.componentInfo.ComponentInfo;
+
/**
* @author $Autor$
*
@@ -33,6 +36,7 @@
private DemoInventoryList demoInventoryList;
private String action;
private String actionListener;
+ private HtmlDataFilterSlider htmlDataFilterSlider = null;
public DemoSliderBean() {
rendered = true;
@@ -40,6 +44,12 @@
actionListener = "---";
}
+ public String addHtmlDataFilterSlider(){
+ ComponentInfo info = ComponentInfo.getInstance();
+ info.addField(htmlDataFilterSlider);
+ return null;
+ }
+
public void setDemoInventoryList(DemoInventoryList demoInventoryList) {
this.demoInventoryList = demoInventoryList;
}
@@ -90,4 +100,12 @@
public String getActionListener() {
return actionListener;
}
+
+ public HtmlDataFilterSlider getHtmlDataFilterSlider() {
+ return htmlDataFilterSlider;
+ }
+
+ public void setHtmlDataFilterSlider(HtmlDataFilterSlider htmlDataFilterSlider) {
+ this.htmlDataFilterSlider = htmlDataFilterSlider;
+ }
}
\ No newline at end of file
Modified: trunk/test-applications/facelets/src/main/webapp/DataFilterSlider/DataFilterSlider.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/DataFilterSlider/DataFilterSlider.xhtml 2008-07-29 13:23:58 UTC (rev 9815)
+++ trunk/test-applications/facelets/src/main/webapp/DataFilterSlider/DataFilterSlider.xhtml 2008-07-29 13:37:11 UTC (rev 9816)
@@ -2,7 +2,7 @@
<f:subview xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" id="dataFilterSliderSubviewID">
<rich:dataFilterSlider sliderListener="#{dfs.doSlide}" action="#{dfs.act}" actionListener="#{dfs.actListener}"
- rendered="#{dfs.rendered}" binding="#{inventoryList.dataFilterSlider}"
+ rendered="#{dfs.rendered}" binding="#{dfs.htmlDataFilterSlider}"
for="carList" forValRef="inventoryList.carInventory"
filterBy="getMileage" manualInput="true" storeResults="true" width="400px"
styleClass="#{style.styleClass}" rangeStyleClass="#{style.rangeStyleClass}" trailerStyleClass="#{style.trailerStyleClass}" style="#{style.style}" fieldStyleClass="#{style.fieldStyleClass}" trackStyleClass="#{style.trackStyleClass}" handleStyleClass="#{style.handleStyleClass}"
@@ -36,7 +36,7 @@
</h:column>
</h:dataTable>
- <h:dataTable id="carList" rows="10"
+ <h:dataTable id="carList" rows="10" rendered="#{dfs.rendered}"
value="#{inventoryList.carInventory}" var="category"
rowClasses="list-row1, list-row2" columnClasses="column"
headerClass="list-header" styleClass="list-table2">
Modified: trunk/test-applications/facelets/src/main/webapp/DataFilterSlider/DataFilterSliderProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/DataFilterSlider/DataFilterSliderProperty.xhtml 2008-07-29 13:23:58 UTC (rev 9815)
+++ trunk/test-applications/facelets/src/main/webapp/DataFilterSlider/DataFilterSliderProperty.xhtml 2008-07-29 13:37:11 UTC (rev 9816)
@@ -5,16 +5,14 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
id="dataFilterSliderPropertySubviewID">
- <h:commandButton action="#{inventoryList.add}" value="add test" />
+ <h:commandButton action="#{dfs.addHtmlDataFilterSlider}" value="add test" />
<h:panelGrid columns="2">
<h:outputText value="Rendered:" />
- <h:selectBooleanCheckbox value="#{dfs.rendered}">
- <a4j:support event="onclick" reRender="p1"></a4j:support>
- </h:selectBooleanCheckbox>
+ <h:selectBooleanCheckbox value="#{dfs.rendered}" onchange="submit();" />
</h:panelGrid>
<br />
<br />
- <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
+ <!-- <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
<h:panelGrid columns="2">
<rich:column>
<a4j:commandLink value="getEndRange" reRender="findID"></a4j:commandLink>
@@ -22,5 +20,5 @@
<rich:column id="findID">
<h:outputText value="#{rich:findComponent('dfsID').endRange}" />
</rich:column>
- </h:panelGrid>
+ </h:panelGrid> -->
</f:subview>
\ No newline at end of file
16 years, 5 months
JBoss Rich Faces SVN: r9815 - trunk/ui/assembly.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-07-29 09:23:58 -0400 (Tue, 29 Jul 2008)
New Revision: 9815
Modified:
trunk/ui/assembly/pom.xml
Log:
Extended skinning client-side support
Modified: trunk/ui/assembly/pom.xml
===================================================================
--- trunk/ui/assembly/pom.xml 2008-07-29 13:22:10 UTC (rev 9814)
+++ trunk/ui/assembly/pom.xml 2008-07-29 13:23:58 UTC (rev 9815)
@@ -65,7 +65,7 @@
<!--
<templateXpath>/*[local-name()='template']/*</templateXpath>
-->
- <excludeXcss>**/basic.xcss, **/basic_classes.xcss, **/extended.xcss, **/extended_classes.xcss, **/skin*.xcss</excludeXcss>
+ <excludeXcss>**/basic.xcss, **/basic_classes.xcss, **/basic_both.xcss, **/extended.xcss, **/extended_classes.xcss, **/extended_both.xcss, **/skin*.xcss</excludeXcss>
<commonStyle>org/richfaces/skin.xcss</commonStyle>
</configuration>
<executions>
16 years, 5 months
JBoss Rich Faces SVN: r9814 - in trunk/framework/impl/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-07-29 09:22:10 -0400 (Tue, 29 Jul 2008)
New Revision: 9814
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/context/RenderPhaseViewResourcesVisitor.java
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/skinning.js
Log:
Extended skinning client-side support
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/context/RenderPhaseViewResourcesVisitor.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/context/RenderPhaseViewResourcesVisitor.java 2008-07-29 12:21:18 UTC (rev 9813)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/context/RenderPhaseViewResourcesVisitor.java 2008-07-29 13:22:10 UTC (rev 9814)
@@ -525,7 +525,7 @@
//by AJAX request
responseWriter.startElement("script", null);
responseWriter.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
- responseWriter.writeText("window.RICH_FACES_SKINNING_ON=true;", null);
+ responseWriter.writeText("window.RICH_FACES_EXTENDED_SKINNING_ON=true;", null);
responseWriter.endElement("script");
}
Modified: trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/skinning.js
===================================================================
--- trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/skinning.js 2008-07-29 12:21:18 UTC (rev 9813)
+++ trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/skinning.js 2008-07-29 13:22:10 UTC (rev 9814)
@@ -1,4 +1,4 @@
-if (window.RICH_FACES_SKINNING_ON) {
+{
var mediaName = "rich-extended-skinning";
var skipNavigator = window.opera || navigator.userAgent.indexOf('AppleWebKit/') > -1;
@@ -30,15 +30,16 @@
};
var f = function() {
- var styles = getElementByTagName(document, 'link');
- if (styles) {
- var l = styles.length;
- for (var i = 0; i < l; i++) {
- var elt = styles[i];
- resetMedia(elt);
+ if (window.RICH_FACES_EXTENDED_SKINNING_ON) {
+ var styles = getElementByTagName(document, 'link');
+ if (styles) {
+ var l = styles.length;
+ for (var i = 0; i < l; i++) {
+ var elt = styles[i];
+ resetMedia(elt);
+ }
}
- }
-
+ }
};
if (window.addEventListener) {
@@ -52,8 +53,10 @@
if (!window._RICH_FACES_SKINNING_ADDED_TO_AJAX && typeof A4J != "undefined" && A4J.AJAX) {
A4J.AJAX.AddHeadElementTransformer(function (elt) {
- if (elt.tagName && elt.tagName.toLowerCase() == 'link') {
- resetMedia(elt);
+ if (window.RICH_FACES_EXTENDED_SKINNING_ON) {
+ if (elt.tagName && elt.tagName.toLowerCase() == 'link') {
+ resetMedia(elt);
+ }
}
});
window._RICH_FACES_SKINNING_ADDED_TO_AJAX = true;
16 years, 5 months