|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.cbse.jeasy.JEObject
com.cbse.jeasy.JEMessage
public class JEMessage
A message is a serialization of components in XML format. GetMessage means save the entrys of the input components to a XML string.
PutMessage will fill the input components out of the given XML string.
The components can be an JEDatafield an JEComboBox an JEComboList an JECheckBox or an JERadioButton.
When you set an element as a panel, all the above components inside the panel will be saved or filled.
Since every component has its unique id, the message uses this id as a XML element. When the JEDatafield DF_country with its label country is filled by a user with the word Germany, the message will store it as
<country>Germany</country>
When storeId is true it will be stored
as
<DF_country>Germany</DF_country>
To set a checkbox to true use the XML string
<CH_MyCheckBox>true</CH_MyCheckbox>To fill a combobox (or list) use the XML string
<CB_My_ComboBox>
<elements>one</elements>
<elements>two</elements>
</CB_My_ComboBox>
<CB_My_ComboBox>one</CB_My_ComboBox>
| Properties | ||
|---|---|---|
| name | values | comment |
| id | * | Id of the object. Let it begin with MS_ |
| separator | NEWLINE TAB NEWLINE+TAB | The separator is inserted after each element. |
| Deprecated: storeId | true false | If it is set to true the name of the field will be the Id of the Object, else the name is the label of the component. |
| XMLTag_Id | * | If true the xml tag of the jeasy element is the id of this element. |
| XMLTag_Label | * | If true the xml tag of the jeasy element is the label of this element. |
| XMLTag_Specified | * | If true the xml tag of the jeasy element is the specified XMLtag of this element. |
| E1 . En |   | Elements to be added in the message. |
* = property you have to set; bold = default value
| Field Summary | |
|---|---|
static int |
INSIDE
Specifies that message bracket should not be set. |
static int |
ONLY_FILLED
Specifies that empty elements should not be get. |
| Fields inherited from class com.cbse.jeasy.JEObject |
|---|
DEVELOPPING, INPUT_ERROR_DATE, INPUT_ERROR_LENGTH, INPUT_ERROR_MANDATORY, INPUT_ERROR_PARSE, INPUT_ERROR_RANGE, INPUT_ERROR_TIME, INPUT_ERRORS, NO_INPUT_ERROR, RUNNING |
| Constructor Summary | |
|---|---|
JEMessage()
|
|
JEMessage(java.lang.String s)
Reads the properties from a string. |
|
| Method Summary | |
|---|---|
java.lang.String |
examineMessage()
|
java.lang.String |
getElementAt(int n)
Gets the component of element n |
int |
getElementSize()
Gets the number of elements |
java.lang.String |
getMessage()
|
java.lang.String |
getMessage(int config)
It saves the entrys of the input components to an XML string. |
java.lang.String |
getMessageString()
|
java.lang.String |
getSeparator()
|
void |
putMessage(java.lang.String message)
It will fill the JEasy components out of an XML message. |
void |
putMessageElement(java.util.Hashtable oht,
JEObject jo,
java.lang.String message)
|
void |
setSeparator(java.lang.String separator)
|
| Methods inherited from class com.cbse.jeasy.JEObject |
|---|
backupEntry, clear, deserializeValue, getApplet, getApplLocale, getCenter, getComponent, getEast, getId, getJCallBack, getJClass, getLabel, getMode, getName, getNorth, getObjLocale, getParentId, getPreview, getProjectDirectory, getProperty, getRegisterText, getSouth, getStarted, getTitle, getType, getWest, getXMLtag, isEditable, isEnabled, isEnterprise, isProfessional, isStandard, isVisible, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEaddTab, removeProperties, removeProperty, restoreEntry, serializeValue, setApplet, setApplLocale, setEditable, setEditable, setEnabled, setEnabled, setFocus, setJCallBack, setMarkable, setMarkable, setMode, setObjLocale, setParentId, setPreview, setProjectDirectory, setProperty, setStarted, setVisible, setVisible, start, wasEntryChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int INSIDE
public static final int ONLY_FILLED
| Constructor Detail |
|---|
public JEMessage(java.lang.String s)
s - contains properties and valuesJE#PropertyStringpublic JEMessage()
| Method Detail |
|---|
public java.lang.String getSeparator()
public void setSeparator(java.lang.String separator)
separator - The separator to set.public int getElementSize()
JEObject
getElementSize in class JEObjectpublic java.lang.String getElementAt(int n)
JEObject
getElementAt in class JEObjectpublic java.lang.String getMessage()
public java.lang.String getMessageString()
public java.lang.String examineMessage()
public java.lang.String getMessage(int config)
The message begins with <messageid>separator and ends with </messageid>.
You can prevent this by setting config with JEMessage.INSIDE.
Setting config with JEMessage.ONLY_FILLED will saves only those components with entrys not null.
config - the Properties key.
null if it did not have one.public void putMessage(java.lang.String message)
message - the message in attribute grammar
public void putMessageElement(java.util.Hashtable oht,
JEObject jo,
java.lang.String message)
throws java.lang.NullPointerException
java.lang.NullPointerException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||