Good morning, I have a registration screen, a jsp
with a modal where I implemented a picklist based on Bootstrap templates.
I need to select from my bank companies (doing this) on one side and move to the other side of the selected ones (which it does not), see image.
BoxApp.controller("CadastroCertificadoController", function($scope, $http) {
$scope.clientes = {};
$scope.iniciar = function() {
$http.get('/boxmlV2/cadastrocertificado').success(function(response) {
$scope.clientes = response;
});
};
$scope.iniciar();
});
My component picklist in jsp:
<div class="form-group">
<label class="control-label col-md-3">Empresas:</label>
<div class="col-md-9">
<select ng-model="certificadoIncluirAlterar.razaoSocial" multiple="multiple" class="multi-select" id="my_multi_select1" name="my_multi_select1[]">
<option ng-repeat="c in clientes" value="{{c.idCliente}}">{{c.razaoSocial}}</option>
</select>
</div>
</div>
My java Controller (only loads data from the client table on the screen):
@Controller
public class CadastroCertificadoController {
@Autowired
private ClienteService clienteService;
@RequestMapping(value = "/cadastrocertificado", method = RequestMethod.GET)
public ModelAndView iniciar(ModelMap modelMap) {
return new ModelAndView("cadastrocertificado");
}
@RequestMapping(value="/cadastrocertificado", method=RequestMethod.GET, produces={"application/json"})
public @ResponseBody List<ClienteDTO> obterTodos(ModelMap modelMap){
return clienteService.obterTodos();
}
}
I do not know what may be happening, any help is valid. Thank you.
Mock data, works like this:
<select ng-model="certificadoIncluirAlterar.razaoSocial" multiple="multiple" class="multi-select"
id="my_multi_select1" name="my_multi_select1[]">
<option>Teste 1 </option>
<option>Teste 2 </option>
<option>Teste 3 </option>
<option>Teste 4 </option>
<option>Teste 5 </option>
<option>Teste</option> <
<option selected>Teste 6</option>
<option selected>Teste 7</option>
</select>