Apache::Wyrd::Site::WidgetControl - Links that change a Widget's State
<BASENAME::SomeWidget> <BASENAME::Site::WidgetControl attribute="color" value="blue" flags="default"> Try this Widget in BLUE </BASENAME::Site::WidgetControl> <BASENAME::Site::WidgetControl attribute="color" value="green"> Try this Widget in GREEN </BASENAME::Site::WidgetControl> <BASENAME::Site::WidgetControl attribute="color" value="red"> Try this Widget in RED </BASENAME::Site::WidgetControl> </BASENAME::SomeWidget>
A WidgetControl provides controlled access to attributes of a Widget via a self-maintaining set of links. These links provide encoded page-state data via a link to the Apache::Wyrd::Site::Page object of the target of that link. Using this page-state data, an attribute of the Widget in which the WidgetControl is enclosed can indipendently maintain its state from other widgets on the page, while allowing some element of it to be changed for a dynamic purpose, such as changing the sort order of a Pull, or altering the coloration or units of a chart.
To do so, it must return it's enclosed HTML "_data" in the final output, since the WidgetControl objects it encloses will have provided themselves as links in that HTML text.
Which attribute of the enclosing widget is manipulated by this WidgetControl.
The value of that attribute if this Control's link is clicked.
How this Control should look (i.e. the HTML) when waiting to be clicked on, or if just clicked on. In general, it is simpler just to assign a class to the anchor tag and provide this class as an attribute to the WidgetControl.
Designate this WidgetControl out of all others in this widget as the "default" value.
(format: (returns) name (arguments after self))
create the href of the link which will provide the state data. The default is to bundle up all CGI attributes other than _page_state and put in placemarkers for the WidgetControl maintenance data.
Reserves the _setup and _format_output methods.
Barry King <email@example.com>
General-purpose HTML-embeddable perl object
Abstract dynamic element of a Page
Construct and track a page of an integrated site
Copyright 2002-2007 Wyrdwright, Inc. and licensed under the GNU GPL.
See LICENSE under the documentation for