SilverStream
Application Server 3.5

com.sssw.shr.page
Class AgpObject

java.lang.Object
 |
 +--com.sssw.shr.page.AgpTag
       |
       +--com.sssw.shr.page.AgpControlBase
             |
             +--com.sssw.shr.page.AgpObject
All Implemented Interfaces:
AgiJavaScriptEnhanced, AgiPageControl, Cloneable, Externalizable, Serializable
Direct Known Subclasses:
AgpActiveObject, AgpApplet

public class AgpObject
extends AgpControlBase

AgpObject is an optionally programmable object which represents an object in the Document Object Model (DOM).

See Also:
Serialized Form

Fields inherited from class com.sssw.shr.page.AgpTag
UNIT_PERCENT, UNIT_PIXEL
 
Constructor Summary
AgpObject()
           
 
Method Summary
 void addParameter(AgpTag tag)
          Adds a parameter.
 AgpTag findParameter(String name)
          Returns the first parameter with the specified name.
 Vector getParameters()
          Returns the parameters of this object.
 String getParameterValue(String name)
          Finds the specified parameter and returns its value.
 void removeParameter(String name)
          Removes the first parameter with the specified name.
 void setParameterValue(String name, String value)
          Sets the value of the specified parameter.
 
Methods inherited from class com.sssw.shr.page.AgpControlBase
getName
 
Methods inherited from class com.sssw.shr.page.AgpTag
getBoolProperty, getEnableHTMLGeneration, getIntArrayProperty, getIntProperty, getIntPropertyUnit, getProperty, getStringArrayProperty, invalidateHTML, removeProperty, setEnableHTMLGeneration, setIntProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods implemented from interface com.sssw.shr.page.AgiJavaScriptEnhanced
generateFunction, generateRepaintScript, generateScriptInitializers, getFunctionNameForMethod, getFunctionNames, getMethodNames, getScriptObjectName, isHTMLRepaintPending, isJavaScriptRepaintPending
 
Methods implemented from interface com.sssw.shr.page.AgiPageControl
generateHTML, getPrefix, notifyPageLoaded, notifyPageRequestBegin, notifyPageRequestEnd, notifyPostValue, notifyPostValues
 
Methods implemented from interface java.io.Externalizable
readExternal, writeExternal
 

Constructor Detail

AgpObject

public AgpObject()
Method Detail

addParameter

public void addParameter(AgpTag tag)
Adds a parameter.
Parameters:
tag - an instance of AgpTag.
Example:

The following code fragment creates a parameter and add it to the object.

 	AgpApplet applet = ...
 	AgpTag param = new AgpTag();
 	param.setTagName("PARAM");
 	param.setProperty("NAME", "MyParam1");
 	param.setProperty("VALUE", "MyValue1");
 	applet.addParameter(tag);
 
See Also:
AgpObject.getParameters(), AgpObject.removeParameter(String name)

getParameters

public Vector getParameters()
Returns the parameters of this object.
Example:

The following code fragment copies the parameters from one object to another.

 	AgpApplet applet1 = ...
 	AgpApplet applet2 = ...
 	applet2.getParameters().removeAllElements();
 	Vector params = applet1.getParameters();
 	for (i = 0; i < n; i++)
 	{
 	    AgpTag param = (AgpTag) params.elementAt(i);
 	    applet2.addParameter((AgpTag) param.cloneControl());
 	}
 
See Also:
AgpObject.addParameter(AgpTag tag), AgpObject.findParameter(String name)

removeParameter

public void removeParameter(String name)
Removes the first parameter with the specified name.
Parameters:
name - a string naming the parameter.
Example:

The following code example removes the specified parameter.

 	applet.removeParameter("MyValue1");
 
See Also:
AgpObject.addParameter(AgpTag tag)

findParameter

public AgpTag findParameter(String name)
Returns the first parameter with the specified name.
Parameters:
name - a string naming the parameter.
Example:

The following code fragment finds the specified parameter and change its value.

 	AgpApplet applet = ...
 	AgpTag param = applet.findParameter("MyParam1");
 	param.setProperty("VALUE", "MyValue2");
 
See Also:
AgpObject.getParameters(), AgpObject.getParameterValue(String name)

getParameterValue

public String getParameterValue(String name)
Finds the specified parameter and returns its value. Returns null if the parameter is not found or the parameter does not define a value.
Parameters:
name - a string naming the parameter.
Example:

The following code example gets the value of the specified parameter.

 	AgpApplet applet = ...
 	String myvalue1 = applet.getParameterValue("MyParam1");
 
See Also:
AgpObject.findParameter(String name)

setParameterValue

public void setParameterValue(String name,
                              String value)
Sets the value of the specified parameter. If the specified parameter is not found, it will be added.
Parameters:
name - a string naming the parameter.
value - a string representing the new value.
Example:

The following code example gets the value of the specified parameter.

 	AgpApplet applet = ...
 	applet.setParameterValue("MyParam1", "MyValue1");
 
See Also:
AgpObject.addParameter(AgpTag tag)

SilverStream
Application Server 3.5