예제 #1
0
  // it was necessary to do it this way rather than using 'jsp:plugin' in the
  // jsf because the 'codebase' parameter does not support dynamic value setting
  public String getAppletHtml() {
    String baseURI = getApplicationBean().getResServiceBaseURI();
    Participant p = _sb.getParticipant();
    Dimension view = getViewSize();
    StringBuilder result = new StringBuilder("<applet width=\"");
    result
        .append(view.width)
        .append("\" height=\"")
        .append(view.height)
        .append("\"")
        .append(" archive=\"visualiser.jar,javax.servlet.jar,jdom-2.0.5.jar,")
        .append(" resourceService.jar,saxon9.jar,log4j-1.2.16.jar,commons-codec-1.9.jar\"")
        .append(" codebase=\"../../visualiserApplet\"")
        .append(" code=\"worklist.WRKLApplet.class\" MAYSCRIPT>")
        .append(" <param name=\"user\" value=\"")
        .append(p.getUserID())
        .append("\"/>")
        .append(" <param name=\"pass\" value=\"")
        .append(p.getPassword())
        .append("\"/>")
        .append(" <param name=\"urYAWL\" value=\"")
        .append(baseURI)
        .append("\"/>")
        .append("</applet>");

    return result.toString();
  }
예제 #2
0
  /** updates a workitem after editing on a dynamic form */
  private void postEditWIR() {
    if (_sb.isWirEdit()) {
      WorkItemRecord wir = _sb.getVisualiserEditedWIR();
      if (wir != null) {
        Element data =
            JDOMUtil.stringToElement(((DynFormFactory) getBean("DynFormFactory")).getDataList());
        wir.setUpdatedData(data);
        _rm.getWorkItemCache().update(wir);

        if (_sb.isCompleteAfterEdit()) {
          completeWorkItem(wir, _sb.getParticipant());
        }
      } else {
        msgPanel.error("Could not complete workitem. Check log for details.");
      }
    }
    _sb.setWirEdit(false);
    _sb.setCompleteAfterEdit(false);
    _sb.setVisualiserReferred(false);
    _sb.setVisualiserEditedWIR(null);
    if (msgPanel.hasMessage()) forceRefresh();
  }
예제 #3
0
 public String getPassword() {
   Participant p = _sb.getParticipant();
   return (p != null) ? p.getPassword() : "";
 }
예제 #4
0
 public String getUsername() {
   Participant p = _sb.getParticipant();
   return (p != null) ? p.getUserID() : "";
 }