Simply add the clickHandler in the for() after the creating of div..
something like these:
for(int i=0; i4; i++){
HTML div = new HTML(a href=\+numLink[i]+\Link+(i+1)+/a);
mainPanel.add(div);
final int app = i+1;
div.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event)
Thak you very much!
Il giorno sabato 5 aprile 2014 16:50:42 UTC+2, Matteo Fioravanti ha scritto:
Hi there, a function have this code to generate a list of event formatted
with html and css.
for (int i = 0; i 10; i++) {
HTML div = new HTML (a href=\+numLink[i]+\Link/a);
Hi there, a function have this code to generate a list of event formatted
with html and css.
for (int i = 0; i 10; i++) {
HTML div = new HTML (a href=\+numLink[i]+\Link/a);
RootPanel.get(mainLayout).add(div);
}
It 'a code for demonstration purposes, but my goal is to handle a
clickhandler