org.apache.click.extras.tree
Interface CheckboxTree.CheckboxJavascriptRenderer

All Known Implementing Classes:
CheckboxTree.BaseCheckboxJavascriptRenderer, CheckboxTree.CheckboxCookieJavascriptRenderer, CheckboxTree.CheckboxSessionJavascriptRenderer
Enclosing class:
CheckboxTree

protected static interface CheckboxTree.CheckboxJavascriptRenderer

Please note this interface is only meant for developers of this control, not users.

Provides the contract for pluggable javascript renderers, for the CheckboxTree.


Method Summary
 void renderCheckbox(HtmlStringBuffer buffer)
          Called when a tree node's checkbox is rendered.
 void renderSelect(HtmlStringBuffer buffer)
          Called when a tree node's selected state is rendered.
 void renderValue(HtmlStringBuffer buffer)
          Called when a tree node's value is rendered.
 

Method Detail

renderValue

void renderValue(HtmlStringBuffer buffer)
Called when a tree node's value is rendered. Enables the renderer to add attributes needed by javascript functionality for example something like:
      buffer.append("onclick=\"handleNodeSelection(this,event);\"");
 
The code above adds a javascript function call to the element.

The code above is appended to whichever element the tree is currently rendering at the time renderValue is called.

Parameters:
buffer - string buffer containing the markup

renderCheckbox

void renderCheckbox(HtmlStringBuffer buffer)
Called when a tree node's checkbox is rendered. Enables the renderer to add attributes needed by javascript functionality for example:
     buffer.append(" onclick=\"onCheckboxClick(this,event);\"");
 
The code above adds a javascript function call to the element.

The code above is appended to whichever element the tree is currently rendering at the time renderValue is called.

Parameters:
buffer - string buffer containing the markup

renderSelect

void renderSelect(HtmlStringBuffer buffer)
Called when a tree node's selected state is rendered. Enables the renderer to add attributes needed by javascript functionality for example something like:
     buffer.appendAttribute("id", selectId);
 
The code above adds a javascript function call to the element.

The code above is appended to whichever element the tree is currently rendering at the time renderSelect is called.

Parameters:
buffer - string buffer containing the markup