Re: Similar to php post method

2014-04-07 Thread Davide Micheletti
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) {
 Window.alert(Pressed + app);
 }
 });
 }





On Sat, Apr 5, 2014 at 4:50 PM, Matteo Fioravanti theking...@gmail.comwrote:

 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 foreach link, I should also be good to change the tag with a
 div if necessary.
 In php+html this it was very clear for me, but in gwt i don't understand
 what i should i do.

 When I click the link I have to activate a feature that let me change the
 html code of the page, help me please!

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to google-web-toolkit+unsubscr...@googlegroups.com.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 Visit this group at http://groups.google.com/group/google-web-toolkit.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Similar to php post method

2014-04-07 Thread Matteo Fioravanti
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);
  RootPanel.get(mainLayout).add(div);
 }


 It 'a code for demonstration purposes, but my goal is to handle a 
 clickhandler foreach link, I should also be good to change the tag with a 
 div if necessary.
 In php+html this it was very clear for me, but in gwt i don't understand 
 what i should i do.

 When I click the link I have to activate a feature that let me change the 
 html code of the page, help me please!


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Similar to php post method

2014-04-05 Thread Matteo Fioravanti
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 foreach link, I should also be good to change the tag with a 
div if necessary.
In php+html this it was very clear for me, but in gwt i don't understand 
what i should i do.

When I click the link I have to activate a feature that let me change the 
html code of the page, help me please!

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.