public class HTMLFormGenerator extends Object
How should a macro look like in your HTML file?
<MACRO ELEMENT NAME VALUE [TAG(S)]>
The "MACRO" word will be stripped in de servscan Servlet and does not enters this object.
ELEMENT: (if you are fimiliar with HTML FORMs this should be known stuff
TEXTAREA, SELECT, PASSWORD, RADIO, CHECKBOX
NAME:
The name of this HTML Element
VALUE:
This can do 2 things:
1. if the PROC TAG is present, this value will be sent to the processor
2. else ( no PROC TAG) this will be the VALUE of the HTML Element
TAG(S)
there can be more TAGS (some TYPES does support them and some don't ...)
some need an argument some don't (some can handle both :-)
TAG WHAT DOES IT? SUPPORTED BY WHICH ELEMENT?example: SELECT name ProcessorTag SELECTED="selected_item" MULTIPLE SIZE=10 PROC VERTICAL.
ROWS= The number of ROWS TEXTAREA COLS= The number of COLS TEXTAREA SIZE= The SIZE of this ELEMENT SELECT TEXT PASSWORD MULTIPLE We want MULTIPLE selection SELECT CHECKED(=)/SELECTED(=) The SELECTED element (if there is no PROC tag you don't need an argument) SELECT RADIO CHECKBOX EXCLUDE= The EXCLUDED element (only use with PROC) SELECT RADIO CHECKBOX VERTICAL Add a <BR> after a item SELECT RADIO CHECKBOX HORIZONTAL Don't add a <BR> after a item SELECT RADIO CHECKBOX EMPTY Add an EMPTY element SELECT PROC Use the processor to get a list (Vector) of values (Strings) TEXTAREA TEXT and PASSWORD (only the first of the Vector will be used) SELECT RADIO CHECKBOX DOUBLE Tell the processor to get a paired list of values SELECT RADIO CHECKBOX
| Modifier and Type | Field and Description |
|---|---|
protected HTMLElementCheckBox |
checkBox
CHECKBOX Element
|
protected HTMLElementPassword |
password
PASSWORD
|
protected HTMLElementRadio |
radio
RADIO Element
|
protected HTMLElementSelect |
select
SELECT Element
|
protected HTMLElementText |
text
TEXT
|
protected HTMLElementTextArea |
textArea
TEXTAREA Element
|
| Constructor and Description |
|---|
HTMLFormGenerator()
Contructs the HTMLElements
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
getFirstElement(Vector vector) |
String |
getHTMLElement(scanpage sp,
ProcessorModule proc,
Vector macro)
Gets the first element of the Vector and selects the correspondending HTMLElement
to handle this element, and passes the tail elements to that Element.
|
protected Vector |
getTailElements(Vector vector) |
protected HTMLElementTextArea textArea
protected HTMLElementRadio radio
protected HTMLElementSelect select
protected HTMLElementCheckBox checkBox
protected HTMLElementText text
protected HTMLElementPassword password
public String getHTMLElement(scanpage sp, ProcessorModule proc, Vector macro)
proc - The Processor to handle the getList (2nd Element from the Vector marco)macro - The Vector with StringsMMBase 1.9-SNAPSHOT - ${javadoctimestamp}