2 Document : gender_selection_box
3 Created on : 11.08.2015, 13:02:12
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" %>
11 <jsp:useBean id="customer" scope="session" class="org.mxchange.pizzaapplication.customer.bean.PizzaServiceCustomerBean" type="CustomerBean" />
14 // Init application instance
15 PizzaApplication app = PizzaServiceApplication.getInstance(application);
18 <select name="gender" id="gender" size="1" <%=app.getDisabledHtmlFromSession(request, session)%>>
20 // "Walk" through all genders and output them
21 for (final Gender gender : Gender.values()) {
23 <option value="<%=gender.name()%>"<%
24 // Get gender from bean
25 Gender value= customer.getGender();
28 if (value.equals(gender)) {
29 // Output selected="selected"
30 out.print("selected=\"selected\"");
32 %>><%=gender%></option>