com.raritantechnologies.eCommerceAdmin
Class DBInputFormRenderer

java.lang.Object
  extended bycom.raritantechnologies.searchApp.taglibrary.BasicSearchFormRenderer
      extended bycom.raritantechnologies.searchApp.taglibrary.BasicInputFormRenderer
          extended bycom.raritantechnologies.eCommerceAdmin.ECommerceInputFormRenderer
              extended bycom.raritantechnologies.eCommerceAdmin.DBInputFormRenderer
All Implemented Interfaces:
IConfigurable, ISearchFormRenderer
Direct Known Subclasses:
AdminDBInputFormRenderer

public class DBInputFormRenderer
extends ECommerceInputFormRenderer

Builds an html input form with a table layout. Field values come from an RTI eCommerce database. Input fields and field types layout also come from database - as opposed to XML configuration like BasicInputFormRenderer.

XML Configuration Template:
   <SearchForm name="DBForm"
           rendererClass="com.raritantechnologies.eCommerceAdmin.DBInputFormRenderer"
           attributes="class='itemTable' width='100%' cellspacing='0'cellpadding='2' align='left'"
           itemTypeField="item_type"
           itemIDField="item_id"
           itemFieldIdQuery="getItemFieldType" 
           itemTypeQuery="getItemTypes" 
           itemFieldDataQuery="getItemFieldTypeValues" 
           itemFieldQueryDelim=";"
           initItemID="true"  >

       <ExcludedFields>
          <Field ID="foo" />  <!-- don't include this field from DB as an Input field -->
       </ExcludedFields>

       <UserPermission name="com.raritantechnologies.security.DBUserPermission" />
       <Form action="somepage.jsp" method="post" submitText="Go" />

       <Field rows="4" cols="30" maxCols="4" fieldClass="medText"
              thClass="labelCell" tdClass="inputCell"
              extraAttribs="onClick='javascript:saveItem()'" />

   </SearchForm>
  


Nested Class Summary
 
Nested classes inherited from class com.raritantechnologies.searchApp.taglibrary.BasicInputFormRenderer
BasicInputFormRenderer.InputFieldBean, BasicInputFormRenderer.SubmitBean
 
Field Summary
 
Fields inherited from class com.raritantechnologies.eCommerceAdmin.ECommerceInputFormRenderer
itemIDField
 
Fields inherited from class com.raritantechnologies.searchApp.taglibrary.BasicInputFormRenderer
attributes, cols, fieldClass, itemType, itemTypeField, maxCols, rows, submitBeans, tableProps, tdClass, thClass, trProps, valueMap, width
 
Fields inherited from class com.raritantechnologies.searchApp.taglibrary.BasicSearchFormRenderer
afterFormData, category, displayStyle, formInitArgs, formMethod, formName, hiddenFieldMap, hiddenFields, includeResetButton, includeSearchForm, includeSubmitButton, initialFields, onSubmitHandler, operatorMap, scriptMap, sourceMapName, submitButtonOnBottom, submitButtonText, submitHandlerName, targetFrame
 
Fields inherited from interface com.raritantechnologies.searchApp.taglibrary.ISearchFormRenderer
CLEAR, PAGE, PAGE_NUM, PAGE_SIZE, RESET, SEARCH
 
Constructor Summary
DBInputFormRenderer()
           
DBInputFormRenderer(java.lang.String itemIDField)
           
 
Method Summary
protected  java.util.List getFields(java.lang.String searchFormName, java.lang.String formCategory, java.lang.String itemType, RaritanPageContext pageContext)
          Reads in the fields from the SearchFieldMap.
protected  java.lang.String getItemID(RaritanPageContext pageContext)
           
protected  java.lang.String getItemType(RaritanPageContext pageContext)
           
 void initialize(org.w3c.dom.Element elem)
          Adds configurable properties to the renderer.
 
Methods inherited from class com.raritantechnologies.eCommerceAdmin.ECommerceInputFormRenderer
getItemIDField, getItemIDField, getItemTypeField, initValueMap, setItemIDField, setItemTypeField
 
Methods inherited from class com.raritantechnologies.searchApp.taglibrary.BasicInputFormRenderer
addToValueMap, createInputFieldBean, getBody, getFormStart, getPopupJScript, noRegularField, processOutputAction
 
Methods inherited from class com.raritantechnologies.searchApp.taglibrary.BasicSearchFormRenderer
addAfterFormData, addFormScript, addHiddenField, addHiddenFields, addPersistentFields, canUpdateSearchParams, getActionURL, getCategory, getFormInitArgs, getFormMethod, getFormName, getFormStart, getFormType, getHiddenFields, getInitialFields, getOnSubmitHandler, getSubmitHandlerName, renderHiddenFields, renderScripts, setFormMethod, setFormName, setFormType, setOnSubmitHandler, setSubmitHandlerName, updateSearchParams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBInputFormRenderer

public DBInputFormRenderer()

DBInputFormRenderer

public DBInputFormRenderer(java.lang.String itemIDField)
Method Detail

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from class: BasicSearchFormRenderer
Adds configurable properties to the renderer.

Specified by:
initialize in interface ISearchFormRenderer
Overrides:
initialize in class ECommerceInputFormRenderer

getFields

protected java.util.List getFields(java.lang.String searchFormName,
                                   java.lang.String formCategory,
                                   java.lang.String itemType,
                                   RaritanPageContext pageContext)
Description copied from class: BasicInputFormRenderer
Reads in the fields from the SearchFieldMap.

Overrides:
getFields in class BasicInputFormRenderer

getItemID

protected java.lang.String getItemID(RaritanPageContext pageContext)
Overrides:
getItemID in class ECommerceInputFormRenderer

getItemType

protected java.lang.String getItemType(RaritanPageContext pageContext)
Overrides:
getItemType in class BasicInputFormRenderer