com.ivata.mask.web.field
Interface FieldWriter

All Known Implementing Classes:
TextAreaFieldWriter, TextFieldWriter, ValueObjectFieldWriter

public interface FieldWriter

Each field writer is responsble for writing out a single field value, given the value object.

Since:
ivata masks 0.4 (2004-05-14)
Version:
$Revision: 1.5 $
Author:
Colin MacLeod colin.macleod@ivata.com

Method Summary
 void removeAttribute(java.lang.String name)
          Clear an attribute on the field tag.
 void setAttribute(java.lang.String name, java.lang.String value)
          Set an attribute on the field tag.
 java.lang.String write(javax.servlet.jsp.PageContext pageContext, com.ivata.mask.valueobject.ValueObject valueObject, boolean displayOnly)
           Write out the appropriate field value, for the value object provided.
 

Method Detail

removeAttribute

public void removeAttribute(java.lang.String name)
Clear an attribute on the field tag. It will no longer appear at all.

Parameters:
name - name of the attribute to clear.

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)
Set an attribute on the field tag.

Parameters:
name - name of the attribute to set.
value - new value to set the attribute to.

write

public java.lang.String write(javax.servlet.jsp.PageContext pageContext,
                              com.ivata.mask.valueobject.ValueObject valueObject,
                              boolean displayOnly)

Write out the appropriate field value, for the value object provided.

Parameters:
pageContext - current tag page context to write with.
valueObject - value object whose field value should be displayed.
displayOnly - if true, only the field value should be shown, otherwise an input field is displayed.
Returns:
appropriate representation of the field value in HTML.


Copyright © 2001-2005 ivata limited. All Rights Reserved.