JBoss Rich Faces SVN: r3315 - trunk/test-applications/jsp/src/main/java/calendar.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-10-10 12:09:21 -0400 (Wed, 10 Oct 2007)
New Revision: 3315
Modified:
trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java
trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelImpl.java
trunk/test-applications/jsp/src/main/java/calendar/CalendarValidator.java
Log:
Modified: trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java 2007-10-10 16:08:39 UTC (rev 3314)
+++ trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java 2007-10-10 16:09:21 UTC (rev 3315)
@@ -28,8 +28,8 @@
import java.util.Locale;
import java.util.StringTokenizer;
import java.util.TimeZone;
+
import javax.faces.event.ValueChangeEvent;
-import javax.faces.webapp.UIComponentTag;
import org.richfaces.event.CurrentDateChangeEvent;
@@ -72,7 +72,6 @@
private String toolTipMode;
private String label;
private String timeZone;
- private String mode;
private int zindex;
private int counter;
@@ -120,13 +119,6 @@
this.pattern = pattern;
}
- public void selectPattern(ValueChangeEvent event) {
- String tPatern = (String) event.getNewValue();
- if (tPatern != null) {
- pattern = tPatern;
- }
- }
-
public CalendarBean() {
height = "400px";
width = "400px";
@@ -149,14 +141,12 @@
required = false;
weekDay = "long";
month = "none";
- mode = "client";
timeZone = "Eastern European Time";
preloadDateRangeBegin = "10.08.2007"; //d.m.y
preloadDateRangeEnd = "11.10.2007";
}
public Date getPrDateRangeBegin() {
- if("ajax".equals(mode)) return null;
Calendar cal = Calendar.getInstance();
StringTokenizer st = new StringTokenizer(preloadDateRangeBegin,".");
ArrayList<Integer> date = new ArrayList<Integer>();
@@ -169,7 +159,6 @@
}
public Date getPrDateRangeEnd() {
- if("ajax".equals(mode)) return null;
Calendar cal = Calendar.getInstance();
StringTokenizer st = new StringTokenizer(preloadDateRangeEnd, ".");
ArrayList<Integer> date = new ArrayList<Integer>();
@@ -205,15 +194,6 @@
this.readonly = readonly;
}
- public void selectLocale(ValueChangeEvent event) {
- String tLocale = (String) event.getNewValue();
- if (tLocale != null) {
- String lang = tLocale.substring(0, 2);
- String country = tLocale.substring(3);
- locale = new Locale(lang, country, "");
- }
- }
-
public Object getWeekDayLabels() {
if(weekDay.equals("long"))
return CalendarBean.WEEK_DAY;
@@ -281,9 +261,6 @@
this.jointPoint = jointPoint;
}
- public void selectJointPoint(ValueChangeEvent event) {
- jointPoint = (String) event.getNewValue();
- }
public String getDirection() {
return direction;
@@ -293,10 +270,6 @@
this.direction = direction;
}
- public void selectDirection(ValueChangeEvent event) {
- direction = (String) event.getNewValue();
- }
-
public String getBoundary() {
return boundary;
}
@@ -307,6 +280,7 @@
public void dcl(CurrentDateChangeEvent event) {
System.out.println(event.getCurrentDateString());
+ System.out.println("ajvhckndskncs");
}
public void ddd(ValueChangeEvent event) {
@@ -431,14 +405,6 @@
this.preloadDateRangeEnd = preloadDateRangeEnd;
}
- public String getMode() {
- return mode;
- }
-
- public void setMode(String mode) {
- this.mode = mode;
- }
-
public String getWeekDay() {
return weekDay;
}
Modified: trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelImpl.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelImpl.java 2007-10-10 16:08:39 UTC (rev 3314)
+++ trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelImpl.java 2007-10-10 16:09:21 UTC (rev 3315)
@@ -22,10 +22,12 @@
package calendar;
import java.text.DateFormat;
+import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
+import java.util.Random;
import org.richfaces.model.CalendarDataModel;
import org.richfaces.model.CalendarDataModelItem;
@@ -62,8 +64,20 @@
data.put("enLabel", enFormatter.format(date));
data.put("frLabel", frFormatter.format(date));
data.put("deLabel", deFormatter.format(date));
+ /*Calendar c = Calendar.getInstance();
+ c.setTime(date);
+ item.setDay(c.get(Calendar.DAY_OF_MONTH));*/
+
+ if (new Random().nextInt(10) > 5) {
+ item.setEnabled(true);
+ } else {
+ item.setEnabled(false);
+ }
+
item.setData(data);
-
+
+ System.out.println(item.getData() + " " + item.isEnabled());
+
return item;
}
Modified: trunk/test-applications/jsp/src/main/java/calendar/CalendarValidator.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/calendar/CalendarValidator.java 2007-10-10 16:08:39 UTC (rev 3314)
+++ trunk/test-applications/jsp/src/main/java/calendar/CalendarValidator.java 2007-10-10 16:09:21 UTC (rev 3315)
@@ -1,3 +1,6 @@
+/**
+ *
+ */
package calendar;
import java.util.Calendar;
17 years, 2 months
JBoss Rich Faces SVN: r3314 - trunk/test-applications/jsp/src/main/java/calendar.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-10-10 12:08:39 -0400 (Wed, 10 Oct 2007)
New Revision: 3314
Modified:
trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelItemImpl.java
Log:
Modified: trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelItemImpl.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelItemImpl.java 2007-10-10 14:47:38 UTC (rev 3313)
+++ trunk/test-applications/jsp/src/main/java/calendar/CalendarDataModelItemImpl.java 2007-10-10 16:08:39 UTC (rev 3314)
@@ -33,8 +33,18 @@
private Object data;
private String styleClass;
private Object toolTip;
+ private int day;
private boolean enabled = true;
+
+ public int getDay() {
+ return day;
+ }
+
+ public void setDay(int day) {
+ this.day = day;
+ }
+
/* (non-Javadoc)
* @see org.richfaces.component.CalendarDataModelItem#getData()
*/
@@ -97,10 +107,5 @@
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
-
- public int getDay() {
- // TODO Auto-generated method stub
- return 0;
- }
-
+
}
17 years, 2 months
JBoss Rich Faces SVN: r3313 - in trunk/ui/scrollableDataTable/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-10-10 10:47:38 -0400 (Wed, 10 Oct 2007)
New Revision: 3313
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js
trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx
Log:
RF-1076
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js 2007-10-10 14:20:50 UTC (rev 3312)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js 2007-10-10 14:47:38 UTC (rev 3313)
@@ -64,7 +64,7 @@
},
createControl: function() {
var grid = this;
- this.layout = new ClientUI.layouts.GridLayoutManager(this.getElement(), null);
+ this.layout = new ClientUI.layouts.GridLayoutManager(this.getElement().id + ":c", null);
var pagePart, item;
for(var i=0; i<this.templates.length; i++) {
Modified: trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx
===================================================================
--- trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx 2007-10-10 14:20:50 UTC (rev 3312)
+++ trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx 2007-10-10 14:47:38 UTC (rev 3313)
@@ -65,174 +65,213 @@
variables.setVariable("hStyle", hStyle);
]]>
</jsp:scriptlet>
-
-
- <div id="#{clientId}" style="width: #{component.attributes['width']};height: #{component.attributes['height']};" class="dr-sdt rich-sdt #{component.attributes['styleClass']}" >
- <div id="#{clientId}:cs" class="dr-sdt-hsplit" style="display: none;"/>
- <div id="#{clientId}_GridHeaderTemplate" class="dr-sdt-inlinebox" style="#{hStyle}; width: #{component.attributes['width']};">
- <iframe id="#{clientId}:hs" class="dr-sdt-substrate" src="" scrolling="no" frameborder="0" > <br/> </iframe>
- <div style="display: block; left: 0px; top: 0px; width: #{sumWidth}px;">
- <span class="dr-sdt-tmplbox dr-sdt-fb" id="#{clientId}:header:FrozenBox">
- <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <table id="#{clientId}" cellpadding="0" cellspacing="0" style="width: #{component.attributes['width']};height: #{component.attributes['height']};" class="dr-sdt rich-sdt #{component.attributes['styleClass']}" >
+ <tbody>
+ <jsp:scriptlet>
+ <![CDATA[
+ UIComponent facet = component.getFacet("header");
+ if (null != facet && facet .isRendered()) {
+ ]]>
+ </jsp:scriptlet>
+ <tr>
+ <td>
+ <u:insertFacet name="header" />
+ </td>
+ </tr>
+ <jsp:scriptlet>
+ <![CDATA[
+ }
+ ]]>
+ </jsp:scriptlet>
+ <tr>
+ <td style="height: 100%;">
+ <div id="#{clientId}:c" style="height: 100%;">
+ <div id="#{clientId}:cs" class="dr-sdt-hsplit" style="display: none;"/>
+ <div id="#{clientId}_GridHeaderTemplate" class="dr-sdt-inlinebox" style="#{hStyle}; width: #{component.attributes['width']};">
+ <iframe id="#{clientId}:hs" class="dr-sdt-substrate" src="" scrolling="no" frameborder="0" > <br/> </iframe>
+ <div style="display: block; left: 0px; top: 0px; width: #{sumWidth}px;">
+ <span class="dr-sdt-tmplbox dr-sdt-fb" id="#{clientId}:header:FrozenBox">
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, true);
+ ]]>
+ </jsp:scriptlet>
+
+ <thead>
+ <tr class="dr-sdt-hr rich-std-header-row #{component.attributes['headerClass']}">
+ <jsp:scriptlet>
+ <![CDATA[
+ renderHeaders(context, component, true);
+ ]]>
+ </jsp:scriptlet>
+ </tr>
+ </thead>
+ </table>
+ </span>
- <jsp:scriptlet>
- <![CDATA[
- renderCols(context, component, true);
- ]]>
- </jsp:scriptlet>
-
- <thead>
- <tr class="dr-sdt-hr rich-std-header-row #{component.attributes['headerClass']}">
- <jsp:scriptlet>
- <![CDATA[
- renderHeaders(context, component, true);
- ]]>
- </jsp:scriptlet>
- </tr>
- </thead>
- </table>
- </span>
-
- <span class="dr-sdt-tmplbox dr-sdt-nb" id="#{clientId}:header:NormalBox">
- <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
-
- <jsp:scriptlet>
- <![CDATA[
- renderCols(context, component, false);
- ]]>
- </jsp:scriptlet>
- <col width="1"/>
- <thead>
- <tr class="dr-sdt-hr rich-std-header-row #{component.attributes['headerClass']}">
- <jsp:scriptlet>
- <![CDATA[
- renderHeaders(context, component, false);
- ]]>
- </jsp:scriptlet>
- <th></th>
- </tr>
- </thead>
- </table>
- </span>
- </div>
- </div>
-
-
-
- <div id="#{clientId}_GridBodyTemplate" class="dr-sdt-inlinebox" style="overflow: auto; width: #{component.attributes['width']}; height: #{component.attributes['height']};">
- <div id="#{clientId}:scb" style="position: absolute; z-index: 0;">
- <div id="#{clientId}:sb" style="position: absolute;" ><br/> </div>
- </div>
- <div id="#{clientId}:bc" style="display: block; width: #{sumWidth}px;">
- <span class="dr-sdt-tmplbox dr-sdt-fb" id="#{clientId}:body:FrozenBox">
- <table id="#{clientId}:f" cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+ <span class="dr-sdt-tmplbox dr-sdt-nb" id="#{clientId}:header:NormalBox">
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, false);
+ ]]>
+ </jsp:scriptlet>
+ <col width="1"/>
+ <thead>
+ <tr class="dr-sdt-hr rich-std-header-row #{component.attributes['headerClass']}">
+ <jsp:scriptlet>
+ <![CDATA[
+ renderHeaders(context, component, false);
+ ]]>
+ </jsp:scriptlet>
+ <th></th>
+ </tr>
+ </thead>
+ </table>
+ </span>
+ </div>
+ </div>
- <jsp:scriptlet>
- <![CDATA[
- renderCols(context, component, true);
- ]]>
- </jsp:scriptlet>
- <tbody>
- <jsp:scriptlet>
- <![CDATA[
- renderGridBody(context, component, true);
- ]]>
- </jsp:scriptlet>
- </tbody>
- </table>
- <span class="dr-sdt-ho" id="#{clientId}:fho" ><br/></span>
- </span>
- <span class="dr-sdt-tmplbox dr-sdt-nb" id="#{clientId}:body:NormalBox">
- <table id="#{clientId}:n" cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <div id="#{clientId}_GridBodyTemplate" class="dr-sdt-inlinebox" style="overflow: auto; width: #{component.attributes['width']}; height: #{component.attributes['height']};">
+ <div id="#{clientId}:scb" style="position: absolute; z-index: 0;">
+ <div id="#{clientId}:sb" style="position: absolute;" ><br/> </div>
+ </div>
+ <div id="#{clientId}:bc" style="display: block; width: #{sumWidth}px;">
+ <span class="dr-sdt-tmplbox dr-sdt-fb" id="#{clientId}:body:FrozenBox">
+ <table id="#{clientId}:f" cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, true);
+ ]]>
+ </jsp:scriptlet>
+ <tbody>
+ <jsp:scriptlet>
+ <![CDATA[
+ renderGridBody(context, component, true);
+ ]]>
+ </jsp:scriptlet>
+ </tbody>
+ </table>
+ <span class="dr-sdt-ho" id="#{clientId}:fho" ><br/></span>
+ </span>
+ <span class="dr-sdt-tmplbox dr-sdt-nb" id="#{clientId}:body:NormalBox">
+ <table id="#{clientId}:n" cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, false);
+ ]]>
+ </jsp:scriptlet>
+ <col width="1"/>
+ <tbody>
+ <jsp:scriptlet>
+ <![CDATA[
+ renderGridBody(context, component, false);
+ ]]>
+ </jsp:scriptlet>
+ </tbody>
+ </table>
+ <span class="dr-sdt-ho" id="#{clientId}:nho" ><br/></span>
+ </span>
+ </div>
+ </div>
+
+ <div id="#{clientId}_GridFooterTemplate" class="dr-sdt-inlinebox" style="#{fStyle}; width: #{component.attributes['width']};">
+ <iframe id="#{clientId}:fs" class="dr-sdt-substrate" src="" scrolling="no" frameborder="0" > <br/></iframe>
+ <div style="display: block; width: width: #{sumWidth}px;">
+ <span class="dr-sdt-tmplbox dr-sdt-fb" id="#{clientId}:footer:FrozenBox">
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, true);
+ ]]>
+ </jsp:scriptlet>
+ <tfoot>
+ <tr class="dr-sdt-fr rich-std-footer-row #{component.attributes['footerClass']}">
+ <jsp:scriptlet>
+ <![CDATA[
+ renderFooters(context, component,true);
+ ]]>
+ </jsp:scriptlet>
+ </tr>
+ </tfoot>
+ </table>
+ </span>
+
+ <span class="dr-sdt-tmplbox dr-sdt-nb" id="#{clientId}:footer:NormalBox">
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, false);
+ ]]>
+ </jsp:scriptlet>
+ <col width="1"/>
+ <tfoot>
+ <tr class="dr-sdt-fr rich-std-footer-row #{component.attributes['footerClass']}">
+ <jsp:scriptlet>
+ <![CDATA[
+ renderFooters(context, component,false);
+ ]]>
+ </jsp:scriptlet>
+ <th></th>
+ </tr>
+ </tfoot>
+ </table>
+ </span>
+ </div>
+ </div>
+
+ <input type="hidden" name="#{clientId}_hc" id="#{clientId}_hc"/>
+ <input type="hidden" name="#{clientId}_state_input" id="#{clientId}_state_input"/>
+ <input type="hidden" name="#{clientId}_options_input" id="#{clientId}_options_input"/>
+ <input type="hidden" name="#{clienId}_rows_input" id="#{clientId}_rows_input" value="#{rows_count}"/>
+ <input type="button" name="#{clientId}_submit_input" id="#{clientId}_submit_input" onclick="#{this:getRowsAjaxUpdate(context,component)}" style="display:none"/>
<jsp:scriptlet>
- <![CDATA[
- renderCols(context, component, false);
+ <![CDATA[
+ renderHiddenScrollInput(context, component);
]]>
- </jsp:scriptlet>
- <col width="1"/>
- <tbody>
- <jsp:scriptlet>
- <![CDATA[
- renderGridBody(context, component, false);
- ]]>
- </jsp:scriptlet>
- </tbody>
- </table>
- <span class="dr-sdt-ho" id="#{clientId}:nho" ><br/></span>
- </span>
- </div>
- </div>
-
- <div id="#{clientId}_GridFooterTemplate" class="dr-sdt-inlinebox" style="#{fStyle}; width: #{component.attributes['width']};">
- <iframe id="#{clientId}:fs" class="dr-sdt-substrate" src="" scrolling="no" frameborder="0" > <br/></iframe>
- <div style="display: block; width: width: #{sumWidth}px;">
- <span class="dr-sdt-tmplbox dr-sdt-fb" id="#{clientId}:footer:FrozenBox">
- <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+ </jsp:scriptlet>
- <jsp:scriptlet>
- <![CDATA[
- renderCols(context, component, true);
- ]]>
- </jsp:scriptlet>
- <tfoot>
- <tr class="dr-sdt-fr rich-std-footer-row #{component.attributes['footerClass']}">
- <jsp:scriptlet>
- <![CDATA[
- renderFooters(context, component,true);
- ]]>
- </jsp:scriptlet>
- </tr>
- </tfoot>
- </table>
- </span>
+ <f:call name="contributorsEncodeHere"/>
+ <script id="#{clientId}_grid_create_scripts" type="text/javascript">
+ //<![CDATA[
+
+ #{this:getJavaScriptVarName(context, component)} = #{this:createClientScrollableGrid(context, component)};
+ #{this:getScriptContributions(context, component)};
- <span class="dr-sdt-tmplbox dr-sdt-nb" id="#{clientId}:footer:NormalBox">
- <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
-
- <jsp:scriptlet>
- <![CDATA[
- renderCols(context, component, false);
- ]]>
- </jsp:scriptlet>
- <col width="1"/>
- <tfoot>
- <tr class="dr-sdt-fr rich-std-footer-row #{component.attributes['footerClass']}">
- <jsp:scriptlet>
- <![CDATA[
- renderFooters(context, component,false);
- ]]>
- </jsp:scriptlet>
- <th></th>
- </tr>
- </tfoot>
- </table>
- </span>
- </div>
- </div>
-
- <input type="hidden" name="#{clientId}_hc" id="#{clientId}_hc"/>
- <input type="hidden" name="#{clientId}_state_input" id="#{clientId}_state_input"/>
- <input type="hidden" name="#{clientId}_options_input" id="#{clientId}_options_input"/>
- <input type="hidden" name="#{clienId}_rows_input" id="#{clientId}_rows_input" value="#{rows_count}"/>
- <input type="button" name="#{clientId}_submit_input" id="#{clientId}_submit_input" onclick="#{this:getRowsAjaxUpdate(context,component)}" style="display:none"/>
- <jsp:scriptlet>
- <![CDATA[
- renderHiddenScrollInput(context, component);
- ]]>
- </jsp:scriptlet>
-
- <f:call name="contributorsEncodeHere"/>
- <script id="#{clientId}_grid_create_scripts" type="text/javascript">
- //<![CDATA[
-
- #{this:getJavaScriptVarName(context, component)} = #{this:createClientScrollableGrid(context, component)};
- #{this:getScriptContributions(context, component)};
-
- // ]]>
- </script>
- <f:call name="tearDownState"/>
- </div>
+ // ]]>
+ </script>
+ <f:call name="tearDownState"/>
+ </div>
+ </td>
+ </tr>
+ <jsp:scriptlet>
+ <![CDATA[
+ facet = component.getFacet("footer");
+ if (null != facet && facet .isRendered()) {
+ ]]>
+ </jsp:scriptlet>
+ <tr>
+ <td>
+ <u:insertFacet name="footer" />
+ </td>
+ </tr>
+ <jsp:scriptlet>
+ <![CDATA[
+ }
+ ]]>
+ </jsp:scriptlet>
+ </tbody>
+ </table>
</f:root>
17 years, 2 months
JBoss Rich Faces SVN: r3312 - trunk/framework/impl/src/main/javascript/ajaxjsf.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-10-10 10:20:50 -0400 (Wed, 10 Oct 2007)
New Revision: 3312
Modified:
trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
Log:
http://jira.jboss.com/jira/browse/RF-1089
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-10-10 14:03:34 UTC (rev 3311)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-10-10 14:20:50 UTC (rev 3312)
@@ -899,11 +899,13 @@
var data = request.getJSON('_ajax:data');
try {
var newscript = Sarissa.getText(oncomplete,true);
-// if (window.execScript) {
-// window.execScript( newscript );
-// } else {
- window.eval(newscript);
-// }
+ if (request.domEvt.target) {
+ request.domEvt.target.oncomplete = new Function(newscript);
+ request.domEvt.target.oncomplete();
+ } else {
+ window.eval(newscript);
+ }
+
} catch(e){
LOG.error('Error evaluate oncomplete function '+e.Message);
}
17 years, 2 months
JBoss Rich Faces SVN: r3311 - branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-10-10 10:03:34 -0400 (Wed, 10 Oct 2007)
New Revision: 3311
Modified:
branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java
Log:
add support for f:param if tabPanel mode is "server"
Modified: branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java
===================================================================
--- branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java 2007-10-10 14:01:18 UTC (rev 3310)
+++ branches/3.1.x/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java 2007-10-10 14:03:34 UTC (rev 3311)
@@ -21,7 +21,20 @@
package org.richfaces.renderkit;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIParameter;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.Messages;
import org.ajax4jsf.javascript.JSFunction;
+import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.ajax4jsf.util.HtmlDimensions;
@@ -30,13 +43,7 @@
import org.richfaces.component.UITabPanel;
import org.richfaces.component.util.HtmlUtil;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import java.io.IOException;
-import java.util.Map;
-
/**
* @author Nick Belaevski - nbelaevski(a)exadel.com
* created 12.01.2007
@@ -48,7 +55,41 @@
protected Class getComponentClass() {
return UITab.class;
}
-
+
+ // find and encode UIParameter's components
+ public List encodeParams(FacesContext context, UITab component) throws IOException {
+
+ UITab menuItem = component;
+ List params = new ArrayList();
+ StringBuffer buff = new StringBuffer();
+
+ List children = menuItem.getChildren();
+ for (Iterator iterator = children.iterator(); iterator.hasNext();) {
+ UIComponent child = (UIComponent) iterator.next();
+
+ if(child instanceof UIParameter){
+
+ UIParameter param = (UIParameter)child;
+ String name = param.getName();
+
+ if (null == name) {
+ throw new IllegalArgumentException(Messages.getMessage(
+ Messages.UNNAMED_PARAMETER_ERROR, component.getClientId(context)));
+ }
+
+ Object value = param.getValue();
+ buff.append("_params[");
+ buff.append(ScriptUtils.toScript(name));
+ buff.append("] = ");
+ buff.append(ScriptUtils.toScript(value));
+ buff.append(";");
+ params.add(buff.toString());
+ }
+ }
+
+ return params;
+ }
+
public void encodeTabLabel(FacesContext context, UITab tab) throws IOException {
ResponseWriter writer = context.getResponseWriter();
@@ -90,7 +131,14 @@
String script = buffer.toString();
writer.writeAttribute(HTML.onclick_ATTRIBUTE, activeCheck + eventCheck + script, null);
} else {
- StringBuffer script = new StringBuffer("var _formName = A4J.findForm(this).id; var _paramName = '" + clientId + "_server_submit'; var _params = new Object(); _params[_paramName] = _paramName; _JSFFormSubmit('");
+ StringBuffer script = new StringBuffer("var _formName = A4J.findForm(this).id; var _paramName = '" + clientId + "_server_submit'; var _params = new Object(); _params[_paramName] = _paramName; ");
+ List params = encodeParams(context, tab);
+
+ for (Iterator iterator = params.iterator(); iterator.hasNext();) {
+ script.append(iterator.next());
+ }
+
+ script.append("_JSFFormSubmit('");
script.append(clientId);
script.append("', _formName, null, _params);");
script.append("this.onclick = null; _clearJSFFormParameters(_formName, null, [_paramName]);");
17 years, 2 months
JBoss Rich Faces SVN: r3309 - trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-10-10 09:58:12 -0400 (Wed, 10 Oct 2007)
New Revision: 3309
Modified:
trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java
Log:
add support for f:param if tabPanel mode is server(RF-1090)
Modified: trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java
===================================================================
--- trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java 2007-10-10 12:54:00 UTC (rev 3308)
+++ trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java 2007-10-10 13:58:12 UTC (rev 3309)
@@ -21,7 +21,20 @@
package org.richfaces.renderkit;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIParameter;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.Messages;
import org.ajax4jsf.javascript.JSFunction;
+import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.ajax4jsf.util.HtmlDimensions;
@@ -30,13 +43,7 @@
import org.richfaces.component.UITabPanel;
import org.richfaces.component.util.HtmlUtil;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import java.io.IOException;
-import java.util.Map;
-
/**
* @author Nick Belaevski - nbelaevski(a)exadel.com
* created 12.01.2007
@@ -48,7 +55,41 @@
protected Class getComponentClass() {
return UITab.class;
}
-
+
+ // find and encode UIParameter's components
+ public List encodeParams(FacesContext context, UITab component) throws IOException {
+
+ UITab menuItem = component;
+ List params = new ArrayList();
+ StringBuffer buff = new StringBuffer();
+
+ List children = menuItem.getChildren();
+ for (Iterator iterator = children.iterator(); iterator.hasNext();) {
+ UIComponent child = (UIComponent) iterator.next();
+
+ if(child instanceof UIParameter){
+
+ UIParameter param = (UIParameter)child;
+ String name = param.getName();
+
+ if (null == name) {
+ throw new IllegalArgumentException(Messages.getMessage(
+ Messages.UNNAMED_PARAMETER_ERROR, component.getClientId(context)));
+ }
+
+ Object value = param.getValue();
+ buff.append("_params[");
+ buff.append(ScriptUtils.toScript(name));
+ buff.append("] = ");
+ buff.append(ScriptUtils.toScript(value));
+ buff.append(";");
+ params.add(buff.toString());
+ }
+ }
+
+ return params;
+ }
+
public void encodeTabLabel(FacesContext context, UITab tab) throws IOException {
ResponseWriter writer = context.getResponseWriter();
@@ -90,7 +131,14 @@
String script = buffer.toString();
writer.writeAttribute(HTML.onclick_ATTRIBUTE, activeCheck + eventCheck + script, null);
} else {
- StringBuffer script = new StringBuffer("var _formName = A4J.findForm(this).id; var _paramName = '" + clientId + "_server_submit'; var _params = new Object(); _params[_paramName] = _paramName; _JSFFormSubmit('");
+ StringBuffer script = new StringBuffer("var _formName = A4J.findForm(this).id; var _paramName = '" + clientId + "_server_submit'; var _params = new Object(); _params[_paramName] = _paramName; ");
+ List params = encodeParams(context, tab);
+
+ for (Iterator iterator = params.iterator(); iterator.hasNext();) {
+ script.append(iterator.next());
+ }
+
+ script.append("_JSFFormSubmit('");
script.append(clientId);
script.append("', _formName, null, _params);");
script.append("this.onclick = null; _clearJSFFormParameters(_formName, null, [_paramName]);");
17 years, 2 months
JBoss Rich Faces SVN: r3308 - trunk/ui/calendar/design/funcspec.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2007-10-10 08:54:00 -0400 (Wed, 10 Oct 2007)
New Revision: 3308
Modified:
trunk/ui/calendar/design/funcspec/FuncSpec - RF Calendar Component.doc
Log:
DayStyleClass renamed
Modified: trunk/ui/calendar/design/funcspec/FuncSpec - RF Calendar Component.doc
===================================================================
(Binary files differ)
17 years, 2 months
JBoss Rich Faces SVN: r3307 - trunk/ui/tree/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-10-10 08:51:53 -0400 (Wed, 10 Oct 2007)
New Revision: 3307
Modified:
trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
Log:
rf-881
Modified: trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2007-10-10 11:40:35 UTC (rev 3306)
+++ trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2007-10-10 12:51:53 UTC (rev 3307)
@@ -117,12 +117,12 @@
UITree tree = treeNode.getUITree();
if (tree.isShowConnectingLines()) {
- //if (((Boolean) (treeNode.getAttributes().get("isLastElement")))
- // .booleanValue()) {
- // variables.setVariable("line", "dr-tree-h-ic-line-last");
- //} else {
+ if (((Boolean) (treeNode.getAttributes().get("isLastElement")))
+ .booleanValue()) {
+ variables.setVariable("line", "dr-tree-h-ic-line-last");
+ } else {
variables.setVariable("line", "dr-tree-h-ic-line-node");
- //}
+ }
if (tree.isExpanded()) {
variables
.setVariable("lineFirst", "dr-tree-h-ic-line-exp");
17 years, 2 months
JBoss Rich Faces SVN: r3306 - trunk/ui/treeTable/design/funcspec.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2007-10-10 07:40:35 -0400 (Wed, 10 Oct 2007)
New Revision: 3306
Modified:
trunk/ui/treeTable/design/funcspec/FuncSpec - Tree Table Component.doc
Log:
update to 0.8 version
Modified: trunk/ui/treeTable/design/funcspec/FuncSpec - Tree Table Component.doc
===================================================================
(Binary files differ)
17 years, 2 months
JBoss Rich Faces SVN: r3305 - in trunk/samples: jQuery-sample and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-10-09 21:11:05 -0400 (Tue, 09 Oct 2007)
New Revision: 3305
Added:
trunk/samples/jQuery-sample/
trunk/samples/jQuery-sample/pom.xml
trunk/samples/jQuery-sample/src/
trunk/samples/jQuery-sample/src/main/
trunk/samples/jQuery-sample/src/main/java/
trunk/samples/jQuery-sample/src/main/resources/
trunk/samples/jQuery-sample/src/main/resources/japanCherry.skin.properties
trunk/samples/jQuery-sample/src/main/webapp/
trunk/samples/jQuery-sample/src/main/webapp/WEB-INF/
trunk/samples/jQuery-sample/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/jQuery-sample/src/main/webapp/WEB-INF/web.xml
trunk/samples/jQuery-sample/src/main/webapp/index.jsp
trunk/samples/jQuery-sample/src/main/webapp/jQuery.xhtml
Log:
jQuery component sample has been added. init version
Property changes on: trunk/samples/jQuery-sample
___________________________________________________________________
Name: svn:ignore
+ target
.classpath
.project
.settings
Added: trunk/samples/jQuery-sample/pom.xml
===================================================================
--- trunk/samples/jQuery-sample/pom.xml (rev 0)
+++ trunk/samples/jQuery-sample/pom.xml 2007-10-10 01:11:05 UTC (rev 3305)
@@ -0,0 +1,23 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>samples</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.samples</groupId>
+ <artifactId>jQuery-sample</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ <packaging>war</packaging>
+ <name>jQuery-sample Maven Webapp</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>jQuery</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <finalName>jQuery-sample</finalName>
+ </build>
+</project>
\ No newline at end of file
Added: trunk/samples/jQuery-sample/src/main/resources/japanCherry.skin.properties
===================================================================
--- trunk/samples/jQuery-sample/src/main/resources/japanCherry.skin.properties (rev 0)
+++ trunk/samples/jQuery-sample/src/main/resources/japanCherry.skin.properties 2007-10-10 01:11:05 UTC (rev 3305)
@@ -0,0 +1,35 @@
+# render.kit=HTML_BASIC
+#Colors
+headerBackgroundColor=#E8BDBD
+headTextColor=#980808
+selectBackgroundColor=#d9E0E0
+generalBackgroundColor=#F8ECEC
+generalTextColor=#000000
+panelTextColor=#000000
+shadowBackgroundColor=#AFB1B2
+shadowOpacity=2
+tableBorderColor=#C0C0C0
+tableBackgroundColor=#ffffff
+selectControlColor=#980808
+controlBorderColor=#DFA5A5
+interfaceLevel3D=10
+overAllBackground=#ffffff
+generalLinkColor=#980808
+hoverLinkColor=#E10000
+visitedLinkColor=#c0c0c0
+# Fonts
+headerSizeFont=12px
+headerFamilyFont=Arial, Verdana, sans-serif
+tabSizeFont=11
+tabFamilyFont=Arial, Verdana, sans-serif
+buttonSizeFont=12
+buttonFamilyFont=Arial, Verdana, sans-serif
+buttonRadiusCorner=12
+panelRadiusCorner=5
+tabRadiusCorner=5
+
+# Preferable
+preferablePanelBodyPadding=0px 0px 0px 0px
+preferableDataSizeFont=11px
+preferableDataFamilyFont=Arial, Verdana, sans-serif
+preferableHeaderWeightFont=bold
Added: trunk/samples/jQuery-sample/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/jQuery-sample/src/main/webapp/WEB-INF/faces-config.xml (rev 0)
+++ trunk/samples/jQuery-sample/src/main/webapp/WEB-INF/faces-config.xml 2007-10-10 01:11:05 UTC (rev 3305)
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+<faces-config>
+</faces-config>
Added: trunk/samples/jQuery-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/jQuery-sample/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ trunk/samples/jQuery-sample/src/main/webapp/WEB-INF/web.xml 2007-10-10 01:11:05 UTC (rev 3305)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <description>Richfaces Gmap Sample</description>
+ <display-name>gmap-sample</display-name>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.SKIN</param-name>
+ <param-value>japanCherry</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added: trunk/samples/jQuery-sample/src/main/webapp/index.jsp
===================================================================
--- trunk/samples/jQuery-sample/src/main/webapp/index.jsp (rev 0)
+++ trunk/samples/jQuery-sample/src/main/webapp/index.jsp 2007-10-10 01:11:05 UTC (rev 3305)
@@ -0,0 +1,7 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head></head>
+ <body>
+ <jsp:forward page="jQuery.jsf" />
+ </body>
+</html>
\ No newline at end of file
Added: trunk/samples/jQuery-sample/src/main/webapp/jQuery.xhtml
===================================================================
--- trunk/samples/jQuery-sample/src/main/webapp/jQuery.xhtml (rev 0)
+++ trunk/samples/jQuery-sample/src/main/webapp/jQuery.xhtml 2007-10-10 01:11:05 UTC (rev 3305)
@@ -0,0 +1,31 @@
+<!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:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:rich="http://labs.jboss.com/jbossrichfaces/ui/jQuery"
+ xmlns:a4j="http://richfaces.org/a4j">
+
+ <f:view contentType="text/html" >
+
+ <body>
+ <form id="form">
+ <h:panelGrid id="menu" columns="1">
+
+ <h:graphicImage value="http://images.businessweek.com/tc/reviews/icons/game_50x50.gif" />
+ <h:graphicImage value="http://www.loinhead.net/images/iconmgs.gif"/>
+ <h:graphicImage value="http://img.dooyoo.co.uk/GB_EN/yoo3/pix/hp/pc-video-games.gif" />
+ <h:graphicImage value="http://www.archos.com/img/av_700/picto_game.gif" />
+
+ </h:panelGrid>
+
+ <rich:jQuery name="makeFat" timing="onJScall" query="stop().animate({width:param.ewidth})" />
+ <rich:jQuery name="makeThin" timing="onJScall" query="stop().animate({width:'50px'})" />
+ <rich:jQuery selector="#menu img" timing="onload" query="mouseover(function(){makeFat(this,{ewidth:'120px'});})" />
+ <rich:jQuery selector="#menu img" timing="onload" query="mouseout(function(){makeThin(this);})" />
+
+ </form>
+ </body>
+</f:view>
+</html>
17 years, 2 months