java - Issue with displaying a Label in a FlexTable -


when execute code below image displayed name not displayed below it. window.alert display correct name. error must in line:

flextable.setwidget(row + 1, col, new label(youthmember.getsurname() + ", " + youthmember.getfirstname())); 

i have searched similar code online can not find solution.

i using eclipse juno , gwt.

your appreciated.

regards,

glyn

 public void renderyouthmembertable(list<youthmember> youthmemberlist) {     if (youthmemberlist != null) {         int row = 0;         int col = 0;         flextable.clear();         (final youthmember youthmember : youthmemberlist) {             string imagedatastring = youthmember.getphotograph();              //display each image name under it.             image image = new image(imagedatastring);              flextable.setwidget(row, col, image);             flextable.setwidget(row + 1, col, new label(youthmember.getsurname() + ", " + youthmember.getfirstname()));             window.alert("name " + youthmember.getsurname() + ", " + youthmember.getfirstname());              //add click handler             image.addclickhandler(new clickhandler(){                  @override                 public void onclick(clickevent event){                     // - go next view passing id                     //returnid = youthmember.getid();                     //window.alert("returnid = " + returnid);                     //navhandler.go(awardoverview);                     window.alert("picture clicked");                 }             });              //go next column , if end of columns             //drop 2 rows , go first column             col = col + 1;             if (col > 7) {                 row = row + 2;                 col = 0;             }         }     }  } 

the answer name displayed. however, not visible. changed code (the change after image display - worked):

flextable.setwidget(row, col, image);             label lblymname = new label (youthmember.getsurname() + ", " + youthmember.getfirstname());             lblymname.setstylename("gwt-label-login");             lblymname.setwidth("151px");             flextable.setwidget(row + 1, col, lblymname); 

the answer name displayed. however, not visible. changed code (the change after image display - worked):

flextable.setwidget(row, col, image);         label lblymname = new label (youthmember.getsurname() + ", " + youthmember.getfirstname());         lblymname.setstylename("gwt-label-login");         lblymname.setwidth("151px");         flextable.setwidget(row + 1, col, lblymname); 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -