JBoss Rich Faces SVN: r2735 - trunk/cdk/generator/src/main/resources/META-INF/templates.
by richfaces-svn-commits@lists.jboss.org
Author: vkukharchuk
Date: 2007-09-04 08:40:47 -0400 (Tue, 04 Sep 2007)
New Revision: 2735
Modified:
trunk/cdk/generator/src/main/resources/META-INF/templates/taglib.vm
Log:
http://jira.jboss.com/jira/browse/RF-809
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates/taglib.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates/taglib.vm 2007-09-04 12:40:27 UTC (rev 2734)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates/taglib.vm 2007-09-04 12:40:47 UTC (rev 2735)
@@ -155,7 +155,7 @@
<name>type</name>
<rtexprvalue>false</rtexprvalue>
<description>
- Attribute defines the fully qualified Java class name for listener.
+ Attribute defines the fully qualified Java class name for listener
</description>
</attribute>
17 years, 4 months
JBoss Rich Faces SVN: r2734 - trunk/cdk/generator/src/main/resources/META-INF/templates.
by richfaces-svn-commits@lists.jboss.org
Author: vkukharchuk
Date: 2007-09-04 08:40:27 -0400 (Tue, 04 Sep 2007)
New Revision: 2734
Modified:
trunk/cdk/generator/src/main/resources/META-INF/templates/taglib.vm
Log:
http://jira.jboss.com/jira/browse/RF-809
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates/taglib.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates/taglib.vm 2007-09-04 12:33:22 UTC (rev 2733)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates/taglib.vm 2007-09-04 12:40:27 UTC (rev 2734)
@@ -154,13 +154,17 @@
<attribute>
<name>type</name>
<rtexprvalue>false</rtexprvalue>
- <description>Type</description>
+ <description>
+ Attribute defines the fully qualified Java class name for listener.
+ </description>
</attribute>
<attribute>
<name>binding</name>
<rtexprvalue>false</rtexprvalue>
- <description>Binding</description>
+ <description>
+ The attribute takes a value-binding expression for a component property of a backing bean
+ </description>
</attribute>
17 years, 4 months
JBoss Rich Faces SVN: r2733 - in trunk/ui/scrollableDataTable/src: main/java/org/richfaces/renderkit/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-09-04 08:33:22 -0400 (Tue, 04 Sep 2007)
New Revision: 2733
Modified:
trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/SelectionRendererContributor.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model/internal/TestObj.java
Log:
RF-777
Modified: trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml
===================================================================
--- trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml 2007-09-04 12:17:01 UTC (rev 2732)
+++ trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml 2007-09-04 12:33:22 UTC (rev 2733)
@@ -145,9 +145,10 @@
</description>
</property>
- <property attachedstate="true" hidden="true">
+ <property attachedstate="true">
<name>selection</name>
<classname>org.richfaces.model.selection.Selection</classname>
+ <description>Value binding representing selected rows</description>
</property>
<property>
@@ -222,12 +223,12 @@
</description>
</property>
- <property>
+ <property hidden="true">
<name>sortListener</name>
<classname>org.richfaces.event.sort.SortListener</classname>
<description>
- MethodBinding representing an action listener method that will be notified after sorting of rows
+ Value representing an scroll listener object that will be notified after sorting of rows
</description>
</property>
@@ -237,7 +238,23 @@
<description>This attribute defines rows that are updated after an AJAX request</description>
</property>
+ <property hidden="true">
+ <name>scrollPos</name>
+ <classname>java.lang.String</classname>
+ <description>Component internal property serving mainly to determine vertical scroll position</description>
+ </property>
+ <property hidden="true">
+ <name>responseData</name>
+ <classname>java.util.Collection</classname>
+ <description>Component internal property serving mainly to determine vertical scroll position</description>
+ </property>
+
+ <property hidden="true">
+ <name>beforeUpdate</name>
+ <classname>java.lang.String</classname>
+ </property>
+
&ajax_component_attributes;
&ui_component_attributes;
&ui_data_attributes;
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/SelectionRendererContributor.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/SelectionRendererContributor.java 2007-09-04 12:17:01 UTC (rev 2732)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/SelectionRendererContributor.java 2007-09-04 12:33:22 UTC (rev 2733)
@@ -13,6 +13,7 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.convert.Converter;
+import javax.faces.el.ValueBinding;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.model.DataVisitor;
@@ -113,6 +114,11 @@
grid.setSelection(simpleSelection);
+ ValueBinding selectionBinding = grid.getValueBinding("selection");
+ if (selectionBinding != null) {
+ selectionBinding.setValue(context, simpleSelection);
+ }
+
ScrollableDataTableRendererState.restoreState(context);
}
Modified: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model/internal/TestObj.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model/internal/TestObj.java 2007-09-04 12:17:01 UTC (rev 2732)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model/internal/TestObj.java 2007-09-04 12:33:22 UTC (rev 2733)
@@ -24,10 +24,22 @@
public class TestObj {
private String name;
+ /**
+ *
+ */
+ public TestObj() {
+ // TODO Auto-generated constructor stub
+ }
+
public TestObj(String name) {
this.name = name;
}
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
public String getName() {
return name;
}
17 years, 4 months
JBoss Rich Faces SVN: r2732 - trunk/ui/drag-drop/src/test/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-09-04 08:17:01 -0400 (Tue, 04 Sep 2007)
New Revision: 2732
Modified:
trunk/ui/drag-drop/src/test/java/org/richfaces/component/DragDropTest.java
Log:
Fixed JUnit test for drag-drop components.
Modified: trunk/ui/drag-drop/src/test/java/org/richfaces/component/DragDropTest.java
===================================================================
--- trunk/ui/drag-drop/src/test/java/org/richfaces/component/DragDropTest.java 2007-09-04 11:47:50 UTC (rev 2731)
+++ trunk/ui/drag-drop/src/test/java/org/richfaces/component/DragDropTest.java 2007-09-04 12:17:01 UTC (rev 2732)
@@ -40,10 +40,10 @@
private static Set javaScripts = new HashSet();
static {
- javaScripts.add("org.ajax4jsf.framework.resource.PrototypeScript");
- javaScripts.add("org.ajax4jsf.framework.ajax.AjaxScript");
+ javaScripts.add("org.ajax4jsf.javascript.PrototypeScript");
+ javaScripts.add("org.ajax4jsf.javascript.AjaxScript");
javaScripts.add("scripts/browser_info.js");
- javaScripts.add("org.ajax4jsf.dnd.DnDScript");
+ javaScripts.add("org.ajax4jsf.javascript.DnDScript");
javaScripts.add("scripts/events.js");
javaScripts.add("scripts/utils.js");
javaScripts
@@ -52,6 +52,8 @@
.add("scripts/simple-dropzone.js");
javaScripts.add("scripts/json/json-mini.js");
javaScripts
+ .add("scripts/json/json-dom.js");
+ javaScripts
.add("scripts/dnd/dnd-common.js");
javaScripts
.add("scripts/dnd/dnd-dropzone.js");
17 years, 4 months
JBoss Rich Faces SVN: r2731 - trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-09-04 07:47:50 -0400 (Tue, 04 Sep 2007)
New Revision: 2731
Modified:
trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/slider.js
Log:
http://jira.jboss.com/jira/browse/RF-793
Modified: trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/slider.js
===================================================================
--- trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/slider.js 2007-09-04 11:32:12 UTC (rev 2730)
+++ trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/slider.js 2007-09-04 11:47:50 UTC (rev 2731)
@@ -49,11 +49,6 @@
this.trackLength = this.maximumOffset() - this.minimumOffset();
- this.handleLength = this.isVertical() ?
- (this.handles[0].offsetHeight != 0 ?
- this.handles[0].offsetHeight : this.handles[0].style.height.replace(/px$/,"")) :
- (this.handles[0].offsetWidth != 0 ? this.handles[0].offsetWidth :
- this.handles[0].style.width.replace(/px$/,""));
this.active = false;
this.dragging = false;
@@ -72,7 +67,22 @@
this.eventMouseUp = this.endDrag.bindAsEventListener(this);
this.eventMouseMove = this.update.bindAsEventListener(this);
+ Event.observe(this.track, "mousedown", this.eventMouseDown);
+ Event.observe(document, "mouseup", this.eventMouseUp);
+ Event.observe(document, "mousemove", this.eventMouseMove);
// Initialize handles in reverse (make sure first handle is active)
+ this.handles[0].style.visibility="hidden";
+ setTimeout(this.initHandles.bind(this), 100);
+ this.initialized = true;
+ },
+ initHandles: function() {
+ this.handleLength = this.isVertical() ?
+ (this.handles[0].offsetHeight != 0 ?
+ this.handles[0].offsetHeight : this.handles[0].style.height.replace(/px$/,"")) :
+ (this.handles[0].offsetWidth != 0 ? this.handles[0].offsetWidth :
+ this.handles[0].style.width.replace(/px$/,""));
+
+ var slider = this;
this.handles.each( function(h,i) {
i = slider.handles.length-1-i;
slider.setValue(parseFloat(
@@ -82,12 +92,7 @@
Element.makePositioned(h); // fix IE
Event.observe(h, "mousedown", slider.eventMouseDown);
});
-
- Event.observe(this.track, "mousedown", this.eventMouseDown);
- Event.observe(document, "mouseup", this.eventMouseUp);
- Event.observe(document, "mousemove", this.eventMouseMove);
-
- this.initialized = true;
+ this.handles[0].style.visibility="";
},
dispose: function() {
var slider = this;
17 years, 4 months
JBoss Rich Faces SVN: r2730 - in trunk/samples/rich-message-demo/src/main: webapp/image and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-09-04 07:32:12 -0400 (Tue, 04 Sep 2007)
New Revision: 2730
Added:
trunk/samples/rich-message-demo/src/main/java/org/richfaces/demo/UserBean.java
trunk/samples/rich-message-demo/src/main/webapp/image/error-q.gif
trunk/samples/rich-message-demo/src/main/webapp/pages/message-demo-test.xhtml
Log:
additional files related with RF-764
Added: trunk/samples/rich-message-demo/src/main/java/org/richfaces/demo/UserBean.java
===================================================================
--- trunk/samples/rich-message-demo/src/main/java/org/richfaces/demo/UserBean.java (rev 0)
+++ trunk/samples/rich-message-demo/src/main/java/org/richfaces/demo/UserBean.java 2007-09-04 11:32:12 UTC (rev 2730)
@@ -0,0 +1,43 @@
+/**
+ *
+ */
+package org.richfaces.demo;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class UserBean {
+
+ private String address;
+
+ private String name;
+
+ private String job;
+
+
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getJob() {
+ return job;
+ }
+
+ public void setJob(String job) {
+ this.job = job;
+ }
+
+}
Added: trunk/samples/rich-message-demo/src/main/webapp/image/error-q.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/rich-message-demo/src/main/webapp/image/error-q.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/rich-message-demo/src/main/webapp/pages/message-demo-test.xhtml
===================================================================
--- trunk/samples/rich-message-demo/src/main/webapp/pages/message-demo-test.xhtml (rev 0)
+++ trunk/samples/rich-message-demo/src/main/webapp/pages/message-demo-test.xhtml 2007-09-04 11:32:12 UTC (rev 2730)
@@ -0,0 +1,61 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:rich="http://labs.jboss.com/jbossrichfaces/ui/message"
+ xmlns:a4j="http://richfaces.org/a4j">
+ <head>
+ <link rel="stylesheet" type="text/css" href="/rich-message-demo/css/app.css" />
+ </head>
+
+ <h:form>
+ <h:panelGrid columns="3">
+
+ <h:outputText value="Name:" />
+
+ <h:inputText label="Name" id="name" required="true" value="#{userBean.name}">
+ <a4j:support event="onblur" ajaxSingle="true" />
+ </h:inputText>
+
+ <rich:message for="name">
+ <f:facet name="passedMarker">
+ <h:outputText value="V" />
+ </f:facet>
+ <f:facet name="errorMarker">
+ <h:outputText value="X" />
+ </f:facet>
+ </rich:message>
+
+ <h:outputText value="Job:" />
+
+ <h:inputText label="Job" id="job" required="true" value="#{userBean.job}">
+ <a4j:support event="onblur" ajaxSingle="true"/>
+ </h:inputText>
+
+ <rich:message for="job">
+ <f:facet name="passedMarker">
+ <h:outputText value="V" />
+ </f:facet>
+ <f:facet name="errorMarker">
+ <h:outputText value="X" />
+ </f:facet>
+ </rich:message>
+
+ <h:outputText value="Address:" />
+
+ <h:inputText label="Address" id="address" required="true" value="#{userBean.address}">
+ <a4j:support event="onblur" ajaxSingle="true"/>
+ </h:inputText>
+
+ <rich:message for="address">
+ <f:facet name="passedMarker">
+ <h:outputText value="V" />
+ </f:facet>
+ <f:facet name="errorMarker">
+ <h:outputText value="X" />
+ </f:facet>
+ </rich:message>
+ </h:panelGrid>
+ </h:form>
+ </html>
\ No newline at end of file
17 years, 4 months
JBoss Rich Faces SVN: r2729 - in trunk/ui/message/src/main: resources/org/richfaces/renderkit/html/css and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-09-04 07:29:23 -0400 (Tue, 04 Sep 2007)
New Revision: 2729
Modified:
trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java
trunk/ui/message/src/main/resources/org/richfaces/renderkit/html/css/msg.css
trunk/ui/message/src/main/resources/org/richfaces/renderkit/html/css/msgs.css
Log:
fix RF-790
Modified: trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java
===================================================================
--- trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java 2007-09-04 08:16:09 UTC (rev 2728)
+++ trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java 2007-09-04 11:29:23 UTC (rev 2729)
@@ -178,12 +178,8 @@
labelClass = labelClass == null ? "rich-messages-label" : "rich-messages-label " + labelClass;
- if(isWroteTable){
- writer.startElement(HTML.td_ELEM,uiMessages);
- }else{
- writer.startElement(HTML.SPAN_ELEM, uiMessages);
- }
-
+ writer.startElement(HTML.SPAN_ELEM, uiMessages);
+
getUtils().writeAttribute(writer, HTML.class_ATTRIBUTE,labelClass);
getUtils().writeAttribute(writer, HTML.style_ATTRIBUTE, labelStyle);
@@ -219,11 +215,8 @@
}
- if(isWroteTable){
- writer.endElement(HTML.td_ELEM);
- }else{
- writer.endElement(HTML.SPAN_ELEM);
- }
+ writer.endElement(HTML.SPAN_ELEM);
+
}
public void renderMarkerHtml(UIComponent component, UIComponent markerFacet, FacesContext context,
@@ -237,24 +230,16 @@
uiMessages = (UIRichMessages)component;
- if(isWroteTable){
- writer.startElement(HTML.td_ELEM, uiMessages);
- }else{
- writer.startElement(HTML.SPAN_ELEM, uiMessages);
- }
-
+ writer.startElement(HTML.SPAN_ELEM, uiMessages);
+
String classes = markerClass == null ? "rich-messages-marker" : "rich-messages-marker " + markerClass;
getUtils().writeAttribute(writer, HTML.class_ATTRIBUTE, classes);
getUtils().writeAttribute(writer, HTML.style_ATTRIBUTE, markerStyle);
renderChild(context, markerFacet);
- if(isWroteTable){
- writer.endElement(HTML.td_ELEM);
- }else{
- writer.endElement(HTML.SPAN_ELEM);
- }
-
+ writer.endElement(HTML.SPAN_ELEM);
+
}
public void renderComponentOuterStyles(UIComponent component, FacesContext context, ResponseWriter writer) throws IOException {
@@ -296,6 +281,7 @@
if(isWroteTable){
writer.startElement(HTML.TR_ELEMENT, uiMessages);
+ writer.startElement(HTML.td_ELEM, uiMessages);
}else{
writer.startElement("dt", uiMessages);
}
@@ -305,6 +291,7 @@
renderLabel(uiMessages, context, writer, facesMsg);
if(isWroteTable){
+ writer.endElement(HTML.td_ELEM);
writer.endElement(HTML.TR_ELEMENT);
}else{
writer.endElement("dt");
Modified: trunk/ui/message/src/main/resources/org/richfaces/renderkit/html/css/msg.css
===================================================================
--- trunk/ui/message/src/main/resources/org/richfaces/renderkit/html/css/msg.css 2007-09-04 08:16:09 UTC (rev 2728)
+++ trunk/ui/message/src/main/resources/org/richfaces/renderkit/html/css/msg.css 2007-09-04 11:29:23 UTC (rev 2729)
@@ -7,8 +7,11 @@
.rich-message-label{
}
-.rich-message-marker *{
- vertical-align: middle;
+SPAN.rich-message-marker, SPAN.rich-message-marker * {
+ vertical-align: text-bottom;
}
+span.rich-message-marker, span.rich-message-marker * {
+ vertical-align: text-bottom;
+}
Modified: trunk/ui/message/src/main/resources/org/richfaces/renderkit/html/css/msgs.css
===================================================================
--- trunk/ui/message/src/main/resources/org/richfaces/renderkit/html/css/msgs.css 2007-09-04 08:16:09 UTC (rev 2728)
+++ trunk/ui/message/src/main/resources/org/richfaces/renderkit/html/css/msgs.css 2007-09-04 11:29:23 UTC (rev 2729)
@@ -10,6 +10,10 @@
.rich-messages-header{
}
-SPAN.rich-messages-marker, SPAN.rich-messages-marker *{
- vertical-align: middle;
+SPAN.rich-messages-marker, SPAN.rich-messages-marker * {
+ vertical-align: text-bottom;
}
+
+span.rich-messages-marker, span.rich-messages-marker * {
+ vertical-align: text-bottom;
+}
17 years, 4 months
JBoss Rich Faces SVN: r2728 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/snippets.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2007-09-04 04:16:09 -0400 (Tue, 04 Sep 2007)
New Revision: 2728
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/snippets/commandLinkProblem.xhtml
Log:
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/snippets/commandLinkProblem.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/snippets/commandLinkProblem.xhtml 2007-09-03 18:16:24 UTC (rev 2727)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/form/snippets/commandLinkProblem.xhtml 2007-09-04 08:16:09 UTC (rev 2728)
@@ -10,7 +10,7 @@
<h:commandLink value="Non-Ajax Submit" action="foo" >
<f:param name="param1" value="foo"/>
...
- </h:commandLink>
+ </h:commandLink>
....
</h:panelGrid>
....
17 years, 4 months
JBoss Rich Faces SVN: r2727 - in trunk/samples/calendar-sample/src/main: webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-09-03 14:16:24 -0400 (Mon, 03 Sep 2007)
New Revision: 2727
Modified:
trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java
trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp
Log:
data attribute renamed to dataModel
common AJAX attributes processing added, test application updated
Modified: trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java
===================================================================
--- trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java 2007-09-03 18:16:18 UTC (rev 2726)
+++ trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java 2007-09-03 18:16:24 UTC (rev 2727)
@@ -53,6 +53,8 @@
private String direction;
private String boundary;
+ private int counter;
+
private boolean useCustomDayLabels;
public Locale getLocale() {
@@ -218,5 +220,7 @@
}
-
+ public int getCounter() {
+ return counter++;
+ }
}
\ No newline at end of file
Modified: trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp
===================================================================
--- trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp 2007-09-03 18:16:18 UTC (rev 2726)
+++ trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp 2007-09-03 18:16:24 UTC (rev 2727)
@@ -28,6 +28,10 @@
<h:messages showDetail="true" showSummary="true"/>
</a4j:outputPanel>
<h:form>
+ <h:panelGroup id="counter">
+ <h:outputText value="#{calendarBean.counter}" />
+ </h:panelGroup>
+
<h:panelGrid columns="1">
<h:selectOneRadio binding="#{skinBean.component}" />
<h:commandLink action="#{skinBean.change}" value="set skin" />
@@ -50,7 +54,8 @@
showInput="#{calendarBean.showInput}"
boundaryDatesMode="#{calendarBean.boundary}"
currentDateChangeListener="#{calendarBean.dcl}"
- valueChangeListener="#{calendarBean.ddd}">
+ valueChangeListener="#{calendarBean.ddd}"
+ reRender="counter">
<f:facet name="optionalHeader">
<h:outputText value="optionalHeader Facet" />
</f:facet>
17 years, 4 months
JBoss Rich Faces SVN: r2726 - in trunk/ui/calendar: src/main/config/component and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-09-03 14:16:18 -0400 (Mon, 03 Sep 2007)
New Revision: 2726
Modified:
trunk/ui/calendar/design/funcspec/FuncSpec - RF Calendar Component.doc
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/java/org/richfaces/renderkit/CalendarRendererBase.java
Log:
data attribute renamed to dataModel
common AJAX attributes processing added, test application updated
Modified: trunk/ui/calendar/design/funcspec/FuncSpec - RF Calendar Component.doc
===================================================================
(Binary files differ)
Modified: trunk/ui/calendar/src/main/config/component/calendar.xml
===================================================================
--- trunk/ui/calendar/src/main/config/component/calendar.xml 2007-09-03 17:34:50 UTC (rev 2725)
+++ trunk/ui/calendar/src/main/config/component/calendar.xml 2007-09-03 18:16:18 UTC (rev 2726)
@@ -48,6 +48,7 @@
</taghandler>
-->
&ui_component_attributes;
+ &ajax_component_attributes;
&ui_input_attributes;
&ui_output_attributes;
<property>
@@ -63,7 +64,7 @@
<defaultvalue>"250px"</defaultvalue>
</property>
<property elonly="true">
- <name>data</name>
+ <name>dataModel</name>
<classname>org.richfaces.model.CalendarDataModel</classname>
<description>
Used to provide data for calendar elements. If data is
@@ -435,6 +436,13 @@
<description>valid</description>
</property>
+ <property>
+ <name>ajaxSingle</name>
+ <classname>boolean</classname>
+ <description>if "true", submits ONLY one field/link, instead of all form controls</description>
+ <defaultvalue>true</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-09-03 17:34:50 UTC (rev 2725)
+++ trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2007-09-03 18:16:18 UTC (rev 2726)
@@ -40,6 +40,8 @@
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
import javax.faces.event.ValueChangeEvent;
+
+import org.ajax4jsf.component.AjaxComponent;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.event.AjaxEvent;
import org.apache.commons.logging.Log;
@@ -56,7 +58,7 @@
* JSF component class
*
*/
-public abstract class UICalendar extends UIInput {
+public abstract class UICalendar extends UIInput implements AjaxComponent {
public static final String COMPONENT_TYPE = "org.richfaces.Calendar";
@@ -84,9 +86,9 @@
public abstract void setCurrentDate(Date date);
- public abstract CalendarDataModel getData();
+ public abstract CalendarDataModel getDataModel();
- public abstract void setData(CalendarDataModel dataModel);
+ public abstract void setDataModel(CalendarDataModel dataModel);
public abstract String getDatePattern();
@@ -212,7 +214,7 @@
public Object getTooltip(Date date) {
- CalendarDataModel calendarDM = (CalendarDataModel) getData();
+ CalendarDataModel calendarDM = (CalendarDataModel) getDataModel();
if (calendarDM != null) {
return calendarDM.getToolTip(date);
} else {
@@ -285,6 +287,7 @@
FacesContext facesContext = FacesContext.getCurrentInstance();
AjaxContext ajaxContext = AjaxContext
.getCurrentInstance(facesContext);
+ ajaxContext.addRegionsFromComponent(this);
ajaxContext.setResponseData(getPreload());
} else {
if (event instanceof CurrentDateChangeEvent) {
@@ -361,7 +364,7 @@
public Object getPreload() {
Date[] preloadDateRange = getPreloadDateRange();
if (preloadDateRange != null && preloadDateRange.length != 0) {
- CalendarDataModel calendarDataModel = (CalendarDataModel) getData();
+ CalendarDataModel calendarDataModel = (CalendarDataModel) getDataModel();
if (calendarDataModel != null) {
CalendarDataModelItem[] calendarDataModelItems = calendarDataModel
.getData(preloadDateRange);
@@ -414,5 +417,5 @@
public void removeCurrentDateChangeListener(CurrentDateChangeListener listener) {
removeFacesListener(listener);
}
-
+
}
Modified: trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
--- trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2007-09-03 17:34:50 UTC (rev 2725)
+++ trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2007-09-03 18:16:18 UTC (rev 2726)
@@ -177,9 +177,7 @@
ajaxFunction.addParameter(JSReference.NULL);
Map options = AjaxRendererUtils.buildEventOptions(context, calendar);
options.put("calendar", JSReference.THIS);
- options.put("single", JSReference.TRUE);
- // ajax single
- // options.put("control", new JSReference(JSReference.THIS.toScript(),"id"));
+ //options.put("single", JSReference.TRUE);
String oncomplete = AjaxRendererUtils.getAjaxOncomplete(calendar);
JSFunctionDefinition oncompleteDefinition = new JSFunctionDefinition();
17 years, 4 months