Search in sources :

Example 26 with HtmlBuilder

use of org.jmesa.view.html.HtmlBuilder in project OpenClinica by OpenClinica.

the class ListStudySubjectTableFactory method viewParticipateBuilder.

private String viewParticipateBuilder(StudySubjectBean studySubject) throws Exception {
    participantPortalRegistrar = new ParticipantPortalRegistrar();
    StudyBean study = (StudyBean) studyDAO.findByPK(studySubject.getStudyId());
    StudyBean pStudy = getParentStudy(study.getOid());
    String url = participantPortalRegistrar.getStudyHost(pStudy.getOid());
    System.out.println("URL:  " + url);
    HtmlBuilder actionLink = new HtmlBuilder();
    // actionLink.a().href("url?id=" + studySubject.getId());
    actionLink.a().href(url + "?ssid=" + studySubject.getLabel());
    actionLink.append("target=\"_blank\"");
    actionLink.append("onMouseDown=\"javascript:setImage('bt_Participate1','images/bt_Ocui_d.gif');\"");
    actionLink.append("onMouseUp=\"javascript:setImage('bt_Participate1','images/bt_Ocui.gif');\"").close();
    actionLink.img().name("bt_Participate1").src("images/bt_Ocui.gif").border("0").alt(resword.getString("connect_participant")).title(resword.getString("connect_participant")).append("hspace=\"2\"").end().aEnd();
    actionLink.append("   ");
    return actionLink.toString();
}
Also used : ParticipantPortalRegistrar(org.akaza.openclinica.service.pmanage.ParticipantPortalRegistrar) StudyBean(org.akaza.openclinica.bean.managestudy.StudyBean) HtmlBuilder(org.jmesa.view.html.HtmlBuilder)

Example 27 with HtmlBuilder

use of org.jmesa.view.html.HtmlBuilder in project OpenClinica by OpenClinica.

the class ViewRuleAssignmentTableFactory method executeLinkBuilder.

private String executeLinkBuilder(Integer ruleSetId) {
    HtmlBuilder actionLink = new HtmlBuilder();
    actionLink.a().href("RunRuleSet?ruleSetId=" + ruleSetId);
    actionLink.append("onMouseDown=\"javascript:setImage('bt_run','images/bt_ExexuteRules.gif');\"");
    actionLink.append("onMouseUp=\"javascript:setImage('bt_run','images/bt_ExexuteRules.gif');\"").close();
    actionLink.img().name("Run").src("images/bt_ExexuteRules.gif").border("0").alt("Run").title("Run").append("hspace=\"2\"").end().aEnd();
    actionLink.append("   ");
    return actionLink.toString();
}
Also used : HtmlBuilder(org.jmesa.view.html.HtmlBuilder)

Example 28 with HtmlBuilder

use of org.jmesa.view.html.HtmlBuilder in project OpenClinica by OpenClinica.

the class ViewRuleAssignmentTableFactory method removeLinkBuilder.

private String removeLinkBuilder(Integer ruleSetRuleId, Integer ruleSetId) {
    HtmlBuilder actionLink = new HtmlBuilder();
    actionLink.a().href("UpdateRuleSetRule?action=remove&ruleSetRuleId=" + ruleSetRuleId + "&ruleSetId=" + ruleSetId);
    actionLink.append("onClick='return confirm(\"" + resword.getString("rule_if_you_remove_this") + "\");'");
    actionLink.append("onMouseDown=\"javascript:setImage('bt_Remove1','images/bt_Remove_d.gif');\"");
    actionLink.append("onMouseUp=\"javascript:setImage('bt_Remove1','images/bt_Remove.gif');\"").close();
    actionLink.img().name("bt_Remove1").src("images/bt_Remove.gif").border("0").alt("Remove").title("Remove").append("hspace=\"2\"").end().aEnd();
    actionLink.append("   ");
    return actionLink.toString();
}
Also used : HtmlBuilder(org.jmesa.view.html.HtmlBuilder)

Example 29 with HtmlBuilder

use of org.jmesa.view.html.HtmlBuilder in project OpenClinica by OpenClinica.

the class ViewRuleAssignmentTableFactory method extractXmlLinkBuilder.

private String extractXmlLinkBuilder(Integer ruleSetRuleId) {
    HtmlBuilder actionLink = new HtmlBuilder();
    actionLink.a().href("DownloadRuleSetXml?ruleSetRuleIds=" + ruleSetRuleId);
    actionLink.append("onMouseDown=\"javascript:setImage('bt_Download','images/bt_Download_d.gif');\"");
    actionLink.append("onMouseUp=\"javascript:setImage('bt_Download','images/bt_Download.gif');\"").close();
    actionLink.img().name("bt_Download").src("images/bt_Download.gif").border("0").alt("Download XML").title("Download XML").append("hspace=\"2\"").end().aEnd();
    actionLink.append("   ");
    return actionLink.toString();
}
Also used : HtmlBuilder(org.jmesa.view.html.HtmlBuilder)

Example 30 with HtmlBuilder

use of org.jmesa.view.html.HtmlBuilder in project OpenClinica by OpenClinica.

the class ListEventsForSubjectTableFactory method removeStudySubjectLinkBuilder.

private String removeStudySubjectLinkBuilder(StudySubjectBean studySubject) {
    HtmlBuilder actionLink = new HtmlBuilder();
    actionLink.a().href("RemoveStudySubject?action=confirm&id=" + studySubject.getId() + "&subjectId=" + studySubject.getSubjectId() + "&studyId=" + studySubject.getStudyId());
    actionLink.append("onMouseDown=\"javascript:setImage('bt_Remove1','images/bt_Remove_d.gif');\"");
    actionLink.append("onMouseUp=\"javascript:setImage('bt_Remove1','images/bt_Remove.gif');\"").close();
    actionLink.img().name("bt_Remove1").src("images/bt_Remove.gif").border("0").alt(resword.getString("remove")).title(resword.getString("remove")).append("hspace=\"2\"").end().aEnd();
    actionLink.append("   ");
    return actionLink.toString();
}
Also used : HtmlBuilder(org.jmesa.view.html.HtmlBuilder)

Aggregations

HtmlBuilder (org.jmesa.view.html.HtmlBuilder)53 HtmlSnippets (org.jmesa.view.html.HtmlSnippets)6 SyndEntryImpl (com.sun.syndication.feed.synd.SyndEntryImpl)1 SimpleDateFormat (java.text.SimpleDateFormat)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 StudyBean (org.akaza.openclinica.bean.managestudy.StudyBean)1 RuleActionBean (org.akaza.openclinica.domain.rule.action.RuleActionBean)1 ParticipantPortalRegistrar (org.akaza.openclinica.service.pmanage.ParticipantPortalRegistrar)1 BasicCellEditor (org.jmesa.view.editor.BasicCellEditor)1 CellEditor (org.jmesa.view.editor.CellEditor)1 HtmlColumn (org.jmesa.view.html.component.HtmlColumn)1 HtmlRow (org.jmesa.view.html.component.HtmlRow)1 HtmlTable (org.jmesa.view.html.component.HtmlTable)1