SilverStream
Application Server 3.5

com.sssw.rt.tview
Class AgoColumnForm

java.lang.Object
 |
 +--com.sssw.rt.tview.AgoColumnBase
       |
       +--com.sssw.rt.tview.AgoColumnForm

public class AgoColumnForm
extends AgoColumnBase

AgoColumnForm columns are unbound columns that display an instance of an AgfForm control for each row. They allow you to lay out your components more flexibly. The form code is responsible for moving data between its UI components and the row cursor supplied in the AgiViewForm interface. Such forms should be as lightweight as possible, since one is instantiated for each displayed row.

Considerations

Follow these steps to build an AgoColumnForm:

  1. Create a form to be used in the view’s cell (this is called the cell form.) This form must implement the AgiViewForm interface.
  2. Create a JAR using the SilverStream JAR designer and add the cell form.
  3. Create another form (the base form) with the AgcView control on it.
  4. In the base form, construct a view format that includes an AgoColumnForm.
  5. When you initialize the AgoColumnForm, set its form class to the class name of the cell form
    for example: setForm("com.sssw.gen.forms.ViewCell")
    You must use the fully qualified classname of the form.
  6. Add the JAR file containing the cell form to the base form (using File - JAR Files...).
    You don’t have to add the JAR file to the cell form since the cell form is what is in the JAR file.

See Also:
AgiViewForm, AgoColumnForm.setFormClass(String formclass)

Constructor Summary
AgoColumnForm()
           
 
Method Summary
 String getFormClass()
          Returns the form class associated with this column
 int getHeight()
          Returns the height of the form as it is to be displayed in the view.
 Object getUserData()
          Returns the user supplied data that will be passed to the form.
 void setFormClass(String formclass)
          Sets the form class to be displayed in this column
 void setHeight(int height)
          Sets the height of the form as it is to be displayed in the view.
 void setUserData(Object userData)
          Sets the user-supplied data to be passed to the form.
 
Methods inherited from class com.sssw.rt.tview.AgoColumnBase
getAlignment, getBackgroundColor, getBorderType, getDisplayWidth, getHidden, getResizable, getSelectable, getTransparent, getVisible, getWidth, isWidthFixed, setAlignment, setBackgroundColor, setBorderType, setFixedWidth, setHidden, setProportionalWidth, setProportionalWidth, setResizable, setSelectable, setTransparent, setVisible, setWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgoColumnForm

public AgoColumnForm()
Method Detail

getHeight

public int getHeight()
Returns the height of the form as it is to be displayed in the view.
Usage:
If this has not been set, it defaults to the actual size of the form.
See Also:
AgoColumnForm.setHeight(int height)

setHeight

public void setHeight(int height)
Sets the height of the form as it is to be displayed in the view.
Parameters:
height - the form's height, in pixels
Usage:
If no height is set, it defaults to the actual size of the form.
See Also:
AgoColumnForm.getHeight()

getFormClass

public String getFormClass()
Returns the form class associated with this column
Example:
      String formName = myColumnForm.getFormClass();
See Also:
AgoColumnForm.setFormClass(String formclass)

setFormClass

public void setFormClass(String formclass)
Sets the form class to be displayed in this column
Parameters:
formclass - the fully qualified path name for the form to display. The fully qualified name is always com.sssw.gen.forms.formname
Usage:
This form must reside in the same database and already be compiled.
Example:
     myColumnForm.setForm("com.sssw.gen.forms.myViewForm") 
See Also:
AgoColumnForm.getFormClass()

getUserData

public final Object getUserData()
Returns the user supplied data that will be passed to the form.
See Also:
AgoColumnForm.setUserData(Object userData)

setUserData

public final void setUserData(Object userData)
Sets the user-supplied data to be passed to the form.
Parameters:
userData - an Object representing data to pass to the form
Usage:
The userData is supplied as the second argument to the initViewForm() method of the AgiViewForm interface. (The AgiViewForm interface must be implemented by any form that is being displayed in a view column.) The userData typically contains the names of the properties (in the specified row) with which the various items in the form are to be associated. It can also contain the text for labels and headings on the form. You are free to structure and interprete the userData any way you wish. For example, you might use a HashMap or a Vector.
See Also:
AgoColumnForm.getUserData(), AgiViewForm

SilverStream
Application Server 3.5