JBoss Rich Faces SVN: r4187 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2007-11-22 10:22:58 -0500 (Thu, 22 Nov 2007)
New Revision: 4187
Modified:
trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml
Log:
RF-1280 - fix the examples for 'oncomplete' attribute
Modified: trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml 2007-11-22 15:12:31 UTC (rev 4186)
+++ trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml 2007-11-22 15:22:58 UTC (rev 4187)
@@ -62,8 +62,7 @@
depends on the location of <emphasis role="bold"><property><a4j:commandButton></property></emphasis>. If the <property>commandButton</property> is situated outside the re-rendered region
you can use keyword 'this' as in the following example:
</para>
- <programlisting role="JAVA"><![CDATA[
-...
+ <programlisting role="JAVA"><![CDATA[...
<h:form id="form">
<a4j:commandButton id="cbutton" action="director.rollCamera"
onclick="this.disabled=true"
@@ -76,8 +75,7 @@
the <emphasis><property>"oncomplete"</property></emphasis> attribute has a problem obtaining a reference of the <property>commandButton</property> object
when using the keyword 'this'. In this case you can use the <emphasis><property>"oncomplete"</property></emphasis> attribute as in the following example:
</para>
- <programlisting role="JAVA"><![CDATA[
-...
+ <programlisting role="JAVA"><![CDATA[...
<h:form id="form">
<a4j:commandButton id="cbutton" action="director.rollCamera"
onclick="this.disabled=true"
18 years, 5 months
JBoss Rich Faces SVN: r4186 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2007-11-22 10:12:31 -0500 (Thu, 22 Nov 2007)
New Revision: 4186
Modified:
trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml
Log:
RF-1280 - add Usage for 'oncomplete' attribute
Modified: trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml 2007-11-22 15:04:31 UTC (rev 4185)
+++ trunk/docs/userguide/en/src/main/docbook/included/commandButton.xml 2007-11-22 15:12:31 UTC (rev 4186)
@@ -56,14 +56,42 @@
<note>
<title>Note:</title>
<para>AJAX support is built in and it's not necessary to add nested <emphasis role="bold"><property><a4j:support></property></emphasis> to the component.</para>
- </note>
+ </note>
+ <para>
+ The usage of the keyword 'this' in JavaScript code in the <emphasis><property>"oncomplete"</property></emphasis> attribute
+ depends on the location of <emphasis role="bold"><property><a4j:commandButton></property></emphasis>. If the <property>commandButton</property> is situated outside the re-rendered region
+ you can use keyword 'this' as in the following example:
+ </para>
+ <programlisting role="JAVA"><![CDATA[
+...
+<h:form id="form">
+ <a4j:commandButton id="cbutton" action="director.rollCamera"
+ onclick="this.disabled=true"
+ oncomplete="this.disabled=false" />
+</h:form>
+...
+]]></programlisting>
+ <para>
+ Otherwise if the <property>commandButton</property> contained in re-rendered region
+ the <emphasis><property>"oncomplete"</property></emphasis> attribute has a problem obtaining a reference of the <property>commandButton</property> object
+ when using the keyword 'this'. In this case you can use the <emphasis><property>"oncomplete"</property></emphasis> attribute as in the following example:
+ </para>
+ <programlisting role="JAVA"><![CDATA[
+...
+<h:form id="form">
+<a4j:commandButton id="cbutton" action="director.rollCamera"
+ onclick="this.disabled=true"
+ oncomplete="document.getElementById('form:cbutton').disabled=false" />
+</h:form>
+...
+]]></programlisting>
<para>Common JSF navigation could be performed after an Ajax submit and partial rendering, but Navigation Case must be defined as <emphasis role="bold"><property><redirect/></property></emphasis> in order to avoid problems with some browsers.</para>
<para>As any Core Ajax component sending Ajax requests and processing server responses <emphasis role="bold"><property><a4j:commandButton></property></emphasis> has all attributes described above (see <emphasis role="bold"><property><a4j:support></property></emphasis> chapter) that provide the required behavior of requests sending (delay, limitation of submit area and rendering, and etc.)</para>
</section>
<section>
<title>Relevant resources links</title>
<para>
- <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/commandButton.jsf?c=c...">Here.
+ <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/commandButton.jsf?c=c...">Here
</ulink>you can see the example of <emphasis role="bold"
><property><a4j:commandButton></property></emphasis> usage and sources for the given example.
</para>
18 years, 5 months
JBoss Rich Faces SVN: r4185 - in management/design: fileUpload and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2007-11-22 10:04:31 -0500 (Thu, 22 Nov 2007)
New Revision: 4185
Added:
management/design/fileUpload/
management/design/fileUpload/FileUpload vision.doc
Log:
Added: management/design/fileUpload/FileUpload vision.doc
===================================================================
(Binary files differ)
Property changes on: management/design/fileUpload/FileUpload vision.doc
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
18 years, 5 months
JBoss Rich Faces SVN: r4184 - in trunk/ui/panelmenu/src/main: java/org/richfaces/renderkit/html and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-11-22 09:45:33 -0500 (Thu, 22 Nov 2007)
New Revision: 4184
Modified:
trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenu.java
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
trunk/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx
trunk/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx
Log:
Panel menu: fixed custom style class for selected element.
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenu.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenu.java 2007-11-22 14:39:12 UTC (rev 4183)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenu.java 2007-11-22 14:45:33 UTC (rev 4184)
@@ -7,7 +7,7 @@
public static final String COMPONENT_TYPE = "org.richfaces.panelMenu";
public static final String DEFAULT_SELECTED_CLASS = "dr-pmenu-selected-item";
- public static final String USER_DEFINED_SELECTED_CLASS = "rich-pmenu-item-selected";
+ public static final String USER_DEFINED_SELECTED_CLASS = "rich-pmenu-selected-element";
public abstract String getEvent();
public abstract void setEvent(String event);
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2007-11-22 14:39:12 UTC (rev 4183)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2007-11-22 14:45:33 UTC (rev 4184)
@@ -243,13 +243,16 @@
return value;
}
- public String getSelectedClass(FacesContext context, UIComponent component){
- StringBuffer selectedClass = null;
- if(isSelected(context, component)){
+ public String getSelectedClass(FacesContext context, UIComponent component) {
+ if (isSelected(context, component)) {
+ StringBuffer selectedClass = null;
selectedClass= new StringBuffer();
- selectedClass.append(UIPanelMenu.DEFAULT_SELECTED_CLASS).append(" ").append(UIPanelMenu.USER_DEFINED_SELECTED_CLASS);
+ selectedClass.append(UIPanelMenu.DEFAULT_SELECTED_CLASS).
+ append(" ").
+ append(UIPanelMenu.USER_DEFINED_SELECTED_CLASS);
+ return selectedClass.toString();
}
- return selectedClass != null ? selectedClass.toString() : "";
+ return "";
}
public String getLabelClass(FacesContext context, UIComponent component) {
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2007-11-22 14:39:12 UTC (rev 4183)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2007-11-22 14:45:33 UTC (rev 4184)
@@ -196,6 +196,18 @@
}
return styleBuffer.toString();
}
+
+ public String getSelectedClass(FacesContext context, UIComponent component) {
+ if (isSelected(context, component)) {
+ StringBuffer selectedClass = null;
+ selectedClass= new StringBuffer();
+ selectedClass.append(UIPanelMenu.DEFAULT_SELECTED_CLASS).
+ append(" ").
+ append(UIPanelMenu.USER_DEFINED_SELECTED_CLASS);
+ return selectedClass.toString();
+ }
+ return "";
+ }
public String getLabelClass(FacesContext context, UIComponent component) {
StringBuffer resClass = new StringBuffer();
@@ -208,9 +220,6 @@
resClass.append("rich-pmenu-item-label");
}
}
- if (isSelected(context, component)) {
- resClass.append(" ").append(UIPanelMenu.DEFAULT_SELECTED_CLASS).append(" ").append(UIPanelMenu.USER_DEFINED_SELECTED_CLASS);
- }
return resClass.toString();
}
Modified: trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
===================================================================
--- trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2007-11-22 14:39:12 UTC (rev 4183)
+++ trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2007-11-22 14:45:33 UTC (rev 4184)
@@ -17,7 +17,7 @@
this.lastExpanded = null;
this.selectedChild = selectedChild;
this.defaultSelectedClass = 'dr-pmenu-selected-item';
- this.userDefinedSelectedClass = 'dr-pmenu-selected-item';
+ this.userDefinedSelectedClass = 'rich-pmenu-selected-element';
this.is = 'panelMenu';
this.selectedNameInput = $(myId + 'selectedItemName');
PanelMenuStorage[myId] = this;
@@ -80,6 +80,7 @@
this.labelArea = $('icon' + ids.myId);
this.content = document.getElementsByClassName("dr-pmenu-group-self-label", this.obj)[0];
this.iconAlign = iconAlign;
+ this.mainRow = $("row_" + ids.myId);
/*
if (level == 0){
this.tdhider.style.display = "";
@@ -314,12 +315,12 @@
setSelectedClass: function(e){
- this.labelArea.addClassName(this.rootMenu.defaultSelectedClass);
- this.labelArea.addClassName(this.rootMenu.userDefinedSelectedClass);
+ this.mainRow.addClassName(this.rootMenu.defaultSelectedClass);
+ this.mainRow.addClassName(this.rootMenu.userDefinedSelectedClass);
},
removeSelectedClass: function(e){
- this.labelArea.removeClassName(this.rootMenu.defaultSelectedClass);
- this.labelArea.removeClassName(this.rootMenu.userDefinedSelectedClass);
+ this.mainRow.removeClassName(this.rootMenu.defaultSelectedClass);
+ this.mainRow.removeClassName(this.rootMenu.userDefinedSelectedClass);
},
Modified: trunk/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx
===================================================================
--- trunk/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx 2007-11-22 14:39:12 UTC (rev 4183)
+++ trunk/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx 2007-11-22 14:45:33 UTC (rev 4184)
@@ -27,7 +27,8 @@
<f:call name="utils.encodePassThru" />
- <tr class="#{this:getSelectedClass( context, component )}">
+ <tr id="row_#{clientId}"
+ class="#{this:getSelectedClass( context, component )}" >
<td class="dr-pmenu-nowrap #{this:getIconClass( context, component,'left')}">
<f:call name="insertSpacerImages" />
<f:call name="insertImage">
Modified: trunk/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx
===================================================================
--- trunk/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx 2007-11-22 14:39:12 UTC (rev 4183)
+++ trunk/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx 2007-11-22 14:45:33 UTC (rev 4184)
@@ -23,7 +23,8 @@
<f:parameter value="onclick,onmousedown,onmouseup,onmousemove" />
</f:call>
- <tr>
+ <tr id="row_#{clientId}"
+ class="#{this:getSelectedClass( context, component )}" >
<f:call name="utils.encodeId"/>
<td class="dr-pmenu-nowrap #{this:getIconClass( context, component,'left')}">
<f:call name="insertSpacerImages" />
18 years, 5 months
JBoss Rich Faces SVN: r4183 - in trunk/framework/impl/src/main/java/org/ajax4jsf: resource and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2007-11-22 09:39:12 -0500 (Thu, 22 Nov 2007)
New Revision: 4183
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/css/CssCompressor.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSRenderer.java
Log:
RF-1349
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/css/CssCompressor.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/css/CssCompressor.java 2007-11-22 14:29:37 UTC (rev 4182)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/css/CssCompressor.java 2007-11-22 14:39:12 UTC (rev 4183)
@@ -23,7 +23,7 @@
srcsb = buffer;
}
- public void compress(Writer out, int linebreakpos)
+ public int compress(Writer out, int linebreakpos)
throws IOException {
Pattern p;
@@ -31,6 +31,7 @@
String css;
StringBuffer sb;
int startIndex, endIndex;
+ int bytesLength;
// Remove all comment blocks...
sb = new StringBuffer(srcsb.toString());
@@ -145,8 +146,9 @@
// Trim the final string (for any leading or trailing white spaces)
css = css.trim();
-
+ bytesLength = css.length() * 2;
// Write the output...
out.write(css);
+ return bytesLength;
}
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSRenderer.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSRenderer.java 2007-11-22 14:29:37 UTC (rev 4182)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSRenderer.java 2007-11-22 14:39:12 UTC (rev 4183)
@@ -48,6 +48,9 @@
public class TemplateCSSRenderer extends StyleRenderer {
private static final String COMPILED_TEMPLATE_PROPERTY = "compiled-template";
+
+ /** Parameter allows switch on/off comressing for css */
+ private static final String COMPRESS_STYLE_PARAMETER = "org.ajax4jsf.COMPRESS_STYLE";
private RendererBase renderer = new RendererBase() {
@@ -65,6 +68,10 @@
CountingOutputWriter countingOutputWriter = new CountingOutputWriter();
template = getTemplate(base, context);
FacesContext facesContext = FacesContext.getCurrentInstance();
+ boolean _CompressStyleOn = Boolean.valueOf(facesContext.getExternalContext()
+ .getInitParameter(COMPRESS_STYLE_PARAMETER));
+ Writer writer = context.getWriter();
+ int bytesLength;
if(null != facesContext) {
// Create responseWriter.
String defaultRenderKitId = facesContext.getApplication().getDefaultRenderKitId();
@@ -75,9 +82,6 @@
RenderKit renderKit = renderKitFactory.getRenderKit(facesContext,defaultRenderKitId);
// TODO - handle response encoding
- //TODO nick - andrei
- //make compressor switchable off
- //use Boolean.valueOf(facesContext.getExternalContext().getInitParameter("org.ajax4jsf.COMPRESS_STYLE")) as criteria
ResponseWriter responseWriter = renderKit.createResponseWriter(countingOutputWriter,null,"UTF-8");
facesContext.setResponseWriter(responseWriter);
responseWriter.startDocument();
@@ -89,20 +93,22 @@
responseWriter.flush();
responseWriter.close();
- //TODO nick - andrei
- //we should return length of already compressed script, not the original one
+ if (_CompressStyleOn) {
+ CssCompressor compressor = new CssCompressor(countingOutputWriter.getContent()); // Compressing css document and printing result in response stream
+ bytesLength = compressor.compress(writer, -1);
+ writer.flush();
+ writer.close();
+ } else {
+ writer.write(countingOutputWriter.getContent().toString()); // Write not compressed style content
+ bytesLength = countingOutputWriter.getWritten();
+ writer.flush();
+ writer.close();
+ }
- // Compressing css document and printing result in response stream
- CssCompressor compressor = new CssCompressor(countingOutputWriter.getContent());
- Writer writer = context.getWriter();
- compressor.compress(writer, -1);
- writer.flush();
- writer.close();
-
} else {
throw new FacesException("FacesContext for resource from template "+base.getKey()+" is null");
}
- return countingOutputWriter.getWritten();
+ return bytesLength;
}
/**
18 years, 5 months
JBoss Rich Faces SVN: r4182 - branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-22 09:29:37 -0500 (Thu, 22 Nov 2007)
New Revision: 4182
Modified:
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
Log:
refactoring of .js files
Modified: branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2007-11-22 14:09:02 UTC (rev 4181)
+++ branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2007-11-22 14:29:37 UTC (rev 4182)
@@ -325,7 +325,7 @@
focusListener : function(e) {
e = e || window.event;
- this.focusKeeper.focusused = false;
+ this.focusKeeper.focused = false;
this.shuttleTable.className = Richfaces.ListBase.ORDERING_LIST_CLASSES.normal;
},
Modified: branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-11-22 14:09:02 UTC (rev 4181)
+++ branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2007-11-22 14:29:37 UTC (rev 4182)
@@ -1,598 +1,183 @@
if(!window.Richfaces) window.Richfaces = {};
-Richfaces.disableSelectionText = function(target) {
- target.onselectstart = function(e) {
- e = window.event||e;
- if (e.srcElement) {
- if (e.srcElement.tagName) {
- var tagName = e.srcElement.tagName.toUpperCase();
-
- if (tagName != "INPUT" && tagName != "TEXTAREA" /* any items more? */) {
- return false;
- }
- }
- }
- }
-
-}
-Richfaces.OrderingList = Class.create();
-
-Richfaces.OrderingList.prototype.initialize = function(containerId, contentTableId, headerTableId, focusKeeperId, valueKeeperId,
- ids, onclickControlId, onorderchanged) {
- this.container = document.getElementById(containerId);
- this.shuttleTable = document.getElementById(contentTableId);
- this.shuttleTbody = this.shuttleTable.tBodies[0];
-
- this.items = null;
- this.selectedItems = new Array();
- this.retrieveShuttleItems(containerId);
-
- this.shuttle = null;
- this.sortOrder = Richfaces.OrderingList.ASC;
-
- this.activeItem = null;
-
- this.onorderchanged = onorderchanged;
-
- this.focusKeeper = document.getElementById(focusKeeperId);
- this.focusKeeper.focused = false;
-
- this.valueKeeper = document.getElementById(valueKeeperId);
-
- this.shuttleTop = null;
-
- this.isShuttleEnabled = true;
- this.controlList = new Array();
-
- var obj = this;
- this.focusKeeper.onkeydown = function(e) {
- obj.onkeydownHandler(window.event || e);
- }
- this.init(containerId, contentTableId, headerTableId, ids, onclickControlId);
- Richfaces.disableSelectionText(this.container);
-}
-
-Richfaces.OrderingList.ASC = "acs";
-Richfaces.OrderingList.DESC = "desc";
-
-Richfaces.OrderingList.CONTROL_SET = ["A", "INPUT", "TEXTAREA", "SELECT", "BUTTON"];
-
-Richfaces.OrderingList.ORDERING_LIST_CLASSES = {
- normal : "ol_internal_tab rich-ordering-list-items",
- disabled : "ol_internal_tab rich-ordering-list-disabled",
- active : "ol_internal_tab rich-ordering-list-active"
-}
-
-Richfaces.OrderingList.ACTIVITY_MARKER = "a";
-Richfaces.OrderingList.SELECTION_MARKER = "s";
-Richfaces.OrderingList.ITEM_SEPARATOR = ",";
-
-Richfaces.OrderingList.HANDLERS = {
- first: function (e) { this.moveSelectedItems("first", e);return false; },
- last: function (e) { this.moveSelectedItems("last", e);return false; },
- up: function (e) { this.moveSelectedItems("up", e);return false; },
- down: function (e) { this.moveSelectedItems("down", e);return false; }
-};
-
-Richfaces.OrderingList.prototype.init = function(containerId, contentTableId, headerTableId, ids, onclickControlId) {
- var obj = this;
- this.setFocus();
- Richfaces.OrderingList.addEventListener(this.focusKeeper, "blur", function (e) {obj.focusListener(e);});
- for (var i = 0; i < ids.length; i++) {
- var id = ids[i];
- var node = document.getElementById(containerId + id[0]);
- var disNode = document.getElementById(containerId + id[1]);
- if (node && disNode) {
- Richfaces.OrderingList.addClickListener(node, Richfaces.OrderingList.HANDLERS[id[0]].bindAsEventListener(this));
- this.controlList[i] = new Control(node, disNode, false, false, id[0]);
- }
- }
- this.controlListManager();
- document.getElementById(contentTableId).onclick = function(e) {obj.onclickHandler(window.event || e);};
- this.shuttleTop = LayoutManager.getElemXY(this.shuttleTable).top;
-}
-
-Richfaces.OrderingList.prototype.isListActive = function() {
- if ((this.activeItem != null || this.selectedItems.length != 0) && this.focusKeeper.focused) {
- return true;
- }
- return false;
-}
-
-Richfaces.OrderingList.prototype.controlListManager = function() {
- this.selectedItems.sort(this.compareByRowIndex);
- var control;
- //FIXME
- if ((this.shuttleItems.length <= 1) || (this.selectedItems.length == 0)) {
- this.controlsProcessing(["first", "last", "down", "up"]);
- } else if (this.selectedItems[0].rowIndex == 0) {
- this.controlsProcessing(["first", "up"]);
- } else if (this.selectedItems[this.selectedItems.length - 1].rowIndex == (this.shuttleItems.length - 1)) {
- this.controlsProcessing(["down", "last"]);
- } else {
- this.controlsProcessing();
- }
-}
-
-Richfaces.OrderingList.prototype.controlsProcessing = function(disabledControls) {
- for (var i = 0; i < this.controlList.length; i++) {
- control = this.controlList[i];
- if (control != null) {
- if (disabledControls != null && disabledControls.indexOf(control.action) != -1) control.doDisable();
- else control.doEnable();
- }
- }
-}
-
-Richfaces.OrderingList.prototype.retrieveShuttleItems = function(containerId) {
- var rows = this.shuttleTbody.rows;
- this.shuttleItems = new Array();
- var id;
-
- for (var i = 0; i < rows.length; i++) {
- var row = rows[i];
- id = row.id.split(containerId + ":")[1];
- this.shuttleItems[i]
- = new Richfaces.SelectItem(null, (id || i),
- ((Richfaces.SelectItems.isSelected(row)) ? true : false), row);
- if (Richfaces.SelectItems.isSelected(row)) {
- this.selectedItems.push(row);
- }
- if (Richfaces.SelectItems.isActive(row)) {
- this.activeItem = row;
- }
- }
-}
-
-Richfaces.OrderingList.prototype.sort = function() {
- if (this.sortOrder == Richfaces.OrderingList.ASC) {
- this.shuttleItems.sort(this.compareByLabel);
- this.sortOrder = Richfaces.OrderingList.DESC;
- } else {
- this.shuttleItems.reverse();
- this.sortOrder = Richfaces.OrderingList.ASC;
- }
- this.rebuild();
-}
-
-Richfaces.OrderingList.prototype.moveSelectedItems = function(action, event) {
- event = window.event||event;
- var rows = this.shuttleTbody.rows;
- var item;
- if (this.selectedItems.length > 0) {
- this.selectedItems.sort(this.compareByRowIndex);
+Richfaces.OrderingList = Class.create({
+ CLASSDEF: {
+ name: 'Richfaces.OrderingList',
+ parent: Richfaces.ListBase
+ },
+
+ initialize: function(containerId, contentTableId, headerTableId, focusKeeperId, valueKeeperId,
+ ids, onclickControlId, onorderchanged) {
+ Richfaces.OrderingList.parentClass.constructor().call(this, containerId, contentTableId, headerTableId, focusKeeperId, valueKeeperId, onclickControlId);
+ this.onorderchanged = onorderchanged;
+ this.controlList = new Array();
- if ((action == 'up') && this.getExtremeItem("first").previousSibling) {
- for (var i = 0; i < this.selectedItems.length; i++) {
- item = this.selectedItems[i];
- item.parentNode.insertBefore(item, item.previousSibling);
+ this.initControlList(containerId, ids);
+ },
+
+ initControlList : function(containerId, ids) {
+ for (var i = 0; i < ids.length; i++) {
+ var id = ids[i];
+ var node = document.getElementById(containerId + id[0]);
+ var disNode = document.getElementById(containerId + id[1]);
+ if (node && disNode) {
+ node.observe('click', Richfaces.OrderingList.HANDLERS[id[0]].bindAsEventListener(this));
+ this.controlList[i] = new Control(node, disNode, false, false, id[0]);
}
- } else if ((action == 'down') && this.getExtremeItem("last").nextSibling) {
- for (var i = this.selectedItems.length - 1; i > -1; i--) {
- item = this.selectedItems[i];
- item.parentNode.insertBefore(item.nextSibling, item);
- }
- } else if (action == 'first') {
- var incr = this.selectedItems[0].rowIndex;
- for (var i = 0; i < this.selectedItems.length; i++) {
- item = this.selectedItems[i];
- item.parentNode.insertBefore(item, rows[item.rowIndex - incr]);
- }
- } else if (action == 'last') {
- var length = this.shuttleItems.length;
- var incr = length - this.selectedItems[this.selectedItems.length - 1].rowIndex;
- for (var i = this.selectedItems.length - 1; i > -1; i--) {
- item = this.selectedItems[i];
- if (item.rowIndex + incr > length - 1) {
- item.parentNode.insertBefore(item, null);
- } else {
- item.parentNode.insertBefore(item, rows[item.rowIndex + incr]);
- }
- }
}
-
- this.shuttleItems = new Array();
- for (var i = 0; i < rows.length; i++) {
- this.shuttleItems.push(rows[i].item);
- }
- if (action != null)
- this.autoScrolling(action, event);
-
this.controlListManager();
- this.saveState();
- this.onorderchanged();
- }
-}
-
-Richfaces.OrderingList.prototype.getExtremeItem = function(position) {
- var extremeItem = this.selectedItems[0];
- var currentItem;
+ },
- for (var i = 1; i < this.selectedItems.length; i++) {
- currentItem = this.selectedItems[i];
- if (position == "first") {
- if (currentItem.rowIndex < extremeItem.rowIndex) {
- extremeItem = currentItem;
- }
+ controlListManager : function() {
+ this.selectedItems.sort(this.compareByRowIndex);
+ var control;
+ //FIXME
+ if ((this.shuttleItems.length <= 1) || (this.selectedItems.length == 0)) {
+ this.controlsProcessing(["first", "last", "down", "up"]);
+ } else if (this.selectedItems[0].rowIndex == 0) {
+ this.controlsProcessing(["first", "up"]);
+ } else if (this.selectedItems[this.selectedItems.length - 1].rowIndex == (this.shuttleItems.length - 1)) {
+ this.controlsProcessing(["down", "last"]);
} else {
- if (currentItem.rowIndex > extremeItem.rowIndex) {
- extremeItem = currentItem;
- }
+ this.controlsProcessing();
}
- }
- return extremeItem;
-}
-
-Richfaces.OrderingList.prototype.getEventTargetRow = function(event) {
- var activeElem;
- if (event.rangeParent) {
- //activeElem = event.rangeParent.parentNode;
- activeElem = event.target;
- } else {
- activeElem = event.srcElement;
- }
+ },
- if (activeElem == null) {
- return;
- }
-
- if (activeElem.tagName && Richfaces.OrderingList.CONTROL_SET.indexOf(activeElem.tagName) != -1) {
- return;
- }
-
- while (activeElem.tagName.toLowerCase() != "tr") {
- activeElem = activeElem.parentNode;
- if (!activeElem.tagName) {
- return; //for IE
+ controlsProcessing : function(disabledControls) {
+ for (var i = 0; i < this.controlList.length; i++) {
+ control = this.controlList[i];
+ if (control != null) {
+ if (disabledControls != null && disabledControls.indexOf(control.action) != -1) control.doDisable();
+ else control.doEnable();
+ }
}
- }
+ },
- return activeElem;
-}
-
-Richfaces.OrderingList.prototype.onclickHandler = function(event) {
- var activeElem = this.getEventTargetRow(event);
- if (activeElem != null) {
-
- if (event.ctrlKey) {
- this.addSelectedItem(activeElem);
- this.activeItem = activeElem;
- } else if (event.shiftKey) {
- this.selectItemGroup(activeElem);
- } else {
- this.selectionItem(activeElem);
- this.activeItem = activeElem;
- }
-
- if (this.getSelectItemByNode(this.activeItem)._selected) {
- Richfaces.SelectItems.doActive(this.activeItem);
- } else {
- Richfaces.SelectItems.doNormal(this.activeItem);
- }
- this.saveState();
+ onclickHandler : function(event) {
+ Richfaces.OrderingList.parentClass.method("onclickHandler").call(this, event);
this.controlListManager();
- this.setFocus();
- }
-}
-
-Richfaces.OrderingList.prototype.onkeydownHandler = function(event) {
- var action = null;
- switch (event.keyCode) {
- case 34 : action = 'last'; this.moveSelectedItems(action ,event); break; //page down
- case 33 : action = 'first'; this.moveSelectedItems(action, event); break; //page up
- case 38 : //up arrow
- action = 'up';
- if (event.ctrlKey) {
- this.moveSelectedItems(action, event);
- } else {
- this.moveActiveItem(action, event);
- }
- break;
- case 40 : //down arrow
- action = 'down';
- if (event.ctrlKey) {
- this.moveSelectedItems(action ,event);
- } else {
- this.moveActiveItem(action, event);
- }
- break;
- case 65 : // Ctrl + A
- if (event.ctrlKey) {
- this.selectAll();
- Richfaces.OrderingList.stopPropogation(event);
- }
- Richfaces.SelectItems.doActive(this.activeItem);
- this.saveState();
- break;
- case 32 : this.invertSelection(event); this.saveState(); break; //blank
- }
- //if (action != null)
- // this.autoScrolling(action, event);
-}
-
-Richfaces.OrderingList.stopPropogation = function(event) {
- if (event.stopPropagation) {
- event.preventDefault();
- event.stopPropagation();
- } else {
- event.cancelBubble = true;
- event.returnValue = false;
- }
-}
-
-Richfaces.OrderingList.prototype.invertSelection = function(event) {
- var eventItem = this.activeItem;
- var eventShuttleItem = this.getSelectItemByNode(eventItem);
- if (eventShuttleItem._selected) {
- eventShuttleItem._selected = false;
- this.selectedItems.remove(eventShuttleItem);
- } else {
- eventShuttleItem._selected = true;
- this.selectedItems.push(eventShuttleItem);
- }
-}
-
-Richfaces.OrderingList.prototype.moveActiveItem = function(action, event) {
- var item = this.activeItem;
- var rows = this.shuttleTbody.rows;
- if ((action == 'up') && (item.rowIndex > 0)) {
- this.changeActiveItems(rows[item.rowIndex - 1], item);
- } else if ((action == 'down') && (item.rowIndex < this.shuttleItems.length - 1)) {
- this.changeActiveItems(rows[item.rowIndex + 1], item);
- }
+ },
- this.saveState();
- this.autoScrolling(action, event);
- this.controlListManager();
-}
-
-Richfaces.OrderingList.prototype.changeActiveItems = function(newItem, item) {
- var shuttleItem = this.getSelectItemByNode(item);
- var newShuttleItem = this.getSelectItemByNode(newItem);
+ moveActiveItem : function(action, event) {
+ Richfaces.OrderingList.parentClass.method("moveActiveItem").call(this ,action, event);
+ this.controlListManager();
+ },
- this.resetMarked();
+ moveSelectedItems : function(action, event) {
+ event = window.event||event;
+ var rows = this.shuttleTbody.rows;
+ var item;
+ if (this.selectedItems.length > 0) {
+ this.selectedItems.sort(this.compareByRowIndex);
+
+ if ((action == 'up') && this.getExtremeItem("first").previousSibling) {
+ for (var i = 0; i < this.selectedItems.length; i++) {
+ item = this.selectedItems[i];
+ item.parentNode.insertBefore(item, item.previousSibling);
+ }
+ } else if ((action == 'down') && this.getExtremeItem("last").nextSibling) {
+ for (var i = this.selectedItems.length - 1; i > -1; i--) {
+ item = this.selectedItems[i];
+ item.parentNode.insertBefore(item.nextSibling, item);
+ }
+ } else if (action == 'first') {
+ var incr = this.selectedItems[0].rowIndex;
+ for (var i = 0; i < this.selectedItems.length; i++) {
+ item = this.selectedItems[i];
+ item.parentNode.insertBefore(item, rows[item.rowIndex - incr]);
+ }
+ } else if (action == 'last') {
+ var length = this.shuttleItems.length;
+ var incr = length - this.selectedItems[this.selectedItems.length - 1].rowIndex;
+ for (var i = this.selectedItems.length - 1; i > -1; i--) {
+ item = this.selectedItems[i];
+ if (item.rowIndex + incr > length - 1) {
+ item.parentNode.insertBefore(item, null);
+ } else {
+ item.parentNode.insertBefore(item, rows[item.rowIndex + incr]);
+ }
+ }
+ }
+
+ this.shuttleItems = new Array();
+ for (var i = 0; i < rows.length; i++) {
+ this.shuttleItems.push(rows[i].item);
+ }
+ if (action != null)
+ this.autoScrolling(action, event);
+
+ this.onorderchanged();
+ this.controlListManager();
+ this.saveState();
+ }
+ },
- Richfaces.SelectItems.doActive(newItem);
- newItem._selected = true;
- this.activeItem = newItem;
- this.selectedItems.push(newItem);
-}
+ onkeydownHandler : function(event) {
+ var action = null;
+ switch (event.keyCode) {
+ case 34 : action = 'last'; this.moveSelectedItems(action ,event); break; //page down
+ case 33 : action = 'first'; this.moveSelectedItems(action, event); break; //page up
+ case 38 : //up arrow
+ action = 'up';
+ if (event.ctrlKey) {
+ this.moveSelectedItems(action, event);
+ } else {
+ this.moveActiveItem(action, event);
+ }
+ break;
+ case 40 : //down arrow
+ action = 'down';
+ if (event.ctrlKey) {
+ this.moveSelectedItems(action ,event);
+ } else {
+ this.moveActiveItem(action, event);
+ }
+ break;
+ case 65 : // Ctrl + A
+ if (event.ctrlKey) {
+ this.selectAll();
+ Event.stop(event);
+ }
+ Richfaces.SelectItems.doActive(this.activeItem);
+ this.saveState();
+ break;
+ case 32 : this.invertSelection(event); this.saveState(); break; //blank
+ }
+ },
-Richfaces.OrderingList.prototype.selectAll = function() {
- var startIndex = 0;
- var endIndex = this.shuttleItems.length - 1;
- this.selectItemRange(startIndex, endIndex);
-}
-
-/**
- * Click handler
- */
-Richfaces.OrderingList.prototype.selectionItem = function(activeItem) {
- var markedItem = this.getSelectItemByNode(activeItem);
- var markedShuttleItem = activeItem;
-
- if (markedItem != null) {
- this.resetMarked();
- if (markedItem._selected) {
- markedItem._selected = false;
- } else {
- markedItem._selected = true;
- this.selectedItems[0] = markedShuttleItem;
+ toString : function() {
+ var result = new Array();
+ for (var i = 0; i < this.shuttleItems.length; i++) {
+ var item = this.shuttleItems[i];
+ result.push(item._id);
+ if (item._selected) {
+ result.push(Richfaces.OrderingList.SELECTION_MARKER);
+ }
+ if (this.activeItem && (this.activeItem.rowIndex == item._node.rowIndex)) {
+ result.push(Richfaces.OrderingList.ACTIVITY_MARKER);
+ }
+ if (i != (this.shuttleItems.length - 1)) {
+ result.push(Richfaces.OrderingList.ITEM_SEPARATOR);
+ }
}
- }
-}
-
-/**
- * CTRL+Click handler
- */
-Richfaces.OrderingList.prototype.addSelectedItem = function(activeItem) {
- var markedItem = this.getSelectItemByNode(activeItem);
- var markedShuttleItem = activeItem;
+ return result.join("");
+ },
- if (markedItem._selected) {
- this.selectedItems.remove(markedShuttleItem);
- markedItem._selected = false;
- } else {
- markedItem._selected = true;
- this.selectedItems.push(markedShuttleItem);
- }
-
- Richfaces.SelectItems.doSelect(this.activeItem);
-
- if (this.activeItem && !this.getSelectItemByNode(this.activeItem)._selected) {
- Richfaces.SelectItems.doNormal(this.activeItem);
- }
-}
-
-/**
- * Shift+Click handler
- */
-Richfaces.OrderingList.prototype.selectItemGroup = function(currentItem) {
- //FIXME
- var activeItemIndex = this.activeItem.rowIndex;
- var startIndex;
- var endIndex;
-
- if (currentItem.rowIndex > activeItemIndex) {
- startIndex = activeItemIndex;
- endIndex = currentItem.rowIndex;
- } else {
- startIndex = currentItem.rowIndex;
- endIndex = activeItemIndex;
- }
-
- this.resetMarked();
-
- this.selectItemRange(startIndex, endIndex);
-}
-
-Richfaces.OrderingList.prototype.selectItemRange = function(startIndex, endIndex) {
- var rows = this.shuttleTbody.rows;
- for (var i = startIndex; i <= endIndex; i++) {
- Richfaces.SelectItems.doSelect(rows[i]);
- this.selectedItems.push(rows[i]);
- this.getSelectItemByNode(rows[i])._selected = true;
- }
-}
-
-Richfaces.OrderingList.prototype.resetMarked = function() {
- var rows = this.shuttleTbody.rows;
- for (var i = 0; i < rows.length; i++) {
- var shuttleItem = rows[i];
- Richfaces.SelectItems.doNormal(shuttleItem);
- this.getSelectItemByNode(shuttleItem)._selected = false; //FIXME
- }
- this.selectedItems.length = 0;
-}
-
-Richfaces.OrderingList.prototype.getSelectItemByNode = function(selectItemNode) {
- for (var i = 0; i < this.shuttleItems.length; i++) {
- var item = this.shuttleItems[i];
- if (selectItemNode.rowIndex == item._node.rowIndex) {
- return item;
+ saveState : function() {
+ if (this.activeItem != null || (this.selectedItems.length > 0)) {
+ this.valueKeeper.value = this.toString();
}
}
- return null;
-}
-
-Richfaces.OrderingList.prototype.autoScrolling = function(action, event) {
- this.selectedItems.sort(this.compareByRowIndex);
- var increment;
- var scrollTop = this.shuttleTable.parentNode.scrollTop;
- if (action == 'up' || action == 'first') {
- var targetItemTop = LayoutManager.getElemXY(this.selectedItems[0]).top;
- increment = (targetItemTop - scrollTop) - this.shuttleTop;
- if (increment < 0) {
- this.shuttleTable.parentNode.scrollTop += increment;
- }
- } else if (action == 'down' || action == 'last') {
- var item = this.selectedItems[this.selectedItems.length - 1];
- targetItemBottom = LayoutManager.getElemXY(this.selectedItems[this.selectedItems.length - 1]).top + item.offsetHeight;
- var increment = (targetItemBottom - scrollTop) - (this.shuttleTop + this.shuttleTable.parentNode.offsetHeight - LayoutManager.SCROLL_WIDTH);
- if (increment > 0) {
- this.shuttleTable.parentNode.scrollTop += increment;
- }
- }
- Richfaces.OrderingList.stopPropogation(event);
-}
-
-/*Shuttle.prototype.init = function() {
- this.shuttle = this.shuttleTbody;
- this.addList(this.shuttleItems);
- this.shuttleTable.appendChild(this.shuttle)
- this.container.appendChild(this.shuttleTable);
-}
-
-Shuttle.prototype.rebuild = function() {
- this.shuttle = document.createElement("tbody");
- for (var i = 0; i < this.shuttleItems.length; i++) {
- this.shuttle.appendChild(this.shuttleItems[i]._node);
- }
- this.shuttleTbody.parentNode.removeChild(this.shuttleTbody);
- this.shuttleTable.appendChild(this.shuttle);
- this.shuttleTbody = this.shuttleTable.tBodies[0];
-}
+});
-Shuttle.prototype.createShuttleItem = function(selectItem, elemContainer) {
- var tr = document.createElement("tr");
- elemContainer.appendChild(tr);
- tr.id = selectItem._id
- var className = null;
- if (selectItem._selected) {
- className = Shuttle.SELECTED_ITEM_CLASS;
- } else if (this.activeItem && (this.activeItem == selectItem)) {
- className = Shuttle.ACTIVE_ITEM_CLASS;
- } else {
- className = Shuttle.NORMAL_ITEM_CLASS;
- }
- tr.className = className;
-
- var obj = this;
- tr.onclick = function(e) {
- obj.onclickHandler(window.event || e);
- }
-
- var td = document.createElement("td");
- tr.appendChild(td);
- if (td.textContent == undefined) {
- td.innerText = selectItem._label;
- } else {
- td.textContent = selectItem._label;
- }
- selectItem._node = tr;
-}*/
+Richfaces.OrderingList.ACTIVITY_MARKER = "a";
+Richfaces.OrderingList.SELECTION_MARKER = "s";
+Richfaces.OrderingList.ITEM_SEPARATOR = ",";
-Richfaces.OrderingList.prototype.toString = function() {
- var result = new Array();
- for (var i = 0; i < this.shuttleItems.length; i++) {
- var item = this.shuttleItems[i];
- result.push(item._id);
- if (item._selected) {
- result.push(Richfaces.OrderingList.SELECTION_MARKER);
- }
- if (this.activeItem && (this.activeItem.rowIndex == item._node.rowIndex)) {
- result.push(Richfaces.OrderingList.ACTIVITY_MARKER);
- }
- if (i != (this.shuttleItems.length - 1)) {
- result.push(Richfaces.OrderingList.ITEM_SEPARATOR);
- }
- }
- return result.join("");
-}
-
-Richfaces.OrderingList.prototype.saveState = function() {
- if (this.activeItem != null || (this.selectedItems.length > 0)) {
- this.valueKeeper.value = this.toString();
- }
-}
-
-Richfaces.OrderingList.prototype.compareByLabel = function(obj1, obj2) {
- obj1 = obj1._label;
- obj2 = obj2._label;
- return Richfaces.OrderingList.compare(obj1, obj2);
-}
-
-Richfaces.OrderingList.prototype.compareByRowIndex = function(obj1, obj2) {
- obj1 = obj1.rowIndex;
- obj2 = obj2.rowIndex;
- return Richfaces.OrderingList.compare(obj1, obj2);
-}
-
-Richfaces.OrderingList.compare = function(obj1, obj2) {
- return ((obj1 == obj2) ? 0 : ((obj1 < obj2) ? -1 : 1));
-}
-
-Richfaces.OrderingList.prototype.setFocus = function() {
- this.focusKeeper.focus();
- this.focusKeeper.focused = true;
- if (this.isListActive()) {
- this.shuttleTable.className = Richfaces.OrderingList.ORDERING_LIST_CLASSES.active;
- }
-}
-
-Richfaces.OrderingList.prototype.focusListener = function(e) {
- e = e || window.event;
- this.focusKeeper.focusused = false;
- if (this.activeItem != null) {
- if (this.getSelectItemByNode(this.activeItem)._selected) {
- Richfaces.SelectItems.doSelect(this.activeItem);
- } else {
- Richfaces.SelectItems.doNormal(this.activeItem);
- }
- }
- this.shuttleTable.className = Richfaces.OrderingList.ORDERING_LIST_CLASSES.normal;
-}
-
-Richfaces.OrderingList.addEventListener = function(elem, event, func) {
- if (window.attachEvent) {
- elem.attachEvent("on" + event, func);
- } else {
- elem.addEventListener(event, func, false);
- }
-}
-
-Richfaces.OrderingList.addClickListener = function(elem, func) {
- Richfaces.OrderingList.addEventListener(elem, "click", func);
-}
-
+Richfaces.OrderingList.HANDLERS = {
+ first: function (e) { this.moveSelectedItems("first", e);return false; },
+ last: function (e) { this.moveSelectedItems("last", e);return false; },
+ up: function (e) { this.moveSelectedItems("up", e);return false; },
+ down: function (e) { this.moveSelectedItems("down", e);return false; }
+};
\ No newline at end of file
18 years, 5 months
JBoss Rich Faces SVN: r4181 - in trunk/ui/calendar/src/main: java/org/richfaces/component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: akushunin
Date: 2007-11-22 09:09:02 -0500 (Thu, 22 Nov 2007)
New Revision: 4181
Modified:
trunk/ui/calendar/src/main/config/component/calendar.xml
trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
Log:
Additional attributes on calendar
Modified: trunk/ui/calendar/src/main/config/component/calendar.xml
===================================================================
--- trunk/ui/calendar/src/main/config/component/calendar.xml 2007-11-22 13:28:01 UTC (rev 4180)
+++ trunk/ui/calendar/src/main/config/component/calendar.xml 2007-11-22 14:09:02 UTC (rev 4181)
@@ -525,6 +525,15 @@
</description>
<defaultvalue>true</defaultvalue>
</property>
+ <property>
+ <name>showApplyButton</name>
+ <classname>boolean</classname>
+ <description>
+ If false ApplyButton should not be shown
+ </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+
</component>
&listeners;
</components>
Modified: trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
===================================================================
--- trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2007-11-22 13:28:01 UTC (rev 4180)
+++ trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2007-11-22 14:09:02 UTC (rev 4181)
@@ -195,6 +195,11 @@
public abstract void setShowToday(boolean showToday);
+ public abstract boolean isShowApplyButton();
+
+ public abstract void setShowApplyButton(boolean showApplyButton);
+
+
// TODO onclick add users onclick
// currentDate processing -------------------------------------------------
Modified: trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
===================================================================
--- trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-11-22 13:28:01 UTC (rev 4180)
+++ trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-11-22 14:09:02 UTC (rev 4181)
@@ -153,11 +153,11 @@
showToday:#{component.attributes['showToday']},
showScrollerBar:#{component.attributes['showScrollerBar']},
showWeeksBar:#{component.attributes['showWeeksBar']},
- showWeeksDayBar:#{component.attributes['showWeeksDayBar']}
+ showWeeksDayBar:#{component.attributes['showWeeksDayBar']},
+ showApplyButton:#{component.attributes['showApplyButton']}
-
<f:call name="writeClass"/>
<f:call name="writeDayCellClass"/>
<f:call name="writeDayStyleClass"/>
18 years, 5 months
JBoss Rich Faces SVN: r4180 - in management/design: columnSortFilterFeatures and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2007-11-22 08:28:01 -0500 (Thu, 22 Nov 2007)
New Revision: 4180
Added:
management/design/columnSortFilterFeatures/
management/design/columnSortFilterFeatures/Sorting and Filtering Features Vision.doc
Log:
Added: management/design/columnSortFilterFeatures/Sorting and Filtering Features Vision.doc
===================================================================
(Binary files differ)
Property changes on: management/design/columnSortFilterFeatures/Sorting and Filtering Features Vision.doc
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
18 years, 5 months
JBoss Rich Faces SVN: r4179 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2007-11-22 07:47:38 -0500 (Thu, 22 Nov 2007)
New Revision: 4179
Modified:
trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml
Log:
RF-391- add link to the RichFaces Forum in the Relevant Resources Links section
Modified: trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml 2007-11-22 12:40:40 UTC (rev 4178)
+++ trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml 2007-11-22 12:47:38 UTC (rev 4179)
@@ -514,5 +514,9 @@
<para>
<ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/scrollableDataTable.j...">Here</ulink>
you can see the example of <emphasis role="bold"><property><rich:scrollableDataTable></property>s</emphasis> usage. </para>
+ <para>How to use <property>one and multi-selection rows mode</property> see on the
+ <ulink url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=122543"> RichFaces Users Forum</ulink>
+ </para>
+
</section>
</section>
18 years, 5 months
JBoss Rich Faces SVN: r4178 - in branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI: controls/grid and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-11-22 07:40:40 -0500 (Thu, 22 Nov 2007)
New Revision: 4178
Modified:
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js
Log:
RF-1371
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js 2007-11-22 12:30:58 UTC (rev 4177)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js 2007-11-22 12:40:40 UTC (rev 4178)
@@ -43,7 +43,10 @@
var src = request.getElementById(id);
if(target && src) {
- Utils.DOM.Event.removeListeners(target);
+ var cells = target.cells;
+ for(var i = 0; i < cells.length; i++) {
+ Utils.DOM.Event.removeListeners(cells[i]);
+ }
if (ClientUILib.isIE) {
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-11-22 12:30:58 UTC (rev 4177)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-11-22 12:40:40 UTC (rev 4178)
@@ -295,7 +295,11 @@
},
addListener: function(element, rowIndex) {
- Utils.DOM.Event.observe(element, "click", this.processClick.bindAsEventListener(this, rowIndex));
+ var listener = this.processClick.bindAsEventListener(this, rowIndex);
+ var cells = element.cells;
+ for(var i = 0; i < cells.length; i++) {
+ Utils.DOM.Event.observe(cells[i], "click", listener);
+ }
},
/* getGridSelection: function() {
18 years, 5 months