JBoss Rich Faces SVN: r5856 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-02-06 05:33:42 -0500 (Wed, 06 Feb 2008)
New Revision: 5856
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dndParam.xml
Log:
http://jira.jboss.com/jira/browse/RF-2158 - done for dndParam
Modified: trunk/docs/userguide/en/src/main/docbook/included/dndParam.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dndParam.xml 2008-02-06 10:33:26 UTC (rev 5855)
+++ trunk/docs/userguide/en/src/main/docbook/included/dndParam.xml 2008-02-06 10:33:42 UTC (rev 5856)
@@ -140,12 +140,12 @@
]]></programlisting>
<para>The parameter is transmitted into an indicator for usage in an
- informational part of the dragIndicator component (inside an indicator a
+ informational part of the <property>dragIndicator</property> component (inside an indicator a
call to {label} happens)</para>
<itemizedlist>
<listitem>Parameters passing happens when dragged content is brought
- onto some zone with dropSupport</listitem>
+ onto some zone with <property>dropSupport</property></listitem>
</itemizedlist>
<para>In this case <property>dndParam</property> is of a drop type and is
18 years, 3 months
JBoss Rich Faces SVN: r5855 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-02-06 05:33:26 -0500 (Wed, 06 Feb 2008)
New Revision: 5855
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml
Log:
http://jira.jboss.com/jira/browse/RF-2158 - done for dataTable
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml 2008-02-06 10:33:16 UTC (rev 5854)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml 2008-02-06 10:33:26 UTC (rev 5855)
@@ -314,7 +314,7 @@
<para>On the screenshot there are classes names that define styles for component elements.</para>
<figure>
- <title><rich:dataTable> class names</title>
+ <title><emphasis role="bold"><property><rich:dataTable></property></emphasis> class names</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/dataTable2.png" scalefit="1"/>
@@ -441,7 +441,7 @@
</para>
<programlisting role="CSS"><![CDATA[...
.rich-table-cell{
-font-weight:bold;
+ font-weight:bold;
}
...]]></programlisting>
@@ -460,14 +460,14 @@
<para>Also it’s possible to change styles of particular <emphasis role="bold"
><property><rich:dataTable></property></emphasis> component. In this case you should create own style classes and use them in corresponding <emphasis role="bold"
- ><property><rich:dataTable></property></emphasis> <property>styleClass</property> attributes. An example is placed below:</para>
+ ><property><rich:dataTable></property></emphasis> <emphasis><property>styleClass</property></emphasis> attributes. An example is placed below:</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="CSS"><![CDATA[...
.myClass{
-font-style:italic;
+ font-style:italic;
}
...]]></programlisting>
<para>The <emphasis><property>"headerClass"</property></emphasis> attribute for <emphasis role="bold"
@@ -482,7 +482,7 @@
<para>This is a result:</para>
<figure>
- <title>Redefinition styles with own classes and styleClass attributes</title>
+ <title>Redefinition styles with own classes and <emphasis><property>styleClass</property></emphasis> attributes</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/datatableStyle.png"/>
18 years, 3 months
JBoss Rich Faces SVN: r5854 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-02-06 05:33:16 -0500 (Wed, 06 Feb 2008)
New Revision: 5854
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dataTable.desc.xml
Log:
http://jira.jboss.com/jira/browse/RF-2158 - done for dataTable
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataTable.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataTable.desc.xml 2008-02-06 10:32:58 UTC (rev 5853)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataTable.desc.xml 2008-02-06 10:33:16 UTC (rev 5854)
@@ -10,7 +10,7 @@
<para>The component for tables rendering that allows choosing data from a model and obtains
built-in support of Ajax updates.</para>
<figure>
- <title><rich:dataTable> component</title>
+ <title><emphasis role="bold"><property><rich:dataTable></property></emphasis> component</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/datatable1.png"/>
18 years, 3 months
JBoss Rich Faces SVN: r5853 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-02-06 05:32:58 -0500 (Wed, 06 Feb 2008)
New Revision: 5853
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.desc.xml
Log:
http://jira.jboss.com/jira/browse/RF-2158 - done for dataOrderedList
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.desc.xml 2008-02-06 10:32:44 UTC (rev 5852)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.desc.xml 2008-02-06 10:32:58 UTC (rev 5853)
@@ -10,7 +10,7 @@
<para>The component for ordered lists rendering that allows choosing data from a model
and obtains built-in support of Ajax updates.</para>
<figure>
- <title><rich:dataOderedList> component</title>
+ <title><emphasis role="bold"><property><rich:dataOderedList></property></emphasis> component</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/dataorderedlist1.png"/>
18 years, 3 months
JBoss Rich Faces SVN: r5852 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-02-06 05:32:44 -0500 (Wed, 06 Feb 2008)
New Revision: 5852
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dataList.xml
Log:
http://jira.jboss.com/jira/browse/RF-2158 - done for dataList
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataList.xml 2008-02-06 10:32:30 UTC (rev 5851)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataList.xml 2008-02-06 10:32:44 UTC (rev 5852)
@@ -253,7 +253,7 @@
<para>Also it’s possible to change styles of particular <emphasis role="bold"
><property><rich:dataLIst></property></emphasis> component. In this case you should create own style classes and use them in corresponding <emphasis role="bold"
- ><property><rich:dataList></property></emphasis> <property>styleClass</property> attributes. An example is placed below:</para>
+ ><property><rich:dataList></property></emphasis> <emphasis><property>styleClass</property></emphasis> attributes. An example is placed below:</para>
<para>
<emphasis role="bold">Example:</emphasis>
@@ -275,7 +275,7 @@
<para>This is a result:</para>
<figure>
- <title>Redefinition styles with own classes and styleClass attributes</title>
+ <title>Redefinition styles with own classes and <emphasis><property>styleClass</property></emphasis> attributes</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/datalistStyle.png"/>
@@ -283,7 +283,7 @@
</mediaobject>
</figure>
- <para>As it could be seen on the picture above, background color for <property><rich:dataList> </property> was changed.</para>
+ <para>As it could be seen on the picture above, background color for <emphasis role="bold"><property><rich:dataList> </property></emphasis> was changed.</para>
</section>
<section>
<title>Relevant Resources Links</title>
18 years, 3 months
JBoss Rich Faces SVN: r5851 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-02-06 05:32:30 -0500 (Wed, 06 Feb 2008)
New Revision: 5851
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dataList.desc.xml
Log:
http://jira.jboss.com/jira/browse/RF-2158 - done for dataList
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataList.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataList.desc.xml 2008-02-06 10:32:14 UTC (rev 5850)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataList.desc.xml 2008-02-06 10:32:30 UTC (rev 5851)
@@ -10,7 +10,7 @@
<para>The component for unordered lists rendering that allows choosing data from a model
and obtains built-in support of Ajax updates.</para>
<figure>
- <title><rich:dataList> component</title>
+ <title><emphasis role="bold"><property><rich:dataList></property></emphasis> component</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/datalist1.png"/>
18 years, 3 months
JBoss Rich Faces SVN: r5850 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-02-06 05:32:14 -0500 (Wed, 06 Feb 2008)
New Revision: 5850
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.desc.xml
Log:
http://jira.jboss.com/jira/browse/RF-2158 - done for dataDefinitionList
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.desc.xml 2008-02-06 02:27:10 UTC (rev 5849)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.desc.xml 2008-02-06 10:32:14 UTC (rev 5850)
@@ -10,7 +10,7 @@
<para>The component for definition lists rendering that allows choosing data from a model
and obtains built-in support of Ajax updates.</para>
<figure>
- <title><rich:dataDefinitionList> component</title>
+ <title><emphasis role="bold"><property><rich:dataDefinitionList></property></emphasis> component</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/datadefinitionlist1.png"/>
18 years, 3 months
JBoss Rich Faces SVN: r5849 - trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-02-05 21:27:10 -0500 (Tue, 05 Feb 2008)
New Revision: 5849
Modified:
trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
Log:
Re-rendering enabled in progress bar demo
Modified: trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp 2008-02-06 02:25:48 UTC (rev 5848)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp 2008-02-06 02:27:10 UTC (rev 5849)
@@ -43,6 +43,7 @@
<progressBar:progressBar value="#{bean.incValue}" enabled="#{bean.enabled}" id="progrs"
interval="700"
styleClass="main"
+ reRender="per1"
reRenderAfterComplete="per2"
mode="#{bean.modeString}"
progressVar="percent"
18 years, 3 months
JBoss Rich Faces SVN: r5848 - trunk/sandbox/ui/progressBAR/src/test/java/org/richfaces/sandbox.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-02-05 21:25:48 -0500 (Tue, 05 Feb 2008)
New Revision: 5848
Modified:
trunk/sandbox/ui/progressBAR/src/test/java/org/richfaces/sandbox/ProgressBarComponentTest.java
Log:
Test for progress bar updated
Modified: trunk/sandbox/ui/progressBAR/src/test/java/org/richfaces/sandbox/ProgressBarComponentTest.java
===================================================================
--- trunk/sandbox/ui/progressBAR/src/test/java/org/richfaces/sandbox/ProgressBarComponentTest.java 2008-02-06 02:09:45 UTC (rev 5847)
+++ trunk/sandbox/ui/progressBAR/src/test/java/org/richfaces/sandbox/ProgressBarComponentTest.java 2008-02-06 02:25:48 UTC (rev 5848)
@@ -1,18 +1,15 @@
package org.richfaces.sandbox;
-import javax.el.ValueExpression;
import javax.faces.component.UIForm;
import javax.faces.component.UIOutput;
import javax.faces.component.html.HtmlForm;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-import org.ajax4jsf.tests.MockValueExpression;
import org.richfaces.component.UIProgressBar;
import com.gargoylesoftware.htmlunit.html.DomText;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
-import com.sun.corba.se.spi.legacy.connection.GetEndPointInfoAgainException;
/**
* Unit test for Progress bar component.
@@ -108,7 +105,7 @@
assertTrue("script".equalsIgnoreCase(node.getTagName()));
DomText text = (DomText) node.getFirstChild();
- assertTrue(text.getData().contains("new ProgressBar"));
+ assertTrue(text.getData().contains("$('" + clientId + "').component"));
assertTrue(text.getData().contains("renderLabel"));
18 years, 3 months
JBoss Rich Faces SVN: r5847 - in trunk/sandbox/ui/progressBAR/src/main: resources/org/richfaces/renderkit/html/css and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-02-05 21:09:45 -0500 (Tue, 05 Feb 2008)
New Revision: 5847
Modified:
trunk/sandbox/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/css/progressBar.xcss
trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js
trunk/sandbox/ui/progressBAR/src/main/templates/org/richfaces/progressBar.jspx
Log:
Latest updates for progressBar & demo
Modified: trunk/sandbox/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
===================================================================
--- trunk/sandbox/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2008-02-06 02:09:36 UTC (rev 5846)
+++ trunk/sandbox/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2008-02-06 02:09:45 UTC (rev 5847)
@@ -22,7 +22,6 @@
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.javascript.JSFunction;
-import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.javascript.JSLiteral;
import org.ajax4jsf.javascript.JSReference;
import org.ajax4jsf.javascript.ScriptUtils;
@@ -156,8 +155,8 @@
JSFunction function = AjaxRendererUtils.buildAjaxFunction(
component, context, AJAX_POLL_FUNCTION);
- function.addParameter(new JSReference("ProgressBar.Pollers['"
- + clientId + "']['options']"));
+ function.addParameter(new JSReference("$('"
+ + clientId + "').component.options"));
function.appendScript(script);
pollScript.append(script);
@@ -184,8 +183,8 @@
writer.startElement(HTML.SPAN_ELEM, component);
writer.startElement(HTML.SCRIPT_ELEM, component);
script.append(
- "new ProgressBar('" + component.getClientId(context)
- + "').renderLabel(").append(
+ "$('" + component.getClientId(context)
+ + "').component.renderLabel(").append(
getMarkup(context, component)).append(",null);\n");
writer.append(script.toString());
writer.endElement(HTML.SCRIPT_ELEM);
@@ -206,6 +205,7 @@
UIProgressBar progressBar = (UIProgressBar) component;
writer.startElement(HTML.SPAN_ELEM, component);
+ writer.writeAttribute(HTML.style_ATTRIBUTE, "display: none;", null);
writer.startElement(HTML.SCRIPT_ELEM, component);
StringBuffer script = new StringBuffer();
@@ -218,7 +218,7 @@
Integer minValue = (Integer) component.getAttributes().get("minValue");
Integer maxValue = (Integer) component.getAttributes().get("maxValue");
- script.append("new ProgressBar().init('")
+ script.append("new ProgressBar('")
.append(clientId).append("','") // id
.append(containerId).append("','") // containerId
.append(formId).append("','") // formId
@@ -262,8 +262,8 @@
options.put("pollinterval", interval);
Map parameters = (Map) options.get("parameters");
parameters.put("percent", "percent");
- options.put("onbeforedomupdate", getOnComplete(clientId, progressBar,
- context));
+// options.put("onbeforedomupdate", getOnComplete(clientId, progressBar,
+// context));
return options;
}
@@ -279,29 +279,6 @@
}
/**
- * Creates oncomplete function
- *
- * @param clientId
- * @param component
- * @param context
- * @param writer
- * @param options
- * @return
- */
- public JSFunctionDefinition getOnComplete(String clientId,
- UIProgressBar component, FacesContext context) {
- JSFunctionDefinition functionDefinition = new JSFunctionDefinition();
- functionDefinition.addParameter("request");
- functionDefinition.addParameter("event");
- functionDefinition.addParameter("data");
- StringBuffer body = new StringBuffer();
- body.append("new ProgressBar('" + clientId + "').onComplete(data);");
- functionDefinition.addToBody(body.toString());
-
- return functionDefinition;
- }
-
- /**
* Methods encodes start facet of progress bar component
*
* @param context -
@@ -497,6 +474,7 @@
encodeInitialScript(context, component);
if (isAjax) {
writer.startElement(HTML.SPAN_ELEM, component);
+ writer.writeAttribute(HTML.style_ATTRIBUTE, "display: none;", null);
writer.startElement(HTML.SCRIPT_ELEM, component);
writer.write(getStopPollScript(clientId).toString());
writer.endElement(HTML.SCRIPT_ELEM);
Modified: trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/css/progressBar.xcss
===================================================================
--- trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/css/progressBar.xcss 2008-02-06 02:09:36 UTC (rev 5846)
+++ trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/css/progressBar.xcss 2008-02-06 02:09:45 UTC (rev 5847)
@@ -8,8 +8,8 @@
<f:verbatim>
-.rich-progress-bar-uploaded{overflow : hidden; position : absolute; border : 0px solid ; height : 16px;}
-.rich-progress-bar{position : relative; margin-bottom : 2px; height : 16px; width : 200px}
+.rich-progress-bar-uploaded{overflow : hidden; position : absolute; border-style: solid; border-width: 1px 0px 1px 1px; height : 16px;}
+.rich-progress-bar{position : relative; margin-bottom : 2px; height : 16px; width : 200px; white-space: nowrap;}
.rich-progress-bar-base{text-align : center; position : absolute; height : 16px; width : 200px; font-weight : bold;}
.rich-progress-bar-remained{border : 1px solid; color : #000000;}
.rich-progress-bar-completed{background-repeat : repeat-x; repeat-y;}
Modified: trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js
===================================================================
--- trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js 2008-02-06 02:09:36 UTC (rev 5846)
+++ trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js 2008-02-06 02:09:45 UTC (rev 5847)
@@ -1,24 +1,26 @@
ProgressBar = {};
ProgressBar = Class.create();
-ProgressBar.Pollers = {}
Object.extend(ProgressBar.prototype, {
- initialize: function() {
- if (arguments.length > 0) {
- var id = arguments[0];
- this.id = id;
- }
+ initialize: function(id, containerId, formId, mode, minValue, maxValue, context, options, progressVar) {
+ this.id = id;
+ $(this.id).component = this;
+
+ this.containerId = containerId;
+ this.formId = formId;
+ this.mode = mode;
+ this.minValue = minValue;
+ this.maxValue = maxValue;
+
+ this.context = context;
+ this.options = options || {};
+
+ this.options.onbeforedomupdate = function(request, event, data) {
+ this.onComplete(data);
+ }.bind(this);
+
+ this.progressVar = progressVar;
},
- init: function (id, containerId, formId, mode, minValue, maxValue, context, options, progressVar) {
- ProgressBar.Pollers[id] = {};
- ProgressBar.Pollers[id]['containerId'] = containerId;
- ProgressBar.Pollers[id]['formId'] = formId;
- ProgressBar.Pollers[id]['mode'] = mode;
- ProgressBar.Pollers[id]['minValue'] = minValue;
- ProgressBar.Pollers[id]['maxValue'] = maxValue;
- ProgressBar.Pollers[id]['context'] = context;
- ProgressBar.Pollers[id]['options'] = options;
- ProgressBar.Pollers[id]['progressVar'] = progressVar;
- },
+
getValue: function () {
var d = $(this.id + ":upload");
if (d != null) {
@@ -39,7 +41,7 @@
},
poll: function () {
- A4J.AJAX.Poll(ProgressBar.Pollers[this.id]['containerId'], ProgressBar.Pollers[this.id]['formId'], ProgressBar.Pollers[this.id]['options']);
+ A4J.AJAX.Poll(this.containerId, this.formId, this.options);
},
interpolate: function (placeholders) {
for(var k in this.context) {
@@ -57,8 +59,8 @@
this.updateClassName($(this.id + ":remain"), data['remainClass'], "rich-progress-bar-base");
this.updateClassName($(this.id), data['styleClass'], "rich-progress-bar-base");
- if (ProgressBar.Pollers[this.id]['options']['pollinterval'] != data['interval']) {
- ProgressBar.Pollers[this.id]['options']['pollinterval'] = data['interval'];
+ if (this.options.pollinterval != data['interval']) {
+ this.options.pollinterval = data['interval'];
}
},
updateStyle: function (style) {
@@ -76,20 +78,20 @@
}
},
updateClassName: function (o, newName, defaultClass) {
- if (o.className) {
+ if (o && o.className) {
if (o.className.indexOf(newName) < 0){
o.className = newName + " "+ defaultClass;
}
}
},
getContext: function () {
- var context = ProgressBar.Pollers[this.id]['context'];
+ var context = this.context;
if (!context) { context = {}; }
- context['minValue'] = ProgressBar.Pollers[this.id]['minValue'];
- context['maxValue'] = ProgressBar.Pollers[this.id]['maxValue'];
+ context['minValue'] = this.minValue;
+ context['maxValue'] = this.maxValue;
context['value'] = (this.value ? this.value : this.getValue());
- if (ProgressBar.Pollers[this.id]['progressVar']) {
- context[ProgressBar.Pollers[this.id]['progressVar']] = context['value'];
+ if (this.progressVar) {
+ context[this.progressVar] = context['value'];
}
return context;
},
@@ -117,13 +119,13 @@
$(this.id + ":remain").innerHTML = $(this.id + ":complete").innerHTML = lbl;
},
getMode: function () {
- return ProgressBar.Pollers[this.id]['mode'];
+ return this.mode;
},
getMaxValue: function () {
- return ProgressBar.Pollers[this.id]['maxValue'];
+ return this.maxValue;
},
getMinValue: function () {
- return ProgressBar.Pollers[this.id]['minValue'];
+ return this.minValue;
},
isAjaxMode: function () {
return (this.getMode() == "ajax");
@@ -153,7 +155,9 @@
},
enable: function (ev) {
if (!this.isAjaxMode()) {
- this.forceState("progress",new Function ("new ProgressBar('"+this.id+"').setValue('0');"));
+ this.forceState("progress", function() {
+ this.setValue(0);
+ }.bind(this));
}else {
this.disable();
this.poll();
@@ -170,10 +174,10 @@
options['parameters'] = {};
options['parameters'][this.id] = this.id;
options['parameters']['forceState'] = state;
- options['actionUrl'] = ProgressBar.Pollers[this.id]['options']['actionUrl'];
+ options['actionUrl'] = this.options.actionUrl;
if (oncomplete) {
options['oncomplete'] = oncomplete;
}
- A4J.AJAX.SubmitRequest(ProgressBar.Pollers[this.id]['containerId'],ProgressBar.Pollers[this.id]['formId'],null,options);
+ A4J.AJAX.SubmitRequest(this.containerId, this.formId, null, options);
}
});
Modified: trunk/sandbox/ui/progressBAR/src/main/templates/org/richfaces/progressBar.jspx
===================================================================
--- trunk/sandbox/ui/progressBAR/src/main/templates/org/richfaces/progressBar.jspx 2008-02-06 02:09:36 UTC (rev 5846)
+++ trunk/sandbox/ui/progressBAR/src/main/templates/org/richfaces/progressBar.jspx 2008-02-06 02:09:45 UTC (rev 5847)
@@ -40,9 +40,9 @@
<![CDATA[
if (forcedState != null) {
renderForcedState(forcedState,context,component);
-}else if (value.doubleValue() < minValue.doubleValue()) {
+}else if (value.doubleValue() <= minValue.doubleValue()) {
encodeInitialState(context, component);
-} else if (value.doubleValue() > maxValue.doubleValue()) {
+} else if (value.doubleValue() >= maxValue.doubleValue()) {
encodeCompletedState(context, component);
} else {
encodeProgressState(context, component);
18 years, 3 months