Author: fdesbois Date: 2010-06-16 20:43:42 +0000 (Wed, 16 Jun 2010) New Revision: 541 Log: Evo #2332 : Add javadoc Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Contacts.java Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Contacts.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Contacts.java 2010-06-16 20:39:29 UTC (rev 540) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Contacts.java 2010-06-16 20:43:42 UTC (rev 541) @@ -729,11 +729,21 @@ @Environmental private RenderSupport renderSupport; + /** + * Instantiate the commentController javascript. + */ @Log void afterRender() { renderSupport.addScript("commentController = new ContactComment();"); } + /** + * Retrieve the current contact comment depends on edition. Also a comment + * can be added separatly by admin or coordinator. + * + * @return the current contact comment used for edition in commentWindow + * @see #getCommentData() + */ public String getContactComment() { String comment = null; if (isEditionMode()) { @@ -749,6 +759,12 @@ return comment == null ? "" : comment.replace("'", "\'"); } + /** + * Prepare comment data for commentController javascript. This data is + * used to open the comment window in javascript. + * + * @return a JSONObject that contains data needed for javascript + */ public JSONObject getCommentData() { JSONObject json = new JSONObject(); json.put("id", contact.getId());