On Nov 8, 3:59 pm, Manuel Carrasco Moñino <
man...@apache.org> wrote:
> You have to use the @ExportInstanceMethod annotation and make the
> implementation in the exportOverlay class translating the arguments, note
> that the method must be static and the first argument must be the instance.
>
> @Export("GeometryIndexService")
> @ExportPackage("org.geomajas.plugin.editing.service")
> public class JsGeometryIndexService implements
> ExportOverlay<GeometryIndexServiceImpl>, GeometryIndexService {
>
> @ExportInstanceMethod
> public static GeometryIndex create(GeometryIndexServiceImpl instance,
> String type, int... values) {
> if ("type_a".equals(type))
> return instance.create( GeometryIndexType.TYPE_A, values)
> [....]
> }
>
> }
>
> Then in javascript you can use the method as usual
>
> var o = new org.geomajas.plugin.editing.service.GeometryIndexService()
> o.create("type_a", ...)
>
> BTW: there are annotations for static methods and constructors as well, you
> have to use last snapshot.
>
> - Manolo
>