-
retrieving data from a jtextfield of a different panel.
I have a Master/Detail panels set up in a form. Based on a date that is entered on the Master panel, thru a jbutton on the detail panel, I am reading data from a different table to load the detail panel. May problem is that while in the detail panel, how do code to retrieve the data from the master panel.
Thanks, william
private void cmdLoadER_actionPerformed(ActionEvent e)
{
String workDate = ?? MasterPanel jTextField ??
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();
currRow.setAttribute("Entrydate","06/22/2005");
String ReactorNumb = readRow.getAttribute("Reactornumb").toString();
currRow.setAttribute("ReactorNumb",ReactorNumb);
String Cause = readRow.getAttribute("Cause").toString();
currRow.setAttribute("Cause",ReactorNumb);
CaDetailVO.insertRow(currRow);
}
}
-
Bind the jTextfield of masterpanel with some attribute of any viewobject, and it will allow u to access its value by getting the current row of that viewobject and by using row.getAttribute("...") of the attribute to which u have bound ur textfield
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks