/** * Creates the test app. */ private MyApp() { target.setText("target"); target.setReadOnly(true); trigger.setAjaxTarget(target); add(trigger); add(target); } }
/** * Creates the test app. */ private MyApp() { target.setText("WrongStepAjaxInterceptor_Test.MyApp.target"); target.setReadOnly(true); trigger.setAjaxTarget(target); add(trigger); add(target); } }
increment.setAjaxTarget(bar); decrement.setAjaxTarget(bar);
envBtn.setAjaxTarget(console); clearBtn.setAjaxTarget(console);
/** * Creates an ExamplePanel. * * @param options the options to display in the multi-select pair. * @param shuffle whether to enable option shuffling for the multi-select pair. */ private ExamplePanel(final List options, final boolean shuffle) { WFieldLayout layout = new WFieldLayout(); add(layout); multi = new WMultiSelectPair(options); roMSP = new WMultiSelectPair(options); multi.setShuffle(shuffle); roMSP.setShuffle(shuffle); layout.addField("Select items", multi); layout.addField("Copied values (read only control)", roMSP); roMSP.setReadOnly(true); WButton copyBtn = new WButton("Copy selected values"); layout.addField((WLabel) null, copyBtn); copyBtn.setAction(new Action() { @Override public void execute(final ActionEvent event) { copySelectedValues(); } }); copyBtn.setAjaxTarget(roMSP); }
/** * Construct the example. */ public AjaxWRepeaterExample() { WPanel panel = new WPanel(); repeat = new WRepeater(new RowComponent()); panel.add(repeat); // Button used to add a new row via AJAX. WButton button = new WButton("Add row via AJAX"); button.setAction(new Action() { @Override public void execute(final ActionEvent event) { List<NameBean> names = new ArrayList<>(repeat.getBeanList()); names.add(new NameBean(new Date().toString(), "F", "L")); repeat.setBeanList(names); } }); button.setAjaxTarget(panel); add(new WHeading(WHeading.MAJOR, "WRepeater using ajax")); add(panel); WPanel buttonPanel = new WPanel(WPanel.Type.FEATURE); buttonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 3, 0)); buttonPanel.setMargin(new Margin(Size.LARGE, null, null, null)); add(buttonPanel); buttonPanel.add(button); buttonPanel.add(new WButton("Submit")); }
copyDateBtn.setAjaxTarget(textField); copyJavaDateBtn.setAjaxTarget(textField); setTodayBtn.setAjaxTarget(dateField);
selectButton.setAjaxTarget(textPanel); textPanel.add(selectionText); add(textPanel);
startButton.setAjaxTarget(this); startButton.setAction(new Action() { @Override retryButton.setAjaxTarget(this); retryButton.setAction(new Action() { @Override
selectButton.setAjaxTarget(textPanel); deleteWithWarningCondition.setAjaxTarget(textPanel); editButton.setAjaxTarget(textPanel); textPanel.add(selectionText); add(textPanel);
selectButton.setAjaxTarget(textPanel); deleteWithWarningCondition.setAjaxTarget(textPanel); editButton.setAjaxTarget(textPanel); textPanel.add(selectionText); add(textPanel);
add(new WText(MODAL_TEXT + ": this text is for automated testing only")); searchButton.setAjaxTarget(this);
WButton resetThisBit = new WButton("Reset this bit"); resetThisBit.setCancel(true); resetThisBit.setAjaxTarget(wrapper); resetThisBit.setAction(new Action() { @Override
ajaxCell.add(ajaxButton); ajaxCell.add(ajaxContentPanel); ajaxButton.setAjaxTarget(ajaxContentPanel); target.add(ajaxCell);
toggleDisableButton.setAjaxTarget(tf4);
ajaxTriggerButton.setAjaxTarget(ajaxTargetPanel);
button.setImagePosition(ImagePosition.EAST); button.setRenderAsLink(true); button.setAjaxTarget(new WTextField()); button.setPopupTrigger(true); setActiveContext(createUIContext());