![]() |
![]()
| ![]() |
![]()
NAMEJifty::Web::Form::Clickable - Some item that can be clicked on -- either a button or a link. DESCRIPTIONMETHODSaccessorsClickable adds "url", "escape_label", "continuation", "call", "returns", "submit", and "preserve_state" to the list of accessors and mutators, in addition to those offered by "accessors" in Jifty::Web::Form::Element. new PARAMHASHCreates a new Jifty::Web::Form::Clickable object. Depending on the requirements, it may render as a link or as a button. Possible parameters in the PARAMHASH are:
url [VALUE]Gets or sets the page that the user will end up on after they click the button. Defaults to the current page. label [VALUE]Gets or sets the text on the clickable object. escape_label [VALUE]Gets or sets if the label is escaped. This is only relevant for objects that are rendered as HTML links. The default is true. continuation [VALUE]Gets or sets the current continuation for the link. Defaults to the current continuation now, if there is one. This may be either a Jifty::Continuation object, or the "id" of such. call [VALUE]Gets or sets the continuation to call when the link is clicked. This will happen after actions have run, if any. Like "continuation", this may be a Jifty::Continuation object or the "id" of such. returns [VALUE]Gets or sets the return value mapping from the continuation. See Jifty::Request::Mapper for details. submit [VALUE]Gets or sets the list of actions to run when the object is clicked. This may be an array reference or a single element; each element may either be a moniker or a Jifty::Action. An undefined value submits all actions in the form, an empty list reference (the default) submits none. preserve_state [VALUE]Gets or sets whether state variables are preserved across the link. Defaults to true if there are any AJAX actions on the link, false otherwise. parameter KEY VALUESets the given HTTP parameter named "KEY" to the given "VALUE". state_variable KEY VALUESets the state variable named "KEY" to "VALUE". region_fragment NAME PATHSets the path of the fragment named "NAME" to be "PATH". region_argument NAME ARG VALUESets the value of the "ARG" argument on the fragment named "NAME" to "VALUE". parametersReturns the generic list of HTTP form parameters attached to the link as a hash. Use of this is discouraged in favor or "post_parameters" and "get_parameters". post_parametersReturns the hash of parameters as they would be needed on a POST request. get_parametersReturns the hash of parameters as they would be needed on a GET request. complete_urlReturns the complete GET URL, as it would appear on a link. as_linkReturns the clickable as a Jifty::Web::Form::Link, if possible. Use of this method is discouraged in favor of "generate", which can better determine if a link or a button is more appropriate. as_buttonReturns the clickable as a Jifty::Web::Form::Field::InlineButton, if possible. Use of this method is discouraged in favor of "generate", which can better determine if a link or a button is more appropriate. generateReturns a Jifty::Web::Form::Field::InlineButton or Jifty::Web::Form::Link, whichever is more appropriate given the parameters. register_action ACTIONRegisters the action if it isn't registered already, but only on the link. That is, the registration will not be seen by any other buttons in the form.
|