JBoss Rich Faces SVN: r6938 - trunk/framework/api/src/main/java/org/ajax4jsf.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-03-19 06:26:31 -0400 (Wed, 19 Mar 2008)
New Revision: 6938
Modified:
trunk/framework/api/src/main/java/org/ajax4jsf/Messages.java
Log:
http://jira.jboss.com/jira/browse/RF-2182
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/Messages.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/Messages.java 2008-03-19 10:26:27 UTC (rev 6937)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/Messages.java 2008-03-19 10:26:31 UTC (rev 6938)
@@ -310,7 +310,7 @@
public static final String SKIN_CYCLIC_REFERENCE = "SKIN_CYCLIC_REFERENCE";
public static final String SKIN_ILLEGAL_REFERENCE = "SKIN_ILLEGAL_REFERENCE";
public static final String NAME_MUST_BE_LITERAL = "NAME_MUST_BE_LITERAL";
- public static final String INSTANTIATE_LISTENER_ERROR = "INSTANTIATE_LISTENER_ERROR";
+ public static final String INSTANTIATE_LISTENER_ERROR = "INSTANTIATE_LISTENER_ERROR";
public static final String NOT_AJAX_CONTAINER_ERROR = "NOT_AJAX_CONTAINER_ERROR";
public static final String INVALID_EXPRESSION = "INVALID_EXPRESSION";
public static final String NOT_INSTANCE_OF_ERROR = "NOT_INSTANCE_OF_ERROR";
16 years, 10 months
JBoss Rich Faces SVN: r6937 - trunk/framework/impl/src/main/resources/org/ajax4jsf.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-03-19 06:26:27 -0400 (Wed, 19 Mar 2008)
New Revision: 6937
Modified:
trunk/framework/impl/src/main/resources/org/ajax4jsf/messages.properties
Log:
http://jira.jboss.com/jira/browse/RF-2182
Modified: trunk/framework/impl/src/main/resources/org/ajax4jsf/messages.properties
===================================================================
--- trunk/framework/impl/src/main/resources/org/ajax4jsf/messages.properties 2008-03-19 09:58:56 UTC (rev 6936)
+++ trunk/framework/impl/src/main/resources/org/ajax4jsf/messages.properties 2008-03-19 10:26:27 UTC (rev 6937)
@@ -255,4 +255,4 @@
UI_INSERT_RESOURCE_NOT_FOUND="Resource {1} not found, component {0}
HIGHLIGHT_LIBRARY_NOT_FOUND="In order to use highlight attribute of the rich:insert component, add jhighlight.jar from https://jhighlight.dev.java.net/ into application."
INVALID_VALUE="Component {0} has invalid value expression {1}"
-DATASCROLLER_PAGE_MISSING=Data scroller page missing {0}{1}{2}{3}
\ No newline at end of file
+DATASCROLLER_PAGE_MISSING=Datascroller {0} will be reset: page #{1} has been requested, but there are {2} page(s) in the model only. Page #{3} will be used.
\ No newline at end of file
16 years, 10 months
JBoss Rich Faces SVN: r6936 - in trunk/framework: impl/src/main/resources/org/ajax4jsf and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2008-03-19 05:58:56 -0400 (Wed, 19 Mar 2008)
New Revision: 6936
Modified:
trunk/framework/api/src/main/java/org/ajax4jsf/Messages.java
trunk/framework/impl/src/main/resources/org/ajax4jsf/messages.properties
Log:
fixed build
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/Messages.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/Messages.java 2008-03-19 08:42:38 UTC (rev 6935)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/Messages.java 2008-03-19 09:58:56 UTC (rev 6936)
@@ -321,6 +321,7 @@
public static final String READ_ONLY_NODE_ERROR = "READ_ONLY_NODE_ERROR";
public static final String NOT_PARENT_AJAX_COMPONENT_ERROR = "NOT_PARENT_AJAX_COMPONENT_ERROR";
public static final String INVALID_VALUE = "INVALID_VALUE";
+ public static final String DATASCROLLER_PAGE_MISSING = "DATASCROLLER_PAGE_MISSING";
public static void main(String[] args) {
String m = getMessage(INVALID_ATTRIBUTE_VALUE, "A", "B");
Modified: trunk/framework/impl/src/main/resources/org/ajax4jsf/messages.properties
===================================================================
--- trunk/framework/impl/src/main/resources/org/ajax4jsf/messages.properties 2008-03-19 08:42:38 UTC (rev 6935)
+++ trunk/framework/impl/src/main/resources/org/ajax4jsf/messages.properties 2008-03-19 09:58:56 UTC (rev 6936)
@@ -254,4 +254,5 @@
NULL_ATTRIBUTE_ERROR=Required attribute {0} for component {1} is null
UI_INSERT_RESOURCE_NOT_FOUND="Resource {1} not found, component {0}
HIGHLIGHT_LIBRARY_NOT_FOUND="In order to use highlight attribute of the rich:insert component, add jhighlight.jar from https://jhighlight.dev.java.net/ into application."
-INVALID_VALUE="Component {0} has invalid value expression {1}"
\ No newline at end of file
+INVALID_VALUE="Component {0} has invalid value expression {1}"
+DATASCROLLER_PAGE_MISSING=Data scroller page missing {0}{1}{2}{3}
\ No newline at end of file
16 years, 10 months
JBoss Rich Faces SVN: r6935 - trunk/ui/calendar/design/funcspec.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-03-19 04:42:38 -0400 (Wed, 19 Mar 2008)
New Revision: 6935
Modified:
trunk/ui/calendar/design/funcspec/FuncSpec - RF Calendar Component.doc
Log:
Modified: trunk/ui/calendar/design/funcspec/FuncSpec - RF Calendar Component.doc
===================================================================
(Binary files differ)
16 years, 10 months
JBoss Rich Faces SVN: r6934 - trunk/ui/datascroller/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-03-18 17:05:32 -0400 (Tue, 18 Mar 2008)
New Revision: 6934
Modified:
trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
Log:
http://jira.jboss.com/jira/browse/RF-2182
Modified: trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
===================================================================
--- trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2008-03-18 21:05:25 UTC (rev 6933)
+++ trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2008-03-18 21:05:32 UTC (rev 6934)
@@ -34,6 +34,7 @@
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
+import org.ajax4jsf.Messages;
import org.ajax4jsf.component.AjaxActionComponent;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.RendererUtils;
@@ -412,14 +413,25 @@
Integer pageCount = getPageCount(dataTable);
int page = getPage();
+ int newPage = -1;
if (page < 1) {
- page = 1;
- setPage(page);
+ newPage = 1;
} else if (page > pageCount) {
- page = pageCount != 0 ? pageCount : 1;
+ newPage = (pageCount != 0 ? pageCount : 1);
+ }
+
+ if (newPage != -1) {
+ FacesContext context = getFacesContext();
+ Object label = MessageUtil.getLabel(context, this);
+ String formattedMessage = Messages.getMessage(Messages.DATASCROLLER_PAGE_MISSING,
+ new Object[] {label, page, pageCount, newPage});
+
+ context.addMessage(this.getClientId(context), new FacesMessage(formattedMessage));
+
+ page = newPage;
setPage(page);
}
-
+
if (dataTable.isRendered()) {
dataTable.setFirst((page - 1) * getRows(dataTable));
}
16 years, 10 months
JBoss Rich Faces SVN: r6933 - trunk/samples/datascroller-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-03-18 17:05:25 -0400 (Tue, 18 Mar 2008)
New Revision: 6933
Modified:
trunk/samples/datascroller-sample/src/main/webapp/pages/index.jsp
Log:
http://jira.jboss.com/jira/browse/RF-2182
Modified: trunk/samples/datascroller-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/datascroller-sample/src/main/webapp/pages/index.jsp 2008-03-18 19:09:04 UTC (rev 6932)
+++ trunk/samples/datascroller-sample/src/main/webapp/pages/index.jsp 2008-03-18 21:05:25 UTC (rev 6933)
@@ -14,6 +14,10 @@
<body>
<f:view>
<h:form>
+
+ <a4j:outputPanel ajaxRendered="true">
+ <h:messages />
+ </a4j:outputPanel>
<h:selectOneRadio binding="#{skinBean.component}" />
<h:commandLink action="#{skinBean.change}" value="set skin" />
16 years, 10 months
JBoss Rich Faces SVN: r6932 - in trunk/docs/userguide/en/src/main: resources/images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vsukhov
Date: 2008-03-18 15:09:04 -0400 (Tue, 18 Mar 2008)
New Revision: 6932
Added:
trunk/docs/userguide/en/src/main/resources/images/fileUpload10.png
trunk/docs/userguide/en/src/main/resources/images/fileUpload9.png
Modified:
trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
Log:
http://jira.jboss.com/jira/browse/RF-1207 added screenshots, corrected mistakes in details of usage
Modified: trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-03-18 18:51:48 UTC (rev 6931)
+++ trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-03-18 19:09:04 UTC (rev 6932)
@@ -85,13 +85,15 @@
</itemizedlist>
</para>
- <!-- attributes of component orderingList -->
-
+
+ <!--para><emphasis>
+ <property> "uploadData"</property>
+ </emphasis> attribute shows the collection of files uploaded. With the help of this attribute you can define the place to upload data.</para-->
<para>
The <emphasis>
<property> "disabled"</property>
</emphasis>
- attribute is used to disable all elements of the component. All the controls should be disabled too. </para>
+ attribute is used to disable all elements of the component. All the controls disables too. </para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
@@ -113,7 +115,7 @@
</figure>
<para>The <emphasis>
- <property> "acceptedTypes"</property></emphasis> attribute is used to define file types which should be accepted to upload.
+ <property> "acceptedTypes"</property></emphasis> attribute is used to define file types which are accepted to upload.
</para>
<para>
<emphasis role="bold">Example:</emphasis>
@@ -121,7 +123,7 @@
<programlisting role="XML"><![CDATA[...
<rich:fileUpload uploadData="#{bean.data}" acceptedTypes="html"/>
...]]></programlisting>
- <para>As it could be seen in the example below, only files with "html" extension should be accepted to upload.</para>
+ <para>As it could be seen in the example above, only files with "html" extension are accepted to upload.</para>
<para>The <emphasis>
<property> "autoclear"</property></emphasis> attribute is used to remove automatically files from list after upload completed.</para>
@@ -133,11 +135,11 @@
<rich:fileUpload uploadData="#{bean.data}" addControlLabel="myLabel" autoclear="true"
acceptedTypes="html"/>
...]]></programlisting>
- <para>As it could be seen in the example below, files removes from list after upload completed.</para>
+ <para>As it could be seen in the example above, files removes from list after upload completed.</para>
<para>The <emphasis>
<property> "maxFilesQuantity"</property></emphasis> defines max number of files allowed for upload.
- After number of files in the list is equals to this attribute – add button should be disabled.
- Add button should not be enabled before upload of the whole list done.
+ After number of files in the list is equals to this attribute – add button is disabled.
+ The add button is not available until all list items are uploaded.
</para>
<para>
<emphasis role="bold">Example:</emphasis>
@@ -159,7 +161,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>As it could be seen in the picture below, only 2 files allows for upload.</para>
+ <para>As it could be seen in the picture above, only 2 files allows for upload.</para>
<para>The <emphasis>
<property> "fileUploadedListener"</property></emphasis> is
called at server side after every file uploaded and used for the file saving by end developer.
@@ -179,9 +181,15 @@
<property> "onuploadcanceled"</property></emphasis> is called after upload was canceled via cancel control. The <emphasis>
<property> "onerror"</property></emphasis> is if the file upload was interrupted according to any errors.</para>
<para>
- There is a number of facets that define entry customization. Markup should be provided using <emphasis>
- <property> "entry"</property></emphasis> facet. <emphasis>
- <property> "label"</property></emphasis> facet could be used to provide displaying the progress of uploading.
+ There are a number of facets providing for this component:
+ <emphasis>
+ <property> "header"</property></emphasis>
+
+ <emphasis>
+ <property> "footer"</property></emphasis>
+ <emphasis>
+ <property> "label"</property></emphasis>. <emphasis>
+ <property> "label"</property></emphasis> facet could be used to provide displaying the progress of uploading.
</para>
<para>
<emphasis role="bold">Example:</emphasis>
@@ -207,7 +215,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>As it could be seen in the picture below, the label displays under the item.</para>
+ <para>As it could be seen in the picture above, the label displays under the item.</para>
<para>Labels of <property>component controls</property> can be defined with <emphasis>
<property> "addControlLabel"</property></emphasis>, <emphasis>
<property> "clearAllControlLabel"</property></emphasis>, <emphasis>
@@ -227,7 +235,13 @@
</itemizedlist>
</para>
- <para>The <emphasis role="bold"><property><rich:fileUpload></property></emphasis> component allows to use internationalization method to redefine and localize the labels. You could use application resource bundle and define RICH_FILE_UPLOAD_CANCEL_LABEL, RICH_FILE_UPLOAD_STOP_LABEL, RICH_FILE_UPLOAD_ADD_LABEL, RICH_FILE_UPLOAD_UPLOAD_LABEL, RICH_FILE_UPLOAD_CLEAR_LABEL, RICH_FILE_UPLOAD_CLEAR_ALL_LABEL, RICH_FILE_UPLOAD_PROGRESS_LABEL, RICH_FILE_UPLOAD_SIZE_ERROR_LABLE, RICH_FILE_UPLOAD_TRANSFER_ERROR_LABLE, RICH_FILE_UPLOAD_ENTRY_STOP_LABEL, RICH_FILE_UPLOAD_ENTRY_CLEAR_LABEL, RICH_FILE_UPLOAD_ENTRY_CANCEL_LABEL there.</para>
+ <para>The <emphasis role="bold"><property><rich:fileUpload></property></emphasis>
+ component allows to use internationalization method to redefine and localize the labels. You could use application
+ resource bundle and define <property>RICH_FILE_UPLOAD_CANCEL_LABEL, RICH_FILE_UPLOAD_STOP_LABEL,
+ RICH_FILE_UPLOAD_ADD_LABEL, RICH_FILE_UPLOAD_UPLOAD_LABEL, RICH_FILE_UPLOAD_CLEAR_LABEL,
+ RICH_FILE_UPLOAD_CLEAR_ALL_LABEL, RICH_FILE_UPLOAD_PROGRESS_LABEL, RICH_FILE_UPLOAD_SIZE_ERROR_LABLE,
+ RICH_FILE_UPLOAD_TRANSFER_ERROR_LABLE, RICH_FILE_UPLOAD_ENTRY_STOP_LABEL, RICH_FILE_UPLOAD_ENTRY_CLEAR_LABEL,
+ RICH_FILE_UPLOAD_ENTRY_CANCEL_LABEL</property> there.</para>
<!-- ordering control set>
Added: trunk/docs/userguide/en/src/main/resources/images/fileUpload10.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/fileUpload10.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/fileUpload9.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/fileUpload9.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 10 months
JBoss Rich Faces SVN: r6931 - Reports/3.2.0 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-03-18 14:51:48 -0400 (Tue, 18 Mar 2008)
New Revision: 6931
Added:
trunk/test-applications/qa/Test Reports/3.2.0/DailyReport320CR318032008mvitenkov.xls
Log:
Added: trunk/test-applications/qa/Test Reports/3.2.0/DailyReport320CR318032008mvitenkov.xls
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/qa/Test Reports/3.2.0/DailyReport320CR318032008mvitenkov.xls
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 10 months
JBoss Rich Faces SVN: r6930 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-03-18 14:28:03 -0400 (Tue, 18 Mar 2008)
New Revision: 6930
Modified:
trunk/docs/userguide/en/src/main/docbook/included/progressBar.xml
Log:
http://jira.jboss.com/jira/browse/RF-1690
The PB chapter was restructured.
Label, ProgressVar, Parameters attributes as well as Macrosubstitutions were revised providing more details.
Modified: trunk/docs/userguide/en/src/main/docbook/included/progressBar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/progressBar.xml 2008-03-18 18:07:23 UTC (rev 6929)
+++ trunk/docs/userguide/en/src/main/docbook/included/progressBar.xml 2008-03-18 18:28:03 UTC (rev 6930)
@@ -47,7 +47,7 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
-<progressBar:progressBar value="#{bean.incValue1}"/>
+<rich:progressBar value="#{bean.incValue1}"/>
...]]></programlisting>
</section>
<section>
@@ -57,7 +57,7 @@
</para>
<programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.progressBar;
...
-HtmlColumns myColumns = new progressBar();
+HtmlProgressBar myProgressBar = new progressBar();
...]]></programlisting>
</section>
<!-- Start Details of Usage-->
@@ -68,16 +68,9 @@
component displays the status of the ongoing process. The component has a number of key attributes.
</para>
<para>
- The <emphasis><property>"value"</property></emphasis> attribute sets the current value of the process. Status of the process is calculated basing on <property> "value"</property> attribute.
+ The <emphasis><property>"value"</property></emphasis> attribute sets the current value of the process. Status of the process is calculated basing on <emphasis><property> "value"</property></emphasis> attribute.
</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
-<rich:progressBar
- value="#{bean.incValue}" >
-</rich:progressBar>
-...]]></programlisting>
+
<para> The <emphasis role="bold"><property><rich:progressBar></property> </emphasis> starts and finishes rendering its state being governed by <emphasis><property>"minValue"</property></emphasis> (default value – "0")
and <emphasis><property>"maxValue"</property></emphasis> (default value is "100") attributes relatively. See the following example.</para>
<para>
@@ -87,7 +80,143 @@
<programlisting role="XML"><![CDATA[...
<rich:progressBar value="#{bean.incValue}" minValue="50" maxValue="400"/>
...]]> </programlisting>
- <para> The <emphasis><property>"interval"</property></emphasis>attribute defines the frequency of status polling. Polling is active while the component is operational. </para>
+ <para>
+ The <emphasis><property> "label"</property></emphasis> attribute is responsible for displaying informational
+ data, information on the progress bar, if it's not displayed using children components.
+ If this attribute is not set and the children components are not used either, no textual information
+ regarding ongoing process will be indicated.
+ In order to indicate the current status you need to pass the value to this attribute. Please see an example.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:progressBar value="#{bean.incValue}" id="progrs" label="{value}%"/>
+...]]></programlisting>
+<para>
+ Displaying information on a progress bar can be also performed using
+
+ <property><h:outputText></property> JSF tag within
+ <emphasis role="bold"><property><rich:progressBar></property> </emphasis> tags passing the progress value to the value of the JSF tag.
+</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
+<rich:progressBar value="#{bean.incValue1}" >
+ <h:outputText value="#{bean.incValue1}"></h:outputText>
+</rich:progressBar>
+...]]> </programlisting>
+
+
+
+ <para>
+ The <emphasis><property> "progressVar"</property></emphasis> attribute serves to provide an option for a
+ value substitution on the page. It defines a variable that contains the
+ data taken from
+ <emphasis><property>"value"</property></emphasis> attribute.
+ The sole purpose of the
+ <emphasis><property> "progressVar"</property></emphasis>
+ attribute is to provide a way to use the data placed into the
+ <emphasis><property>"value"</property></emphasis> attribute.
+ Please study carefully the following code example:
+
+
+
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
+<rich:progressBar value="#{bean.incValue1}" enabled="#{bean.enabled1}" id="progrs1" progressVar="progress">
+ <h:outputText value="{progress}%"></h:outputText>
+</rich:progressBar>
+...]]> </programlisting>
+
+
+ <para>
+ In the shown example
+ <emphasis><property> "progressVar"</property></emphasis> attribute
+ gets the "progress" value which contains data taken from
+ <emphasis><property>"value"</property></emphasis>
+ attribute of a
+ <emphasis role="bold"><property><rich:progressBar></property> </emphasis>
+ and transfers the received data to the "value" attribute of <property><h:outputText></property> JSF tag, to make the data appear on the page.
+ </para>
+<!--Macrosubs-->
+
+
+
+
+ <para>
+ The <emphasis role="bold"><property><rich:progressBar></property> </emphasis>
+ component provides 3 predefined macrosubstitution parameters:
+
+ <itemizedlist>
+ <listitem>
+ <para><property><emphasis><property>{value}</property></emphasis></property> contains <emphasis><property>"value"</property></emphasis></para>
+ </listitem>
+ <listitem>
+ <para><property><emphasis><property>{minValue}</property></emphasis></property> contains <emphasis><property>"minValue"</property></emphasis></para>
+ </listitem>
+ <listitem>
+ <para><property><emphasis><property>{maxValue}</property></emphasis></property> contains <emphasis><property>"maxValue"</property></emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ You can use them as follows:
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:progressBar value="#{bean.incValue1}" minValue="400" maxValue="900">
+ <h:outputText value="Min value is {minValue}, current value is {value}, max value is {maxValue}"></h:outputText>
+</rich:progressBar>
+ ...]]> </programlisting>
+ <figure>
+ <title>Macrosubstitution</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/progressbar_macrosubs.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
+
+ <!--END of Macrosubs-->
+ <!-- Parameters-->
+ <para>
+ The <emphasis><property>"parameters"</property></emphasis>
+ is also a special attribute that can be used for substitutional purposes.
+ All you need is to define a value of your own parameter
+ (e.g parameters="param:'#{bean.incValue1}'")
+ and you can use it to pass the data.
+ </para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
+<progressBar:progressBar value="#{bean.incValue1}" parameters="param:'#{bean.incValue1}'">
+ <h:outputText value="{param}%"></h:outputText>
+</progressBar:progressBar>
+...]]> </programlisting>
+
+
+
+ <!-- END Parameters-->
+
+
+
+
+ <para> The <emphasis><property>"interval"</property></emphasis>attribute defines the frequency of status polling. Polling is active while the component is operational. </para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
@@ -95,6 +224,10 @@
<programlisting role="XML"><![CDATA[...
<rich:progressBar value="#{bean.incValue}" id="progrs" interval="900"/>
...]]> </programlisting>
+
+
+
+
<para> The <emphasis><property>"parameters"</property></emphasis>attribute allows to send some
dynamical data to the component which is displayed in the informational part.
Parameters can be passed through <emphasis><property>"parameters"</property></emphasis> attribute, or from component control.</para>
@@ -106,29 +239,6 @@
<h:outputText="{param1} task #{progress} %"/>
</rich:progressBar>
...]]> </programlisting>
- <para>
- The <emphasis><property> "label"</property></emphasis> attribute is responsible for displaying informational
- data on the progress bar, if it's not displayed using children components.
- If this attribute is not set and the children components are not used either, no textual information
- regarding ongoing process will be indicated.
- In order to indicate the current status you need to pass the value to this attribute. Please see an example.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
-<rich:progressBar value="#{bean.incValue}" id="progrs" label="{value}%" >
-</rich:progressBar>
-...]]></programlisting>
-
- <para> In order to display textual and numerical information on the progress bar (as it was said above this can be aslo performed using <emphasis><property> "label"</property></emphasis> attribute ) you can also use this code:
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
-<h:outputText value="{value}%" ></h:outputText>
-...]]></programlisting>
<para>
The component can also employ <emphasis><property> "initial"</property></emphasis> and <emphasis><property> "complete"</property></emphasis>
@@ -139,14 +249,14 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
-<progressBar:progressBar value="#{bean.incValue1}" >
+<rich:progressBar value="#{bean.incValue1}" >
<f:facet name="initial">
<h:outputText value="Process not started"></h:outputText>
</f:facet>
<f:facet name="complete">
<h:outputText value="Process completed"></h:outputText>
</f:facet>
-</progressBar:progressBar>
+</rich:progressBar>
...]]> </programlisting>
<para> However, the usage of these facets is optional. If you omit them nothing will be displayed.
</para>
@@ -161,36 +271,7 @@
</listitem>
</itemizedlist>
- <para>
- You can also use macrosubstitution in both Client and Ajax modes,
- which allows you to pass
- <emphasis><property>"minValue"</property></emphasis>,
- <emphasis><property>"maxValue"</property></emphasis>and
- <emphasis><property>"Value"</property></emphasis>
- to the facet that is responsible for displaying information on the progress bar, using
- <emphasis><property>{minValue}</property></emphasis>,
- <emphasis><property>{maxValue}</property></emphasis> and
- <emphasis><property>{Value}</property></emphasis>syntax.
- See the example.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
-<progressBar:progressBar value="#{bean.incValue1}"
- minValue="400"
- maxValue="900">
- <h:outputText value="Min value is {minValue}, current value is {value}, max value is {maxValue}"></h:outputText>
-</progressBar:progressBar>
- ...]]> </programlisting>
- <figure>
- <title>Macrosubstitution</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/progressbar_macrosubs.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+
</section>
<!-- End. Details of Usage-->
@@ -472,7 +553,7 @@
</thead>
<tbody>
<row>
- <entry>.rich-progress-bar-shell</entry>
+ <entry>rich-progress-bar-shell</entry>
<entry>Defines styles for the background and the borders of the bar when label is not used</entry>
</row>
@@ -547,7 +628,7 @@
</para>
<programlisting role="CSS"><![CDATA[...
.rich-progress-bar-remained{
- background-color: #5793f5;
+ background-color: #ebf3fd;
}
...]]></programlisting>
@@ -573,9 +654,7 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="CSS"><![CDATA[...
-.myFontClass{
- color: #5793f5;
-}
+.RremainClass{ background-color: #ebf3fd;}
...]]></programlisting>
<para>The <emphasis><property>"styleClass"</property></emphasis> attribute for <emphasis role="bold"
><property><rich:progressBar> </property></emphasis> is defined as it’s shown in the example below:</para>
@@ -583,7 +662,7 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="CSS"><![CDATA[<progressBar:progressBar value="#{bean.incValue1}" styleClass="myFontClass" />
+ <programlisting role="CSS"><![CDATA[<rich:progressBar value="#{bean.incValue1}" styleClass="remainClass" />
]]></programlisting>
<para>This is a result:</para>
@@ -592,7 +671,7 @@
<title>Modificaton of a look and feel with own classes and <emphasis><property>styleClass</property></emphasis> attributes</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/progressbarMyClass.png"/>
+ <imagedata fileref="images/progressbarRedefinedClasses.png"/>
</imageobject>
</mediaobject>
</figure>
16 years, 10 months
JBoss Rich Faces SVN: r6929 - in trunk/ui/datascroller/src: main/java/org/richfaces/renderkit/html and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-03-18 14:07:23 -0400 (Tue, 18 Mar 2008)
New Revision: 6929
Modified:
trunk/ui/datascroller/src/main/java/org/richfaces/component/DataScrollerViewPhaseListener.java
trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
trunk/ui/datascroller/src/main/resources/org/richfaces/renderkit/html/scripts/datascroller.js
trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx
trunk/ui/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java
Log:
http://jira.jboss.com/jira/browse/RF-2182
Modified: trunk/ui/datascroller/src/main/java/org/richfaces/component/DataScrollerViewPhaseListener.java
===================================================================
--- trunk/ui/datascroller/src/main/java/org/richfaces/component/DataScrollerViewPhaseListener.java 2008-03-18 18:07:09 UTC (rev 6928)
+++ trunk/ui/datascroller/src/main/java/org/richfaces/component/DataScrollerViewPhaseListener.java 2008-03-18 18:07:23 UTC (rev 6929)
@@ -24,7 +24,6 @@
import java.util.Iterator;
import javax.faces.component.UIComponent;
-import javax.faces.component.UIData;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseEvent;
@@ -49,21 +48,17 @@
}
private void updateScrollers(UIComponent component) {
- if (component.isRendered()) {
- if (component instanceof UIDatascroller) {
- UIDatascroller datascroller = (UIDatascroller) component;
-
- UIData dataTable = datascroller.getDataTable();
- if (dataTable.isRendered()) {
- dataTable.setFirst(datascroller.setupFirstRowValue());
- }
- }
-
- Iterator<UIComponent> children = component.getFacetsAndChildren();
- while(children.hasNext()) {
- updateScrollers(children.next());
- }
+ if (component.isRendered()) {
+ if (component instanceof UIDatascroller) {
+ UIDatascroller datascroller = (UIDatascroller) component;
+ datascroller.setupFirstRowValue();
}
+
+ Iterator<UIComponent> children = component.getFacetsAndChildren();
+ while(children.hasNext()) {
+ updateScrollers(children.next());
+ }
+ }
}
public void beforePhase(PhaseEvent event) {
Modified: trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
===================================================================
--- trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2008-03-18 18:07:09 UTC (rev 6928)
+++ trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2008-03-18 18:07:23 UTC (rev 6929)
@@ -50,7 +50,7 @@
public abstract class UIDatascroller extends AjaxActionComponent
implements DataScrollerSource, ActionSource {
- private Integer pageNumber;
+ private Integer page;
public static final String COMPONENT_TYPE = "org.richfaces.Datascroller";
public static final String COMPONENT_FAMILY = "org.richfaces.Datascroller";
@@ -225,26 +225,6 @@
return (UIData) forComp;
}
- /**
- * Gets the index of the current page
- *
- * @param data
- * @param pageCount
- * @return the page index
- */
- public int getPageIndex(UIData data, int pageCount) {
- int page = getPage();
- if (page < 0) {
- if (pageCount == 0) {
- page = 1;
- } else {
- page = pageCount + page + 1;
- }
- }
-
- return page;
- }
-
private int getFastStepOrDefault() {
int step = getFastStep();
if (step <= 0) {
@@ -254,54 +234,57 @@
}
}
- public int getPageForFacet(String facetName) {
- UIData dataTable = getDataTable();
- int pageCount = getPageCount(dataTable);
- int pageIndex = getPageIndex(dataTable, pageCount);
-
- return getPageForFacet(facetName, pageIndex, pageCount);
+ /**
+ * @param data
+ * @return
+ * @see #getPage()
+ * @deprecated
+ */
+ public int getPageIndex(UIData data) {
+ return getPageIndex();
}
- public int getPageForFacet(String facetName, int pageIndex, int pageCount) {
+ /**
+ * @return
+ * @see #getPage()
+ * @deprecated
+ */
+ public int getPageIndex() {
+ return getPageIndex();
+ }
+
+ public int getPageForFacet(String facetName) {
+ if (facetName == null) {
+ throw new NullPointerException();
+ }
+
int newPage = 1;
+ int pageCount = getPageCount();
if (FIRST_FACET_NAME.equals(facetName)) {
newPage = 1;
} else if (PREVIOUS_FACET_NAME.equals(facetName)) {
- newPage = pageIndex - 1;
+ newPage = getPage() - 1;
} else if (NEXT_FACET_NAME.equals(facetName)) {
- newPage = pageIndex + 1;
+ newPage = getPage() + 1;
} else if (LAST_FACET_NAME.equals(facetName)) {
newPage = pageCount > 0 ? pageCount : 1;
} else if (FAST_FORWARD_FACET_NAME.equals(facetName)) {
- newPage = pageIndex + getFastStepOrDefault();
+ newPage = getPage() + getFastStepOrDefault();
} else if (FAST_REWIND_FACET_NAME.equals(facetName)) {
- newPage = pageIndex - getFastStepOrDefault();
+ newPage = getPage() - getFastStepOrDefault();
} else {
- if (facetName != null) {
- try {
- newPage = Integer.parseInt(facetName.toString());
- } catch (NumberFormatException e) {
- throw new FacesException(e.getLocalizedMessage(), e);
- }
+ try {
+ newPage = Integer.parseInt(facetName.toString());
+ } catch (NumberFormatException e) {
+ throw new FacesException(e.getLocalizedMessage(), e);
}
-
- if (newPage < 0) {
- if (pageCount == 0) {
- newPage = 1;
- } else {
- //newPage = -1 should scroll to the last one
- newPage = pageCount + newPage + 1;
- }
- }
}
if (newPage >= 1 && newPage <= pageCount) {
return newPage;
- } else if (newPage == 0) {
- return 1;
} else {
- return -1;
+ return 0;
}
}
@@ -319,7 +302,7 @@
*/
public void setPage(String facetName) {
int newPage = getPageForFacet(facetName);
- if (newPage > 0) {
+ if (newPage != 0) {
setPage(newPage);
}
}
@@ -379,6 +362,25 @@
return row;
}
+ /**
+ * @param data
+ * @return
+ * @see #getPage()
+ * @deprecated
+ */
+ public int getFirstRow(UIData data) {
+ return data.getFirst();
+ }
+
+ /**
+ * @param rows
+ * @see #setPage(int)
+ * @deprecated
+ */
+ public void setFirstRow(int rows) {
+ getDataTable().setFirst(rows);
+ }
+
// facet getter methods
public UIComponent getFirst() {
return getFacet(FIRST_FACET_NAME);
@@ -404,52 +406,33 @@
return getFacet(PREVIOUS_FACET_NAME);
}
- private transient Integer currentPageIndex;
- private transient Integer currentPageCount;
-
- public Integer getCurrentPageCount(UIData dataTable) {
- if (currentPageCount == null) {
- currentPageCount = getPageCount(dataTable);
- }
-
- return currentPageCount;
- }
-
- public Integer getCurrentPageIndex(UIData dataTable) {
- if (currentPageIndex == null) {
- int pageCount = getCurrentPageCount(dataTable);
- int pageIndex = getPageIndex(dataTable, pageCount);
-
- if (pageCount < 1) {
- pageCount = 1;
+ public void setupFirstRowValue() {
+ UIData dataTable = getDataTable();
+ if (isRendered()) {
+ Integer pageCount = getPageCount(dataTable);
+
+ int page = getPage();
+ if (page < 1) {
+ page = 1;
+ setPage(page);
+ } else if (page > pageCount) {
+ page = pageCount != 0 ? pageCount : 1;
+ setPage(page);
}
- if (pageIndex < 1) {
- pageIndex = 1;
- setPage(pageIndex);
- } else if (pageIndex > pageCount) {
- pageIndex = pageCount;
- setPage(pageIndex);
+ if (dataTable.isRendered()) {
+ dataTable.setFirst((page - 1) * getRows(dataTable));
}
-
- currentPageIndex = pageIndex;
}
-
- return currentPageIndex;
}
-
- public int setupFirstRowValue() {
- UIData dataTable = getDataTable();
- return (getCurrentPageIndex(dataTable) - 1) * getRows(dataTable);
- }
public void setPage(int newPage) {
- this.pageNumber = newPage;
+ this.page = newPage;
}
public int getPage() {
- if (this.pageNumber != null) {
- return pageNumber;
+ if (this.page != null) {
+ return page;
}
ValueExpression ve = getValueExpression("page");
@@ -471,13 +454,13 @@
}
private void updateModel(int newPage) {
- this.pageNumber = newPage;
+ this.page = newPage;
FacesContext context = getFacesContext();
ValueExpression ve = getValueExpression("page");
if (ve != null) {
try {
- ve.setValue(context.getELContext(), this.pageNumber);
- this.pageNumber = null;
+ ve.setValue(context.getELContext(), this.page);
+ this.page = null;
} catch (ELException e) {
String messageStr = e.getMessage();
Throwable result = e.getCause();
@@ -566,7 +549,7 @@
public Object saveState(FacesContext context) {
return new Object[] {
super.saveState(context),
- pageNumber
+ page
};
}
@@ -575,7 +558,7 @@
Object[] state = (Object[]) object;
super.restoreState(context, state[0]);
- pageNumber = (Integer) state[1];
+ page = (Integer) state[1];
}
}
Modified: trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
===================================================================
--- trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2008-03-18 18:07:09 UTC (rev 6928)
+++ trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2008-03-18 18:07:23 UTC (rev 6929)
@@ -28,7 +28,6 @@
import java.util.Map;
import javax.faces.component.UIComponent;
-import javax.faces.component.UIData;
import javax.faces.component.UIParameter;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
@@ -36,6 +35,7 @@
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.javascript.JSFunctionDefinition;
+import org.ajax4jsf.javascript.JSReference;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
import org.richfaces.component.UIDatascroller;
@@ -54,24 +54,18 @@
String param = (String) paramMap.get(clientId);
if (param != null) {
UIDatascroller scroller = (UIDatascroller) component;
- UIData data = scroller.getDataTable();
- int pageCount = scroller.getPageCount(data);
-
- if (pageCount > 1) {
- int pageIndex = scroller.getPageIndex(data, pageCount);
- int newPage = scroller.getPageForFacet(param, pageIndex, pageCount);
- int page = scroller.getPage();
- if (newPage > 0 && newPage != page) {
- DataScrollerEvent event = new DataScrollerEvent(scroller,
- String.valueOf(page), param, newPage);
- if (scroller.isImmediate()) {
- event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- } else {
- event.setPhaseId(PhaseId.INVOKE_APPLICATION);
- }
+ int newPage = scroller.getPageForFacet(param);
+ int page = scroller.getPage();
+ if (newPage != 0 && newPage != page) {
+ DataScrollerEvent event = new DataScrollerEvent(scroller,
+ String.valueOf(page), param, newPage);
+ if (scroller.isImmediate()) {
+ event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ } else {
+ event.setPhaseId(PhaseId.INVOKE_APPLICATION);
+ }
- component.queueEvent(event);
- }
+ component.queueEvent(event);
}
}
}
@@ -282,11 +276,10 @@
public String getSubmitFunction(FacesContext context, UIComponent component) {
- JSFunctionDefinition definition = new JSFunctionDefinition("event");
+ JSFunctionDefinition definition = new JSFunctionDefinition("event", "value");
JSFunction function = AjaxRendererUtils.buildAjaxFunction(component,
context);
- UIDatascroller scroller = (UIDatascroller) component;
Map eventOptions = AjaxRendererUtils.buildEventOptions(context,
component);
Map parameters = (Map) eventOptions.get("parameters");
@@ -296,6 +289,8 @@
parameters.putAll(params);
}
+ parameters.put(component.getClientId(context), new JSReference("value"));
+
function.addParameter(eventOptions);
StringBuffer buffer = new StringBuffer();
function.appendScript(buffer);
Modified: trunk/ui/datascroller/src/main/resources/org/richfaces/renderkit/html/scripts/datascroller.js
===================================================================
--- trunk/ui/datascroller/src/main/resources/org/richfaces/renderkit/html/scripts/datascroller.js 2008-03-18 18:07:09 UTC (rev 6928)
+++ trunk/ui/datascroller/src/main/resources/org/richfaces/renderkit/html/scripts/datascroller.js 2008-03-18 18:07:23 UTC (rev 6929)
@@ -18,20 +18,5 @@
e = e.parentNode;
}
- var id = e.id;
- var inputId = id + "PageIndex";
-
- var input = e.lastChild;
- while (!input.id || input.id != inputId) {
- input = input.previousSibling;
- }
-
- var value = input.value;
-
- input.value = newPage;
- try {
- e.submitFunction(event);
- } finally {
- input.value = value;
- }
+ e.submitFunction(event, newPage);
};
\ No newline at end of file
Modified: trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx
===================================================================
--- trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx 2008-03-18 18:07:09 UTC (rev 6928)
+++ trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx 2008-03-18 18:07:23 UTC (rev 6929)
@@ -23,19 +23,16 @@
</jsp:scriptlet>
<c:object var="singlePageRenderStyle" type="java.lang.String" />
- <c:object var="pageIndex" type="int" />
<jsp:scriptlet>
<![CDATA[
- javax.faces.component.UIData dataTable = component.getDataTable();
-
int maxPages = component.getMaxPages();
if (maxPages <= 1) {
maxPages = 1;
}
- int pageCount = component.getCurrentPageCount(dataTable);
- pageIndex = component.getCurrentPageIndex(dataTable);
+ int pageCount = component.getPageCount();
+ int pageIndex = component.getPage();
boolean singlePageRender = true;
@@ -356,6 +353,5 @@
<script type="text/javascript">
RichFaces.Datascroller.initialize('#{clientId}', #{this:getSubmitFunction(context,component)});
</script>
- <input type="hidden" name="#{clientId}" id="#{clientId}PageIndex" value="#{pageIndex}" />
</div>
</f:root>
\ No newline at end of file
Modified: trunk/ui/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java
===================================================================
--- trunk/ui/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java 2008-03-18 18:07:09 UTC (rev 6928)
+++ trunk/ui/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java 2008-03-18 18:07:23 UTC (rev 6929)
@@ -426,31 +426,56 @@
assertEquals(4,scroller.getPageCount());
scroller.setPage("2");
scroller.setFastStep(2);
- assertEquals(5,scroller.setupFirstRowValue());
+ scroller.setupFirstRowValue();
+ assertEquals(5, scroller.getFirstRow(data));
+
scroller.setPage("next");
- assertEquals(10,scroller.setupFirstRowValue());
+ scroller.setupFirstRowValue();
+ assertEquals(10,scroller.getFirstRow(data));
+
scroller.setPage("previous");
- assertEquals(5,scroller.setupFirstRowValue());
+ scroller.setupFirstRowValue();
+ assertEquals(5,scroller.getFirstRow(data));
+
scroller.setPage("fastforward");
- assertEquals(15,scroller.setupFirstRowValue());
+ scroller.setupFirstRowValue();
+ assertEquals(15,scroller.getFirstRow(data));
+
scroller.setPage("fastrewind");
- assertEquals(5,scroller.setupFirstRowValue());
+ scroller.setupFirstRowValue();
+ assertEquals(5,scroller.getFirstRow(data));
+
scroller.setPage("first");
- assertEquals(0,scroller.setupFirstRowValue());
+ scroller.setupFirstRowValue();
+ assertEquals(0,scroller.getFirstRow(data));
+
scroller.setPage("previous");
- assertEquals(0,scroller.setupFirstRowValue());
+ scroller.setupFirstRowValue();
+ assertEquals(0,scroller.getFirstRow(data));
+
scroller.setPage("fastrewind");
- assertEquals(0,scroller.setupFirstRowValue());
+ scroller.setupFirstRowValue();
+ assertEquals(0,scroller.getFirstRow(data));
+
scroller.setPage("last");
- assertEquals(15,scroller.setupFirstRowValue());
+ scroller.setupFirstRowValue();
+ assertEquals(15,scroller.getFirstRow(data));
+
scroller.setPage("next");
- assertEquals(15,scroller.setupFirstRowValue());
+ scroller.setupFirstRowValue();
+ assertEquals(15,scroller.getFirstRow(data));
+
scroller.setPage("fastforward");
- assertEquals(15,scroller.setupFirstRowValue());
+ scroller.setupFirstRowValue();
+ assertEquals(15,scroller.getFirstRow(data));
+
scroller.setPage("5");
- assertEquals(15,scroller.setupFirstRowValue());
+ scroller.setupFirstRowValue();
+ assertEquals(15,scroller.getFirstRow(data));
+
scroller.setPage("0");
- assertEquals(0,scroller.setupFirstRowValue());
+ scroller.setupFirstRowValue();
+ assertEquals(15,scroller.getFirstRow(data));
}
public void testListener() throws Exception{
16 years, 10 months