java.lang.Object | +--DataEntryWidget | +--com.ibm.commerce.pa.widget.DynamicForm
This class renders a form of form elements. It is used to render the data entry form for the ProductExploreDataBean.
Field Summary | |
---|---|
protected
int |
columns |
protected
int |
rows |
Constructor Summary | |
---|---|
DynamicForm() DynamicForm constructor. |
Method Summary | |
---|---|
protected
int |
calculateNumberOfRows(int max, int cols) This method will calculate the numer of rows given the number of columns and the maximum data elements. |
int |
getColumns() This method will return the number of columns in the table. |
int |
getRows() This method will return the number of rows in the table. |
void |
render(HttpServletRequest request,
HttpServletResponse response) This method renders the form. |
protected
void |
renderHorizontalTable(HttpServletRequest request,
HttpServletResponse response,
FormDataBean table) This method will output the table with products as rows and features as columns |
protected
void |
renderVerticalTable(HttpServletRequest request,
HttpServletResponse response,
FormDataBean table) This method will output the table with features as rows and products as columns |
void |
setColumns(int newValue) Set the number of columns in the form. |
void |
setColumns(java.lang.String newValue) Set the number of columns using a String of the numeric value. |
void |
setRows(int newValue) Set the number of rows in the form. |
java.lang.String |
writeAllValues(
ColumnDataBean row) This method renders the feature values for the row passed in. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait |
Field Detail |
---|
protected int columns
protected int rows
Constructor Detail |
---|
public DynamicForm()
Method Detail |
---|
protected int calculateNumberOfRows(int max, int cols)
max
- int the maximum number of data elementscols
- int the number of columns you wantpublic int getColumns()
public int getRows()
public void render(HttpServletRequest request, HttpServletResponse response)
protected void renderHorizontalTable(HttpServletRequest request, HttpServletResponse response, FormDataBean table) throws java.io.IOException
table
- com.ibm.commerce.beans.TableDataBean the table to
renderjava.io.IOException
protected void renderVerticalTable(HttpServletRequest request, HttpServletResponse response, FormDataBean table) throws java.io.IOException
table
- com.ibm.commerce.beans.TableDataBean the table to
renderjava.io.IOException
public void setColumns(int newValue)
newValue
- intpublic void setColumns(java.lang.String newValue)
newValue
- java.lang.Stringpublic void setRows(int newValue)
newValue
- intpublic java.lang.String writeAllValues(ColumnDataBean row)