Changeset 3477


Ignore:
Timestamp:
09/07/10 15:23:41 (17 months ago)
Author:
rwagner
Message:
 
Location:
molgenis_projects/col7a1/handwritten/java/plugin/ui/search
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • molgenis_projects/col7a1/handwritten/java/plugin/ui/search/SearchPlugin.java

    r3476 r3477  
    6666        private PatientSummaryVO patientSummaryVO; 
    6767         
    68         //private SimpleSearch simpleSearch; 
     68        private SimpleSearchForm simpleSearchForm = new SimpleSearchForm(); 
    6969         
    7070        public SearchPlugin(String name, ScreenModel parent) 
     
    100100 
    101101                        this.action      = request.getAction(); 
    102  
    103 //                      if (StringUtils.isEmpty(this.action) || this.action.equals("simpleSearch")) 
    104 //                              this.populateSimpleSearch(); 
    105102 
    106103                        this.queryParametersVO.init(); 
     
    261258                                } 
    262259                        } 
     260                         
     261                        if (StringUtils.isEmpty(this.action) || this.action.equals("simpleSearch")) 
     262                                this.populateSimpleSearchForm(); 
    263263                } 
    264264                catch(Exception e) 
     
    299299        } 
    300300         
    301 //      private void populateSimpleSearch() 
    302 //      { 
    303 //              this.simpleSearch = new SimpleSearch(); 
    304 //               
    305 //              simpleSearch.setAction(new HiddenInput("__action", "findMutationsByTerm")); 
    306 //              simpleSearch.setTarget(new HiddenInput("__target", this.getName())); 
    307 //               
    308 //              StringInput term = new StringInput("term"); 
    309 //              term.setSize(10); 
    310 //              simpleSearch.setTerm(term); 
    311 //      } 
    312 // 
    313 //      public SimpleSearch getSimpleSearch() 
    314 //      { 
    315 //              return this.simpleSearch; 
    316 //      } 
     301        private void populateSimpleSearchForm() 
     302        { 
     303                this.simpleSearchForm.get("term").setValue(this.mutationSearchCriteriaVO.getSearchTerm()); 
     304        } 
     305 
     306        public SimpleSearchForm getSimpleSearchForm() 
     307        { 
     308                return this.simpleSearchForm; 
     309        } 
    317310 
    318311        public String getAction() 
  • molgenis_projects/col7a1/handwritten/java/plugin/ui/search/searchForm.ftl

    r3460 r3477  
    11<table cellpadding="4" cellspacing="4"> 
    22<#if !queryParametersVO.expertSearch> 
     3<#assign form = screen.simpleSearchForm> 
    34<tr> 
    4         <td>Search term: <form method="post" enctype="multipart/form-data"><input type="hidden" name="__target" value="${screen.name}" /><input type="hidden" name="__action" value="findMutationsByTerm"/><input type="text" name="term" size="10"></form></td> 
     5        <td>Search term: <form method="post" enctype="multipart/form-data"><input type="hidden" name="__target" value="${screen.name}" />${form.__action}${form.term}</form></td> 
    56        <td><a href="molgenis.do?__target=${screen.name}&__action=init&expertSearch=1">Expert search</a></td> 
    67</tr> 
Note: See TracChangeset for help on using the changeset viewer.