Clover coverage report - Code Coverage for tapestry release 4.0-beta-12
Coverage timestamp: Sun Oct 30 2005 16:22:01 EST
file stats: LOC: 58   Methods: 0
NCLOC: 7   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
FormComponentContributorContext.java - - - -
coverage
 1    // Copyright 2005 The Apache Software Foundation
 2    //
 3    // Licensed under the Apache License, Version 2.0 (the "License");
 4    // you may not use this file except in compliance with the License.
 5    // You may obtain a copy of the License at
 6    //
 7    // http://www.apache.org/licenses/LICENSE-2.0
 8    //
 9    // Unless required by applicable law or agreed to in writing, software
 10    // distributed under the License is distributed on an "AS IS" BASIS,
 11    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12    // See the License for the specific language governing permissions and
 13    // limitations under the License.
 14   
 15    package org.apache.tapestry.form;
 16   
 17    /**
 18    * Object that provides support to objects that implement
 19    * {@link org.apache.tapestry.form.FormComponentContributor}. For the moment, at least, this is all
 20    * about client-side JavaScript generation.
 21    * <p>
 22    * TODO: Having support for regular expressions might be useful (and would allow a single
 23    * {@link RegexpMatcher to be shared).
 24    *
 25    * @author Howard Lewis Ship
 26    * @since 4.0
 27    */
 28    public interface FormComponentContributorContext extends ValidationMessages
 29    {
 30    /**
 31    * Includes the indicated script; the path is a path on the classpath.
 32    */
 33   
 34    public void includeClasspathScript(String path);
 35   
 36    /**
 37    * Adds initialization to register a submit handler on the client side. A submit handler is a
 38    * JavaScript method that accepts a single parameter, a (JavaScript) FormSubmitEvent.
 39    *
 40    * @param submitListener
 41    * either the name of a submit listener ("myListener"), or an inline implementation
 42    * of a listener function ("function(event) { ... } ").
 43    */
 44   
 45    public void addSubmitHandler(String handler);
 46   
 47    /**
 48    * Registers a field for automatic focus. The goal is for the first field that is in error to
 49    * get focus; failing that, the first required field; failing that, any field.
 50    *
 51    * @param priority
 52    * a priority level used to determine whether the registered field becomes the focus
 53    * field. Constants for this purpose are defined in {@link ValidationConstants}.
 54    * @see org.apache.tapestry.FormBehavior#registerForFocus(IFormComponent, int)
 55    */
 56   
 57    public void registerForFocus(int priority);
 58    }