I'm not really sure how to ask this question, so please bear with me.
 
Requirement:
The system has several functions which a typical user can perform.  The
user selects a function and the appropriate action is executed.  If that
action implements myObjectAware, myObjectInterceptor retrieves myObject
(which is based on dates).  This is all working correctly.
 
The Problem:
An administrative user has the option to override these
function/date-based selectors by providing myObjectId as a parameter in
the url (e.g., ?myObjectId=1).  While watching the logs, the
myObjectInterceptor is executed the first time with myObjectId=1.  This
is where my understanding becomes a little cloudy.  I believe after the
interceptor is executed initially (and the rest of the interceptor stack
is executed), the action is executed, and then the interceptors are
executed in reverse order.  This is what appears to be happening and the
second time my interceptor is executed, myObjectid=null (i.e.,
myObjectId is not a parameter on the request).
 
I think I understand why this happens...because in the response (i.e.,
the result), the myObjectId is not being carried over from the initial
request.
 
Because myObjectId=null, myObjectInterceptor believes that it should
resort to the function/date-based selection of myObject; thereby
effectively ignoring the administrative user's request and selecting
myObject by function/date.
 
Question:
How should I be handling the second execution of myObjectInterceptor?
1. Is there a way to ignore the second execution of myObjectInterceptor?
2. Should I create a public property on *all of my actions* to store
myObjectId?
3. Some much simpler way I'm overlooking?
 
Hopefully this is enough info to at least get a conversation started.
 
I appreciate your time in reading this.
 
Sincerely,
Beez

Reply via email to