lunes, 28 de marzo de 2016

Juntar arreglo con form para enviarlo como un arreglo de controles dinamicos html jquery


//arreglo es una variable de tipo array
var arreglo= ["2368", "1818", "2365"];
           var model = $("#formulario").serializeArray();

                    $.map(arreglo, function (val, i) {
                        return model.push({ "name": "nombrePropiedadoControl[" + i + "]", "value": val });
                    });

lunes, 7 de diciembre de 2015

Group concat en oracle 11g como el de MYSQL

Group concat en oracle 11g como el de MYSQL
SELECT 
    col1,
    LISTAGG(col2, ', ') WITHIN GROUP (ORDER BY col2) "names"
FROM table_x
GROUP BY col1

Thymeleaft envio de listas de objetos al server

El isuiente link me ayudo bastante, sin embargo con los select no funciona.

http://nixmash.com/java/object-child-lists-in-thymeleaf-forms-and-spring-mvc/

jueves, 16 de julio de 2015

Verificar que elemento en un CheckBoxList dispara un evento

 protected void chkEtapaLegal_SelectedIndexChanged(object sender, EventArgs e)
        {
            CheckBoxList list = (CheckBoxList)sender;
            string[] control = Request.Form.Get("__EVENTTARGET").Split('$');
            int idx = control.Length - 1;
            string sel = list.Items[Int32.Parse(control[idx])].Value;   
          
        }