Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
object:create
Creates an object.
Syntax
<object:create classname="classname of object" name="name of object" [allocate="true|false"] [arg1="argument 1"] [arg2="argument 2"]/> <object:argument name="name" value="value"/> </object:create>Parameters
classname (required)
- Classname of the object to be created.
name (required)
- Name of the object to be created.
allocate (optional)
- When set to
true
, the tag allocates the object, and makes the object ID available before the object is saved to the database.
arg1 (optional)
- Argument 1.
arg2 (optional)
- Argument 2.
Description
This tag creates a new object instance of the implementing class, and saves it in the object pool using the specified name. The implementing class must implement a create method in order for an instance of the implementing class to be constructed. The create method should have one of the following prototypes:
public static IAbstractBase Create(ICS ics)
public static IAbstractBase Create(ICS ics, String sArg1)
public static IAbstractBase Create(ICS ics, String sArg1, String sArg2)
Error Numbers
The possible values of
errno
include:
Value Description -10001 The implementing class is invalid. -10002 There is a missing method for the implementing class. -10003 The method could not be invoked successfully. -10004 A required parameter is missing. -10010 Invalid attribute valueExample
The following example creates an instance of
object1
in memory to be saved in thesample
table.<object:create
classname="com.openmarket.framework.objects.AbstractObject" name="object1" arg1="sample" <object:argument name="name" value="John Doe"/> </object:create>See Also
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.