I am using JSF and primefaces to develop my UI and using Java and Spring as server side.
In an xhtml page I am calling a controller method which will perform some logics and populates a HashMap in the bean class. In xhtml, the HashMap is been iterated using JSTL foreach loop to create the UI components. I have multiple pages in y application. So each xhtml page willl have previous and next buttons.
Consider, i have Page_1, Page_2, Page_3. All there pasges has set of radio buttons and check boxes. In each page i have next and previous buttons. On click of next button page_1, page_2 will be displayed. On click of previous button in page_2, page_1 will be displayed.
Each page wil call a controller method.
Page_1 (radio_buttons) <------> Page_2(check_boxes) <------> Page_3
My question is, if user checks/selects a radio button/checkbox in page_1 and go to page_2 sing next button in page_1 and when he returns back to page_1, how will I make the radio button to remain in selected state??
The bean which hold the selected radio button/check box values are resetting in the controller method when the page load. So i need to restrict from calling the controller if the page loads for second time. How can i achieve this?