CatalystX::Usul::Plugin::Model::StashHelper - Convenience methods for stuffing the stash


CatalystX-Usul documentation  | view source Contained in the CatalystX-Usul distribution.

Index


Name

Top

CatalystX::Usul::Plugin::Model::StashHelper - Convenience methods for stuffing the stash

Version

Top

0.3.$Revision: 576 $

Synopsis

Top

   package CatalystX::Usul;
   use parent qw(Catalyst::Component CatalystX::Usul::Base);

   package CatalystX::Usul::Model;
   use parent qw(CatalystX::Usul CatalystX::Usul::StashHelper);

   package YourApp::Model::YourModel;
   use parent qw(CatalystX::Usul::Model);

Description

Top

Many convenience methods for stuffing/resetting the stash. The form widget definitions will be replaced later by the form building method which is called from the HTML view

Subroutines/Methods

Top

add_append

Stuff some content into the stash so that it will appear in the append div in the template. The content is a hash ref which will be interpreted as a widget definition by the form builder which is invoked by the HTML view. Multiple calls push the content onto a stack which is rendered in the order in which it was stacked

add_button

Add a button definition to the stash. The template will render these as image buttons on the bbar div

add_buttons

Loop around add_button

add_chooser

Generates the data for the popup chooser window which allows a data value to be selected from a list produced by some query. It is intended as a replacement for a popup menu widget where the list of values would be prohibitively long

add_error

Stringifies the passed error object, localises the text, logs it as an error and calls add_result to display it at the top of the sdata div

add_error_msg

Localises the message text, creates a new error object and calls add_error

add_field

Create a widget definition for a form field

add_header

Stuffs the stash with the data for the page header

add_hidden

Adds a hidden field to the form

add_result

Adds the result of forwarding to an an action. This is the result div in the template

add_result_msg

Localises the message text and calls add_result

add_sidebar_panel

Stuffs the stash with the data necessary to create a panel in the accordion widget on the sidebar

check_field_wrapper

   $model->check_field_wrapper;

Extract parameters from the query and call check_field. Stash the result

clear_append

Clears the stash of the widget data used by the region appended to the main data store

clear_buttons

Clears button data from the stash

clear_controls

Groups the methods that clear the stash of data not used in a minority of pages

clear_form

Initialises the sdata div contents. Called by /stash_content on first use

clear_hidden

Clears the hidden fields from the form

clear_menus

Clears the stash of the main navigation and tools menu data

clear_result

Clears the stash of messages from the output of actions

clear_sidebar

Clears the stash of the data used by the sidebar accordion widget

group_fields

Stashes the data used by HTML::FormWidgets to throw fieldset around a group of fields

open_window

Returns the Javascript fragment that will open a new window in the web browser

search_page

Create a KinoSearch results page

simple_page

Creates a "simple" page from information stored in the configuration files

stash_content

Pushes the content (usually a widget definition) onto the specified stack

stash_form

Calls stash_content specifying the sdata stack

stash_meta

Adds some meta data to the response for an Ajax call

Configuration and Environment

Top

None

Diagnostics

Top

None

Dependencies

Top

CatalystX::Usul
Data::Pageset
Lingua::Flags
Time::Elapsed

Incompatibilities

Top

There are no known incompatibilities in this module.

Bugs and Limitations

Top

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Author

Top

Peter Flanigan, <Support at RoxSoft.co.uk>

License and Copyright

Top


CatalystX-Usul documentation  | view source Contained in the CatalystX-Usul distribution.