cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Markus <t.mar...@proventis.net>
Subject Re: C2.2: Accessing static method on Java object with Flowscript
Date Mon, 15 Aug 2011 05:23:09 GMT
Hi,

i missed the private

i tried direct access and it works fine:

var U = Packages.com.foo bar.UseFul;
U.someMethod('text1', 'stringb');

Packages.com.foo.bar.UseFul.someMethod('text1', 'stringb');


public class UseFul {

     private UseFul() {}

     public static void someMethod(String a, String b) {
         System.out.println("a=" + a + "  b=" + b);
     }

}


I'm using C2.2

regards
Thomas


Am 14.08.2011 20:20, schrieb Andre Juffer:
> On 08/14/2011 03:04 PM, Thomas Markus wrote:
>> Hi,
>>
>> or create an instance without spring:
>>
>> var bean = new com.foo.bar.Useful();
>> bean.someMethod(arg1, arg2);
>
> Actually, this would (should) not work as the constructor of Useful is 
> private. It may be that this would not matter in flow, that is, one 
> can call private constructors (did not try). In Spring this is possible. 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message