struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Jouravlev <>
Subject Re: Seperation between Controller and Model
Date Wed, 04 May 2005 03:49:58 GMT
Um, what is a keypair? A primary key?

I personally prefer to have "store" actions and "view" actions. In my
"store" action I would call some business code which verifies that
object can be saved automatically. And if not, then if "overwrite"
flag is set by client. If yes, store and show "view".

If not, show "view" with both objects and with checkbox/button to
overwrite. On submit go to "store" action again. This time "overwrite"
checkbox would be set.

On 5/3/05, 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:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message