This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one for details.
In my requirement, i have a datagrid which includes an icon in every row in PAGE 1. At one point the icon is purple and then after double clicking the row, it takes to a different page PAGE 2 and after saving, it comes back to PAGE 1. At that time, icon in PAGE 1 has to change to blue. But the icon remains purple in my case. When I refresh the page, the problem is rectified. As i have observed that the icon value taken is that of blue but the display is incorrect, i feel it has something to do with refreshing the page.
Please help me resolve this issue as soon as possible.
How is the color updated ? By modifying the page's innerHTML ?
From the work flow you mentioned, it appears to me that your page is displayed based on a flag that is set by the controller. Obviously the JSP will not contain the updated flag unless it is refreshed. Two solutions you can try
1. Use AJAX to poll the status of this flag and display the result. This is inefficient and has a time delay.
2. Modify the flow so that the new page does not open in a new window, but on the same window. When you are done with your changes the page should redirect to the old page, which would result in another GET call to the controller. The JSP page will now contain updated values.
I assumed that some of the calls that you make are idempotent. If they are not you may need to use a pattern like PRG to get around problems related to usability.