Class XmlForm
- java.lang.Object
-
- org.silverpeas.core.contribution.content.form.AbstractForm
-
- org.silverpeas.core.contribution.content.form.form.XmlForm
-
- All Implemented Interfaces:
Form
public class XmlForm extends AbstractForm
A Form is an object which can display in HTML the content of a DataRecord to a end user and can retrieve via HTTP any updated values.- See Also:
DataRecord
,RecordTemplate
,FieldDisplayer
-
-
Field Summary
-
Fields inherited from class org.silverpeas.core.contribution.content.form.AbstractForm
REPEATED_FIELD_CSS_HIDE, REPEATED_FIELD_CSS_SHOW, REPEATED_FIELD_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description XmlForm(RecordTemplate template)
XmlForm(RecordTemplate template, boolean viewForm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
display(javax.servlet.jsp.JspWriter jw, PagesContext pageContext, DataRecord record)
Prints this form into the specified JSP writer according to the specified records of data that populate the form fields.String
toString(PagesContext pagesContext, DataRecord record)
Prints the HTML layout of the dataRecord using the RecordTemplate to extract labels and extra informations.-
Methods inherited from class org.silverpeas.core.contribution.content.form.AbstractForm
display, displayScripts, getData, getFieldDisplayer, getFieldTemplates, getFormName, getJavascriptSnippet, getName, getSkippableSnippet, getSureField, getTitle, isEmpty, isViewForm, setData, setFormName, setName, setTitle, setViewForm, toString, update, update, updateWysiwyg
-
-
-
-
Constructor Detail
-
XmlForm
public XmlForm(RecordTemplate template) throws FormException
- Throws:
FormException
-
XmlForm
public XmlForm(RecordTemplate template, boolean viewForm) throws FormException
- Throws:
FormException
-
-
Method Detail
-
toString
public String toString(PagesContext pagesContext, DataRecord record)
Prints the HTML layout of the dataRecord using the RecordTemplate to extract labels and extra informations. The value formats may be adapted to a local language. Never throws an Exception but log a silvertrace and writes an empty string when :- a field is unknown by the template.
- a field has not the required type.
-
display
public void display(javax.servlet.jsp.JspWriter jw, PagesContext pageContext, DataRecord record)
Description copied from class:AbstractForm
Prints this form into the specified JSP writer according to the specified records of data that populate the form fields.- Specified by:
display
in interfaceForm
- Specified by:
display
in classAbstractForm
- Parameters:
jw
- the JSP writer.pageContext
- the JSP page context.record
- the record the data records embbed the form fields.
-
-