• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Portlet modes

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suppose I have a portlet that shows me some info about a person from the database. I have to provide a way by which the info can be edited as well by the logged in user.

So what is the best way to do it. Should an edit link be provided in the portlet or should this be done in the edit portlet mode, or in the configure mode?

I am using Struts 1.1., JSR-168 portlets on RAD 6.0

Thanks..
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let's turn this into a philisophical argument.

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.

-Cameron McKenzie
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Dorothy",
Please check your private messages.
 
Warning! Way too comfortable! Do not sit! Try reading this tiny ad instead:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic