yyang-talend / gwt-ent

Automatically exported from code.google.com/p/gwt-ent
0 stars 0 forks source link

invoke with array parameters #29

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.public void doSomething(String ... parameters){
//display label if works
}
3.ClassType clientComponentClassType = 
TypeOracle.Instance.getClassType(GWTClientComponent.class);
        clientComponentClassType.invoke(listbox, "testCase", "hello");
        Object[] stringArray = new String[2];

        stringArray[0] = "Hello";
        stringArray[1] = "Hdsfsfsdfo";
//        clientComponentClassType.invoke(listbox, "doSomething", new Object[] 
{ "blah", "blah" });
clientComponentClassType.invoke(listbox, "doSomething", stringArray });

the last 2 invoke do not work.
Can you please post a working example in which the
-function has array parameters
-with invoke
Thank you

What is the expected output? What do you see instead?
error:
Error Method: doSomethindrequest 1 params, but invoke provide 2 params.
im try and catching --printing e.getMessage 
What version of the product are you using? On what operating system?

Please provide any additional information below.
Thank you for your time. It is urgent

Original issue reported on code.google.com by lama.gh...@gmail.com on 24 Aug 2010 at 1:42

GoogleCodeExporter commented 8 years ago
If it's request a array parameter, I think you may need call like this:
clientComponentClassType.invoke(listbox, "doSomething", new Object[]{new 
String[]{"blah", "blah"}} });

Original comment by JamesLuo...@gmail.com on 24 Aug 2010 at 11:13

GoogleCodeExporter commented 8 years ago
Thank you, it is working now

Original comment by lama.gh...@gmail.com on 25 Aug 2010 at 6:48

GoogleCodeExporter commented 8 years ago

Original comment by JamesLuo...@gmail.com on 27 Aug 2010 at 4:55