forked from camunda/camunda-bpm-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapproveLoanRequest.xhtml
More file actions
58 lines (53 loc) · 2.2 KB
/
approveLoanRequest.xhtml
File metadata and controls
58 lines (53 loc) · 2.2 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
<!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 working on a task. Task Id is read internally from
request parameters and cached in the CDI conversation scope.
NOTE: Syntax is different when starting a process instance, see file "submitLoanRequest.xhtml".
-->
<f:event type="preRenderView" listener="#{camundaTaskForm.startTaskForm()}"/>
</f:metadata>
<h:head>
<title>Approve Loan Request</title>
</h:head>
<h:body>
<h2>Complete Task</h2>
<h1>External Forms Quickstart</h1>
<hr/>
<h1>Approve Loan Request</h1>
<h:form id="approveForm">
<h:panelGrid columns="2">
<p>
<label for="firstname">First Name</label>
<!-- read/write 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 completes the current task. This ends the conversation and redirects us to the tasklist.
NOTE: Syntax is different when starting a process instance, see file "submitLoanRequest.xhtml".
-->
<h:commandButton id="approve_button" value="Approve Request" action="#{camundaTaskForm.completeTask()}"/>
<h:messages style="color:red;margin:8px;"/>
</h:form>
</h:body>
</f:view>
</html>