我有一个显示包含数据的表格的弹出窗口,我可以选择一行,然后按 OK 按钮,我可以检索表格中所选行的 idNo。
我想要做的是将此 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。
谢谢最好的问候