Package org.apache.click

Examples of org.apache.click.ActionListener


        if(form.isFormSubmission() && !submit.isClicked()) {
            form.setValidate(false);
            addModel("msg", "Validation is bypassed");
        }

        submit.setActionListener(new ActionListener() {
            private static final long serialVersionUID = 1L;

            public boolean onAction(Control source) {
                if (form.isValid()) {
                addModel("msg", "Form is valid after validation");
View Full Code Here


        fieldSet.add(investmentSelect);

        fieldSet.add(toggle);

        fieldSet.add(submit);
        submit.setActionListener(new ActionListener() {

            public boolean onAction(Control source) {

                if (form.isValid()) {
                    // Copy field values to customer
View Full Code Here

    public LinkListPage() {
        for (int i = 0; i < 3; i++) {

            ActionLink link = new ActionLink("link" + i);
            link.setActionListener(new ActionListener() {

                public boolean onAction(Control source) {
                    msg = "ControlListenerListPage#" + source.getName()
                        + " object method <tt>onLinkClick()</tt> invoked.";
View Full Code Here

        super.onInit();

        // Restore the table sort and paging state from the session
        table.restoreState(getContext());

        table.getControlLink().setActionListener(new ActionListener() {

            public boolean onAction(Control source) {
                // Save Table sort and paging state between requests.
                // NOTE: we set the listener on the table's Link control which is invoked
                // when the Link is clicked, such as when paging or sorting.
View Full Code Here

        panel2.add(form);

        final TextField field = new TextField("name", "Enter your name");
        form.add(field);
        Submit submit = new Submit("go");
        submit.setActionListener(new ActionListener() {

            public boolean onAction(Control source) {
                addModel("msg", "Hi " + field.getValue() + ". Your form has been saved!");
                return true;
            }
        });

        form.add(submit);
       
        panel2.setLabel("The Second Panel");
        tabbedPanel.add(panel2);

        Panel panel3 = new Panel("panel3", "panel/tabbed/table-panel3.htm");
        Table table = new Table("table");
        table = new Table("table");

        table.setClass(Table.CLASS_ITS);

        table.addColumn(new Column("id"));
        table.addColumn(new Column("name"));
        table.addColumn(new Column("email"));
        table.addColumn(new Column("investments"));
        table.setPageSize(5);
        table.setSortable(true);

        List list = customerService.getCustomersSortedByName(100);
        table.setRowList(list);

        panel3.add(table);

        tabbedPanel.add(panel3);

        // NOTE: Save the TabbedPanel state when a new panel is activated.
        // Register a listener that is notified when a different panel is selected.
        tabbedPanel.setTabListener(new ActionListener() {
            public boolean onAction(Control source) {
                // Save the TabbedPanel state to the session
                tabbedPanel.saveState(getContext());
                return true;
            }
View Full Code Here

        // Restore form and table state from the session
        form.restoreState(context);
        table.restoreState(context);

        table.getControlLink().setActionListener(new ActionListener() {
            public boolean onAction(Control source) {
                // Save Table sort and paging state between requests.
                // NOTE: we set the listener on the table's Link control which is invoked
                // when the Link is clicked, such as when paging or sorting.
                // This ensures the table state is only saved when the state changes, and
View Full Code Here

 
  public void onInit() {
    super.onInit();
    addControl(createSchema);
   
    createSchema.setActionListener(new ActionListener() {

      @Override
      public boolean onAction(Control source) {
        try {
          JdbcConnectionSource connectionSource =
View Full Code Here

    public boolean onProcess() {
        getExpandLink().onProcess();
        getSelectLink().onProcess();
        bindRequestValue();

        ActionEventDispatcher.dispatchActionEvent(this, new ActionListener() {
            private static final long serialVersionUID = 1L;

            public boolean onAction(Control source) {
                return postProcess();
            }
View Full Code Here

        TabbedPanel tabbedPanel = new TabbedPanel("tabbedPanel");
        tabbedPanel.add(new Panel("panel1"));
        tabbedPanel.add(new Panel("panel2"));

        tabbedPanel.setTabListener(new ActionListener() {
            private static final long serialVersionUID = 1L;

            public boolean onAction(Control source) {
                return false;
            }
View Full Code Here

     *
     * @return the control's action listener
     */
    public ActionListener getActionListener() {
        if (actionListener == null && listener != null && listenerMethod != null) {
            actionListener = new ActionListener() {

                private static final long serialVersionUID = 1L;

                public boolean onAction(Control source) {
                    return ClickUtils.invokeListener(listener, listenerMethod);
View Full Code Here

TOP

Related Classes of org.apache.click.ActionListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.