OK let me give a more complete description
Environment :
- Seam 1.1.1 GA
- Jboss Portal 2.4 GA
- MyFaces 1.1.4
- OS Win XP
I have an application that manage internal document, and if the number of
documents is very large, I perform data paging, so I only display 10 documents
per page, the problem is when I login as the same user for two windows/tabs
(window A and Window B) and I perform the paging,
in window A :
initial status :
displaying 10 documents of 100, page 1 of 10
in window B :
initial status :
displaying 10 documents of 100, page 1 of 10
When I perform first action at window A with pressing next button(I do "go to
the next page") the status will be like this :
Window A :
displaying 10 documents of 100, page 2 of 10
Until last step above, everything is going well, but when I do an action in
window B with pressing the next button the status starts to be strange like
this :
Window B :
displaying 10 documents of 100, page 3 of 10
I expect that the status in window A are isolated from window B and vice versa,
so when I perform an action in window B, the status that I expect is like this :
Window B :
displaying 10 documents of 100, page 2 of 10
not jump to third place, I guessed thats because of there are shared state
between the two pages, not isolated state. and this is part of my code :
| @Name("controller")
| @Scope(SESSION)
| @Synchronized
| public class myController implements Serializable {
|
| /** Start index */
| @Out(scope = CONVERSATION, required = false)
| private int startIndex;
|
| /** Page number */
| @Out(scope = CONVERSATION, required = false)
| private int page;
|
| /** Number Of all records */
| @Out(scope = CONVERSATION, required = false)
| private int totalNumberOfResults;
|
| /** Total number of pages */
| @Out(scope = CONVERSATION, required = false)
| private int totalNumberOfPages;
|
| /** End index */
| @Out(scope = CONVERSATION, required = false)
| private int endIndex;
|
| .......
|
| public void pagingNext() {
| totalNumberOfResults = getTotalNumberOfRestults();
| totalNumberOfPages = (totalNumberOfResults % pageSize == 0 ?
totalNumberOfResults
| / pageSize
| : (totalNumberOfResults / pageSize) + 1);
|
| page++;
| if (page > totalNumberOfPages - 1) {
| page = totalNumberOfPages - 1;
| }
|
| startIndex = page * pageSize;
| endIndex = (page == totalNumberOfPages - 1 ?
totalNumberOfResults : startIndex + pageSize);
|
| }
|
| ......
|
|
| }
|
I hope this description is clear, and I hope somebody outhere can help me
Thanx and Regards,
-haric-
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022811#4022811
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022811
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user