your problem seems to be 100% presentation. Business logic shouldn't
know anything about confirmation pages, because it's not a part of the
business use case. 
Business logic should provide you the methods to perform the checks. 
like:
in First Update Action:
  if (service.hasKeyPairMoved())
    sendToConfirmationPage(newKeypair, service.getKeyPair());
  else
    service.updateKeyPair();
in Second Update Action (after confirmation)
  service.updateKeyPair();

regards
Leon

P.S. DTO.Update() method? I thought DTO where a POJO?


On Tue, 2005-05-03 at 20:03 -0700, Nic Werner wrote:
> Hi again,
>    My apologies for a probably obvious problem. I've got an example 
> where I need to check (on update) if this object is actually being 
> 'moved' (ie, keypair is being changed), and if there is already data at 
> the dest. keypair, go back to the page, display both objects and confirm 
> the user wants to overwrite the actual data there. If confirmed, null 
> out the old keypair data and update the new keypair.
> 
>     Now, I'm confused on where I should put the logic for all this? This 
> almost seems like the perfect place for  custom Validation code, and 
> seems like something the Controller would do, but it also seems that 
> this is business logic and shouldn't be coupled to Struts. I'm thinking 
> that all Struts should call is my DTO.Update() method?
> 
>       Maybe because I don't have much so-called business logic in this 
> application that I'm not sure of what really should be in that layer, 
> the above example is about as complex as the logic gets for me.
> 
> Thanks,
> 
> - Nic.
>    
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



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

Reply via email to