com.oktiva.mogno.additional
Class Template

java.lang.Object
  extended bycom.oktiva.mogno.Component
      extended bycom.oktiva.mogno.Visual
          extended bycom.oktiva.mogno.additional.Template
All Implemented Interfaces:
java.lang.Cloneable

public class Template
extends Visual

Template - Component for adding free text

This component will be used to insert free text inside your web page. It will substitute text enclosed by [# and #] with the key setted in the vars Hashtable.

Version:
$Id: Template.java,v 1.1.1.1 2005/01/05 16:53:02 ruoso Exp $
Author:
Itamar Carvalho <itamar@oktiva.com.br> and others.
See Also:
ITemplate

Field Summary
 java.lang.String evOnLoad
          Event dispatched when this frame is loaded.
 java.lang.String source
          This property indicates the full path to the source file to be printed or if the type is string, the code itself.
 java.lang.String type
          file or string.
protected  java.util.Hashtable vars
          This property contains the variables to be substituted.
 
Fields inherited from class com.oktiva.mogno.Visual
evOnShow, evOnSyntaxError, gridHeight, gridWeightX, gridWeightY, gridWidth, id, lastError, left, parent, problematic, style, styleClass, title, top
 
Fields inherited from class com.oktiva.mogno.Component
bag, componentFiler, componentFilerParams, designing, eventQueue, evOnCreate, name, owned, ownedClasses, owner, tag, xmlFileName
 
Constructor Summary
Template()
           
 
Method Summary
 java.lang.String getEvOnLoad()
           
 java.lang.String getSource()
           
 java.lang.String getType()
           
 void receiveRequest(javax.servlet.http.HttpServletRequest request)
          Receive the request and rebuild the properties using the data that the user has filled in.
 void setEvOnLoad(java.lang.String evOnLoad)
           
 void setSource(java.lang.String source)
           
 void setType(java.lang.String type)
           
 void setVars(java.util.Hashtable vars)
          Define the variables that will be used for substitution in the template.
 java.lang.String show()
          Fills in the template and return it.
 
Methods inherited from class com.oktiva.mogno.Visual
buildHtmlAttributes, cellhalignHtmlAttributes, cellvalignHtmlAttributes, checkSyntax, coreHtmlAttributes, descendentOf, eventsHtmlAttributes, getEvOnShow, getEvOnSyntaxError, getGridHeight, getGridWeightX, getGridWeightY, getGridWidth, getId, getLastError, getLeft, getParent, getStyle, getStyleClass, getTitle, getTop, htmlAttributes, i18nHtmlAttributes, localizableAttributes, setEvOnShow, setEvOnSyntaxError, setGridHeight, setGridWeightX, setGridWeightY, setGridWidth, setId, setLastError, setLeft, setParent, setStyle, setStyleClass, setTitle, setTop, showHtmlAttributes
 
Methods inherited from class com.oktiva.mogno.Component
attribsHash, createOwnedComponents, dispatch, dispatchAll, dispatchFunction, eventParamTypes, eventParamValues, freeChild, getApplication, getAttrsTypes, getBag, getChild, getChildClass, getClone, getEvOnCreate, getFromBag, getName, getOrderedChildNames, getOwner, initialize, initialize, initialize, initialize, isDesigning, listChilds, nonAttributeGetters, putInBag, queue, registerChild, removeFromBag, serializedBag, setBag, setComponentFiler, setComponentFilerParams, setDesigning, setEvOnCreate, setName, setOwner, setProperties, store, unserializeBag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

public java.lang.String type
file or string. If type is file, it will try to open the source and use it. Else it will print the source.
Default is string.


source

public java.lang.String source
This property indicates the full path to the source file to be printed or if the type is string, the code itself.


vars

protected java.util.Hashtable vars
This property contains the variables to be substituted.


evOnLoad

public java.lang.String evOnLoad
Event dispatched when this frame is loaded.

Constructor Detail

Template

public Template()
Method Detail

getType

public java.lang.String getType()

setType

public void setType(java.lang.String type)

getSource

public java.lang.String getSource()

setSource

public void setSource(java.lang.String source)

getEvOnLoad

public java.lang.String getEvOnLoad()

setEvOnLoad

public void setEvOnLoad(java.lang.String evOnLoad)

receiveRequest

public void receiveRequest(javax.servlet.http.HttpServletRequest request)
Description copied from class: Visual
Receive the request and rebuild the properties using the data that the user has filled in. This is a stub method

Overrides:
receiveRequest in class Visual
Parameters:
request - HttpServletRequest

show

public java.lang.String show()
                      throws java.lang.Exception
Fills in the template and return it.

Overrides:
show in class Visual
Throws:
java.lang.Exception

setVars

public void setVars(java.util.Hashtable vars)
Define the variables that will be used for substitution in the template.