forked from camunda/camunda-bpm-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubmitLoanRequest.xhtml
More file actions
59 lines (54 loc) · 2.27 KB
/
submitLoanRequest.xhtml
File metadata and controls
59 lines (54 loc) · 2.27 KB
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
55
56
57
58
59
<!DOCTYPE HTML>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<f:view>
<f:metadata>
<!-- Start a new process instance. Process Definition Key is read internally from
request parameters and cached in the CDI conversation scope.
NOTE: Syntax is different when working on user task forms, see file "approveLoanRequest.xhtml".
-->
<f:event type="preRenderView" listener="#{camundaTaskForm.startProcessInstanceByKeyForm()}"/>
</f:metadata>
<h:head>
<title>Submit Loan Request</title>
</h:head>
<h:body>
<h2>Start Process Instance</h2>
<h1>External Forms Quickstart</h1>
<hr/>
<h1>Submit Loan Request</h1>
<h:form id="submitForm">
<h:panelGrid columns="2">
<p>
<label for="firstname">First Name</label>
<!-- create process variables using the processVariables map. -->
<h:inputText id="firstname" value="#{processVariables['firstname']}" required="true"/>
</p>
<p>
<label for="lastname">Last Name</label>
<h:inputText id="lastname" value="#{processVariables['lastname']}" required="true"/>
</p>
<p>
<label for="netIncome">Net Income</label>
<h:inputText id="netIncome" value="#{processVariables['netIncome']}" converter="javax.faces.Integer"
required="true"/>
</p>
<p>
<label for="amount">Loan Amount</label>
<!-- use type converters to convert process variables to the correct type. -->
<h:inputText id="amount" value="#{processVariables['amount']}" converter="javax.faces.Integer"
required="true"/>
</p>
</h:panelGrid>
<!-- The button starts a new process instance. This ends the conversation and redirects us to the tasklist.
NOTE: Syntax is different when working on user task forms, see file "approveLoanRequest.xhtml".
-->
<h:commandButton id="submit_button" value="Submit Request"
action="#{camundaTaskForm.completeProcessInstanceForm()}"/>
<h:messages style="color:red;margin:8px;"/>
</h:form>
</h:body>
</f:view>
</html>