CRUD Project in Portlet Environment
By sakthi on Mar 07, 2006
While exercising the CRUD Tutorial (Performing Inserts, Updates and Deletes) in a Portlet Project, I have learnt that Portlet Life Cycle is little different from that of a normal Creator WebApplication.
Unlike a normal web application page, a portlet page can't assume that the page being rendered in the Render Response phase is the same page that was built in Restore View. If a portlet wants to maintain state across repeated render requests, the portlet must use the session bean to store stateful information.
The prerender code in this CRUD Portlet tutorial is little different from the one used in normal webapplication(as suggested in the tutorial). It uses a sessionbean property personId to persist the current personId selection or its change and then uses the same for passing as the parameter to the tripRowSet.
Here's the Creator Project built, InsertUpdateDelete_Portlet.zip, that works fine with the bundled Pluto w/ SunAppserver. Download this project, Open it in IDE and Choose Run project to deploy this to the bundled container.