com.primix.tapestry.html
Class InsertText

java.lang.Object
  |
  +--com.primix.tapestry.AbstractComponent
        |
        +--com.primix.tapestry.html.InsertText
All Implemented Interfaces:
IComponent, IRender

public class InsertText
extends AbstractComponent

Inserts formatted text (possibly collected using a Text component. To maintain the line breaks provided originally, this component will break the input into individual lines and insert additional HTML to make each line seperate.

This can be down more simply, using the <pre> HTML element, but that usually renders the text in a non-proportional font.
Parameter Type Read / Write Required Default Description
text String R no   The text to be inserted. If not provided, no output is written
mode InsertTextMode R no InsertTextMode.BREAK Defines how each line will be emitted.

Informal parameters are not allowed. The component must not have a body.

Version:
$Id: InsertText.java,v 1.6 2001/05/02 14:15:16 hship Exp $
Author:
Howard Ship

Fields inherited from class com.primix.tapestry.AbstractComponent
id, page, specification, wrapped, wrappedCount
 
Constructor Summary
InsertText()
           
 
Method Summary
 IBinding getModeBinding()
           
 IBinding getTextBinding()
           
 void render(IResponseWriter writer, IRequestCycle cycle)
          The principal rendering/rewinding method.
 void setModeBinding(IBinding value)
           
 void setTextBinding(IBinding value)
           
 
Methods inherited from class com.primix.tapestry.AbstractComponent
addAsset, addComponent, addWrapped, cleanupAfterRender, cleanupComponent, finishLoad, finishLoad, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, generateAttributes, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getChangeObserver, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getPage, getSpecification, prepareForRender, renderWrapped, reset, setBinding, setContainer, setId, setPage, setSpecification, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InsertText

public InsertText()
Method Detail

getTextBinding

public IBinding getTextBinding()

setTextBinding

public void setTextBinding(IBinding value)

getModeBinding

public IBinding getModeBinding()

setModeBinding

public void setModeBinding(IBinding value)

render

public void render(IResponseWriter writer,
                   IRequestCycle cycle)
            throws RequestCycleException
Description copied from interface: IRender
The principal rendering/rewinding method. This will cause the receiving component to render its top level elements (HTML text and components).

Renderring and rewinding are the exact same process. The same code that renders must be able to restore state by going through the exact same operations (even though the output is discarded).