Set Option Selected JSP form

0

Modify data from form (Selected Option Brands)

I am loading all the fields of the database and one is a combobox and what I want is for it to load the value it has and then deploy it to be able to modify this value that is in selected mode.

<table > <tr> <td>ID</td> <td><input type="text" name="codigo" disabled value="<%= p.getCodigo() %>"></td> </tr> <tr> <td>Producto</td> <td><input type="text" name="producto" required value="<%= p.getroducto()%>"></td> </tr> <tr> <td>Rol</td> <td> <select name="marca"> <% List<MarcaDTO> lista = (List<MarcaDTO>)request.getAttribute("marcas"); if(lista!= null) { for(MarcaDTO m: lista) { %> <option value="<%=m.getCodigo()%>" selected="true"><%=m.getNombre()%></option> <% } } %> </select>

    
asked by LUNA95087 03.11.2018 в 03:06
source

0 answers