SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 310 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

We will start with the easiest??”we will look at how to implement a
published-state filter.
Rendering Output
[ 232 ]
We can use the grid.state type to easily render a published state drop-down
selection box. Unlike previous examples, we'll use the type in the JView class's
display() method. This example demonstrates how we can implement this:
// prepare list array
$lists = array();
// get the user-state of the published filter
$filter_state = $mainframe->getUserStateFromRequest(
>$option.'filter_state',
'filter_state');
// set the table filter values
$lists['state'] = JHTML::_('grid.state', $filter_state);
// add the lists array to the object
$this->assignRef('lists', $lists);
We use the application getUserStateFromRequest() method to determine the
current published state filter value, using the path $option plus filter_state. The
default value is a null string, which indicates that no selection has been made.
Once we have the published state filter value, we use the grid.state type to render
a drop-down list form control with the available published state properties.


Pages:
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6