/** Construct a client-side initialisation block. * @param parent The parent container in which this init block is to be placed. * @param ID The ID to be given to this block. * @param functionname The client-side name of the function to be invoked when this block is encountered. * @param arguments An array of arguments to be passed to the client-side function. * Arguments may be of the types: * <ul> * <li> Leaf types - these will be converted to String values by the standard conversion * <li> UIComponents - these will be rendered as their own fullIDs. * <li> ViewParameters - these will be converted to "fragment URLs", suitable for * rendering direct (unportalised) versions of the views they address. * </ul> */ public static UIInitBlock make(UIContainer parent, String ID, String functionname, Object[] arguments) { if (arguments == null || functionname == null) { throw new NullPointerException("Cannot supply null arguments or function name to UIInitBlock"); } UIInitBlock togo = new UIInitBlock(); togo.ID = ID; togo.functionname = functionname; togo.arguments = arguments; parent.addComponent(togo); return togo; }