Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.content.form
Class NoteForm  view NoteForm download NoteForm.java

java.lang.Object
  extended byorg.apache.struts.action.ActionForm
      extended bycom.RuntimeCollective.webapps.form.EntityBeanForm
          extended bycom.RuntimeCollective.content.form.NoteForm
All Implemented Interfaces:
java.io.Serializable

public class NoteForm
extends com.RuntimeCollective.webapps.form.EntityBeanForm

A form to link a new Note (TextComponent) to a given EntityBean. This uses the role given, and links from the annoted bean to the note.

Works hands in hands with NoteAction.

Version:
$Id: NoteForm.java,v 1.3 2003/09/30 15:12:46 joe Exp $

Field Summary
 int annotedId
          The bean id.
 java.lang.String returnPage
          The return url.
 java.lang.String role
          The role.
 java.lang.String text
          The text of the note.
 
Fields inherited from class com.RuntimeCollective.webapps.form.EntityBeanForm
action, id
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
NoteForm()
           
 
Method Summary
 int getAnnotedId()
           
 java.lang.String getReturnPage()
           
 java.lang.String getRole()
           
 java.lang.String getText()
           
 void reset(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
          Reset all properties to default values.
 void setAnnotedId(int annotedId)
           
 void setReturnPage(java.lang.String returnPage)
           
 void setRole(java.lang.String role)
           
 void setText(java.lang.String text)
           
 org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
          Validate entry field entries.
protected  void validateInt(int id, org.apache.struts.action.ActionErrors errors, java.lang.String message)
          Validate one int.
 
Methods inherited from class com.RuntimeCollective.webapps.form.EntityBeanForm
getFormAction, getId, setFormAction, setId
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

annotedId

public int annotedId
The bean id.


role

public java.lang.String role
The role.


returnPage

public java.lang.String returnPage
The return url.


text

public java.lang.String text
The text of the note.

Constructor Detail

NoteForm

public NoteForm()
Method Detail

getAnnotedId

public int getAnnotedId()

setAnnotedId

public void setAnnotedId(int annotedId)

getRole

public java.lang.String getRole()

setRole

public void setRole(java.lang.String role)

getReturnPage

public java.lang.String getReturnPage()

setReturnPage

public void setReturnPage(java.lang.String returnPage)

getText

public java.lang.String getText()

setText

public void setText(java.lang.String text)

reset

public void reset(org.apache.struts.action.ActionMapping mapping,
                  javax.servlet.http.HttpServletRequest request)
Reset all properties to default values. This also sets the form action to REGISTER ;


validate

public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
                                                      javax.servlet.http.HttpServletRequest request)
Validate entry field entries.

Error codes returned:

  • error.note.invalidAnnotedId - invalid bean id
  • error.note.invalidReturnPage - invalid return page
  • error.note.emptyText - null or no text


validateInt

protected void validateInt(int id,
                           org.apache.struts.action.ActionErrors errors,
                           java.lang.String message)
Validate one int.