Sequenceablepublic class FormBindingData extends Object implements Sequenceable
This class is used to carry the data to be passed for creating and updating a JS form.
SystemCapability.Aafwk#ABILITYSequenceable.Producer<T>| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static Sequenceable.Producer<FormBindingData> |
PRODUCER |
Creates a
FormBindingData object from a Parcel object. |
| 构造器 | 说明 |
|---|---|
FormBindingData() |
A constructor used to create an empty
FormBindingData instance. |
FormBindingData(String zsonData) |
A constructor used to create a
FormBindingData instance with data of the String type specified. |
FormBindingData(ZSONObject data) |
A constructor used to create a
FormBindingData instance with data of
the ZSONObject type specified. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
addImageData(String picName,
byte[] data) |
Adds an image to this
FormBindingData instance. |
String |
getDataString() |
Obtains the form data stored in this
FormBindingData object. |
boolean |
marshalling(Parcel parcel) |
Marshals this
FormBindingData object into a Parcel object. |
void |
removeImageData(String picName) |
Removes data of an image with the specified
picName from this FormBindingData instance. |
boolean |
unmarshalling(Parcel parcel) |
Unmarshals this
FormBindingData object from a Parcel object. |
void |
updateData(ZSONObject data) |
Updates form data in this
FormBindingData object. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasFileDescriptorpublic static final Sequenceable.Producer<FormBindingData> PRODUCER
FormBindingData object from a Parcel object.
This constant is used together with marshalling(ohos.utils.Parcel) and is
the encapsulation of the unmarshalling(ohos.utils.Parcel) method.public FormBindingData()
FormBindingData instance.public FormBindingData(ZSONObject data)
FormBindingData instance with data of
the ZSONObject type specified.data - Indicates the data to be carried in the new FormBindingData instance,
in ZSONObject format.public FormBindingData(String zsonData)
FormBindingData instance with data of the String type specified.zsonData - Indicates the data to be carried in the new FormBindingData instance, in JSON string
format.public void updateData(ZSONObject data)
FormBindingData object.data - Indicates the new data to use, in ZSONObject format.public String getDataString()
FormBindingData object.public boolean marshalling(Parcel parcel)
FormBindingData object into a Parcel object.marshalling 在接口中 Sequenceableparcel - Indicates the Parcel object for marshalling.true if the marshalling is successful; returns false otherwise.public boolean unmarshalling(Parcel parcel)
FormBindingData object from a Parcel object.unmarshalling 在接口中 Sequenceableparcel - Indicates the Parcel object for unmarshalling.true if the unmarshalling is successful; returns false otherwise.public void addImageData(String picName, byte[] data)
FormBindingData instance.picName - Indicates the name of the image to add.data - Indicates the binary data of the image content.public void removeImageData(String picName)
picName from this FormBindingData instance.picName - Indicates the name of the image to remove.