Solstice::Controller - A virtual superclass for constructing Solstice controllers.


Solstice documentation  | view source Contained in the Solstice distribution.

Index


NAME

Top

Solstice::Controller - A virtual superclass for constructing Solstice controllers.

SYNOPSIS

Top

  package MyApp::Controller;

  use Solstice::Controller;

  our @ISA = qw(Solstice::Controller);

DESCRIPTION

Top

This is a virtual class for creating Solstice controller classes. This class should never be instantiated as an object, rather, it should always be sub-classed. This particular implementation uses Solstice::CGI to handle events by the user.

Export

No symbols exported.

Methods

new()

Creates a new Solstice::Controller object.

build
validPreConditions()
freshen()
update()
validate()
commit()
revert()
setModel($model)

Set the data model that this controller controls.

getModel()

Get the data model that this controller controls.

setSuccessView($view)

Set the success view that this controller controls.

getStartingView()

This gets the first view that a controller produces, like the form that the controller will then manage. Must by subclassed.

setErrorView($view)

Set the error view for this controller.

getErrorView()

Get the error view for this controller.

getChildView($key)

Returns a view object for the child controller of a given key.

getChildViews($key)

Returns an array ref of view objects for all of the child controllers of a given key.

setError($error)

Sets an error object for placement into the views

getError()

Gets the error object for this controller.

getErrMsgs()

Get the error messages for this controller.

checkForm($profile)

This method takes a form profile to be passed to Data::FormValidator, and returns a Data::FormValidator::Results object.

createParam('param_name')

Adds a new param to be validated. This is required by default.

createRequiredParam('param_name')

Adds a new param to be validated. Requires user input.

createOptionalParam('param_name');

Adds a new param to be validated. Does not require user input.

createGroupDependency({ dependency_name => 'name', require => $count, fields => [ $field1, $field2] });

Allows the use of require_some...

processConstraints()

Takes all of the constraints added to a controller, transforms them into a hash for Data::FormValidator.

setInputName($location_name)
getInputName()
setOutputName($location_name)
getOutputName()
getInputObject()
getOutputObject()
setInputObject($object)
setOutputObject($object)
createChildControllerList( 'loop_name', 'var_name' )
addChildController($key,( $controller || \@controllers) )
getChildController($key)
getChildControllers($key)

returns a reference to an array of 'em.

clearChildControllers($key)
validateChildren($key)
updateChildren($key)
revertChildren($key)
commitChildren($key)
validPreConditionsChildren($key)
freshenChildren($key)
getDateTimeController($model)

Return the preferred Solstice datetime controller, or a fallback.

getRichTextController($model)

Return the preferred Solstice rich-text controller, or a fallback.

Private Methods

_initErrMsgs()

Initialize the error messages for this controller.

Modules Used

Solstice::Service, Solstice::LogService, Solstice::UserService, Solstice::ValidationParam, Solstice::CGI, Solstice::CGI::FormError, Data::FormValidator.

AUTHOR

Top

Catalyst Group, <catalyst@u.washington.edu>

VERSION

Top

Version $Revision: 3365 $

COPYRIGHT

Top


Solstice documentation  | view source Contained in the Solstice distribution.