I'm about to change the order of these two interceptors in my
application, and I thought I'd ask about this use case, and find out why
the order is as it is right now in struts-default.xml.
I've got a fairly generic "get a piece of a list of ____" action, and I
think I've settled on creating a number of action definitions that each
call this same code, but with different parameters specified in the
action definition.
In order to make this a bit more concrete, let me show an example:
Instead of this uber-complex tool for admins that lets me specify all
sorts of constraints and relationships:
http://localhost:8080/seenabout/wayTooGenericTool.html?elementType=Media&eventRelationship=takenAt&eventShortName=spiralween2007&startAt=0
I want to make a separate action definition that provides a cleaner URL
for simpler queries:
http://localhost:8080/seenabout/allEventMedia.html?eventShortName=spiralween2007
http://localhost:8080/seenabout/allUserMedia.html?username=DNewfield
http://localhost:8080/seenabout/allAttendedEvents.html?username=DNewfield
So the "allEventMedia" action definition would set "elementType=Media",
and "eventRelationship=takenAt"; the "allAttendedEvents" action
definition would set "elementType=Event", and
"userRelationship=attended"; etc.
Using the staticParams interceptor that should be straightforward.
Except that in the default stacks, an instance of "params" follows
"staticParams", which would allow these action definitions to be
overridden (which I don't want). I will change the order in my own
stack, but I figured I'd ask why it is the way it is? Wouldn't it be
the case for most people that specify params in the action definition
that they wouldn't want those overridden by request params?
-Dale
P.S.: I figure someone will say: "This is silly--you should use REST to
specify all those constraints in a single action definition!" I don't
disagree, but I'm confused how to apply that--my constraints are ternary
in nature (for each noun in my system, when a constraint is specified
there's "What noun is involved?" "What is the relationship to that
noun?" and "What's the url-friendly name for the instance of that
noun?"). Also, since codebehind/smarturls/etc. are still moving
targets, which should I develop to?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]