</td>
            </tr>
            <tr>
                <td>Password:</td>
                <td><?php 
        echo smarty_function_WFPassword(array('id' => 'password'), $this);
        ?>
</td>
            </tr>
            <tr>
                <td colspan="2" align="center"><?php 
        echo smarty_function_WFSubmit(array('id' => 'login'), $this);
        ?>
</td>
            </tr>
        </table>
    <?php 
        $_block_content = ob_get_contents();
        ob_end_clean();
        $_block_repeat = false;
        echo smarty_block_WFForm($this->_tag_stack[count($this->_tag_stack) - 1][1], $_block_content, $this, $_block_repeat);
    }
    array_pop($this->_tag_stack);
} else {
    ?>
    <p><a href="<?php 
    echo smarty_function_WFURL(array('page' => 'doLogout'), $this);
    ?>
">Logout</a></p>
<?php 
}
    if ($this->_sections['skin_i']['total'] == 0) {
        $this->_sections['skin_i']['show'] = false;
    }
} else {
    $this->_sections['skin_i']['total'] = 0;
}
if ($this->_sections['skin_i']['show']) {
    for ($this->_sections['skin_i']['index'] = $this->_sections['skin_i']['start'], $this->_sections['skin_i']['iteration'] = 1; $this->_sections['skin_i']['iteration'] <= $this->_sections['skin_i']['total']; $this->_sections['skin_i']['index'] += $this->_sections['skin_i']['step'], $this->_sections['skin_i']['iteration']++) {
        $this->_sections['skin_i']['rownum'] = $this->_sections['skin_i']['iteration'];
        $this->_sections['skin_i']['index_prev'] = $this->_sections['skin_i']['index'] - $this->_sections['skin_i']['step'];
        $this->_sections['skin_i']['index_next'] = $this->_sections['skin_i']['index'] + $this->_sections['skin_i']['step'];
        $this->_sections['skin_i']['first'] = $this->_sections['skin_i']['iteration'] == 1;
        $this->_sections['skin_i']['last'] = $this->_sections['skin_i']['iteration'] == $this->_sections['skin_i']['total'];
        ?>
    <li><a href="<?php 
        echo smarty_function_WFURL(array('page' => 'previewSkin'), $this);
        ?>
/<?php 
        echo $this->_tpl_vars['currentSkinType'];
        ?>
/<?php 
        echo $this->_tpl_vars['skins'][$this->_sections['skin_i']['index']];
        ?>
"><?php 
        echo $this->_tpl_vars['skins'][$this->_sections['skin_i']['index']];
        ?>
</a></li>
<?php 
    }
}
?>
<pre>
	'myTextField' => array(
		'bindings' => array(
			'value' => array(
				'instanceID' => 'myDataObject',
				'controllerKey' => 'selection',
				'modelKeyPath' => 'author.name',
			),
		),
	),
</pre>

Typically this configuration is setup in the GUI PHOCOA Builder application.</p>
<p>PHOCOA's bindings go beyond simply moving data around between the Model and the View. They also automatically call your data's validation and normalization function (provided by Key-Value Validation) and keep track of the errors found by KVV. More on this <a href="<?php 
echo smarty_function_WFURL(array('module' => "/examples/emailform"), $this);
?>
">here</a>.</p>
<p>Thus, because of the PHOCOA bindings system, most of the glue code normally written to handle moving data between the Model and the View, along with data validation and error handling is instead done simlpy by configuring the application in the PHOCOA Builder tool.
</p>
<p>The bindings can be <b>one-way</b> (read-only), or <b>two-way</b>. One-way bindings read their value from the bound object/property and use it for the value of the widget property. Two-way bindings read their values just like one-way bindings, but also update the value of the bound object/property with the new value from the widget from the UI.</p> 
<p>Some bindings have additional <b>binding options</b> that you can use to modify the values. Some of these options are specific to certain bindings. For instance, you can add an extra choice to select lists via binding options. Others are generic. The generic mechanism used to modify bindings is called a <b>Value Transformer</b> and can be added to any binding. Value Transformers are used to modify the value from the bound object/property without having to write additional code. Built-in value transformers are WFNegateBoolean, WFIsEmpty, WFIsNotEmpty. You can tell by their names that these can be convenient for using an existing model method with a binding that doesn't quite return exactly what you need, but with a Value Transformer, it's perfect, and you don't have to write any additional methods.</p>
<p>Bindings can also be <b>mutli-value</b>, which means that multiple sources can be combined to deliver a single value to the widget. Multi-value bindings are automatically read-only.</p>
<p>All of these topics are explained very well by the <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/index.html" target="_blank">Cocoa documentation on bindings</a>.</p>

<p>The following examples show how the various binding types work, and how to use binding options to get additional functionality out of the bindings mechanism.</p>

<style type="text/css">
<?php 
echo '
.exampleBox {
        $this->_sections['peeps']['index_prev'] = $this->_sections['peeps']['index'] - $this->_sections['peeps']['step'];
        $this->_sections['peeps']['index_next'] = $this->_sections['peeps']['index'] + $this->_sections['peeps']['step'];
        $this->_sections['peeps']['first'] = $this->_sections['peeps']['iteration'] == 1;
        $this->_sections['peeps']['last'] = $this->_sections['peeps']['iteration'] == $this->_sections['peeps']['total'];
        echo smarty_function_WFDynamic(array('id' => 'personInfo'), $this);
        ?>
<br />
<?php 
    }
}
?>

<hr>
<p>Pagination is quite simple with PHOCOA. The WFPaginator class provides an interface to paged, sorted data. The data access is delegated to a class implementing WFPagedData. PHOCOA ships with WFPagedData implementations to provide paging for PHP arrays, Creole queries, and Propel criteria-based queries. It takes only a few minutes to convert any list view to support paging and sorting. Typically you need add only 4-6 lines of code to your module and configure several widgets for the GUI. A variety of widgets are available that provide navigation, current page info, and sort links that provide user interface for the the pagination system. The pagination system is compatible with forms as well, so if the data you're accessing is the result of a form-based query, you can have the pagination system interface with your form (via javascript) to provide paging that works seamlessly with the results of a form submission.</p>
<p>This example uses MODE_URL, which is the non-form mode. <a href="<?php 
echo smarty_function_WFURL(array('page' => 'exampleWithForm'), $this);
?>
">Click here for a MODE_FORM example.</a></p>

<?php 
ob_start();
echo '
{WFPaginatorPageInfo id="pageInfo"}<br />
{WFPaginatorState id="pageNav"}<br />
Sort: {WFView id="pageSort"}<br />
<br />

{section name=peeps loop=$people}
{WFDynamic id="personInfo"}<br />
{/section}
';
        ?>
</a></li>
    <?php 
        if ($this->_sections['themes_i']['last']) {
            ?>
</ul><?php 
        }
    }
} else {
    ?>
    <p>No theme list available for this skin.</p>
<?php 
}
?>
<p>Default theme: <?php 
echo $this->_tpl_vars['skinDefaultTheme'];
?>
</p>
<p>Current theme: <?php 
echo $this->_tpl_vars['skinThemeName'];
?>
</p>
<p>Current Theme Variables:</p>
<pre><?php 
echo $this->_tpl_vars['skinThemeVars'];
?>
</pre>
<p><a href="<?php 
echo smarty_function_WFURL(array('page' => 'skinTypes'), $this);
?>
">Return to skin list.</a></p>
">WFSelect</a></li>
    <li><a href="<?php 
echo smarty_function_WFURL(array('page' => 'jumpSelect'), $this);
?>
">WFJumpSelect</a></li>
    <li><a href="<?php 
echo smarty_function_WFURL(array('page' => 'radios'), $this);
?>
">WFRadioGroup with WFDynamic WFRadio's</a></li>
    <li><a href="<?php 
echo smarty_function_WFURL(array('page' => 'simpleForm'), $this);
?>
">Putting it all together: A simple form with multiple widgets</a></li>
</ul>

<h3>Advanced Features</h3>
<p>Each of these examples is set up as its own stand-alone example module.</p>
<ul>
    <li><a href="<?php 
echo smarty_function_WFURL(array('module' => "/examples/concepts/pagination"), $this);
?>
">Pagination</a></li>
    <li><a href="<?php 
echo smarty_function_WFURL(array('module' => "/examples/concepts/formatters"), $this);
?>
">Formatters</a></li>
    <li><a href="<?php 
echo smarty_function_WFURL(array('module' => "/examples/concepts/bindings"), $this);
?>
">Bindings - Binding Options and Multi-Value Bindings</a></li>
</ul>