]> git.mxchange.org Git - pizzaservice-war.git/blob - web/static/gender_selection_box.jsp
missed align=right + column span over new column
[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.beans.controller.PizzaServiceBean"%>
8 <%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%>
9 <%@page import="org.mxchange.pizzaapplication.beans.customer.CustomerBean" %>
10
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.controller.PizzaServiceBean" type="PizzaBean" />
13
14 <select class="select" name="gender" id="gender" size="1" <%=controller.getDisabledHtmlFromSession(request, session)%>>
15         <%
16         // "Walk" through all genders and output them
17         for (final Gender gender : Gender.values()) {
18                 %>
19                 <option value="<%=gender.name()%>"<%
20                 // Get gender from bean
21                 Gender customerGender =  customer.getGender();
22
23                 // Test it
24                 if (customerGender.equals(gender)) {
25                         // Output selected="selected"
26                         out.print("selected=\"selected\"");
27                 }
28                 %>><%=gender%></option>
29                 <%
30         }
31         %>
32 </select>