The Perl Toolchain Summit 2025 Needs You: You can help 🙏 Learn more

NAME

HTML::GUI::screen - Create and control a whole screen for web application

VERSION

Version 0.01

SCREEN

Manage a screen : it loads its definition with a YAML file and create all the widgets it contains. It can generate javascript code to check constraints on the web page. It can test if constraints of each widget are OK. It can generate the HTML of each widget for use with HTML::Template.

PUBLIC METHODS

new

create a new screen

setProp

Description :
specialized version of widget::setProp for managing
functions associated with the screen

getJscript

Parameters :
Return :
string
Description :
Return the javascript code to enforce the constraints of the widgets (describe each constraint for each widget); this code must be inserted in the header of the HTML page.

getDescriptionDataFromParams

Description:
Retrieve from the http form data the data describing the current screen
Parameters :
params : the hash containing the params retrieve from the HTTP form submit
Return :
a hash ref containing the description data (screen name...)

getDescriptionFieldsHtml

Return :
a string containing the html of the hidden fields containing usefull
data for describing the screen (for example, the name of the screen)
To generate a valid Html document, we insert the the hidden field into
an invisible div.

getHtml

Return :
a string containing the html of the webpage for the screen.

validate Description : Validate all the fields of a screen and store the result of the validation

Return :
return 1 if no field of the screen break no constraint
return 0 if one or more field break constraint

getPubPropHash

Returns :
propHash : hash : a hash containing the value '1' pour each public propertie

executeAction

Parameters :
- $actionFunction : the function to execute
- $session : a hash ref to the session
Description :
Execute the function $actionFunction with the values of the screen
Returns :

processHttpRequest

Parameters :
- $params : hash ref containing the POST data
Description :
- do all the stuff when a user press a buton
Returns :
- the screen to display to the user ; it can be a new one if needed

executeCallBackHandler

Description
- execute the handler whose name is $handlerName on
the $newScreen object if the handle is defined.
When the handler is called, it is called with $params as parameters

getNextScreen

Description :
- determine what is the next screen to display to the user and populate it with the messages and user data
Returns :
- the screen to display to the user ; it can be a new one if needed

setNextScreen

Parameters :
- $path : the path of the next screen
- $params : hash ref containing the optional params to call the next screen (for example imagine the next screen is customer_info and the param is {customer_id => 254412}
- $values : you can specify all the values you want to feed your screen (in the way you get the values from getValueHash() )
Description :
- determine what is the next screen to display to the user and populate it with the messages and user data
Returns :
- the screen to display to the user ; it can be a new one if needed

openDialog

Description :
- define the next dialog to show to the end user. The difference between a dialog and a screen is that a dialog can be closed (like a popup window).
Parameters :
- $path : the path of the next screen
- $params : hash ref containing the optional params to call the next screen (for example imagine the next screen is customer_info and the param is {customer_id => 254412}
- $values : you can specify all the values you want to feed your screen (in the way you get the values from getValueHash() )

closeDialog

Description :
- close the current dialog. MUST only be called on an dialog screen.
Parameters :
- $params : hash ref containing the optional params that will be used as parameters for the dialogCallBack function.

error

Description :
- Specialization of the error function for all generic messages for the end user
parameters :
- $message : the message to display to the end user
Returns :
- nothing

getDefinitionData

This method is the specialisation of the widget.pm method, refer to the widget.pm manual for more information.

AUTHOR

Jean-Christian Hassler, <jhassler at free.fr>

BUGS

Please report any bugs or feature requests to bug-gui-libhtml-screen at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-GUI-widget. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc HTML::GUI::widget

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2007 Jean-Christian Hassler, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.