JBoss Rich Faces SVN: r3005 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-09-19 12:43:17 -0400 (Wed, 19 Sep 2007)
New Revision: 3005
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
Log:
http://jira.jboss.com/jira/browse/RF-391,
http://jira.jboss.com/jira/browse/RF-389 - added new questions
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-09-19 16:42:08 UTC (rev 3004)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-09-19 16:43:17 UTC (rev 3005)
@@ -164,9 +164,9 @@
suggestion list doesn't show since it is behind the modalPanel.</title>
<para>To solve this problem you should use the latest versions of RichFaces.</para>
<para> Most important links for RichFaces can be found <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104575"
- >here</ulink>.</para>
-
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104575"
+ >here</ulink>.</para>
+
</section>
<section>
@@ -371,6 +371,15 @@
</section>
<section>
+ <?dbhtml filename="Howtonavigatefromonetabtoanother.html"?>
+ <title>How to navigate from one tab to another using buttons (apart from tabPanel
+ functionality)?</title>
+ <para> For necessary information you can see <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085931#..."
+ >RichFaces Users Forum</ulink>.</para>
+ </section>
+
+ <section>
<?dbhtml filename="Howtoretrievethecurrentvalue.html"?>
<title>How to retrieve the current value from the inputNumberSlider?</title>
<para>To catch the value of the inputNumberSlider from the JavaScrip, use the
@@ -493,16 +502,16 @@
<section>
<?dbhtml filename="HowtoExpand/CollapseTreeNodesfromcode.html"?>
- <title>How to Expand/Collapse Tree Nodes from code?</title>
+ <title>How to expand/collapse tree nodes from code?</title>
<para>The answer could be found <ulink
url="http://labs.jboss.com/wiki/ExpandCollapseTreeNodes"
>here</ulink>.</para>
</section>
-
+
<section>
<?dbhtml filename="HowtouseJavaScriptAPI.html"?>
<title>How to use JavaScript API?</title>
- <para>The simple code is placed below:</para>
+ <para>The simple code is placed below:</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
@@ -522,8 +531,28 @@
...
]]></programlisting>
</section>
-
+ <section>
+ <?dbhtml filename="HowtoloadtheScriptaculouslibrary.html"?>
+ <title>How to load the Scriptaculous library shipped with RichFaces?</title>
+ <para>To load the Scriptaculous library shipped with RichFaces use <emphasis
+ role="bold"><a4j:loadScript></emphasis> tag.</para>
+ <para>For more information see <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=119044"
+ >RichFaces Users Forum</ulink>.</para>
+ </section>
+
+ <section>
+ <?dbhtml filename="Howtosaveeffectstatus.html"?>
+ <title>How to save <rich:effect> status?</title>
+ <para><emphasis role="bold"><rich:effect></emphasis> component has
+ several callback methods such as beforeStart, afterFinish. You can use them
+ to save the status.</para>
+ <para> See also <ulink
+ url="http://wiki.script.aculo.us/scriptaculous/show/CoreEffects"
+ >core effects</ulink> in scriptaculous.</para>
+ </section>
+
<section id="DecidingWhatToChangeOnTheServerSide">
<?dbhtml filename="DecidingWhatToChangeOnTheServerSide.html"?>
<title>What should I change on the server side?</title>
18 years, 7 months
JBoss Rich Faces SVN: r3004 - branches.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-09-19 12:42:08 -0400 (Wed, 19 Sep 2007)
New Revision: 3004
Added:
branches/3.1.x/
Removed:
branches/3.1.1/
Log:
fix branch name
Copied: branches/3.1.x (from rev 3003, branches/3.1.1)
18 years, 7 months
JBoss Rich Faces SVN: r3003 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-09-19 12:40:12 -0400 (Wed, 19 Sep 2007)
New Revision: 3003
Modified:
trunk/docs/userguide/en/src/main/docbook/included/effect.xml
Log:
http://jira.jboss.com/jira/browse/RF-396 - added link
Modified: trunk/docs/userguide/en/src/main/docbook/included/effect.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/effect.xml 2007-09-19 16:23:45 UTC (rev 3002)
+++ trunk/docs/userguide/en/src/main/docbook/included/effect.xml 2007-09-19 16:40:12 UTC (rev 3003)
@@ -71,17 +71,15 @@
<section>
<title>Details of Usage</title>
-<para>
- It is possible to use <property><rich:effect></property> in two modes:
-<itemizedlist>
+ <para> It is possible to use <property><rich:effect></property> in two modes: <itemizedlist>
<listitem>attached to the JSF components or html tags and triggered by a particular event.
- Wiring effect with JSF components might occur on the server or client.
- Wiring with html tag is possible only on the client side </listitem>
- <listitem>invoking from the JavaScript code by an effect name.
- During the rendering, <property>rich:effect</property> generates the JavaScript function with defined name. When the function is called,
- the effect is applied </listitem>
-</itemizedlist>
-</para>
+ Wiring effect with JSF components might occur on the server or client. Wiring with html
+ tag is possible only on the client side </listitem>
+ <listitem>invoking from the JavaScript code by an effect name. During the rendering,
+ <property>rich:effect</property> generates the JavaScript function with defined name.
+ When the function is called, the effect is applied </listitem>
+ </itemizedlist>
+ </para>
<para>
<emphasis role="bold">Those a the typical variants of using:</emphasis>
</para>
@@ -118,8 +116,8 @@
</imageobject>
</mediaobject>
</figure>
-
- <figure>
+
+ <figure>
<title>When the mouse cursor is over:</title>
<mediaobject>
@@ -129,42 +127,66 @@
</mediaobject>
</figure>
-<para>
-<emphasis><property>"name"</property></emphasis> attribute defines a name of the JavaScript function that is
-be generated on a page when the component is rendered. You can invoke this function to activate the effect. The function accesses one parameter.
-It is a set of effect options in JSON format.
-</para>
+ <para>
+ <emphasis>
+ <property>"name"</property>
+ </emphasis> attribute defines a name of the JavaScript function that is be generated on a page
+ when the component is rendered. You can invoke this function to activate the effect. The
+ function accesses one parameter. It is a set of effect options in JSON format. </para>
-<para>
-<emphasis><property>"type"</property></emphasis> attribute defines the type of an effect. For example, "Fade", "Blind", "Opacity". Have a look at <ulink url="http://script.aculo.us">scriptaculous documentation</ulink> for set of available effect.
-</para>
+ <para>
+ <emphasis>
+ <property>"type"</property>
+ </emphasis> attribute defines the type of an effect. For example, "Fade", "Blind", "Opacity".
+ Have a look at <ulink url="http://script.aculo.us">scriptaculous documentation</ulink> for set
+ of available effect. </para>
-<para>
-<emphasis><property>"for"</property></emphasis> attribute defines the id of the component or html tag, the effect will be attached to.
-Richfaces converts the <emphasis><property>"for"</property></emphasis> attribute value to the client id of the component if such component is found. If not, the value is left as is for possible
-wiring with on the DOM element's id on the client side.
-By default, the target of the effect is the same element that effect pointed to. However, the target element
-is might be overridden with <emphasis><property>"effectId"</property></emphasis> option passed with <emphasis><property>"params"</property></emphasis>
-attribute of with function paramenter.
-</para>
+ <para>
+ <emphasis>
+ <property>"for"</property>
+ </emphasis> attribute defines the id of the component or html tag, the effect will be attached
+ to. Richfaces converts the <emphasis>
+ <property>"for"</property>
+ </emphasis> attribute value to the client id of the component if such component is found. If
+ not, the value is left as is for possible wiring with on the DOM element's id on the client
+ side. By default, the target of the effect is the same element that effect pointed to.
+ However, the target element is might be overridden with <emphasis>
+ <property>"effectId"</property>
+ </emphasis> option passed with <emphasis>
+ <property>"params"</property>
+ </emphasis> attribute of with function paramenter. </para>
-<para>
-<emphasis><property>"params"</property></emphasis> attribute allows to define the set of options possible for particurar effect.
-For example, 'duration', 'delay', 'from', 'to'. Additionally to the options used by the effect itself, there are two option that might override
-the <property>rich:effect</property> attribute. Those are:
-<itemizedlist>
- <listitem><emphasis><property>"effectId"</property></emphasis> allows to re-define the target of effect.
- The option is override the value of <emphasis><property>"for"</property></emphasis> attribute</listitem>
- <listitem><emphasis><property>"effectType"</property></emphasis> defines the effect type.
- The option is override the value of <emphasis><property>"type"</property></emphasis> attribute</listitem>
-</itemizedlist>
-</para>
-
- </section>
- <section>
+ <para>
+ <emphasis>
+ <property>"params"</property>
+ </emphasis> attribute allows to define the set of options possible for particurar effect. For
+ example, 'duration', 'delay', 'from', 'to'. Additionally to the options used by the effect
+ itself, there are two option that might override the <property>rich:effect</property>
+ attribute. Those are: <itemizedlist>
+ <listitem><emphasis>
+ <property>"effectId"</property>
+ </emphasis> allows to re-define the target of effect. The option is override the value of <emphasis>
+ <property>"for"</property>
+ </emphasis> attribute</listitem>
+ <listitem><emphasis>
+ <property>"effectType"</property>
+ </emphasis> defines the effect type. The option is override the value of <emphasis>
+ <property>"type"</property>
+ </emphasis> attribute</listitem>
+ </itemizedlist>
+ </para>
+
+ </section>
+ <section>
<title>Relevant resources links</title>
<para>
- <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/effect.jsf?c=effect">Here</ulink>
- you can see the example of <emphasis role="bold"><rich:effect></emphasis> usage. </para>
+ <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/effect.jsf?c=effect"
+ >Here</ulink> you can see the example of <emphasis role="bold"
+ ><rich:effect></emphasis> usage. </para>
+ <para>How to save <emphasis role="bold">
+ <property><rich:effect></property>
+ </emphasis>status see on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=118833"
+ >RichFaces Users Forum</ulink>.</para>
</section>
</section>
18 years, 7 months
JBoss Rich Faces SVN: r3002 - in trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-09-19 12:23:45 -0400 (Wed, 19 Sep 2007)
New Revision: 3002
Modified:
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css/suggestionbox.xcss
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/popup.jspx
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/table.jspx
Log:
http://jira.jboss.com/jira/browse/RF-833
Modified: trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css/suggestionbox.xcss
===================================================================
--- trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css/suggestionbox.xcss 2007-09-19 15:04:36 UTC (rev 3001)
+++ trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css/suggestionbox.xcss 2007-09-19 16:23:45 UTC (rev 3002)
@@ -32,6 +32,7 @@
.dr-sb-overflow {
overflow : auto;
+ overflow-x : hidden;
}
.dr-sb-int-decor-table {
Modified: trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/popup.jspx
===================================================================
--- trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/popup.jspx 2007-09-19 15:04:36 UTC (rev 3001)
+++ trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/popup.jspx 2007-09-19 16:23:45 UTC (rev 3002)
@@ -21,7 +21,7 @@
<f:call name="overflowSize"/>
</f:attribute>
- <table>
+ <table width="100%" >
<f:attribute name="id">
<f:call name="getContentId"/>
</f:attribute>
Modified: trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/table.jspx
===================================================================
--- trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/table.jspx 2007-09-19 15:04:36 UTC (rev 3001)
+++ trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/table.jspx 2007-09-19 16:23:45 UTC (rev 3002)
@@ -3,7 +3,7 @@
xmlns:u='http:/jsf.exadel.com/template/util'
xmlns="http://www.w3.org/1999/xhtml">
- <table border="0" cellpadding="0" cellspacing="0" class="dr-sb-int-decor-table rich-sb-int-decor-table">
+ <table border="0" cellpadding="0" cellspacing="0" class="dr-sb-int-decor-table rich-sb-int-decor-table" width="100%" >
<f:attribute name="id">
<f:call name="getContentId"/>
</f:attribute>
18 years, 7 months
JBoss Rich Faces SVN: r3001 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-09-19 11:04:36 -0400 (Wed, 19 Sep 2007)
New Revision: 3001
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
RF-913
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-09-19 13:33:19 UTC (rev 3000)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-09-19 15:04:36 UTC (rev 3001)
@@ -381,6 +381,7 @@
// dayListMarkup - day cell markup
// weekNumberMarkup - week number cell markup
// weekDayMarkup - week day cell markup
+ // context: {weekDayLabel, weekDayLabelShort, weekDayNumber, componentId}
// headerMarkup
// footerMarkup
// headerOptionalMarkup - user defined header (optional)
@@ -389,6 +390,7 @@
// currentDate - date to show month (day not used) (mm/yyyy)
// selectedDate - selected date (mm/dd/yyyy)
// weekDayLabels - collection of week day labels keyed by week day numbers
+ // weekDayLabelsShort - collection of week day short labels keyed by week day numbers
// minDaysInFirstWeek - locale-specific constant defining number of days in the first week
// firstWeekDay - (0..6) locale-specific constant defining number of the first week day
// showWeekDaysBar - show WeekDays Bar [default value is true]
@@ -410,7 +412,7 @@
this.params = parameters;
if (!this.params.showWeekDaysBar) this.params.showWeekDaysBar = true;
if (!this.params.showWeeksBar) this.params.showWeeksBar = true;
- if (!this.params.datePattern) this.params.datePattern = "MMM d, y";
+ if (!this.params.datePattern) thisparams.datePattern = "MMM d, y";
// markups initialization
if (!this.params.dayListMarkup) this.params.dayListMarkup = CalendarView.dayList;
@@ -491,7 +493,7 @@
var weekDayCounter = this.params.firstWeekDay;
for (var i=0;i<7;i++)
{
- var weekDayHtml = this.evaluateMarkup(this.params.weekDayMarkup, {weekDayLabel: this.params.weekDayLabelsShort[weekDayCounter], weekDayNumber:weekDayCounter, componentId:this.getWeekDayComponentId(i)} );
+ var weekDayHtml = this.evaluateMarkup(this.params.weekDayMarkup, {weekDayLabel: this.params.weekDayLabels[weekDayCounter], weekDayLabelShort: this.params.weekDayLabelsShort[weekDayCounter], weekDayNumber:weekDayCounter, componentId:this.getWeekDayComponentId(i)} );
if (weekDayCounter==6) weekDayCounter=0; else weekDayCounter++;
styleClass = "rich-calendar-days";
@@ -1392,7 +1394,7 @@
CalendarView.dayList = [new ET(function (context) { return context.day})];
CalendarView.weekNumber = [new ET(function (context) { return context.weekNumber})];
-CalendarView.weekDay = [new ET(function (context) { return context.weekDayLabel})];
+CalendarView.weekDay = [new ET(function (context) { return context.weekDayLabelShort})];
CalendarContext = Class.create();
Object.extend(CalendarContext.prototype, {
@@ -1400,6 +1402,8 @@
this.calendar=calendar;
this.monthLabels=calendar.params.monthLabels;
this.monthLabelsShort=calendar.params.monthLabelsShort;
+ this.weekDayLabels=calendar.params.weekDayLabels;
+ this.weekDayLabelsShort=calendar.params.weekDayLabelsShort;
},
nextYearControl: CalendarView.nextYearControl,
18 years, 7 months
JBoss Rich Faces SVN: r3000 - trunk/ui/panelmenu/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-09-19 09:33:19 -0400 (Wed, 19 Sep 2007)
New Revision: 3000
Modified:
trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java
trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuItem.java
Log:
http://jira.jboss.com/jira/browse/RF-967
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java 2007-09-19 13:13:37 UTC (rev 2999)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java 2007-09-19 13:33:19 UTC (rev 3000)
@@ -22,7 +22,6 @@
package org.richfaces.component;
import javax.faces.component.ActionSource;
-import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
import javax.faces.convert.BooleanConverter;
import javax.faces.el.MethodBinding;
@@ -32,10 +31,9 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
-import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.component.AjaxInputComponent;
-public abstract class UIPanelMenuGroup extends UIInput implements ActionSource{
+public abstract class UIPanelMenuGroup extends AjaxInputComponent implements ActionSource{
public static final String COMPONENT_TYPE = "org.richfaces.panelMenuGroup";
@@ -164,9 +162,6 @@
if (listener != null) {
listener.processAction((ActionEvent) event);
}
- } else if (event instanceof AjaxEvent) {
- FacesContext context = getFacesContext();
- AjaxContext.getCurrentInstance(context).addRegionsFromComponent(this);
}
}
}
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuItem.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuItem.java 2007-09-19 13:13:37 UTC (rev 2999)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuItem.java 2007-09-19 13:33:19 UTC (rev 3000)
@@ -21,16 +21,9 @@
package org.richfaces.component;
-import javax.faces.component.UICommand;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.FacesEvent;
+import org.ajax4jsf.component.AjaxActionComponent;
-import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.event.AjaxEvent;
-
-public abstract class UIPanelMenuItem extends UICommand {
+public abstract class UIPanelMenuItem extends AjaxActionComponent {
public static final String COMPONENT_TYPE = "org.richfaces.panelMenuItem";
@@ -66,15 +59,4 @@
public abstract void setName(String string);
public abstract String getName();
- /* (non-Javadoc)
- * @see javax.faces.component.UIComponentBase#broadcast(javax.faces.event.FacesEvent)
- */
- public void broadcast(FacesEvent event) throws AbortProcessingException {
- super.broadcast(event);
- if (event instanceof AjaxEvent) {
- FacesContext context = getFacesContext();
- AjaxContext.getCurrentInstance(context).addRegionsFromComponent(this);
- }
- }
-
}
18 years, 7 months
JBoss Rich Faces SVN: r2999 - in trunk/ui/suggestionbox/src/main: java/org/richfaces/renderkit/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-09-19 09:13:37 -0400 (Wed, 19 Sep 2007)
New Revision: 2999
Added:
trunk/ui/suggestionbox/src/main/java/org/richfaces/component/SelectSuggestionEvent.java
Modified:
trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java
trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
http://jira.jboss.com/jira/browse/RF-923
Added: trunk/ui/suggestionbox/src/main/java/org/richfaces/component/SelectSuggestionEvent.java
===================================================================
--- trunk/ui/suggestionbox/src/main/java/org/richfaces/component/SelectSuggestionEvent.java (rev 0)
+++ trunk/ui/suggestionbox/src/main/java/org/richfaces/component/SelectSuggestionEvent.java 2007-09-19 13:13:37 UTC (rev 2999)
@@ -0,0 +1,23 @@
+package org.richfaces.component;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+
+public class SelectSuggestionEvent extends FacesEvent {
+
+ private static final long serialVersionUID = 1L;
+
+ public SelectSuggestionEvent(UIComponent component) {
+ super(component);
+ }
+
+ public boolean isAppropriateListener(FacesListener listener) {
+ return false;
+ }
+
+ public void processListener(FacesListener listener) {
+ throw new UnsupportedOperationException();
+ }
+
+}
Modified: trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java
===================================================================
--- trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java 2007-09-19 12:09:42 UTC (rev 2998)
+++ trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java 2007-09-19 13:13:37 UTC (rev 2999)
@@ -21,12 +21,15 @@
package org.richfaces.component;
+import java.util.Map;
+
import javax.faces.component.UIData;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.el.MethodBinding;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
+import javax.faces.event.PhaseId;
import org.ajax4jsf.component.AjaxComponent;
import org.ajax4jsf.context.AjaxContext;
@@ -273,7 +276,18 @@
/* (non-Javadoc)
* @see javax.faces.component.UIData#broadcast(javax.faces.event.FacesEvent)
*/
- public final void broadcast(final FacesEvent event)
+
+ private int rowNumber = -1;
+
+ public int getRowNumber() {
+ return rowNumber;
+ }
+
+ public void setRowNumber(int rowNumber) {
+ this.rowNumber = rowNumber;
+ }
+
+ public final void broadcast(final FacesEvent event)
throws AbortProcessingException {
super.broadcast(event);
if (event instanceof AjaxEvent) {
@@ -285,10 +299,52 @@
AjaxContext.getCurrentInstance(context)
.renderSubmittedAjaxRegion(context, true);
}
+ } else if (event instanceof SelectSuggestionEvent) {
+ setValue(null);
}
}
- public void addAjaxListener(final AjaxListener listener) {
+ public void queueEvent(FacesEvent event) {
+ if (event instanceof SelectSuggestionEvent) {
+ event.setPhaseId(PhaseId.RENDER_RESPONSE);
+ super.queueEvent(event);
+ } else if (event.getComponent() != this && rowNumber != -1) {
+ int prevIndex = getRowIndex();
+ setRowIndex(rowNumber);
+ super.queueEvent(event);
+ setRowIndex(prevIndex);
+ } else {
+ super.queueEvent(event);
+ }
+
+ }
+
+ public void processDecodes(FacesContext context) {
+ if (!this.isRendered())
+ return;
+ Map requestParameterMap = context.getExternalContext().getRequestParameterMap();
+ String clientId = getClientId(context);
+ String rowValue = (String)requestParameterMap.get(clientId+"_selection");
+ if (rowValue != null && rowValue.length()!=0) {
+ setRowNumber(Integer.parseInt(rowValue)+getFirst());
+ setupValue(context);
+ queueEvent(new SelectSuggestionEvent(this));
+ } else {
+ setRowNumber(-1);
+ }
+ super.processDecodes(context);
+ }
+
+ public void setupValue(FacesContext context) {
+ Object value = getSubmitedValue();
+ MethodBinding suggestingAction = getSuggestionAction();
+ if (null != suggestingAction) {
+ setValue(suggestingAction.invoke(
+ context, new Object[]{value}));
+ }
+ }
+
+ public void addAjaxListener(final AjaxListener listener) {
addFacesListener(listener);
}
@@ -299,4 +355,5 @@
public void removeAjaxListener(final AjaxListener listener) {
removeFacesListener(listener);
}
+
}
Modified: trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
===================================================================
--- trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2007-09-19 12:09:42 UTC (rev 2998)
+++ trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2007-09-19 13:13:37 UTC (rev 2999)
@@ -221,6 +221,15 @@
writer.writeAttribute(
"style", "position:absolute;display:none;z-index:" + zIndex + ";", null);
writer.endElement("iframe");
+
+ writer.startElement("input", component);
+ writer.writeAttribute("type", "hidden", null);
+ writer.writeAttribute("id", component.getClientId(context)
+ + "_selection", null);
+ writer.writeAttribute("name", component.getClientId(context)
+ + "_selection", null);
+ writer.endElement("input");
+
} else {
suggestionBox.setSubmitted(false);
}
@@ -243,13 +252,7 @@
throws IOException {
UISuggestionBox suggestionBox = (UISuggestionBox) component;
if (suggestionBox.isSubmitted()) {
- Object value = suggestionBox.getSubmitedValue();
- MethodBinding suggestingAction = suggestionBox.getSuggestionAction();
- if (null != suggestingAction) {
- // TODO - use converter
- suggestionBox.setValue(suggestingAction.invoke(
- context, new Object[]{value}));
- }
+ suggestionBox.setupValue(context);
body.encode(getTemplateContext(context, suggestionBox));
// Replace rendered area ID from component to suggestion table
suggestionBox.setRowIndex(-1);
Modified: trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
--- trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-09-19 12:09:42 UTC (rev 2998)
+++ trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-09-19 13:13:37 UTC (rev 2999)
@@ -17,6 +17,8 @@
this.oldValue = this.element.value;
this.skipHover = false;
+ options.selection = update + "_selection";
+
var needIframe = (RichFaces.navigatorType() == "MSIE");
if (needIframe) {
@@ -540,6 +542,10 @@
selectEntry: function(event) {
this.active = false;
+
+ var input = $(this.options.selection);
+ input.value = this.index;
+
this.updateElement(this.getCurrentEntry());
if (this.options.onselect) {
this.options.onselect(this, event);
@@ -547,6 +553,7 @@
if (this.update.onselect) {
this.update.onselect(this, event);
}
+ input.value = "";
},
updateElement: function(selectedElement) {
18 years, 7 months
JBoss Rich Faces SVN: r2997 - trunk/test-applications/qa.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-09-19 08:09:22 -0400 (Wed, 19 Sep 2007)
New Revision: 2997
Removed:
trunk/test-applications/qa/QA test report Build RF3.1.0 RC1.xls
trunk/test-applications/qa/QA test report Build RF3.1.0 RC2.xls
trunk/test-applications/qa/QA test report Build RF3.1.0 RC3.xls
trunk/test-applications/qa/QA test report Build RF3.1.0 RC4.xls
trunk/test-applications/qa/QA test report Build RF3.1.0 RC5.xls
Log:
Deleted: trunk/test-applications/qa/QA test report Build RF3.1.0 RC1.xls
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/qa/QA test report Build RF3.1.0 RC2.xls
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/qa/QA test report Build RF3.1.0 RC3.xls
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/qa/QA test report Build RF3.1.0 RC4.xls
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/qa/QA test report Build RF3.1.0 RC5.xls
===================================================================
(Binary files differ)
18 years, 7 months
JBoss Rich Faces SVN: r2996 - trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-09-19 07:41:25 -0400 (Wed, 19 Sep 2007)
New Revision: 2996
Modified:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
Log:
RF-957 add percentage values checking
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2007-09-19 11:40:14 UTC (rev 2995)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2007-09-19 11:41:25 UTC (rev 2996)
@@ -5,6 +5,7 @@
import java.util.Iterator;
import java.util.Map;
+import javax.faces.FacesException;
import javax.faces.component.UIComponent;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
@@ -51,6 +52,8 @@
private final String COLUMN_NORMAL_TYPE = "normal";
+ private final String PERSENTAGE_SUPPORT_ERROR_MSG = "columnsWidth property: Percentage values are not supported";
+
private RendererBase cellTemplate = null;
private RendererBase headerCellTemplate = null;
@@ -108,9 +111,14 @@
ComponentVariables variables =
ComponentsVariableResolver.getVariables(headerCellTemplate, column);
String widthPx = (String)column.getAttributes().get("width");
+
+ // temporary solution RF-957
+ if(widthPx.contains("%")){
+ throw new FacesException(PERSENTAGE_SUPPORT_ERROR_MSG);
+ }
+
int width = Integer.parseInt(widthPx.substring(0, widthPx.indexOf("px")));
-
-
+
int sepOffset = 0;
if(state.isFrozenColumn()){
18 years, 7 months