Monday, July 21, 2014

Can we have both ClickableTextCell and ButtonCell on the same column in GWT?

Ok, I have an IndexedColumn

public class IndexedColumn extends Column<List<String>, String>{      public IndexedColumn(int index){         super(new ClickableTextCell()); // by default it is ClickableTextCell      }  }  

When creating column

IndexedColumn objectColumn=new IndexedColumn(6){      @Override      public String getCellStyleNames(Context context, List<String> object) {          if (object.get(12).equals("button")){              return getView().getRes().css().gwtCellButton();          }          else if(object.get(12).equals("1")){              return getView().getRes().css().redColor();          }          return getView().getRes().css().myClickableTextCellStyle();      }  }  

//css

.myClickableTextCellStyleBold{      font-weight:bold;  }  .myClickableTextCellStyleNormal{      font-weight:normal !important;  }    .myClickableTextCellStyle, .myClickableTextCellStyleBold, .myClickableTextCellStyleNormal  {      cursor: pointer;      cursor: hand;  }  .gwt-Button, .gwtCellButton button, .gwtCellButtonSmall button {    margin: 0;    padding: 5px 7px;    text-decoration: none;    cursor: pointer;    cursor: hand;    font-size:small;    background: black;    border:1px solid #bbb;    border-bottom: 1px solid #a0a0a0;    border-radius: 3px;   -moz-border-radius: 3px;    color: white;    }  

after ran, it can pick up the getView().getRes().css().redColor() but didn't pick up the getView().getRes().css().gwtCellButton().

Is it possible to have both ClickableTextCell and ButtonCell on the same column, if it is, then how to do it?

http://stackoverflow.com/questions/24868496/can-we-have-both-clickabletextcell-and-buttoncell-on-the-same-column-in-gwt

--
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+unsubscribe@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.

No comments:

Post a Comment