JBoss Rich Faces SVN: r3406 - trunk/framework/impl/src/main/java/org/ajax4jsf/javascript.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-10-16 14:13:52 -0400 (Tue, 16 Oct 2007)
New Revision: 3406
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/javascript/JSMin.java
Log:
http://jira.jboss.com/jira/browse/RF-1129
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/javascript/JSMin.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/javascript/JSMin.java 2007-10-16 17:50:03 UTC (rev 3405)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/javascript/JSMin.java 2007-10-16 18:13:52 UTC (rev 3406)
@@ -213,7 +213,7 @@
case 3:
theB = next();
- if (theB == '/' && (theA == '(' || theA == ',' || theA == '='|| theA == ':')) {
+ if (theB == '/' && (theA == '(' || theA == ',' || theA == '='|| theA == ':' || theA == '[')) {
out.write(theA);
out.write(theB);
for (;;) {
17 years, 2 months
JBoss Rich Faces SVN: r3405 - branches/3.1.x/ui/dataTable/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-10-16 13:50:03 -0400 (Tue, 16 Oct 2007)
New Revision: 3405
Modified:
branches/3.1.x/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
Log:
remove FacesException if columnWidth value with %
Modified: branches/3.1.x/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- branches/3.1.x/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2007-10-16 16:55:01 UTC (rev 3404)
+++ branches/3.1.x/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2007-10-16 17:50:03 UTC (rev 3405)
@@ -52,7 +52,7 @@
* @throws IOException
*/
- protected final static String PERSENTAGE_SUPPORT_ERROR_MSG = "columnsWidth property: Percentage values are not supported";
+// protected final static String PERSENTAGE_SUPPORT_ERROR_MSG = "columnsWidth property: Percentage values are not supported";
public void encodeTableStructure(FacesContext context, UIDataTable table)
throws IOException {
@@ -66,9 +66,9 @@
if (null != columnsWidth) {
// temporary solution RF-957
- if(columnsWidth.contains("%")){
- throw new FacesException(PERSENTAGE_SUPPORT_ERROR_MSG);
- }
+// if(columnsWidth.contains("%")){
+// throw new FacesException(PERSENTAGE_SUPPORT_ERROR_MSG);
+// }
String[] widths = columnsWidth.split(",");
for (int i = 0; i < widths.length; i++) {
writer.startElement("col", table);
17 years, 2 months
JBoss Rich Faces SVN: r3404 - trunk/ui/dataTable/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-10-16 12:55:01 -0400 (Tue, 16 Oct 2007)
New Revision: 3404
Modified:
trunk/ui/dataTable/src/main/templates/org/richfaces/htmlColgroup.jspx
Log:
Added clientId to columnGroup, similar to http://jira.jboss.com/jira/browse/RF-1091
Modified: trunk/ui/dataTable/src/main/templates/org/richfaces/htmlColgroup.jspx
===================================================================
--- trunk/ui/dataTable/src/main/templates/org/richfaces/htmlColgroup.jspx 2007-10-16 16:50:33 UTC (rev 3403)
+++ trunk/ui/dataTable/src/main/templates/org/richfaces/htmlColgroup.jspx 2007-10-16 16:55:01 UTC (rev 3404)
@@ -11,8 +11,8 @@
component="org.richfaces.component.UIColumnGroup"
>
<f:clientid var="clientId"/>
- <tr x:passThruWithExclusions="id"
- >
+ <tr id="#{clientId}"
+ x:passThruWithExclusions="id" >
<vcp:body />
</tr>
</f:root>
\ No newline at end of file
17 years, 2 months
JBoss Rich Faces SVN: r3403 - trunk/sandbox/ui/simpleTogglePanel2/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-10-16 12:50:33 -0400 (Tue, 16 Oct 2007)
New Revision: 3403
Modified:
trunk/sandbox/ui/simpleTogglePanel2/src/main/templates/simpleTogglePanel2.jspx
Log:
Fix x:passThru.. with 'style' attribute
Modified: trunk/sandbox/ui/simpleTogglePanel2/src/main/templates/simpleTogglePanel2.jspx
===================================================================
--- trunk/sandbox/ui/simpleTogglePanel2/src/main/templates/simpleTogglePanel2.jspx 2007-10-16 16:44:24 UTC (rev 3402)
+++ trunk/sandbox/ui/simpleTogglePanel2/src/main/templates/simpleTogglePanel2.jspx 2007-10-16 16:50:33 UTC (rev 3403)
@@ -20,7 +20,7 @@
scripts/simpleTogglePanel2.js
</h:scripts>
- <div id="#{clientId}" x:passThruWithExclusions="id,value"
+ <div id="#{clientId}" x:passThruWithExclusions="id,value,style"
style="width: #{component.attributes['width']};">
<div class="dr-stglpnl rich-stglpanel #{component.attributes['styleClass']}"
style="#{component.attributes['style']};">
17 years, 2 months
JBoss Rich Faces SVN: r3402 - in trunk/ui/tooltip/src/main: java/org/richfaces/component and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-10-16 12:44:24 -0400 (Tue, 16 Oct 2007)
New Revision: 3402
Modified:
trunk/ui/tooltip/src/main/config/component/toolTip.xml
trunk/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java
trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
Log:
http://jira.jboss.com/jira/browse/RF-1124
Modified: trunk/ui/tooltip/src/main/config/component/toolTip.xml
===================================================================
--- trunk/ui/tooltip/src/main/config/component/toolTip.xml 2007-10-16 16:19:49 UTC (rev 3401)
+++ trunk/ui/tooltip/src/main/config/component/toolTip.xml 2007-10-16 16:44:24 UTC (rev 3402)
@@ -42,11 +42,17 @@
<defaultvalue><![CDATA["inline"]]></defaultvalue>
</property>
<property>
- <name>delay</name>
+ <name>showDelay</name>
<classname>int</classname>
<description>Delay in milliseconds before tooltip will be displayed.</description>
<defaultvalue><![CDATA[0]]></defaultvalue>
- </property>
+ </property>
+ <property>
+ <name>hideDelay</name>
+ <classname>int</classname>
+ <description>Delay in milliseconds before tooltip will be hidden.</description>
+ <defaultvalue><![CDATA[0]]></defaultvalue>
+ </property>
<property>
<name>zorder</name>
<classname>int</classname>
Modified: trunk/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java
===================================================================
--- trunk/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java 2007-10-16 16:19:49 UTC (rev 3401)
+++ trunk/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java 2007-10-16 16:44:24 UTC (rev 3402)
@@ -93,10 +93,14 @@
public abstract void setOnmouseover(String onmouseover);
- public abstract int getDelay();
+ public abstract int getShowDelay();
- public abstract void setDelay(int delay);
+ public abstract void setShowDelay(int delay);
+
+ public abstract int getHideDelay();
+ public abstract void setHideDelay(int delay);
+
public abstract int getZorder();
public abstract void setZorder(int delay);
Modified: trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
===================================================================
--- trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2007-10-16 16:19:49 UTC (rev 3401)
+++ trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2007-10-16 16:44:24 UTC (rev 3402)
@@ -221,7 +221,8 @@
eventsMap.put(new JSReference("onshow"), toolTip.getOnshow());
eventsMap.put(new JSReference("oncomplete"), toolTip.getOncomplete());
eventsMap.put(new JSReference("onhide"), toolTip.getOnhide());
- eventsMap.put(new JSReference("delay"), new Integer(toolTip.getDelay()));
+ eventsMap.put(new JSReference("delay"), new Integer(toolTip.getShowDelay()));
+ eventsMap.put(new JSReference("hideDelay"), new Integer(toolTip.getHideDelay()));
JSFunction function = AjaxRendererUtils.buildAjaxFunction(component, context);
JSReference ref = new JSReference("ajaxOptions");
Modified: trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
--- trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2007-10-16 16:19:49 UTC (rev 3401)
+++ trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2007-10-16 16:44:24 UTC (rev 3402)
@@ -11,6 +11,7 @@
this.oncomplete = new Function('event', events.oncomplete + ';return true;');
this.onhide = new Function('event', events.onhide + ';return true;');
this.delay = events.delay;
+ this.hideDelay = events.hideDelay;
this.id = id;
this.parentId = parentId;
@@ -61,7 +62,13 @@
this.attachOnLoadEventsListner = this.attachOnLoadEvents.bindAsEventListener(this);
this.setToolTipPositionListner = this.setToolTipPosition.bindAsEventListener(this);
- this.doHideListner = this.doHide.bindAsEventListener(this);
+
+ if (this.hideDelay > 0) {
+ this.doHideListner = this.customHideHandler.bindAsEventListener(this);
+ } else {
+ this.doHideListner = this.doHide.bindAsEventListener(this);
+ }
+
this.leaveToolTipListner = this.leaveToolTip.bindAsEventListener(this);
if (Richfaces.tooltips[parentId])
@@ -113,11 +120,23 @@
this.eventCopy = A4J.AJAX.CloneObject(event, false);
- this.activationTimerHandle = setTimeout(function() {
+ this.activationTimerHandle = window.setTimeout(function() {
this.doShow(this.eventCopy);
- }.bind(this), this.delay);
+ }.bindAsEventListener(this), this.delay);
},
+ customHideHandler: function(event) {
+ if (this.hidingTimerHandle) {
+ return ;
+ }
+
+ this.eventCopy = A4J.AJAX.CloneObject(event, false);
+
+ this.hidingTimerHandle = window.setTimeout(function() {
+ this.doHide(this.eventCopy);
+ }.bindAsEventListener(this), this.hideDelay);
+ },
+
attachParentEvents: function(){
if(this.followMouse){
Event.observe(this.parent, 'mousemove', this.setToolTipPositionListner, false);
@@ -264,7 +283,7 @@
if (this.ffcheck(relTarg)) return;
if (this.activationTimerHandle) {
- clearTimeout(this.activationTimerHandle);
+ window.clearTimeout(this.activationTimerHandle);
this.activationTimerHandle = undefined;
}
@@ -288,6 +307,11 @@
this.hintParentElement = null;
this.isMouseOvered = false;
this.onhide(e);
+
+ if (this.hidingTimerHandle) {
+ window.clearTimeout(this.hidingTimerHandle);
+ this.hidingTimerHandle = undefined;
+ }
},
doEnable: function(){
17 years, 2 months
JBoss Rich Faces SVN: r3401 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-10-16 12:19:49 -0400 (Tue, 16 Oct 2007)
New Revision: 3401
Modified:
trunk/docs/userguide/en/src/main/docbook/included/inputNumberSlider.xml
Log:
CSS role is defined
Modified: trunk/docs/userguide/en/src/main/docbook/included/inputNumberSlider.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/inputNumberSlider.xml 2007-10-16 15:39:27 UTC (rev 3400)
+++ trunk/docs/userguide/en/src/main/docbook/included/inputNumberSlider.xml 2007-10-16 16:19:49 UTC (rev 3401)
@@ -358,7 +358,7 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="HTML"><![CDATA[...
+ <programlisting role="CSS"><![CDATA[...
.rich-slider-handle{
border:2px solid;
}
17 years, 2 months
JBoss Rich Faces SVN: r3400 - trunk/ui/jQuery/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-10-16 11:39:27 -0400 (Tue, 16 Oct 2007)
New Revision: 3400
Modified:
trunk/ui/jQuery/src/main/config/component/jQuery.xml
Log:
http://jira.jboss.com/jira/browse/RF-730
correcting language
Modified: trunk/ui/jQuery/src/main/config/component/jQuery.xml
===================================================================
--- trunk/ui/jQuery/src/main/config/component/jQuery.xml 2007-10-16 15:24:13 UTC (rev 3399)
+++ trunk/ui/jQuery/src/main/config/component/jQuery.xml 2007-10-16 15:39:27 UTC (rev 3400)
@@ -29,10 +29,10 @@
<name>name</name>
<classname>java.lang.String</classname>
<description>
- The name of the function that will be generated to execute the query. If name is
- not defined explicitly it will be pre-generated from the id of the component where
- colon is replaced with underscore and "jq_" prefix is added. The name attribute is required
- if timing attribute equals to "onJScall"
+ The name of a function that will be generated to execute a query. If the name is
+ not defined explicitly, it is pre-generated from the id of the component where
+ colon is replaced with underscore and "jq_" prefix is added. The "name" attribute is required
+ if "timing" attribute equals to "onJScall"
</description>
<defaultvalue>""</defaultvalue>
</property>
@@ -40,7 +40,7 @@
<name>selector</name>
<classname>java.lang.String</classname>
<description>
- Selector for query. The component id as well as any html element id might
+ Selector for a query. The component id as well as any html element id might
be used inside.
</description>
<defaultvalue>""</defaultvalue>
@@ -49,7 +49,7 @@
<name>query</name>
<classname>java.lang.String</classname>
<description>
- The query string that will be executed for given selector.
+ The query string that is executed for a given selector.
</description>
<defaultvalue>""</defaultvalue>
</property>
@@ -57,9 +57,9 @@
<name>timing</name>
<classname>java.lang.String</classname>
<description>
- When to peform the query. Two possible values are "immediate","onload" and "onJScall".
+ The attribute that defines when to perform the query. The possible values are "immediate","onload" and "onJScall".
"immediate" performs the query right away. "onload" adds the task to the
- time when document is loaded (the DOM tree is created). "onJScall" allows to invoke the
+ time when a document is loaded (the DOM tree is created). "onJScall" allows to invoke the
query by Javascipt function name defined with "name" attribute. The default value is
"immediate".
</description>
17 years, 2 months
JBoss Rich Faces SVN: r3399 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-10-16 11:24:13 -0400 (Tue, 16 Oct 2007)
New Revision: 3399
Modified:
trunk/docs/userguide/en/src/main/docbook/included/jQuery.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/jQuery.xml
Log:
http://jira.jboss.com/jira/browse/RF-1123 -added description
Modified: trunk/docs/userguide/en/src/main/docbook/included/jQuery.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/jQuery.desc.xml 2007-10-16 15:00:44 UTC (rev 3398)
+++ trunk/docs/userguide/en/src/main/docbook/included/jQuery.desc.xml 2007-10-16 15:24:13 UTC (rev 3399)
@@ -7,23 +7,22 @@
</sectioninfo>
<section>
<title>Description</title>
-
+ <para>The <emphasis role="bold">
+ <property><rich:jQuery></property>
+ </emphasis> allows to apply styles and behaviour to the DOM object.</para>
- <mediaobject>
+ <!--mediaobject>
<imageobject>
<imagedata fileref="images/jQuery.png"/>
</imageobject>
- </mediaobject>
+ </mediaobject-->
</section>
<section>
<title>Key Features</title>
- <!--itemizedlist>
- <listitem>Highly customizable look and feel</listitem>
- <listitem>Popup representation</listitem>
- <listitem>Disablement support</listitem>
- <listitem>Smart and user-defined positioning</listitem>
- <listitem>Cells customization</listitem>
- <listitem>Macro substitution based on tool bars customization</listitem>
- </itemizedlist-->
+ <itemizedlist>
+ <listitem>No developer JavaScript code needed to use the component on a page</listitem>
+ <listitem>Presents jQuery JavaScript framework functionality</listitem>
+ <listitem>Works without conflicts with prototype.js library</listitem>
+ </itemizedlist>
</section>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/jQuery.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/jQuery.xml 2007-10-16 15:00:44 UTC (rev 3398)
+++ trunk/docs/userguide/en/src/main/docbook/included/jQuery.xml 2007-10-16 15:24:13 UTC (rev 3399)
@@ -57,13 +57,12 @@
<para>To create the simplest variant on a page use the following syntax:</para>
-
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <!--programlisting role="XML"><![CDATA[...
- <rich:jQuery name="makeFat" timing="onJScall" query="stop().animate({width:param.ewidth})" />
-...]]></programlisting-->
+ <programlisting role="XML"><![CDATA[...
+ <rich:jQuery selector="#customList tr:odd" timing="onload" query="addClass(odd)" />
+...]]></programlisting>
</section>
<section>
@@ -81,5 +80,265 @@
<section>
<title>Details of Usage</title>
+ <para><emphasis role="bold">
+ <property><rich:jQuery></property>
+ </emphasis> can be used in two major modes:</para>
+ <itemizedlist>
+ <listitem>as a one-time query applied immediately or on document ready event</listitem>
+ <listitem>as a JavaScript function that can be invoked from the JavaScript code</listitem>
+ </itemizedlist>
+ <para>The mode is chosen with <emphasis>
+ <property>"timing"</property>
+ </emphasis> attribute that has following options:</para>
+ <itemizedlist>
+ <listitem>immediate - execution a query immediately</listitem>
+ <listitem>onload - execution a query when a document is loaded</listitem>
+ <listitem>onJScall - execution a query by invoked JavaScript function defined with the <emphasis>
+ <property>"name"</property>
+ </emphasis> attribute</listitem>
+ </itemizedlist>
+ <para>Definition the <emphasis>
+ <property>"name"</property>
+ </emphasis> attribute is mandatory when the value of <emphasis>
+ <property>"timing"</property>
+ </emphasis> attribute is <property>"onJScall"</property>. If the<emphasis>
+ <property>"name"</property>
+ </emphasis> attribute is defined when <emphasis>
+ <property>"timing"</property>
+ </emphasis> value equals to <property>"immediate"</property> or
+ <property>"onload"</property>, the query is applied according to this
+ value, but you still have an opportunity to invoke it by function name.</para>
+ <para>The <emphasis>
+ <property>"selector"</property>
+ </emphasis> attribute define an object or a list of objects. The query is defined with the <emphasis>
+ <property>"query"</property>
+ </emphasis>attribute.</para>
+ <para>There is an example how to highlight odd rows in a table:</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+ <style>
+ .odd {
+ background-color: #FFC;
+ }
+ </style>
+ ...
+
+ <rich:table id="customList" ...>
+ ...
+ </rich:table>
+ ...
+ <rich:jQuery selector="#customList tr:odd" timing="onload" query="addClass(odd)" />
+...]]></programlisting>
+ <para>The <emphasis>
+ <property>"selector"</property>
+ </emphasis> attribute uses defined by w3c consortium syntax for CSS rule <ulink
+ url="http://www.w3.org/TR/REC-CSS2/selector.html">selector</ulink> with some jQuery
+ extensions. </para>
+ <para>Those are typical examples of using selector in the <emphasis role="bold">
+ <property><rich:jQuery></property>
+ </emphasis> component.</para>
+
+ <table>
+ <title>Examples of using selector</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Selector</entry>
+
+ <entry>Comment</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>"p[a]"</entry>
+ <entry>In a document find all "p" tags with "a" tag
+ inside</entry>
+ </row>
+
+ <row>
+ <entry>"ul/li"</entry>
+ <entry>All "li" elements of unordered "ul" lists
+ </entry>
+ </row>
+
+ <row>
+ <entry>"p.foo[a]"</entry>
+ <entry>All "p" tags with "foo" class and inserted
+ "a" tag </entry>
+ </row>
+
+ <row>
+ <entry>"input[@name=bar]"</entry>
+ <entry>All "input" tags with "name" attribute which
+ value is "bar"</entry>
+ </row>
+
+ <row>
+ <entry>"input[@type=radio][@checked]"</entry>
+ <entry>Find all "input" tags with attribute
+ "type"="radio" and attribute value =
+ "chekced"</entry>
+ </row>
+
+ <row>
+ <entry>"p,span,td"</entry>
+ <entry>All tag elements "p" or"span" or
+ "td" </entry>
+ </row>
+
+ <row>
+ <entry>"p#secret"</entry>
+ <entry>"p" paragraph element with "id"
+ identification = "secret" </entry>
+ </row>
+
+ <row>
+ <entry>"p span"</entry>
+ <entry>"span" tag is a (direct or non-direct) child of
+ "p" tag. If it's necessary, use "p >
+ span" or "p/span" </entry>
+ </row>
+
+ <row>
+ <entry>"p[@foo^=bar]"</entry>
+ <entry>"p" tag containing "foo" attribute with
+ textual value beginning with "bar" word </entry>
+ </row>
+
+ <row>
+ <entry>"p[@foo$=bar] "</entry>
+ <entry>"p" tag containing "foo" attribute with
+ textual value ending with "bar" word</entry>
+ </row>
+
+ <row>
+ <entry>"p[@foo*=bar] "</entry>
+ <entry>"p" tag with "foo" attribute containing
+ substring "bar" in any place</entry>
+ </row>
+
+ <row>
+ <entry>"p//span "</entry>
+ <entry>"span" tag is a (direct or non-direct) child of
+ "p" tag </entry>
+ </row>
+
+ <row>
+ <entry>"p/../span "</entry>
+ <entry>"span" tag is a grandchild of "p" tag</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>In addition, RichFaces allows using either component id or client id if you apply the
+ query to the JSF component. When you define a selector, RichFaces examines its content and
+ tries to replace the defined in the selector id with component id if found.</para>
+ <para>For example, you have the following code:</para>
+
+ <programlisting role="XML"><![CDATA[...
+ <h:form id="form">
+ ...
+ <h:panelGrid id="menu">
+ <h:graphicImage ... />
+ <h:graphicImage ... />
+ ...
+ </h:panelGrid>
+ </h:form>
+...]]></programlisting>
+
+ <para>The actual id of the <emphasis role="bold">
+ <property><h:panelGrid></property>
+ </emphasis> table in the browser DOM is "form:menu". However, you still can
+ reference to images inside this table using the following selector: </para>
+
+ <programlisting role="XML"><![CDATA[...
+ <rich:jQuery selector="#menu img" query="..." />
+...]]></programlisting>
+
+ <para>You can define the exact id in the selector if you want. The following code reference to
+ the same set of DOM object:</para>
+
+ <programlisting role="XML"><![CDATA[...
+ <rich:jQuery selector="#form\\:menu img" query="..." />
+...]]></programlisting>
+
+ <para>Pay attention to the double slashes that escapes the colon in the id.</para>
+
+ <para>In case when the <emphasis>
+ <property>"name"</property>
+ </emphasis> attribute is defined, <emphasis role="bold">
+ <property><rich:jQuery></property>
+ </emphasis> generates a JavaScript function that might be used from any place of JavaScript
+ code on a page.</para>
+
+ <para>There is an example how to enlarge the picture smoothly on mouse over event and return
+ back to the normal size on mouse out:</para>
+
+ <programlisting role="XML"><![CDATA[...
+ <h:graphicImage onmouseover="enlargePic(this)" width="50" value=""/images/price.gif"
+ onmouseover="enlargePic(this, {pwidth:'60px'})" onmouseover="releasePic(this)" />
+ <h:graphicImage onmouseover="enlargePic(this)" width="50" value="/images/discount.gif"
+ onmouseover="enlargePic(this, {pwidth:'100px'})" onmouseover="releasePic(this)" />
+ ...
+ <rich:jQuery name="enlargePic" timing="onJScall" query="animate({width:param.pwidth})" />
+ <rich:jQuery name="releasePic" timing="onJScall" query="animate({width:'50px'})"/>
+...]]></programlisting>
+
+ <para>The JavaScript could use two parameters. The first parameter is a replacement for the
+ selector attribute. Thus, you can share the same query execution it to the different DOM
+ objects. You can use the literal value or the direct reference to the existing DOM object. The
+ second parameter can be used to path the specific value inside the query. The JSON syntax is
+ used for the second parameter. The "param." namespace is used for
+ referencing to data inside the parameter value.</para>
+
+ <para><emphasis role="bold">
+ <property><rich:jQuery></property>
+ </emphasis> adds styles and behavior to the DOM object dynamically. This means if you replace
+ something on a page during an Ajax response, the applied artifacts will be overwritten. You
+ are resistible to apply them again after the Ajax response is complete.</para>
+ <para>Normally, it could be done with reRendering the <emphasis role="bold">
+ <property><rich:jQuery></property>
+ </emphasis> components in the same Ajax interaction with the components those queries are
+ applied to. Note, that queries with <emphasis>
+ <property>"timing"</property>
+ </emphasis> attribute set to <property>"onload"</property> will not be
+ invoked even the query is reRendered because, the DOM document is not fully reloaded during
+ the Ajax interaction. If you need to re-applies query with
+ <property>"onload"</property> value of <emphasis>
+ <property>"timing"</property>
+ </emphasis> attribute , define the <emphasis>
+ <property>"name</property>
+ </emphasis> attribute and invoke the query by name in the <emphasis>
+ <property>"oncomplete"</property>
+ </emphasis> attribute of the Ajax component.</para>
+
+ <para>RichFaces includes jQuery JavaScript framework. You can use the futures of jQuery directly
+ without defining the <emphasis role="bold">
+ <property><rich:jQuery></property>
+ </emphasis> component on a page if it is convenient for you. To start using the jQuery feature
+ on the page, include the library to the page with the following code:</para>
+
+ <programlisting role="XML"><![CDATA[...
+ <a4j:loadScript src="resource://jquery.js"/>
+...]]></programlisting>
+
+ <para>Refer to the <ulink url="http://docs.jquery.com/">jQuery documentation </ulink> for the
+ right sintax. Remember to use jQuery() function instead of $(), as soon as jQuery works
+ without conflicts with prototype.js.</para>
</section>
+ <section>
+ <title>Relevant Resources Links</title>
+ <para>More information about jQuery framework and its features you can read <ulink
+ url="http://jquery.com/">here</ulink>.</para>
+ <para>How to use jQuery with other libraries see <ulink
+ url="http://docs.jquery.com/Using_jQuery_with_Other_Libraries">here</ulink>.</para>
+
+ </section>
</section>
17 years, 2 months
JBoss Rich Faces SVN: r3398 - in trunk/samples/richfaces-demo/src/main/webapp/richfaces: poll and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-10-16 11:00:44 -0400 (Tue, 16 Oct 2007)
New Revision: 3398
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/jQuery/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/poll/usage.xhtml
Log:
language correction
RF-398
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/jQuery/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/jQuery/usage.xhtml 2007-10-16 14:48:33 UTC (rev 3397)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/jQuery/usage.xhtml 2007-10-16 15:00:44 UTC (rev 3398)
@@ -9,15 +9,15 @@
<ui:define name="sample">
<p>rich:jQuery integrates jQuery javascript framework into the JavaServer
- Faces application. The component allows to apply the styles and behaviors
- on the DOM elements, including the result of JSF components rendering,
- dynamically. For more information about jQuery framework and its features,
- you can read at <a href="http://jquery.com/">http://jquery.com</a>
+ Faces application. The component allows to apply the styles and behavior
+ to the DOM elements dynamically, including the result of JSF components rendering.
+ For more information about jQuery framework and its features,
+ you can read <a href="http://jquery.com/">http://jquery.com</a>
</p>
- <p>Integrated jQuery works is non-conflict with prototype.js library used
+ <p>Integrated jQuery works without conflicts with prototype.js library that is used
widely in the RichFaces library. This means that $() function is delegated
- back to the prototype.js. Use jQuery() function instead to refer to the
- jQuery objects if needs. Read more about using jQuery with other libraries
+ back to the prototype.js. Use jQuery() function instead to refer to
+ jQuery objects if necessary. Read more about jQuery usage with other libraries
at <a href="http://docs.jquery.com/Using_jQuery_with_Other_Libraries">
http://docs.jquery.com/Using_jQuery_with_Other_Libraries</a>
</p>
@@ -44,11 +44,11 @@
</ul>
</p>
<p>
- Defining the name attribute is mandatory in case timing="onJScall".
- If name attribute is defined when timing equals to immediate or onload,
+ Defining "name" attribute is mandatory when timing="onJScall".
+ If "name" attribute is defined when timing equals to "immediate" or "onload",
the query is applied according to this value, but you still have an
- opportunity to invoke it by function name.<br/>
- The selector attribute define the object or list of object, the query
+ opportunity to invoke it by a function name.<br/>
+ The selector attribute defines an object or list of objects, the query
defined with the query attribute will be applied to.
</p>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/poll/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/poll/usage.xhtml 2007-10-16 14:48:33 UTC (rev 3397)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/poll/usage.xhtml 2007-10-16 15:00:44 UTC (rev 3398)
@@ -18,7 +18,8 @@
</p>
<p>The following example shown how the date and time is updated on the page based on the data
- taken from the server.</p>
+ taken from the server. To turn off polling, press "Stop Polling" button.</p>
+ <p><b>Note: </b>polling is automatically disabled after one minute of working.</p>
<div class="sample-container">
17 years, 2 months
JBoss Rich Faces SVN: r3397 - trunk/ui/tooltip/design/funcspec.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2007-10-16 10:48:33 -0400 (Tue, 16 Oct 2007)
New Revision: 3397
Modified:
trunk/ui/tooltip/design/funcspec/FuncSpec - RF Tool Tip Component.doc
Log:
Modified: trunk/ui/tooltip/design/funcspec/FuncSpec - RF Tool Tip Component.doc
===================================================================
(Binary files differ)
17 years, 2 months