jacquard 1.12.0 by The Web Engineering Factory and Toolworks

uk.co.weft.htform
Class ActionColumn

java.lang.Object
  extended byuk.co.weft.htform.ResourceConsumerImpl
      extended byuk.co.weft.htform.ActionColumn
All Implemented Interfaces:
ResourceConsumer

public class ActionColumn
extends ResourceConsumerImpl

a column which may be added to a ResultFormatter to allow users to perform actions on individual rows. Each cell in this column will contain a URL which acts on some aspect of the data item represented by the row.

Since:
Jacquard 1.10
Version:
$Revision: 1.1.4.2 $
Author:
Simon Brooke
See Also:
ResultFormatter

Field Summary
protected  java.lang.String label
          my label
protected  java.util.Vector passThrough
          the tokens whose values I pass through in my URL
protected  java.lang.String urlStub
          the stub from which my URL will be built
 
Fields inherited from class uk.co.weft.htform.ResourceConsumerImpl
resourceBundleName
 
Fields inherited from interface uk.co.weft.htform.ResourceConsumer
RESOURCEBUNDLEMAGICTOKEN
 
Constructor Summary
ActionColumn(java.lang.String label, java.lang.String urlStub, java.util.Vector passThrough)
          create an ActionColumn
 
Method Summary
protected  void addPassthrough(java.lang.String token)
          Add a token to my list of passthrough tokens
protected  java.lang.String composeActionURL(Context context, Context row)
          construct the action URL with the correct embedded arguments for this row
 void format(Context context, Context row)
          format this column to the output stream
protected  void setLabel(java.lang.String label)
          set my label to this
protected  void setUrlStub(java.lang.String urlStub)
          set my URL stub to this
 
Methods inherited from class uk.co.weft.htform.ResourceConsumerImpl
getContextOrResource, getResource, getResourceOrContext, getResourceString, grs, grs, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

label

protected java.lang.String label
my label


urlStub

protected java.lang.String urlStub
the stub from which my URL will be built


passThrough

protected java.util.Vector passThrough
the tokens whose values I pass through in my URL

Constructor Detail

ActionColumn

public ActionColumn(java.lang.String label,
                    java.lang.String urlStub,
                    java.util.Vector passThrough)
create an ActionColumn

Method Detail

format

public void format(Context context,
                   Context row)
            throws java.io.IOException
format this column to the output stream

Parameters:
context - the service context
row - the current row
Throws:
java.io.IOException

setLabel

protected void setLabel(java.lang.String label)
set my label to this


setUrlStub

protected void setUrlStub(java.lang.String urlStub)
set my URL stub to this


addPassthrough

protected void addPassthrough(java.lang.String token)
Add a token to my list of passthrough tokens


composeActionURL

protected java.lang.String composeActionURL(Context context,
                                            Context row)
construct the action URL with the correct embedded arguments for this row

Parameters:
context - the context for this service.
row - a Context containing the fields of this row.

jacquard 1.12.0 by The Web Engineering Factory and Toolworks