how to align composite cell element vertically

100 views
Skip to first unread message

Bhumika Thaker

unread,
Sep 27, 2013, 7:51:04 AM9/27/13
to google-we...@googlegroups.com
Hi All,

I want to show CompositeCell 's  cells vertically as It's coming horizontally.

How can I do it?

Thanks,
Bhumiak.


Thomas Broyer

unread,
Sep 27, 2013, 8:57:34 AM9/27/13
to google-we...@googlegroups.com
The default implementation of render(Context,Element,C) in CompositeCell is:

```java
    for (HasCell<C, ?> hasCell : hasCells) {
      render(context, value, sb, hasCell);
    }
```

You can easily override it with code that wraps each call to render(Context,C,SafeHtmlBuilder,HasCell) into a <div>, or builds a <table>, or whatever.

Bhumika Thaker

unread,
Sep 27, 2013, 9:17:48 AM9/27/13
to google-we...@googlegroups.com
Thanks :) Yes, I have implemented it and resolved this issue.

@Override
public void render(com.google.gwt.cell.client.Cell.Context context,
SearchItem value, SafeHtmlBuilder sb) {
for (HasCell<SearchItem, ?> hasCell : searchCells) {
      render(context, value, sb, hasCell);
    }
}
  protected <X> void render(Context context, SearchItem value,
      SafeHtmlBuilder sb, HasCell<SearchItem, X> hasCell) {
    Cell<X> cell = hasCell.getCell();
    sb.appendHtmlConstant("<div style='display:block;padding-bottom:5px;'>");
    cell.render(context, hasCell.getValue(value), sb);
    sb.appendHtmlConstant("</div>");
  }
 
Thanks,
Bhumika

Timothy Spear

unread,
Sep 27, 2013, 9:24:00 AM9/27/13
to google-we...@googlegroups.com, Timothy Spear
I think I am missing a few simple things, and even Google Search has failed me this time. :D

The following covers some of the concepts fairly well:

However a few simple questions:
1. I cannot find the actuating logging example project.
2. I want client logging enabled/disabled based on run time settings not compile time (I have a logging.properties file to control server logging). Has anyone done this?


Thanks,

Tim
Reply all
Reply to author
Forward
0 new messages