public String getViewDescription() { String d = super.getViewDescription(); ResearchItem r = (ResearchItem) this.object; String url = r.getUrl(); if ((url != null) && (url.trim().length() > 0)) { if (!url.toLowerCase().trim().startsWith("http://")) { url = "http://" + url; } // Add a space after the url to ensure that the markup code finds the "end". d = url + " <br /><br />" + d; } if (d == null) { d = "<i>No description.</i>"; } return d; }
public void fillForEdit() { ResearchItem r = (ResearchItem) this.object; this.urlEdit.setText(r.getUrl()); }
public void fillForSave() { ResearchItem r = (ResearchItem) this.object; r.setUrl(this.urlEdit.getText().trim()); }