Expresso 5-6

com.jcorporate.expresso.services.controller.ui
Class CacheAutoElement

java.lang.Object
  extended bycom.jcorporate.expresso.services.controller.ui.DefaultAutoElement
      extended bycom.jcorporate.expresso.services.controller.ui.CacheAutoElement
All Implemented Interfaces:
AutoControllerElement

public class CacheAutoElement
extends DefaultAutoElement

implementation of the AutoController Element which also uses Form Cache to set object values during creation phase. This is appropriate for times when, after an error, user's typing should be preserved

Since:
Expresso 5.3
Author:
Larry Hamel

Field Summary
 
Fields inherited from class com.jcorporate.expresso.services.controller.ui.DefaultAutoElement
BLOCK_TITLE, CLASS_HANDLER_NAME, DBOBJECT_LABEL, DEFAULT_CLASS_HANDLER, DEFAULT_STYLE, ERROR_STYLE, log, REQUIRED_STYLE, SESSION_KEY, theDefault
 
Constructor Summary
CacheAutoElement()
           
 
Method Summary
protected  void retrieveCachedValueInForm(ControllerResponse response, String oneFieldName, Input i)
          Used to set values in created db objects to the values found (if any) in the form cache.
 
Methods inherited from class com.jcorporate.expresso.services.controller.ui.DefaultAutoElement
createDBObjectBlock, createDBObjectBlock, displayValue, displayValue, getAutoControllerElement, getErrorStyle, getNormalStyle, getRequiredDecorator, getRequiredStyle, parseBlock, parseBlocks, parseDBObject, parseDBObject, parseSingleInput, renderDBObjectField, renderReadOnlyInput, renderReadWriteBlob, renderReadWriteInput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheAutoElement

public CacheAutoElement()
Method Detail

retrieveCachedValueInForm

protected void retrieveCachedValueInForm(ControllerResponse response,
                                         String oneFieldName,
                                         Input i)
                                  throws ControllerException
Used to set values in created db objects to the values found (if any) in the form cache. (the form cache is what people type into an HTML form, and if there is an error, we cache those values in order to send back the form (with error message) and have their typing preserved for the next try.)

we override this method to have dbobjects get the value form cache.

Overrides:
retrieveCachedValueInForm in class DefaultAutoElement
Parameters:
i - the Input to retrieve from.
oneFieldName - the dataobject field name
response - the ControllerResponse.
Throws:
ControllerException
See Also:
CacheAutoElement

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.