Name
CatalystX::Usul::Plugin::Controller::ModelHelper - Convenience methods for common model calls
Version
0.1.$Revision: 440 $
Synopsis
package CatalystX::Usul;
use parent qw(Catalyst::Component CatalystX::Usul::Base);
package CatalystX::Usul::Controller;
use parent qw(CatalystX::Usul
CatalystX::Usul::ModelHelper
Catalyst::Controller);
package YourApp::Controller::YourController;
use parent qw(CatalystX::Usul::Controller);
Description
Many convenience methods for common model calls
Subroutines/Methods
add_result
Add a message to the results div
add_sidebar_panel
Calls method of the same name in the base model class to stuff the stash with the data necessary to create a panel in the accordion widget on the sidebar
check_field
Creates an XML response to and Ajax call which validates a data value for a given form field. Calls "check_field" in CatalystX::Usul::Model
close_footer
Forces the footer to not be displayed when the page is rendered
close_sidebar
Forces the sidebar to not be displayed when the page is rendered
common
Sets stash values for the navigation menus, tools menus, the footer, quick links and recovers the keys for the current form from the session store
Calls add_header
Calls add_footer
Calls add_main_menu. This is the main navigation menu
Calls add_quick_links. Quick links appear in the header and are selected from the rooms config items if the quick_link element is set. It's numeric value determines the sort order of the links
Calls add_tools_menu
default
Generates a simple page not found page. No longer called as unknown pages cause a redirect to the controllers default page
help
Generates a context sensitive help page by calling get_help
open_footer
Sets the key/value pair in the browser state cookie that will cause the footer to appear in the generated page
open_sidebar
Sets the key/value pair in the browser state cookie that will cause the sidebar to appear in the generated page
overview
Generates some blurb for the Overview panel of the sidebar accordion widget
query_array
Exposes the method of the same name in the base model class
query_value
Exposes the method of the same name in the base model class
select_sidebar_panel
Set the cookie that controls which sidebar panel is visible
set_popup
Sets the popup flag to stop the browser from caching the window size in the browser state cookie. Clears the main navigation menu and adds a close window link
Diagnostics
None
Configuration and Environment
None
Dependencies
Incompatibilities
There are no known incompatibilities in this module
Bugs and Limitations
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Author
Peter Flanigan, <Support at RoxSoft.co.uk>
License and Copyright
Copyright (c) 2008 Pete Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE