Control
s are used to specify certain update and render logic for a {@link Spatial}.
@author Kirill Vainer
Control
object is used to control some media processing functions. The set of operations are usually functionally related. Thus a Control
object provides a logical grouping of media processing functions. Control
s are obtained from Controllable
. The Player
interface extends Controllable
. Therefore a Player
implementation can use the Control
interface to extend its media processing functions. For example, a Player
can expose a VolumeControl
to allow the volume level to be set.
Multiple Control
s can be implemented by the same object. For example, an object can implement both VolumeControl
and ToneControl
. In this case, the object can be used for controlling both the volume and tone generation.
The javax.microedition.media.control
package specifies a set of pre-defined Control
s.
@see Controllable
@see Player
The LDAPv3 protocol uses controls to send and receive additional data to affect the behavior of predefined operations. Controls can be sent along with any LDAP operation to the server. These are referred to as request controls. For example, a "sort" control can be sent with an LDAP search operation to request that the results be returned in a particular order. Solicited and unsolicited controls can also be returned with responses from the server. Such controls are referred to as response controls. For example, an LDAP server might define a special control to return change notifications.
This interface is used to represent both request and response controls. @author Rosanna Lee @author Scott Seligman @author Vincent Ryan @see ControlFactory @since 1.3
Represents an Atom Publishing Protocol control
element.
The purpose of the control extension is to provide a means for content publishers to embed various publishing-operation specific control parameters within the body of the entry. For instance, the client may wish to mark the entry as a draft, or may wish to ask the publishing server to enable or disable specific extended features for a given entry.
Per APP Draft-08:
pubControl = element pub:control { atomCommonAttributes, pubDraft? & extensionElement } pubDraft = element pub:draft { "yes" | "no" } The "pub:control" element MAY appear as a child of an "atom:entry" which is being created or updated via the Atom Publishing Protocol. The "pub:control" element, if it does appear in an entry, MUST only appear at most one time. The "pub:control" element is considered foreign markup as defined in Section 6 of [RFC4287]. The "pub:control" element and its child elements MAY be included in Atom Feed or Entry Documents. The "pub:control" element MAY contain exactly one "pub:draft" element as defined here, and MAY contain zero or more extension elements as outlined in Section 6 of [RFC4287]. Both clients and servers MUST ignore foreign markup present in the pub:control element.
public class CustomField extends TextField { protected static final String HTML_IMPORT = "<script type=\"text/javascript\" src=\"{0}/click/custom.js\"></script>\n"; public String getHtmlImports() { String[] args = { getContext().getRequest().getContextPath() }; return MessageFormat.format(HTML_IMPORTS, args); } .. }Please note multiple import lines should be separated by a '\n' char, as the {@link org.apache.click.util.PageImports} will parse multiple import lineson the '\n' char and ensure that imports are not included twice.
public class CustomField extends TextField { .. public void onDeploy(ServletContext servletContext) { ClickUtils.deployFile (servletContext, "/com/mycorp/control/custom.js", "click"); } }Controls using the onDeploy() method must be registered in the application WEB-INF/click.xml for them to be invoked. For example:
<click-app> <pages package="com.mycorp.page" automapping="true"/> <controls> <control classname="com.mycorp.control.CustomField"/> </controls> </click-app>
When the Click application starts up it will deploy any control elements defined in the following files in sequential order: Control ::= SEQUENCE { controlType LDAPOID, criticality BOOLEAN DEFAULT FALSE, controlValue OCTET STRING OPTIONAL }@author Apache Directory Project @version $Rev$, $Date$
Control ::= SEQUENCE { controlType LDAPOID, criticality BOOLEAN DEFAULT FALSE, controlValue OCTET STRING OPTIONAL }@author Apache Directory Project @version $Rev$, $Date$
|
|
|
|