com.stellent.cis.web.input
Interface IFormInputConverter


public interface IFormInputConverter

Interface that represents a converter to migrate data from an input form to a particular data type.


Method Summary
 java.lang.Object convertInput(javax.servlet.http.HttpServletRequest request, MultipartElement element)
          Convert the input to the appropiate data type
 java.lang.Object convertInput(javax.servlet.http.HttpServletRequest request, java.lang.String name, java.lang.String value)
          Convert the input to the appropiate data type
 java.lang.String getJspPage()
           
 void renderFieldInput(ICommandField field, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Render the JSP to create the input for the given field
 

Method Detail

renderFieldInput

void renderFieldInput(ICommandField field,
                      javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Render the JSP to create the input for the given field

Parameters:
field - the field to render
request - the current servlet request
response - the current servlet response
Throws:
javax.servlet.ServletException
java.io.IOException

getJspPage

java.lang.String getJspPage()
Returns:
the full path to the JSP page that will render the input

convertInput

java.lang.Object convertInput(javax.servlet.http.HttpServletRequest request,
                              java.lang.String name,
                              java.lang.String value)
                              throws javax.servlet.ServletException
Convert the input to the appropiate data type

Parameters:
request - the current request
name - the name of the parameter
value - the value as retrieved from the request object
Returns:
the converted value
Throws:
javax.servlet.ServletException

convertInput

java.lang.Object convertInput(javax.servlet.http.HttpServletRequest request,
                              MultipartElement element)
                              throws javax.servlet.ServletException
Convert the input to the appropiate data type

Parameters:
request - the current request
element - the multipart element if this is a multipart post
Returns:
the converted value
Throws:
javax.servlet.ServletException