Ejemplo n.º 1
0
  public void loadTemplates(int userID) {
    Vector templates = null;
    try {
      templates = (Vector) reportPanel.getRemoteTask().getUserJob(userID);
      for (int i = 0; i < templates.size(); i++) {
        UserJob userjobs = (UserJob) templates.get(i);
        tablemodel.insertRow(i, new Object[] {userjobs.getId(), userjobs.getTreeNodeName()});
      }

    } catch (RemoteException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
Ejemplo n.º 2
0
 public void saveTemplate(String templateName, int userID) {
   if (!commonUTIL.isEmpty(templateName)) {
     job = new UserJob();
     job.setId(0);
     job.setTabid(0);
     job.setUserID(user.getId());
     job.setType(getReportType().toUpperCase());
     job.setTreeNodeName(templateName);
     setTemplateFrame(templateName);
     try {
       job = (UserJob) reportPanel.getRemoteTask().saveUserJob(job);
       tablemodel.insertRow(
           tablemodel.getRowCount(), new Object[] {job.getId(), job.getTreeNodeName()});
     } catch (RemoteException e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
     }
   }
 }