Status

Wicket Objects provides an implementation of a viewer plugin for the Naked Objects framework. From a functional perspective it is mostly complete; undoubtedly though the presentation could be improved of some of the components.

On my blog there's a list of user stories that NO viewers should implement; the sections below list which stories have been completed, and which are still to do.

User Stories To Do

don't render repositories that are annotated as @Hidden

handle actions returning void

  • render a meaningful view for an action returning void

action argument defaults

  • when bring up action parameter form, default any action arguments if exist, as per default[N]Xxx()

action argument choices

  • in action parameter form, display choices for parameter if exist (as per choices[N]Xxx()]

entity property defaults

  • when bring up entity edit form for newly instantiated entity, default any properties if exist, as per defaultXxx()

entity property choices

  • in entity edit form, display choices for property if exist (as per choicesXxx())

handle actions returning values

  • display “results” (a meaningful view) for an action returning a value

recent references

  • For action parameter form for reference parameters, provide drop-down of recently-used entities of correct type * For entity properties form for reference properties, provide drop-down of recently-used entities of correct type

add/remove from entity collection

  • allow entities to be added to or removed from collection if not @Disabled

validate add/remove from entity collection

  • validate entities being added to or removed from entity collections, as per validateAddToXxx() and validateRemoveFromXxx()

honour @Hidden in tables

  • currently @Hidden properties are still shown in tables

immutable

  • do not allow editing of immutable objects

error handling

  • handle various errors conditions, e.g. optimistic locking

support image properties

  • be able to render * be able to upload them

support video properties

  • be able to render * be able to upload them

support image gallery (of entities)

  • be able to render entities that are Imageable within a gallery

User Stories Completed

bootstrap Naked Objects

  • start the app using the viewer technologies normal mechanism (e.g. from web.xml), but bootstrap Naked Objects in its initialisation

application services

  • provide a representation of application services (as registered via nakedobjects.properties file), e.g. as an icon or a link

application service actions

  • display the actions for application services, e.g. as links or drop-down menu items etc

invoke no-arg action

  • invoke an (application service) action, taking no arguments

display entity summary

  • display the icon and title of an entity * i.e. resultant from invoking an action

display entity properties, read only

  • display the properties of an entity, in read-only mode * just handle basic types (integer, string, date, boolean) initially

display entity collections, read only

  • display each of the collections of an entity, in read-only mode

display actions for an entity

  • render actions available for an entity, e.g. as menu items or links

invoke action on entity

  • invoke a (no-arg) action for entity

display collection of entities, read only

  • i.e. resultant from invoking an action

render action with parameters

  • display form to capture arguments * handle basic types only

invoke action with parameters

  • … and handle results using existing mechanisms

handle contributed actions

  • ensure contributed actions invoked on contributor (application service), not entity * automatically default the contributed entity as an action param

combine infrastructure for action arguments and entity properties

  • they’re basically the same thing… scalars

validate individual action arguments

  • as per validate[N]Xxx() method for argument N

validate all action arguments

  • as per validateXxx() method

display entity for edit

  • editable properties for values

editable references

  • allow property or parameter that references another object to be set * allow property or parameter that references another object to be cleared

entity object-level validation

  • validate object prior to saving, as per validate() method

support all built-in value types

  • remaining built-ins, e.g. java.math.BigDecimal

support any value objects for action parameter or entity property

  • Support all value types (as per @Value annotation), so long as are parseable/encodable

lazy/load entity collections

  • Lazy load entity collections rather than eagerly load

process objects

  • handle actions returning transient objects

deal with multi-threading

  • ensure multi-threading concerns dealt with (e.g. NakedObjectsContext implementation if required)

extensibility

  • allow new renderers for properties, for entities, for values