public class SubmitCmd extends Control
Example render:
[Label]
Modifier and Type | Field and Description |
---|---|
protected String |
confirmMessage
Confirmation message for submit.
|
protected int |
confirmType
Type of confirmation message.
|
protected Object |
h
Hidden object associated with the submit
|
static String |
HIDDENREF
Auxiliary property URI for the path to reach the hidden object.
|
protected List |
l
List of required mandatory inputs.
|
Constructor and Description |
---|
SubmitCmd()
Generic empty constructor.
|
SubmitCmd(String ref)
Constructor with the reference of the submit to be used in request and
response.
|
SubmitCmd(String ref,
String label)
Constructor with the reference of the submit to be used in request and
response.
|
Modifier and Type | Method and Description |
---|---|
void |
addMandatoryInput(InputControl input)
Indicates that the InputControl passed as parameter must be filled with a
value by the user before this Submit is pressed.
|
String[] |
create(Group group)
This method is for internal use of utils only.
|
String |
getConfirmMessage()
Get the confirmation message that will appear when this Submit is
selected by the user.
|
int |
getConfirmType()
Get the type of confirmation message.
|
void |
setConfirmMessage(String confirmMessage)
Set the confirmation message that will appear when this Submit is
selected by the user.
|
void |
setConfirmMessage(String confirmMessage,
int confirmType)
Set the confirmation message that will appear when this Submit is
selected by the user.
|
void |
setConfirmType(int confirmType)
Set the type of confirmation message.
|
void |
setHiddenObject(Object hidden)
Associate an object to a submit so it is sent within the UI request, but
not shown to the user.
|
getHelp, getHint, getLabel, getReference, setHelp, setHint, setLabel, setReference, setReference
protected String confirmMessage
protected int confirmType
protected List l
protected Object h
public static final String HIDDENREF
public SubmitCmd()
public SubmitCmd(String ref)
ref
- The simple reference identifying the input. Set to null to
auto-generate.public SubmitCmd(String ref, String label)
ref
- The simple reference identifying the input. Set to null to
auto-generate.label
- The label text that identifies the submit to the user.public String[] create(Group group)
Control
create
in class Control
group
- The UI group to which the control is being added.public void addMandatoryInput(InputControl input)
input
- The InputControl to make mandatory for this Submit.public void setHiddenObject(Object hidden)
uiresponse.getUserInput( new String[] { REFSUBMIT, SubmitCmd.HIDDENREF });
This is useful when you are building a list of items in a form, each of which has a Submit associated to them. You can use this method to know, later when handling the response, which item of the list had its Submit pressed. Tip: to do this it's useful that all the references of these listed submits start with the same string, so you can detect any of them when handling the response, and then get the exact submission ID for use as REFSUBMIT in the example above.
hidden
- The InputControl to make mandatory for this Submit.public String getConfirmMessage()
public void setConfirmMessage(String confirmMessage)
confirmMessage
- The confirmation message.public void setConfirmMessage(String confirmMessage, int confirmType)
confirmMessage
- The confirmation message.confirmType
- The type of confirmation. One of
org.universAAL.middleware.ui.rdf
.Submit.CONFIRMATION_TYPE_OK_CANCEL (0) or
org.universAAL.middleware
.ui.rdf.Submit.CONFIRMATION_TYPE_YES_NO (1)public int getConfirmType()
public void setConfirmType(int confirmType)
confirmType
- The type of confirmation. One of
org.universAAL.middleware.ui.rdf
.Submit.CONFIRMATION_TYPE_OK_CANCEL (0) or
org.universAAL.middleware
.ui.rdf.Submit.CONFIRMATION_TYPE_YES_NO (1)Copyright © 2018 universAAL Consortium. All rights reserved.