forked from camunda/camunda-bpm-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart-form.xhtml
54 lines (52 loc) · 2.28 KB
/
start-form.xhtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE HTML>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<f:view>
<f:metadata>
<f:viewParam id="processDefinitionKey" name="processDefinitionKey" />
<f:viewParam id="callbackUrl" name="callbackUrl" />
<f:event type="preRenderView"
listener="#{camundaTaskForm.startProcessInstanceByKeyForm(processDefinitionKey, callbackUrl)}" />
</f:metadata>
<h:head>
<h:outputStylesheet library="webjars/bootstrap/2.3.2/css" name="bootstrap.css"/>
<h:outputStylesheet library="css" name="style.css" />
<!-- if you need it - it is right there:
<h:outputScript type="text/javascript" library="webjars/bootstrap/2.3.2/js" name="bootstrap.js" />
-->
<title>Start Process: #{processDefinitionKey}</title>
</h:head>
<h:body>
<div class="container">
<div class="row quickstart-info">
<h1>BPMN model API JSF form example</h1>
<p>
This examples shows a generic JSF form which gathers informations from the actual BPMN process definition.
</p>
<p>
This form displays the <code>name</code> attribute of the start event as the title of the form.
Also the button label is generated by the <code>name</code> attribute of the following user task.
</p>
</div>
<div class="row quickstart-form">
<h:form class="form-horizontal">
<legend>#{startEventController.getStartEventName(processDefinitionKey)}</legend>
<div class="control-group">
<label class="control-label" for="inputName">Title:</label>
<div class="controls">
<h:inputText disabled="false" id="inputName" value="#{processVariables['ticket-title']}" />
</div>
</div>
<div class="control-group">
<div class="controls">
<h:commandButton id="submit_button" type="submit" value="#{startEventController.getUserTaskName(processDefinitionKey)}"
action="#{camundaTaskForm.completeProcessInstanceForm()}" styleClass="btn btn-primary" />
</div>
</div>
</h:form>
</div>
</div>
</h:body>
</f:view>
</html>