Hi alberto33,

Thanks for the replies, I appreciate it... but sorry I dont want to be
rude... I think you don't understand my problem or maybe im not making
myself clear..

1. I already am successful in the FILEUPLOAD part, (ive seen that
Upload sample and tried it and its working).
2. I already am succesfful in the Conversion of RECORD to be saved in
a database..

My problem is, I have two server calls, one is the formpanel.submit()
and the other is a RPC call..

For example, if I click the save button, I have the form submitted and
another for the RPC call.. I was hoping that there is a way that I can
only have one server call with that process.

Thanks!

On Jan 25, 5:33 am, alberto33 <[email protected]> wrote:
> Have you looked at:
>
> http://www.gwt-ext.com:8080/demo-ux/#UploadSample
>
> and
>
> http://www.gwt-ext.com:8080/demo-ux/#SwfUploadPanel
>
> ?
>
> That might be helpful for you too.
>
> On Jan 23, 12:39 am,Arji<[email protected]> wrote:
>
> > Hi alberto33,
>
> > Yeah, that's what I did.. I implemented the record converter method
> > and I defined the required RPC interface.. It is successfully saved in
> > the DB.
>
> > What I'm trying to say is, if I need a FileUpload in the process
> > (which I dont think RPC will suffice), I will have two connections to
> > the server from GWT. One is RPC call, like your pseudo code, and
> > another one for the form.submit to the servlet.
>
> > That's what I did. Two connections. I was hoping that I can pass the
> > Records to the Servlet without using RPC. (because I think there is no
> > other way to pass a FILE using RPC).
>
> > Thanks.
>
> > On Jan 23, 12:47 pm, alberto33 <[email protected]> wrote:
>
> > > Not sure if I yet understand your question. It sounds like you got the
> > > file upload part resolved, so I won't comment on that.
>
> > > The pseudo code (of one of many possibilities, depending on what data
> > > structure you want to serialize and send) would look something like
> > > this:
>
> > > Record[] record = store.getRecords();
> > > List<List<String>> list = recordConverter(record);
> > > getRPCServiceInstance().submit(list, new AsyncCallback() {
> > >                  public void onFailure(Throwable caught) {
> > >                     // process failure if needed
> > >                  }
>
> > >                  public void onSuccess(Object result) {
> > >                       // process success if needed
> > >                  }
>
> > > });
>
> > > So now you still have to do a few things
> > > 1) Implement the recordConverter method, which takes the records from
> > > the grid store and converts them into a list of lists of strings (or
> > > any primitive objects you might have in your store).
> > > 2) Define required RPC interfaces and the corresponding server
> > > implementation.
>
> > > Hope this helps.
>
> > > On Jan 22, 4:42 am,Arji<[email protected]> wrote:
>
> > > > Hi Dariusz,
>
> > > > Sorry if you got confused..
>
> > > > Here is a simple example.
>
> > > > one EditorGridPanel with one column with a text field.
> > > > and
> > > > one fileupload textfield both in FormPanel.
>
> > > > I click form.submit.
>
> > > > I can get the values of the fileupload textfield and successful
> > > > processing..
>
> > > > but i cant get the values inside the GridPanel. I need to get the
> > > > values of the Grid Panel.
>
> > > > So what I did was, two connection to the server, one servlet for the
> > > > fileupload and one RPC for the converted Grid Values into Map..
>
> > > > Tell me if it is clear or not..
>
> > > > Thanks So Much!
>
> > > > On Jan 22, 3:18 pm, Dariusz Borowski <[email protected]> wrote:
>
> > > > > Oops, of course the HOSTED_MODE_URL should be somthing like this:
>
> > > > > *String HOSTED_MODE_URL =
> > > > > "http://localhost:8080/yourApplicationName/upload<http://localhost:8080/springgwt/upload>
> > > > > ";*
>
> > > > > D.
>
> > > > > On Thu, Jan 22, 2009 at 8:17 AM, Dariusz Borowski 
> > > > > <[email protected]>wrote:
>
> > > > > > Hmm... I thought I know what you are trying to do, but now you lost 
> > > > > > me...
>
> > > > > > Never mind, If you want to upload your files to a servlet, you might
> > > > > > consider two things. First, you would need to use the 
> > > > > > *RequestBuilder*class to be able to send your data to your servlet 
> > > > > > like this:
>
> > > > > > *String WEB_MODE_URL = "/upload";
> > > > > > String HOSTED_MODE_URL = "http://localhost:8080/springgwt/upload";*
> > > > > > *
> > > > > > if( GWT.isScript() ) {
>
> > > > > >          url = URL.encode( WEB_MODE_URL );
>
> > > > > >       } else {
>
> > > > > >          url = URL.encode( HOSTED_MODE_URL );
>
> > > > > > }
>
> > > > > > RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, 
> > > > > > url);*
>
> > > > > > (while you debugging, don't forget to check if you are in a HOSTED 
> > > > > > or WEB
> > > > > > MODE. You can check it out via *GWT.isScript();* )
>
> > > > > > On the back end you can use the *MultipartRequest *to fetch all 
> > > > > > your files
> > > > > > coming from the frot end. This is the approach I would go for.
>
> > > > > > Dariusz
>
> > > > > > On Thu, Jan 22, 2009 at 6:10 AM,Arji<[email protected]> wrote:
>
> > > > > >> Hi alberto33 ,
>
> > > > > >> I have a bit of knowledge in using GWT-RPC and I already tried /
> > > > > >> tested working examples of my own.
>
> > > > > >> My problem is, how to (exactly) get the data from an 
> > > > > >> EditorGridPanel
> > > > > >> into the servlet.
>
> > > > > >> I can get the values from a textfield, text area, etc, but is 
> > > > > >> there a
> > > > > >> way to get the data inside a editor gridpanel as a list?
>
> > > > > >> I know how to create the servlet connecting to the GWT, and 
> > > > > >> successful
> > > > > >> in file upload.
>
> > > > > >> My question is, the values inside a editor grid panel into the 
> > > > > >> servle
> > > > > >> (or server).
>
> > > > > >> Thanks!
>
> > > > > >> On Jan 22, 11:12 am, alberto33 <[email protected]> wrote:
> > > > > >> >Arji,
>
> > > > > >> > Basically what you want to make an GWT RPC call to pass the data
> > > > > >> > along.
>
> > > > > >> > Take at look at:
>
> > > > > >> >http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=goog.
> > > > > >> ..
>
> > > > > >> > or do a google search GWT RPC to find out more info.
>
> > > > > >> > On Jan 21, 8:47 pm,Arji<[email protected]> wrote:
>
> > > > > >> > > Hi Dariusz,
>
> > > > > >> > > Thanks for the reply!  My goal is, to save the contents of the
> > > > > >> > > EditorGridPanel to a Database.. I don't know how to get the 
> > > > > >> > > values in
> > > > > >> > > the servlet.. Im using servlet because the formpanel involves 
> > > > > >> > > file
> > > > > >> > > upload.
>
> > > > > >> > > Is there a way?
>
> > > > > >> > > Thanks so much!
>
> > > > > >> > > On Jan 20, 6:51 pm, "Dariusz Borowski" <[email protected]> 
> > > > > >> > > wrote:
>
> > > > > >> > > > But I found already 3 examples where you can get the values 
> > > > > >> > > > from a
> > > > > >> grid:
>
> > > > > >>http://www.gwt-ext.com/demo/#gridEventshttp://www.gwt-ext.com/demo/#c.<http://www.gwt-ext.com/demo/#gridEventshttp://www.gwt-ext.com/demo/%23c.>
> > > > > >> ..
>
> > > > > >> > > > Maybe it's not exactly what you are looking for, but at 
> > > > > >> > > > least a hint
> > > > > >> how to
> > > > > >> > > > do so.
>
> > > > > >> > > > Dariusz
>
> > > > > >> > > > On Tue, Jan 20, 2009 at 11:35 AM,Arji<[email protected]> 
> > > > > >> > > > wrote:
>
> > > > > >> > > > > Hi,
>
> > > > > >> > > > > I've searched the forums for some examples, but I can't 
> > > > > >> > > > > seem to
> > > > > >> find
> > > > > >> > > > > any.  How can I pass the whole data content of an Editable 
> > > > > >> > > > > Grid
> > > > > >> Panel
> > > > > >> > > > > into a Servlet..
>
> > > > > >> > > > > Im successful in passing a Textfield, by accessing its 
> > > > > >> > > > > name,
>
> > > > > >> > > > > /*In the servlet class*/
> > > > > >> > > > > FileItemStream item = iterator.next();
> > > > > >> > > > > String name = item.getFieldName();
> > > > > >> > > > > String value = Streams.asString(stream);
>
> > > > > >> > > > > But how can I get the editor grid values?
>
> > > > > >> > > > > Thanks So much!- Hide quoted text -
>
> > > > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to