struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Germuska <...@Germuska.com>
Subject Re: sTRUTS 1.3 - chain flow
Date Fri, 20 May 2005 18:50:56 GMT
>>I'd suggest adding a preprocessing command which recognizes the 
>>SOAP header, as Frank described, and instead of forwarding, simply 
>>sets a key/value pair in the ActionContext which other commands can 
>>interpret.  Then later, you could extend the PopulateForm class to 
>>look for the flag and to do its population process based on SOAP 
>>data instead of request parameters.
>
>Yep, that's what I was talking about in terms of changing things... 
>extending classes isn't changing them of course, but it's still not 
>the "insert some commands and your done" that I was hoping for.  I 
>suppose it's not that bad really, I was just hoping for simple 
>insertions into the chain config.

Well, the difference between extending PopulateForm and putting a 
command after it which re-populates in the case of a SOAP request is 
small; the only caveat being that in the add-a-command-after model 
you must do it after or the existing PopulateForm action would 
clobber your efforts -- subclassing eliminates any questions about 
the ordering of events.

How does the strutsws kit respond to form validation failures?  Is 
the "input" path overwritten when you clone the ActionMapping?  You 
could keep doing that, or you could use the same model described for 
the forward, that is indicate the failed-validation-path in a 
property set in the ActionMapping.

>>Typical caveats apply, but I think that would handle it.  I'm not 
>>totally sure how I feel about a practice of changing the forward 
>>config in the process-view chain, but I can't see any other way 
>>you'd handle it without having to bind your code a lot more to the 
>>specific fact that it might be used in both ways.
>
>Agreed.  As it stands now, I'm doing some rather dicey things to 
>make it all work, specifically I'm thinking of the cloning of the 
>ActionMapping and altering it on-the-fly for exception handling. 
>So, what you suggest is better in terms of "proper-ness" at least :)

I don't know nothing about properness ;-)

It's interesting to have some more complex use cases to test the 
chain model against...

Joe

-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"Narrow minds are weapons made for mass destruction"  -The Ex

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message