WebLogic Platform 8.1 Custom Controls are generally composed of two files: JCS files and java files. JCS is the meaning of Java Control Source, representative source files, implement custom controls; Java file representative
The control can be called interface. For example:
1) JCS file code is as follows package verifyFunds.poUtil; import java.util.StringTokenizer; / ** * Provides a number formatting utility function for the * VerifyFunds sample control * Author Description:. WebLogic Platform 8.1 defines a number of JAVADOC, facilitate our Development and deployment * @JCS: JC-jar label = "poutil" * @ editor-info: code-gen control-interface = "true" * /// Author Description: JCS file defaults to "IMPL" after the Java file suffix, POUtil.java JCS is implemented to implement the interface // JCS com.bea.control.ControlSource interfaces public class POUtilImpl implements POUtil, com.bea.control.ControlSource {/ ** * Formats a purchase order number, removing * Non-Numeric Characters. * The following is the specific functional implementation, if you are not interested, you can use * @common: Operation * / public int formatNumber (StringBuffer Delimiters = new stringbuffer ();
For (int i = 0; I
'9') Delimiters.Append (StringNumber.Charat (i));
StringTokenizer tokens = New StringTokenizer (StringNumber,
delimiters.toString ()); StringBuffer cleanString = new StringBuffer (); while (tokens.hasMoreTokens ()) {cleanString.append (tokens.nextToken ());}. int number = new Integer (cleanString.toString ()) intValue (); Return Number;}} javadoc Note @COMMON: Operation indicates that this method belongs to a part of the public interface. When this comment occurs
WebLogic Workshop will include this method in the public interface listed in .java. In the design view,
This comment is represented by blue arrow icon.
2) The Java file code is as follows. Package VerifyFunds.Poutil;
Import com.bea.control.control; // interface inherits com.bea.control.controlpublic interface poutil extends control {/ ** * Formats a purchase Order Number, Removing Non-Numeric Characters. * / / Corresponding to JCS file @Common: Operation Method Int formatNumber (Java.lang.String StringNumber);} WebLogic Workshop provides a good interface that allows us to develop and understand in a graphic way, or quite good.