Thanks :)

On Tue, Sep 9, 2008 at 2:16 PM, Dimitrios Gianninas <
[EMAIL PROTECTED]> wrote:

>    If you have a simple method called reset() on your DTO, it wont affect
> how it does back to the server.
>
> *Dimitrios Gianninas*
> *RIA Developer Team Lead*
> *Optimal Payments Inc.*
>
>
>  ------------------------------
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *nwebb
> *Sent:* Tuesday, September 09, 2008 5:46 AM
> *To:* flexcoders
> *Subject:* [flexcoders] DTOs & methods?
>
>   Hi, I have a Data Transfer Object which I use to encapsulate values from
> a search-filter in my application - i.e. the user can filter search-results
> by project, employee, month, year etc. I am using remoting and passing this
> as a typed object to ColdFusion.
>
> *The short version of my question*: I want to add a method to my
> FilterDto, allowing me to reset (some) properties, is it okay to add such a
> method (will CF simply ignore it), or should DTOs always be devoid of
> methods. Can adding a method cause problems when remoting?
>
> ------------------------------------------
>
> *( ... yes I know I could use binding but...):*
>
> When the user presses  "Search" I call a method which updates the filterDto
> with the current values of the filter-components.
>
> I didn't want to use binding here, simply for performance reasons, as this
> is fairly simple, so rather than bind each visual component to the
> corresponding Dto property I just call a method which updates the
> properties.
>
> Now I have an either-or situation - if the user searches by OrderId I need
> to clear/reset the other properties, else if they search by any other
> property they can't also search by a specific OrderId, so I could do with a
> method (I can't just instantiate a new instance of the DTO as that will
> clear/reset ALL properties)
>
> This functionality feels like it should be a method that belongs in the DTO
> class. Is it okay to create such methods in DTOs?
>
>  *AVIS IMPORTANT*
>
> *WARNING*
>
> Ce message électronique et ses pièces jointes peuvent contenir des
> renseignements confidentiels, exclusifs ou légalement privilégiés destinés
> au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun
> privilège ou à aucun autre droit si le présent message a été transmis
> involontairement ou s'il est retransmis sans son autorisation. Si vous
> n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu
> par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi
> que toutes ses pièces jointes, de votre système. La lecture, la
> distribution, la copie ou tout autre usage du présent message ou de ses
> pièces jointes par des personnes autres que le destinataire visé ne sont pas
> autorisés et pourraient être illégaux. Si vous avez reçu ce courrier
> électronique par erreur, veuillez en aviser l'expéditeur.
>
> This electronic message and its attachments may contain confidential,
> proprietary or legally privileged information, which is solely for the use
> of the intended recipient. No privilege or other rights are waived by any
> unintended transmission or unauthorized retransmission of this message. If
> you are not the intended recipient of this message, or if you have received
> it in error, you should immediately stop reading this message and delete it
> and all attachments from your system. The reading, distribution, copying or
> other use of this message or its attachments by unintended recipients is
> unauthorized and may be unlawful. If you have received this e-mail in error,
> please notify the sender.
>   
>

Reply via email to