}
});
// Set the destination to which messages will be to be sent:
_uriSenderField =
new EditField("Destination:",
CommunicationController.ECHO_SERVER_URI + "TEXT");
final FullWidthButton destinationButton =
new FullWidthButton("Set Destination");
destinationButton.setChangeListener(new FieldChangeListener() {
/**
* @see FieldChangeListener#fieldChanged(Field, int)
*/
public void fieldChanged(final Field field, final int context) {
controller.setNonBlockingSenderDestination(_uriSenderField
.getText());
}
});
// First Message
_contentField1 = new EditField("Message:", "Message One");
final FullWidthButton postButton1 =
new FullWidthButton("Send and Cancel (ALL)");
postButton1.setChangeListener(new FieldChangeListener() {
/**
* @see FieldChangeListener#fieldChanged(Field, int)
*/
public void fieldChanged(final Field field, final int context) {
controller.testMessageCancellable(_contentField1.getText(),
true); // cancellable = true
}
});
// Second Message
_contentField2 = new EditField("Message:", "Message Two");
final FullWidthButton postButton2 =
new FullWidthButton("Send and Cancel (NEVER)");
postButton2.setChangeListener(new FieldChangeListener() {
/**
* @see FieldChangeListener#fieldChanged(Field, int)