Codota Logo
FormRenderContextManager.newContext
Code IndexAdd Codota to your IDE (free)

How to use
newContext
method
in
org.jbpm.formModeler.api.client.FormRenderContextManager

Best Java code snippets using org.jbpm.formModeler.api.client.FormRenderContextManager.newContext (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: org.jbpm/jbpm-form-modeler-form-provider

protected String renderProcessForm(ProcessDefinition process, InputStream template, Map<String, Object> renderContext) {
  String result = null;
  try {
    Form form = formSerializationManager.loadFormFromXML(template);
    Map ctx = new HashMap();
    ctx.put("process", process);
    // Adding forms to context while forms are'nt available on marshaller classloader
    FormRenderContext context = formRenderContextManager.newContext(form, process.getDeploymentId(), ctx, new HashMap<String, Object>());
    formRenderContentMarshaller.addContentMarshaller(context.getUID(), (ContentMarshallerContext) renderContext.get("marshallerContext"));
    result = context.getUID();
  } catch (Exception e) {
    log.warn("Error rendering form: ", e);
  }
  return result;
}
origin: org.jbpm/jbpm-form-modeler-form-provider

protected String renderTaskForm(Task task, InputStream template, Map<String, Object> renderContext) {
  String result = null;
  try {
    Form form = formSerializationManager.loadFormFromXML(template);
    Map inputs = new HashMap();
    Map outputs;
    if (task.getTaskData().getOutputContentId() == -1) outputs = new HashMap();
    else outputs = (Map) renderContext.get("outputs");
    Map m = (Map) renderContext.get("inputs");
    if (m != null) inputs.putAll(m);
    inputs.put("task", task);
    // Adding forms to context while forms are'nt available on marshaller classloader
    FormRenderContext context = formRenderContextManager.newContext(form, task.getTaskData().getDeploymentId(), inputs, outputs);
    formRenderContentMarshaller.addContentMarshaller(context.getUID(), (ContentMarshallerContext) renderContext.get("marshallerContext"));
    String status = task.getTaskData().getStatus().name();
    boolean readonly = !"InProgress".equals(status);
    context.setReadonly(readonly);
    result = context.getUID();
  } catch (Exception e) {
    log.warn("Error rendering form: ", e);
  }
  return result;
}
origin: org.jbpm/jbpm-wb-forms-modeler-backend

@Override
public FormModelerFormRenderingSettings render(ProcessRenderingSettings settings) {
  if (!StringUtils.isEmpty(settings.getFormContent())) {
    try {
      Form form = formSerializationManager.loadFormFromXML(settings.getFormContent());
      Map ctx = new HashMap();
      ctx.put("process",
          settings.getProcess());
      // Adding forms to context while forms are'nt available on marshaller classloader
      FormRenderContext context = formRenderContextManager.newContext(form,
                                      settings.getServerTemplateId(),
                                      ctx,
                                      new HashMap<>());
      formRenderContentMarshaller.addContentMarshaller(context.getUID(),
                               settings.getMarshallerContext());
      return new FormModelerFormRenderingSettings(context.getUID());
    } catch (Exception e) {
      log.warn("Error rendering form: ",
           e);
    }
  }
  return null;
}
origin: org.jbpm/jbpm-wb-forms-modeler-backend

FormRenderContext context = formRenderContextManager.newContext(form,
                                settings.getServerTemplateId(),
                                inputs,
org.jbpm.formModeler.api.clientFormRenderContextManagernewContext

Popular methods of FormRenderContextManager

  • getRootContext
  • getFormRenderContext
  • fireContextFormResize
  • fireContextSubmit
  • fireContextSubmitError
  • persistContext
  • removeContext

Popular in Java

  • Making http requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • getSystemService (Context)
  • requestLocationUpdates (LocationManager)
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now