Package net.sf.click.control

Provides renderable HTML controls.

See:
          Description

Interface Summary
Decorator Provides a decorator interface for delegating object rendering.
 

Class Summary
AbstractControl Provides a default implementation of the Control interface, to make it easier for developers to implement their own controls.
AbstractLink Provides a Abstract Link control:   <a href=""></a>.
ActionButton Provides a ActionButton control:   <input type="button"/>.
ActionLink Provides a Action Link control:   <a href=""></a>.
Button Provides a Button control:   <input type='button'/>.
Checkbox Provides a Checkbox control:   <input type='checkbox'>.
Column Provides the Column table data <td> and table header <th> renderer.
Column.Comparator Provides a table Column comparator for sorting table rows.
Field Provides an abstract form Field control.
FieldSet Provides a FieldSet container control:   <fieldset>.
FileField Provides a File Field control:   <input type='file'>.
Form Provides a Form control:   <form method='post'>.
HiddenField Provides a Hidden Field control:   <input type='hidden'>.
ImageSubmit Provides an ImageSubmit control:   <input type='image' src='edit.gif'>.
Label Provides a Label display control.
Option Provides a select Option element:   <option></option>.
OptionGroup Provides a select Option Group element:   <optgroup></optgroup>.
PageLink Provides a Page Link control:   <a href="" ></a>.
Panel Provides a Panel control for creating customized layout sections within a page.
PasswordField Provides a Password Field control:   <input type='password'>.
Radio Provides a Radio control:   <input type='radio'>.
RadioGroup Provides a RadioGroup control.
Reset Provides a Reset control:   <input type='reset'>.
Select Provides a Select control:   <select></select>.
Submit Provides a Submit control:   <input type='submit'>.
Table Provides a HTML Table control: <table>.
TextArea Provides a TextArea control:   <textarea></textarea>.
TextField Provides a Text Field control:   <input type='text'>.
 

Package net.sf.click.control Description

Provides renderable HTML controls. Controls implement the Control interface to perform server side request processing. At the top level a Pages controls are processed by the ClickServlet. Some controls can contain child controls which they will inturn process. These container controls include Form, FieldSet, Panel and Table.

Using these controls is similar to traditional Swing GUI programming. While these controls do not provide a full Swing style MVC implementation, they provided a simplified programming model and high performance.

Click Controls provide an event callback mechanism similar the java.awt.ActionListener callback.

public class MyPage extends Page {

    public ActionLink actionLink = new ActionLink();

    public MyPage() {
        actionLink.setListener(this, "onLinkClick");
    }
    
    public boolean onLinkClick() {
        System.out.println("onLinkClick invoked");
        return true;
    }
} 
All call back listener methods must return a boolean value. If they return true the the further processing of other controls and page methods should continue. Otherwise if they return false, then any further processing should be aborted. By returning false you can effectively exit at this point and redirect or forward to another page.