retrieving data from a jtextfield of a different panel.


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: retrieving data from a jtextfield of a different panel.

  1. #1
    Join Date
    Jun 2005
    Posts
    1

    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);
    }
    }

  2. #2
    Join Date
    Jun 2005
    Posts
    3
    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center