Re: RequestFactory and populate form field with dynamic data

2011-06-30 Thread Thomas Broyer
It's really no different from GWT-RPC, if you're more comfortable with it. 
The main difference is that you can push several things in a RequestContext 
before firing it, making a "batch request". The other major difference is 
that changes to proxies have to be made in a RequestContext, after you 
edit() them; that way, when you fire(), only the changes you made are sent 
across the write, not the whole object, only the diff.

Here, you'll create a RequestContext out of your RequestFactory, enqueue an 
invocation to get the values from the server and fire() the whole thing. In 
most cases, it'll be a different RequestContext instance than the one you 
get your PersonProxy from, but it depends how you organize your code. It'll 
however have to be a different context instance than the one you *edit()* the 
PersonProxy in!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/hOXTX-Mcc90J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RequestFactory and populate form field with dynamic data

2011-06-29 Thread ungarida

You are right, there is a misunderstanding. I try to complete my
question with an example.
My problem is when you want to do a drop down list of cities for a
form of a person entity.
I mean, the problem is not about how to dynamically update a form, it
is about where have I to put data that is not strictly part of an
entity and how have I to get this data to populate the form?

On Jun 29, 4:27 pm, Thomas Broyer  wrote:e
> On Wednesday, June 29, 2011 3:44:21 PM UTC+2, ungarida wrote:
>
> > Hi all,
> > I'm studying new RequestFactory framework and I have a big doubt.
> > If the RequestFactory is stricly associated with a single Entity,
> > which is the best way transmit dynamic data to populate form fields
> > with default values?
>
> > For example I want to fill a drop down list, I can not use
> > RequestFactory to load all data.
>
> Yes you can, what makes you think it's not possible?
>
> You must be misunderstanding something, but it's hard to tell what exactly.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RequestFactory and populate form field with dynamic data

2011-06-29 Thread Elhanan Maayan
i believe to treat rf api , is to first think about how would do it with
normal java dao, and persistence api, then begin to translate them to rf
api's becouse that's basically what it tries to do.

by persistence api, i mainly thinkking about DAO's classes, where each DAO
usually revolves around a single entity and all of them extend one single
Abstract class which usually has single entity FUD api's
(Find,Update,Delete).


On Wed, Jun 29, 2011 at 5:27 PM, Thomas Broyer  wrote:

>
>
> On Wednesday, June 29, 2011 3:44:21 PM UTC+2, ungarida wrote:
>>
>> Hi all,
>> I'm studying new RequestFactory framework and I have a big doubt.
>> If the RequestFactory is stricly associated with a single Entity,
>> which is the best way transmit dynamic data to populate form fields
>> with default values?
>>
>> For example I want to fill a drop down list, I can not use
>> RequestFactory to load all data.
>>
>
> Yes you can, what makes you think it's not possible?
>
> You must be misunderstanding something, but it's hard to tell what
> exactly.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/H13wStc3Z2kJ.
>
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RequestFactory and populate form field with dynamic data

2011-06-29 Thread Thomas Broyer


On Wednesday, June 29, 2011 3:44:21 PM UTC+2, ungarida wrote:
>
> Hi all, 
> I'm studying new RequestFactory framework and I have a big doubt. 
> If the RequestFactory is stricly associated with a single Entity, 
> which is the best way transmit dynamic data to populate form fields 
> with default values? 
>
> For example I want to fill a drop down list, I can not use 
> RequestFactory to load all data.
>

Yes you can, what makes you think it's not possible?

You must be misunderstanding something, but it's hard to tell what exactly. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/H13wStc3Z2kJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RequestFactory and populate form field with dynamic data

2011-06-29 Thread ashwin.desi...@gmail.com
you should be able to dynamically populate a drop list using requestFactory.
Once you fetch the data from the server, you can update your list.

The only instance where you would have to build a custom widget is when you
want to dynamically populate a SelectionCell with your dynamic data. For
that you can refer to the following link

http://stackoverflow.com/questions/4565790/how-to-dynamically-update-the-choices-in-a-selectioncell-using-gwt

Thanks
Ashwin

On Wed, Jun 29, 2011 at 7:14 PM, ungarida  wrote:

> Hi all,
> I'm studying new RequestFactory framework and I have a big doubt.
> If the RequestFactory is stricly associated with a single Entity,
> which is the best way transmit dynamic data to populate form fields
> with default values?
>
> For example I want to fill a drop down list, I can not use
> RequestFactory to load all data. Should I use RPC?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



RequestFactory and populate form field with dynamic data

2011-06-29 Thread ungarida
Hi all,
I'm studying new RequestFactory framework and I have a big doubt.
If the RequestFactory is stricly associated with a single Entity,
which is the best way transmit dynamic data to populate form fields
with default values?

For example I want to fill a drop down list, I can not use
RequestFactory to load all data. Should I use RPC?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.