I have a primefaces datatable which has a list of values being displayed. And every row has a Open button which navigates to other page for details and on the same page i have a back button which takes me page to the previous visited page. so it comes to the datatable page which gets refreshed to the original state...it does not maintain the records which the user had searched. My Managed Bean is in viewscope. I want to the records to be maintained even if the user navigates to other pages and comes back to the same page. I tried making the managed bean Session scoped that solves the issue but on page refresh the datatable does not get refreshed .even if we do a Control+refresh it still maintains the same records
Related
I am doing work on a project using primefaces 3.5 and my problem is that...
I have a search form I enter some criteria in the form and press Search Button...Result is displayed...suppose using FireFox
Now If I open application same page in some other browser suppose IE there I will see the form with same values and same search result returned earlier...even this is a new session
More over suppose in the same browser if I logout and then login and navigate to same page I see the search form with same values and same result returned.
More or less this behavior is close to application scope Beans where as I have not any application scope Bean and have only one Bean with session scope for login purpose...rest of the beans are #ViewScoped
If I use #Scope("request")...Bean is created on each request but in this case I am unable to set parameter to the confirm dialog for deleting the record because when i click on dialog delete button previous values gets nullified due to new request.
I am in great difficulty and have done too much workaround but all in vain....
I am a newbie with JSF. Currently I have the problem with keeping the state of data-table list pagination.
The problem is when a user edits a row of a list which is not in the first page of data-table, after completing his action, page navigation returns to the first initial page of the list while we need to return to the previous page that user has been editing.
A complete Scenario:
In the list page there are 100 rows of records, and each page shows 20 rows,
User navigates to the 3th page, and selects one of the rows in order to edit the record.
Backing ListBean calls the EditBean that navigate the page to edit page.
User update the record information and backing Editbean calls back the ListBean.
ListBean refresh the Datamodel and navigate back to the list page, but the state of the pagination that user initially had edited is lost.
What is the best approach to return back the page to the previous page that user has been editing?
Myface 1.2.7 and Tomahawk taglib 1.0 has been used in the project. Pages consist of t:dataTable.
Thanks.
I have two pages, one page has a command button (page 1)with a backed action event that update the database. The other page has a data table that display the value of that database.(page 2)
When I trigger that command on page 1 and navigate to page two the data table is not updating. I am using primeface (jsf) and ejb.
So I was wondering if Requestcontext.update(":page2:datatable") will update the data table on page two or is there a better way of updating the datatable.
Im having a question regarding retrieving the view state of a JSF page.
I have an application in which the user is able to search for persons in a
list and when the user press "show" button the same JSF page will be filled
with a list of the various persons.
Now when I choose one of the persons , another JSF page will show up with more
in-depth and detailed information about that person. Now in that page there is a
"cancel/abort" button displayed. What I want to accomplish is that when I press
that specific "cancel/abort" button the page should be redirected and navigate
back to the JSF page with the list as it was shown, so in some way the "view state"
should be stored (I assume only) but I dont know how it could be done...
I just wanted to check if anyone has been able to solve this kind of issue
in some manner.. ? (The JSF search page as mentioned above is declared as a viewscoped as
an additional information)
Thanks for all help..
You could make the bean #SessionScoped. That means that only one instance will be created by browser session, so when you get back you get the last state.
Of course, session scoped means that when you get back to the view even if it is not a "back" navigation, that info will still be there.
I'm trying to get some data from a datatable in rich:modal panel
The whole flow is as follows
When clicking on search button on main page, a modal panel pops up with appropriate data & check box
Till this point the application is working fine
After clicking on ok button, selected data should be populated into main page. This is where the code fails
I tried stuff like getRowData, getValues, etc. but in vain. This could be done by keeping the bean in session scope but I have to keep this bean in request scope using Apache MyFaces JSF 1.2
Two ways comes to mind:
Pass an extra request parameter (the search string and the page number?) so that the bean knows which data to preload.
Make use of MyFaces Orchestra to create a conversation scope which lies in between request and session scope and is exactly the scope you're looking for this particular functional requirement.