You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 91 Next »

Error formatting macro: snippet: java.lang.NullPointerException

To create a Model Driven action, implement the ModelDriven interface by adding a model property, or at least the accessor.

public Object getModel() ...

In the implementation of getModel, acquire an instance of a business object and return it.

On the page, you can address any JavaBean properties on the business object as if they were coded directly on the Action class. (The framework pushes the Model object onto the ValueStack.)

Many developers use Spring to acquire the business object. With the addition of a setModel method, the business logic can be injected automatically.

Parameters

Error formatting macro: snippet: java.lang.NullPointerException

Extending the Interceptor

Error formatting macro: snippet: java.lang.NullPointerException

Examples

Error formatting macro: snippet: java.lang.NullPointerException
  • No labels