"Enter a destination URL and send a fire-and-forget message to it. "
+ "Responses are not processed.",
Field.NON_FOCUSABLE);
_isLocal = new CheckboxField("Local Address ", true);
_isLocal.setChangeListener(new FieldChangeListener() {
/**
* @see FieldChangeListener#fieldChanged(Field, int)
*/
public void fieldChanged(final Field field, final int context) {
if (_isLocal.getChecked()) {
// Local
_pathField.setText(PATH_STRING);
updateSenderField();
} else {
// Http
_pathField.setText("--NOT USED--");
_uriSenderField
.setText(CommunicationController.ECHO_SERVER_URI
+ "TEXT");
}
}
});
_pathField = new EditField("Path:", PATH_STRING, 140, 0);
_pathField.setChangeListener(new FieldChangeListener() {
/**
* @see FieldChangeListener#fieldChanged(Field, int)
*/
public void fieldChanged(final Field field, final int context) {
updateSenderField();
}
});
_uriSenderField = new EditField("Sender URI:", "", 140, 0);
final FullWidthButton backButton = new FullWidthButton("Back");
backButton.setChangeListener(new FieldChangeListener() {
/**
* @see FieldChangeListener#fieldChanged(Field, int)
*/
public void fieldChanged(final Field field, final int context) {
((UiApplication) SendFireForgetScreen.this.getApplication())
.popScreen(SendFireForgetScreen.this);
}
});
final FullWidthButton postButton = new FullWidthButton("Send message");
postButton.setChangeListener(new FieldChangeListener() {
/**
* @see FieldChangeListener#fieldChanged(Field, int)
*/
public void fieldChanged(final Field field, final int context) {
controller.sendFireForget(_uriSenderField.getText());