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.beans.PizzaServiceBean"%>
8 <%@page import="org.mxchange.pizzaapplication.beans.PizzaBean"%>
9 <%@page import="org.mxchange.pizzaapplication.beans.customer.CustomerBean" %>
11 <jsp:useBean id="customer" scope="session" class="org.mxchange.pizzaapplication.beans.customer.PizzaServiceCustomerBean" type="CustomerBean" />
12 <jsp:useBean id="controller" scope="session" class="org.mxchange.pizzaapplication.beans.PizzaServiceBean" type="org.mxchange.pizzaapplication.beans.PizzaBean" />
14 <select class="select" name="gender" id="gender" size="1" <%=controller.getDisabledHtmlFromSession(request, session)%>>
16 // "Walk" through all genders and output them
17 for (final Gender gender : Gender.values()) {
19 <option value="<%=gender.name()%>"<%
20 // Get gender from bean
21 Gender customerGender = customer.getGender();
24 if (customerGender.equals(gender)) {
25 // Output selected="selected"
26 out.print("selected=\"selected\"");
28 %>><%=gender%></option>