Changes between Version 17 and Version 18 of MolgenisPlugin
- Timestamp:
- 03/22/11 16:06:08 (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MolgenisPlugin
v17 v18 23 23 == 2. Add reload logic to 'plugin.pubmed.!PubmedPlugin.java' == 24 24 Open the plugin.pubmed.!PubmedPlugin.java file from the handwritten/java folder. You see it has four methods including: 25 25 26 * 'handleRequest' to process user requests (updates, interactive features) 26 27 * 'reload' to implement what needs to be done if the page is reloaded (data loading) … … 39 40 { 40 41 //get the menu above this plugin 41 Menu Screen parentMenu = (MenuScreen)this.getParent();42 MenuModel parentMenu = (MenuModel)this.getParent(); 42 43 43 44 //get the form above the menu, this holds the contacts 44 Form Screen<Contact> parentForm = (FormScreen)parentMenu.getParent();45 FormModel<Contact> parentForm = (FormModel)parentMenu.getParent(); 45 46 46 47 //get the currently visible contact … … 66 67 } 67 68 }}} 68 69 69 == 3. Create a html layout in plugin.pubmed.!PubmedPlugin.ftl to show Pubmed in iframe == 70 70 Tip: [http://freemarker.sourceforge.net/eclipse.html Install Freemarker Plugin] into eclipse in order to make Eclipse show colorful highlighting. 71 71 72 * Edit the section between 'begin' and 'end':72 * Edit the section between 'begin' and 'end': 73 73 {{{ 74 74 <#--begin your plugin--> … … 81 81 82 82 == 4. Add user input handling to enable users to choose year == 83 * Further edit the 'plugin.pubmed.!PubmedPlugin.ftl' to add inputs to enter 'year' and a 'submit' button.[[BR]] 84 NOTICE: within MOLGENIS it has become practice to always use a field named ‘action’ to transfer the users intention. 85 Hence the weird {{{onclick=”__action.value=’setYear’}}} mechanism. 83 * Further edit the 'plugin.pubmed.!PubmedPlugin.ftl' to add inputs to enter 'year' and a 'submit' button.[[BR]] NOTICE: within MOLGENIS it has become practice to always use a field named ‘action’ to transfer the users intention. Hence the weird `onclick=”__action.value=’setYear’` mechanism. 86 84 87 85 {{{ … … 94 92 <#--end of your plugin--> 95 93 }}} 96 97 * Edit the 'plugin.pubmed.!PubmedPlugin.java' to handle the requests 94 * Edit the 'plugin.pubmed.!PubmedPlugin.java' to handle the requests 98 95 {{{ 99 96 #!java … … 105 102 } 106 103 } 107 }}} 104 }}}