This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I suggest that your first option is best one. You can add Edit link/button to do this functionality in View mode itself. Most commonly edit mode can be used for setting up the user preferences. For e.g., if you want to restrict number of user records to be displayed in the view mode, you can provide a text box in Edit mode in which user can give number of records to be displayed.
What is the purpose of the edit mode? I'd say that the purpose of the edit mode it to change how the portlet itself renders, displays, or behaves. The edit mode is really designed to edit the portlet, and portlet properties, not necessarily the data displayed in the portlet.
So, if I have a person details portlet, to me, the edit mode might do things like add a new field to display about the user, or the edit mode might be used to remove the 'middle-name' textfield on the portlet. But can you see how, philisophically, the edit button is being used to change the behavior of the PORTLET, and not change the behavior or the state of the data in which the portlet resides.
The data being displayed about a user in a portlet is NOT a property of the portlet. My name is NOT a portlet preference. If I want to change my last name, I shouldn't have to the edit mode of the portlet, because my name has nothing to do with the portlet. If I want to edit my name, there should be a button on the view mode of the portlet that allows me to update my personal information.
Is what I'm saying making sense?
To me, the edit mode is designed to edit the portlet, and how the portlet does certain things.