Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting data from a different panel than you are in.

Status
Not open for further replies.

wdc58

Programmer
Feb 15, 2005
7
US
I have a forms with Master/Detail panels. I have a jButton on the detail panel that will load data based on a date entered on the master panel. How do I reference the textfield in the master panel? Below is the code I'm using in the detail panel. the code below is in a detail panel.

String workDate = ?? masterpanel jTextfield1 ??

ViewObject ExceptionReactorVO = panelBinding.getApplication().getApplicationModule().findViewObject("ExceptionReactorView1");
ExceptionReactorVO.setWhereClauseParam(0,workDate);

ViewObject CaDetailVO = panelBinding.getApplication().getApplicationModule().findViewObject("CaDetailView2");

Row readRow;
Row currRow = CaDetailVO.createRow();

while (ExceptionReactorVO.hasNext())
{
readRow = ExceptionReactorVO.first();
String EntryDate = readRow.getAttribute("EntryDate").toString();
currRow.setAttribute("EntryDate",EntryDate);
String ReactorNumb = readRow.getAttribute("ReactorNumb").toString();
currRow.setAttribute("ReactorNumb",ReactorNumb);
String ReactorNumb = readRow.getAttribute("Cause").toString();
currRow.setAttribute("Cause",ReactorNumb);
CaDetailVO.insertRow(currRow);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top