Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#389 closed task (fixed)

API new widget

Reported by: adube Owned by:
Priority: major Milestone: 1.2.0
Component: widgets Version: trunk
Keywords: bis-1.2.0 Cc:

Description

Currently

GeoPrisma doesn't currently have any form of API. All its widgets are self-aware and independent. When you want to interact with a widget externally, you need to know its JavaScript object instance.

The need

That method is kinda harsh and not user-friendly. It would be very nice to be able to access GeoPrisma features more easily via an API of some sort.

Solution

Create an API widget that gets automatically loaded by Globals.xslt, thus doesn't require to be defined in the config.

Its content is a bunch load of methods that would trigger events. Widgets that need to listen to these events would do so and act accordingly.

The "GeoPrisma" object would be the instance of that API widget. We may need to adjust widget using "GeoPrisma" as a namespace.

Since it's a widget, all its 'methods' would be documented in its .rst file.

Change History (6)

comment:1 by adube, 13 years ago

r1252, featuring :

  • new API widget
  • source and execution automatically added in Globals.xslt, that way it doesn't required to be defined in config
  • instance currently named GeoPrismaAPI because "GeoPrisma" namespaces were not yet changed (todo or discuss)

More to come.

comment:2 by adube, 13 years ago

The following widgets are using "GeoPrisma" as namespace. Change them to "org.GeoPrisma".

  • featurepanelselector
  • resultextgrid (DelegateFeature)
  • sample
  • shortcut
  • unselectall

comment:3 by adube, 13 years ago

r1253, featuring the use of "org.GeoPrisma" namespace prefix for all the widgets mentioned above.

Some more widgets use other namespaces for instantiation or elsewhere. Change them accordingly too :

  • InitialView
  • GeoExtToolbar

comment:4 by adube, 13 years ago

r1254 features namespaces changes to "org.GeoPrisma" for InitialView and GeoExtToolbar widgets.

comment:5 by adube, 13 years ago

Resolution: fixed
Status: newclosed

r1255, instance object of the API renamed from "GeoPrismaAPI" to "GeoPrisma" now that all widgets no longer use it as a namespace prefix.

This completes the task of creating the API widget. All methods it support should from now on be added by the widgets requiring them (in their according tickets).

Done.

comment:6 by adube, 13 years ago

Keywords: bis-1.2.0 added
Note: See TracTickets for help on using tickets.