|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.support.utils.ui.Control
org.universAAL.support.utils.ui.SubmitCmd
public class SubmitCmd
Class representing a Submit UI element. Submits are commands that can be issued by the user, whether it's a button, spoken command or any other way, depending on the UI renderer.
Example render:
[Label]
Field Summary | |
---|---|
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. |
Fields inherited from class org.universAAL.support.utils.ui.Control |
---|
help, hint, label, MY_NAMESPACE, ref |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.universAAL.support.utils.ui.Control |
---|
getHelp, getHint, getLabel, getReference, setHelp, setHint, setLabel, setReference, setReference |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String confirmMessage
protected int confirmType
protected List l
protected Object h
public static final String HIDDENREF
Constructor Detail |
---|
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.Method Detail |
---|
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |