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();
     }
   }
 }
 public void setUser(Users user) {
   // TODO Auto-generated method stub
   this.user = user;
   loadTemplates(user.getId());
 }