]> git.mxchange.org Git - pizzaservice-war.git/blob - web/static/gender_selection_box.jsp
Added footer for admin area + error include file "direct_call.jsp"
[pizzaservice-war.git] / web / static / gender_selection_box.jsp
1 <%-- 
2         Document   : gender_selection_box
3         Created on : 11.08.2015, 13:02:12
4         Author     : Roland Haeder
5 --%>
6 <%@page import="org.mxchange.jcore.contact.Gender"%>
7 <%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%>
8 <%@page import="org.mxchange.pizzaapplication.application.PizzaApplication"%>
9 <%@page import="org.mxchange.pizzaapplication.beans.CustomerBean" %>
10
11 <jsp:useBean id="customer" scope="session" class="org.mxchange.pizzaapplication.customer.bean.PizzaServiceCustomerBean" type="CustomerBean" />
12
13 <%
14         // Init application instance
15         PizzaApplication app = PizzaServiceApplication.getInstance(application);
16 %>
17
18 <select class="select" name="gender" id="gender" size="1" <%=app.getDisabledHtmlFromSession(request, session)%>>
19         <%
20         // "Walk" through all genders and output them
21         for (final Gender gender : Gender.values()) {
22                 %>
23                 <option value="<%=gender.name()%>"<%
24                 // Get gender from bean
25                 Gender value=  customer.getGender();
26
27                 // Test it
28                 if (value.equals(gender)) {
29                         // Output selected="selected"
30                         out.print("selected=\"selected\"");
31                 }
32                 %>><%=gender%></option>
33                 <%
34         }
35         %>
36 </select>