[
https://issues.jboss.org/browse/RF-12986?page=com.atlassian.jira.plugin.s...
]
Raphael Lacerda edited comment on RF-12986 at 5/14/13 6:59 PM:
---------------------------------------------------------------
I've debbuged the JS code and i've found that the JS is sending the wrong data
The file is richfaces.js
the param *source* has an attribute *source.rowIndex*. It's sending the wrong rowIndex
when i go to page 2 using rich:dataScroller for instance
{code:java}
richfaces.ajax = function(source, event, options) {
var options = options || {};
var sourceId = getSourceId(source, options);
var sourceElement = getSourceElement(source);
{code}
was (Author: raphael_lacerda):
I've debbuged the JS code and i've found that the JS is sending the wrong
data
The file is richfaces.js.bb
the param *source* has an attribute *source.rowIndex*. It's sending the wrong rowIndex
when i go to page 2 using rich:dataScroller for instance
{code:java}
richfaces.ajax = function(source, event, options) {
var options = options || {};
var sourceId = getSourceId(source, options);
var sourceElement = getSourceElement(source);
{code}
Rich:datatable selects the wrong object when working with
rich:datascroller and selectable row
----------------------------------------------------------------------------------------------
Key: RF-12986
URL:
https://issues.jboss.org/browse/RF-12986
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 4.3.1
Environment: Richfaces 4.3.1 - JSF 2 - Tomcat 7+ Chrome
Reporter: Raphael Lacerda
The example shows the using of a *rich:datable* to list Strings from a @ManagedBean.
The goal is to click at a specific row and display the selected element.
{code:xml}
<h:form>
<rich:dataTable value="#{test.names}" var="n"
rows="4">
<a4j:ajax event="rowclick"
listener="#{test.setSelectedItem(n)}" render="@form" />
<rich:column>
<f:facet name="header">Names</f:facet>
<h:outputText value="#{n}" />
</rich:column>
<f:facet name="footer">
<rich:dataScroller />
</f:facet>
</rich:dataTable>
<h:outputText value="#{test.selectedItem}" />
</h:form>
{code}
This works just fine! However, *when i click to go to the next page on the dataScroller*
and i click at a specific row , it gets the elements from the first page
For example:
Page 1 - Names1,Names2,Names3, Names4
Page 2 - Names4,Names5,Names6, Names8
First step:
- Click at the " Names 2"
- The String "Names 2" is displayed
Second step:
- Navigate to page 2
Third Step
- Click at the "Names 4"
- The String "Names 1" is displayed
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira