Fix in the class:
import java.util.Arrays;
import java.util.List;
import com.google.gwt.user.client.rpc.IsSerializable;
public class Tuple implements IsSerializable{
List<Object> elements;
public Tuple(){};
public Tuple(Object... elements) {
this.elements = Arrays.asList(elements);
}
public Object getElement(int index) {
return elements.get(index- 1);
}
public int size() {
return elements.size();
}
public String toString(){
String out="";
for(int i=0;i<elements.size();i++){
*out*+=elements.get(i).toString();
}
return out;
}
}
--------------------------------------------------------------------------------------------------
"Se um dia tiver que escolher entre o mundo e o amor... Lembre-se:
Se escolher o mundo, ficará sem o amor, mas se escolher o amor,
com ele conquistará o mundo." (Albert Einstein)
╔════════════════════════════════════════╗
ROMERYTO VIEIRA LIRA
Bacharelando em Ciência da Computação - UFCG
Membro do SegHidro2 - LSD - http://seghidro.lsd.ufcg.edu.br
Membro do Grupo de Suporte Guardians - www.lcc.ufcg.edu.br
Página Pessoal: http://romeryto.googlepages.com
Blog: http://olhartecnologico.blogspot.com
╚════════════════════════════════════════╝
Pensou em imprimir este e-mail? Isto é mesmo necessário? Poupe o meio
ambiente.
----------------------------------------------------------------------------------------------------------------------------
2008/10/2 Romeryto Lira <[EMAIL PROTECTED]>
> Hi,
>
> I have any problems with List of Object in my gwt application.
> I have the class Tuple that represent a collection where many variables
> types can be added in this collection.
>
> This is the class:
>
> import java.util.Arrays;
> import java.util.List;
>
> import com.google.gwt.user.client.rpc.IsSerializable;
>
> public class Tuple implements IsSerializable{
>
> List<Object> elements;
>
>
> public Tuple(){};
>
> public Tuple(Object... elements) {
> this.elements = Arrays.asList(elements);
> }
>
> public Object getElement(int index) {
> return elements.get(index- 1);
> }
>
> public int size() {
> return elements.size();
> }
>
> public String toString(){
> String out="";
> for(int i=0;i<elements.size();i++){
> saida+=elements.get(i).toString();
> }
> return out;
> }
> }
>
> I want a list of tuple is returned from the server
>
>
> I want to return a list of tuple from the class server implement, but the
> GWT 1.5 doesn't accept the Type Object.
> The question is: How to return a List of Tuple or other type that represent
> a List of many objects types (int, string,etc) from the server and the GWT
> 1.5 suport?
>
>
>
> --------------------------------------------------------------------------------------------------
> "Se um dia tiver que escolher entre o mundo e o amor... Lembre-se:
> Se escolher o mundo, ficará sem o amor, mas se escolher o amor,
> com ele conquistará o mundo." (Albert Einstein)
> ╔════════════════════════════════════════╗
> ROMERYTO VIEIRA LIRA
> Bacharelando em Ciência da Computação - UFCG
> Membro do SegHidro2 - LSD - http://seghidro.lsd.ufcg.edu.br
> Membro do Grupo de Suporte Guardians - www.lcc.ufcg.edu.br
> Página Pessoal: http://romeryto.googlepages.com
> Blog: http://olhartecnologico.blogspot.com
> ╚════════════════════════════════════════╝
>
> Pensou em imprimir este e-mail? Isto é mesmo necessário? Poupe o meio
> ambiente.
>
> ----------------------------------------------------------------------------------------------------------------------------
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---