Creates a button which sends a payload back when clicked.

@param title
the button label.
@param payload
the payload to send back when clicked.
@return a {@link PostbackButton}.
191753
public static Button createPostbackButton(String title, String payload) {
		return new PostbackButton(title, ButtonType.POSTBACK, payload);
	}
990258
public void setTitle(final String title) {
        if (this.title == null) {
            this.title = new Content();
        }
        this.title.setValue(title);
    }
92503
public static Optional<ButtonType> showConfirmation(String title, String content) {
        return showConfirmation(title, null, content);
    }
498828
def create(self, title):
    
    return self.send_request(C.POST, self.end, data={'title':title})
713380
@SuppressLint("NewApi")
    public static Intent createChooser(Intent target, CharSequence title) {
        if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) {
            return Intent.createChooser(target, title);
        }
        Intent intent = new Intent();
        intent.setClass(Application.getLastInstance(), ChooserActivity.class);
        intent.putExtra(Intent.EXTRA_INTENT, target);
        if (title != null) {
            intent.putExtra(Intent.EXTRA_TITLE, title);
        }
        int permFlags = target.getFlags()
                & (Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
        if (permFlags != 0 && VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) {
            ClipData targetClipData = target.getClipData();
            if (targetClipData == null && target.getData() != null) {
                ClipData.Item item = new ClipData.Item(target.getData());
                String[] mimeTypes;
                if (target.getType() != null) {
                    mimeTypes = new String[]{
                            target.getType()
                    };
                } else {
                    mimeTypes = new String[]{};
                }
                targetClipData = new ClipData(null, mimeTypes, item);
            }
            if (targetClipData != null) {
                intent.setClipData(targetClipData);
                intent.addFlags(permFlags);
            }
        }
        return intent;
    }
1326398
public static Button createPhoneNumberButton(String title,
			String phoneNumber) {
		return new PostbackButton(title, ButtonType.PHONE_NUMBER, phoneNumber);
	}
832527
public static JComponent createTitleLabel(final String text, final ActionListener backButtonActionListener) {
        final DCLabel titleLabel = new DCLabel(false, text, WidgetUtils.BG_COLOR_BLUE_DARK, null);
        titleLabel.setFont(WidgetUtils.FONT_BANNER);

        final EmptyBorder border = new EmptyBorder(adjuster.adjust(20), MARGIN_LEFT, adjuster.adjust(10), 0);

        if (backButtonActionListener != null) {
            titleLabel.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(final MouseEvent e) {
                    backButtonActionListener.actionPerformed(null);
                }
            });
            titleLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

            final DCPanel panel = DCPanel.flow(Alignment.LEFT, MARGIN_LEFT, 0,
                    createBackToWelcomeScreenButton(backButtonActionListener), titleLabel);
            panel.setBorder(border);
            return panel;
        } else {
            titleLabel.setBorder(border);
            return titleLabel;
        }
    }
707934
public void setAppTitle(String title) {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(title)) {
            if (m_titleLabel != null) {
                m_titleLabel.removeFromParent();
                m_titleLabel = null;
            }
        } else {

            if (m_titleLabel == null) {
                m_titleLabel = new Label();
                m_titleLabel.setStyleName(I_CmsLayoutBundle.INSTANCE.toolbarCss().title());
                m_buttonPanelLeft.insert(m_titleLabel, 0);
            }
            m_titleLabel.setText(title);
        }
    }
1255739
public function postback($postback)
    {
        if ($this->isNotSetOrEmpty($postback)) {
            throw CouldNotCreateButton::postbackNotProvided();
        } elseif (! is_array($postback)) {
            throw CouldNotCreateButton::invalidPostbackProvided($postback);
        }

        $this->payload['payload'] = json_encode($postback);
        $this->isTypePostback();

        return $this;
    }
1116380
public function backButton(string $title = null, $url = null, array $options = []): string
    {
        $options = Hash::merge([
            'icon' => 'arrow-left',
            'escape' => false,
        ], $options);

        if (!$title) {
            $title = '<span class="button-text">' . __d('ck_tools', 'Back') . '</span>';
        }

        $here = $this->getRequestedAction();
        if ($this->request->getSession()->check('back_action.' . $here)) {
            $url = $this->request->getSession()->read('back_action.' . $here);
        }
        if (empty($url)) {
            $url = [
                'action' => 'index',
            ];
        }

        return $this->button($title, $url, $options);
    }
453394
public Optional<Response> POST(String partialUrl, Object payload)
    {    
        URI uri = buildUri(partialUrl);   
        return executePostRequest(uri, payload);
    }
536971
@Override
    public void bindView(ViewHolder viewHolder, List<Object> payloads) {
        super.bindView(viewHolder, payloads);

        viewHolder.radioButton.setChecked(isSelected());

        //set the text for the name
        StringHolder.applyTo(name, viewHolder.name);
        //set the text for the description or hide
        StringHolder.applyToOrHide(description, viewHolder.description);
    }
1321634
public void addPayload(final Payload payload) {
		ApptentiveLog.v(PAYLOADS, "Adding payload: %s", payload);
		singleThreadExecutor.execute(new Runnable() {
			@Override
			public void run() {
				try {
					dbHelper.addPayload(payload);
					sendNextPayloadSync();
				} catch (Exception e) {
					ApptentiveLog.e(PAYLOADS, e, "Exception while adding a payload: %s", payload);
					logException(e);
				}
			}
		});
	}
97982
public void setWindowTitle(String title) {

        /* HACK: Using a Label destroys the layout for some reason, so we resort to setting the caption directly in the
         element via an explicit JavaScript call. */
        m_windowTitle = title;
        JavaScript.eval(
            "document.querySelector('#"
                + getId()
                + " .fakewindowheader').innerHTML = '"
                + StringEscapeUtils.escapeEcmaScript(title)
                + "'");
    }
289512
public static Button createUrlButton(String title, String url,
			WebViewHeightRatioType ratioType) {
		return new WebUrlButton(title, url, ratioType);
	}
462874
private void showTitle(@Nullable final CharSequence title) {
        ActionBar actionBar = getSupportActionBar();

        if (actionBar != null) {
            if (isSplitScreen()) {
                if (toolbarLarge != null) {
                    toolbarLarge.setTitle(title);
                }

                actionBar.setTitle(null);
            } else {
                actionBar.setTitle(title);
            }
        }
    }
634208
@Override
	public void setTitle(String title) {
		buttonAction.setTitle(title);
		titleLabel.setContents(prepareTitle());
	}