It isnt exactly a use-case of RF to construct existing entities on the client side.
Either you create a new one, or load an existing one form the server.

Alternatively you can create a search API which expects simple parameters instead of objects:
searchApi.lookup(id, name, ..)

Putting everything in objects adds sometimes only another layer of indirection.

Regards,
Stefan

On 17.04.2013 16:22, Aryan wrote:
Thanks Jens, This is exactly how I am doing right now. I am having something like EmployeeSearchProxy extends ValueProxy for EmployeeSearch class which wraps up Employee and have an additional field for id.

But it seems to me as workaround for a perticular case which solves a perticular problem. A few workarounds are not bad but if they grew large enough, they may haunt you back in maintainance.

The real problem is control and communication which developer can do with GWT-RequestFactory framework.

If I could have said at runtime to RequestFactory
"Hey RequestFactory, chill !!!, don't make any checks and don't throw any exception, this one is just for search purpose"

I guess it could might have been a better design and more compiling to object oriented principles.


On Wednesday, 17 April 2013 17:50:20 UTC+5:30, Jens wrote:


        *
        *Is there any way I can tell RequestFactory:
            '*Hey RequestFactory, chill !!!, don't make any checks and
        don't throw any exception, this one is just for search purpose*'


    Use ValueProxy instead, e.g. EmployeSearchCriteriaProxy extends
    ValueProxy. ValueProxies do not have an identity and RF should not
    care about IDs and Versions.
    At first it may sound stupid to duplicate all the methods from
    your EmployeeEntityProxy because you can filter all properties of
    your Employee but in the future you may need to filter employees
    based on more complex data that is not directly available on
    EmployeeEntityProxy.

    -- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Google 
Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to