Monday, September 26, 2011

Re: TextCell in Cell Table

Subclass the Column<T,C> class, and pass the TextCell in super class
constructor. Try the below code.

public class MyTextCellColumn extends Column<YourDomainClass, String>
{
public MyTextCellColumn ()
{
super(new TextCell());
}

@Override
public String getValue(YourDomainClass object)
{

return object.getName();
}

//add the column to your celltable

cellTable.addColumn(new MyTextCellColumn (),"Col Name") ;

S. Abraham
www.DataStoreGwt.com
Persist objects directly in GAE

On Sep 24, 9:20 pm, gangurg gangurg <gang...@gmail.com> wrote:
> Can I add Text Cell in Cell Table . I extended TextCellbut later realzied
> cant add cellTable.addColumn(MyTextCell,"Col Name")
>
> public class MyTextCell extends TextCell
> {
> public MyTextCell () { super(); }
>  public void render(Context context, SafeHtml value, SafeHtmlBuilder sb)
> {
> if (value != null) {
>  //Ren der logic}
>
>  }
>
> }
>
> I just realized

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment