public class Message extends UIRequest implements IContainer
Message m=new Message(user,"Light interface","Light1 has been turned off");
caller.sendUIRequest(m);
Notice that Simple Form Controls will be rendered in the same order as they
are added. Once they are added they can no longer be modified, so set all
their properties before adding them to the Dialog. Take into account however
that Simple Group controls need to be added to the Dialog BEFORE other
controls can be added to those Groups.
This is not necessarily faster nor better than the usual way of doing it with
Form and UIRequest. It's just an alternative way that might help those less
familiarized with universAAL.MY_URI, PROP_ADDRESSED_USER, PROP_DIALOG_FORM, PROP_DIALOG_LANGUAGE, PROP_DIALOG_PRIORITY, PROP_DIALOG_PRIVACY_LEVEL, PROP_HAS_ACCESS_IMPAIRMENT, PROP_HAS_PREFERENCE, PROP_PRESENTATION_LOCATION, PROP_PRESENTATION_MODALITY, PROP_PRESENTATION_MODALITY_ALT, UI_NAMESPACE
ONLY_LOCAL_SCOPE, PROP_ORIG_SCOPE, PROP_SCOPES
ANON_URI_PREFIX, blockAddingTypes, isXMLLiteral, NAMESPACE_PREFIX, ns_delim_index, PROP_INVOLVED_HUMAN_USER, PROP_RDF_FIRST, PROP_RDF_REST, PROP_RDF_TYPE, PROP_RDFS_COMMENT, PROP_RDFS_LABEL, PROP_SERIALIZATION_FULL, PROP_SERIALIZATION_OPTIONAL, PROP_SERIALIZATION_REDUCED, PROP_SERIALIZATION_UNDEFINED, props, RDF_EMPTY_LIST, RDF_NAMESPACE, RDFS_NAMESPACE, SERVICE_NAMESPACE, TYPE_RDF_LIST, TYPE_RDFS_CLASS, uri, VOCABULARY_NAMESPACE
Constructor and Description |
---|
Message(User user,
String title,
String message)
Use this helper class to create a UIRequest that is easy to use.
|
Message(User user,
String title,
String message,
LevelRating priority,
PrivacyLevel privacy)
Use this helper class to create a UIRequest that is easy to use.
|
Modifier and Type | Method and Description |
---|---|
String[] |
add(Control ctrl)
Add the given Simple Control UI element to this container.
|
void |
addHidden(String ref,
Object hidden)
Add a hidden object so it is sent within the UI request, but not shown to
the user.
|
String |
addSubmit(SubmitCmd ctrl)
Add a Submit Form Control to the Submit group of the Message.
|
getAddressedUser, getAltPresentationModality, getDialogForm, getDialogID, getDialogLanguage, getDialogPriority, getDialogPrivacyLevel, getDialogType, getImpairments, getPreferences, getPresentationLocation, getPropSerializationType, matches, setAltPresentationModality, setCollectedInput, setImpairments, setPreferences, setPresentationLocation, setPresentationModality
addScope, clearScopes, getOriginScope, getScopes, isScoped, isSerializableTo, setOriginScope, setScope
addType, getLocalName, getNamespace, getProperty, getPropertyURIs, getType, getTypes, getURI, hasQualifiedName, isAnon, numberOfProperties
addMultiLangProp, asList, asList, asRDFList, changeProperty, copy, deepCopy, equals, generateAnonURI, getDefaultLang, getFilename, getMultiLangProp, getOrConstructLabel, getOrConstructLabel, getResource, getResourceComment, getResourceLabel, getResourceLabel, getStaticFieldValue, hashCode, hasProperty, isAnon, isBlockingAddingTypes, isClosedCollection, isQualifiedName, isWellFormed, literal, representsQualifiedURI, serializesAsXMLLiteral, setProperty, setPropertyPath, setPropertyPath, setPropertyPathFromOffset, setResourceComment, setResourceLabel, toString, toStringRecursive, toStringRecursive, unliteral
public Message(User user, String title, String message)
user
- The user to which the request is addressed.title
- The title of the Message.message
- The default output message to be shown to the user.public Message(User user, String title, String message, LevelRating priority, PrivacyLevel privacy)
user
- The user to which the request is addressed.title
- The title of the Message.message
- The default output message to be shown to the user.priority
- Set a custom priority for the Message.privacy
- Set the required privacy level for the Message.public String[] add(Control ctrl)
IContainer
add
in interface IContainer
ctrl
- The Simple Control UI element to be added.public String addSubmit(SubmitCmd ctrl)
ctrl
- The Submit to addpublic void addHidden(String ref, Object hidden)
uiresponse.getUserInput(new String[]{ref});
, being
ref
the one you used in this method.ref
- The reference you will use to access the hidden object later
from the responsehidden
- The object you want to hideCopyright © 2018 universAAL Consortium. All rights reserved.