У меня есть всплывающее окно, в котором отображается таблица с данными, я могу выбрать строку и, нажав кнопку «ОК», я могу получить идентификатор выбранной строки в таблице.
Что я хочу сделать, так это передать этот idNo окну, которое вызывает всплывающее окно, и обновить outputText, который находится в этом окне.
Кто-нибудь может мне помочь?
Код для кнопки:
newBean Класс для кнопки:
public String b1_action() {
// Add event code here...
System.out.println("Select One Button has been Clicked");
// Get bindings associated with the current scope, then access the one that we have assigned to our table - e.g. OpenSupportItemsIterator
DCBindingContainer bindings =
(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding dcItteratorBindings =
bindings.findIteratorBinding("NameView1_1Iterator");
// Get an object representing the table and what may be selected within it
ViewObject voTableData = dcItteratorBindings.getViewObject();
// Get selected row
Row rowSelected = voTableData.getCurrentRow();
// Display attriebute of row in console output - would generally be bound to a UI component like a Label and or used to call another proces
System.out.println(rowSelected.getAttribute("IdNo"));
setOutputText("" + rowSelected.getAttribute("IdNo") + "");
closePopup("p1");
return null;
}
Я хочу, чтобы моя функция: setOutputText(), которая еще не реализована, могла обновлять мой outputText в главном окне.
Спасибо С наилучшими пожеланиями