-
1. Richfaces 4 M6: second click in sortable header don´t work
ilya_shaikovsky Feb 21, 2011 4:29 AM (in response to flaviohenrique)1 of 1 people found this helpfulwhich scope the meuMB has? If request - sortOrder will be reseted for every request with that code.
-
2. Richfaces 4 M6: second click in sortable header don´t work
flaviohenrique Feb 21, 2011 6:26 AM (in response to ilya_shaikovsky)It´s in @ViewScoped. I also changed it to @SessionScoped and all behavior that I listed still present.
@ManagedBean
@ViewScoped
public class meuMB implements Serializable{
(...)
I am using Mojarra 2.0.4. I tried to downgrade to 2.0.3, but i got the same problem.
-
3. Richfaces 4 M6: second click in sortable header don´t work
jbalunas Feb 21, 2011 8:14 AM (in response to flaviohenrique)We'll have to review this one asap to see if there is an issue here that might need to be addressed in Final. Ilya, can you create a jira, and assign for investigation?
-
4. Richfaces 4 M6: second click in sortable header don´t work
ilya_shaikovsky Feb 22, 2011 7:06 AM (in response to flaviohenrique)Jus realized that the problem lies completelly at client side!(sorry but missed point about frequent clicks only and thought that the problem is common for any ones) And fortunatelly what is more good related to demo code!
So change render of the links to the tabela@body. As you have the tabela now - all the table getting rendered and links DOM elements became replaced also. That's why click event's from old instances getting lost also.
Checked that it started to work at showcase and I will updated demo correspondingly soon.
-
5. Richfaces 4 M6: second click in sortable header don´t work
flaviohenrique Feb 22, 2011 11:59 AM (in response to ilya_shaikovsky)Ilya, maybe I am doing some wrong (JSF 1.0 is fine, but I also need to learn JSF 2.0), but I made the change you asked and still have the same problem.
<f:facet name="header">
<a4j:commandLink value="Nome" render="tabela@body"
action="#{meuMB.sortByNome}" />
</f:facet>
When I debug, multiples call to meuMB.sorByNome are fired, change to Ascend and Descend continuos.
I can´t see what is wrong with that code
-
6. Richfaces 4 M6: second click in sortable header don´t work
ilya_shaikovsky Feb 23, 2011 6:21 AM (in response to flaviohenrique)When I debug, multiples call to meuMB.sorByNome are fired, change to Ascend and Descend continuos.
I'm sorry but seems I missing the point now... what's the problem with latest code? -
7. Richfaces 4 M6: second click in sortable header don´t work
flaviohenrique Feb 23, 2011 7:28 AM (in response to ilya_shaikovsky)I made the change you recommended render="tabela@body", but I still can´t get the second click on header sort the datatable.
Why? Because a single click on the sortable header makes multiples call to sorByNome() even in @ViewScoped or @SessionScoped.
The first click, even firing multiples calls, works, because nomeOrder starts with SortOrder.unsorted and became ascending, then, after the second click (yet multiples calls) anomeOrder still ascending (because of the last call), not descending.
As I undestood, you said that this behavior can happens if you do not go with @ViewScoped or @SessionScoped, but both are suffering from the same problem.