This seems to be a common design problem, so I figured i would take
it to the struts list for advice.  In my application, a user can
login and perform functions, such as viewing/altering one's own
profile.  Additionally, a user can have "superuser" priviledged, in
which case they can alter other user's profiles.  Would it be better
to split this into two actions or try to merge it in as a single
action?  If I did it as a single action, there would be a lot of

if (request.isUserInRole('ADMIN'))
{
    contact =
    contactFacade.getContact(request.getParameter('user'));
}
else
{
    contact = contactFacade.getContact(request.getRemoteUser()); 
}

within the action.  Additionally, different messages would be
needed, different forwards would be targeted and the views would be
different because they may need different messages, different return
pages, etc.

In short, it seems like I am performing the same action, but
in many ways it is more different than the same.  I sure which there
was a nice example of a "superuser" like interface that was
effecient.  Anyone have any thoughts or followup questions?

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Real programmers just hate to get up in the morning, and 
contrary to Ordinary People, they're in better shape as 
it gets closer to nighttime.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to