pass a parameter from a list element to a window

Hi,

I have a list with several elements (templates)… and i have some links in that template thar fires when onclick…

The action linked to that onclick opens a window and i want to pass the obj from the list element to that window…

this is my code:

onclick event:

function verDetallePublicacion(listItemObject) {
_ventana.verDetallePublicacion();
$$(“winDetallePublicacion”).show();
}

window.js (where i implement window views)

var _ventana = {};
_ventana.elements = {};

_ventana.verDetallePublicacion = function () {
dhx.ui(_ventana.elements.winDetallePublicacion);
};

_ventana.elements.winDetallePublicacion = {
view: “window”,
id: “winDetallePublicacion”,
head:
{
view: “template”,
id: “winHeadDetallePublicacion”,
template: “

head
”,
height: 40
},
body:
{
view: “template”,
template: “
test

}
}

and i want to have the object of the list item in the view “ventana.elements.winDetallePublicacion”

how can i do this?

thanks and greetings!

Hello,

it would be better to put a layout into a window. And in one row/column you can configure list, other rows/cols will be different elements that you planned to put into template.

hi,

i think i dont explain it very well…i am sorry…

i just want to pass the object (with all my data) from one list element to a window that opens when the user clicks a list element image for example on its event onclick.

I want this because if i want to modify the list element data, a window with all its data is opened and the user can modify it…and with this way i dont have to call server again…

thanks and greetings!

You can bind list with form. The form can be put inside window. Please check the demo in touch package:

dhtmlxTouch/samples/10_server/01_loading/04_list_form_auto.html

Thank you very much!!

it worked!!

You are welcome )