开发者

Can I add style using class="xyz" to GWT CellList rendering?

开发者 https://www.devze.com 2023-04-06 17:51 出处:网络
If I do this sb.appendHtmlConstant(\"<div class=\\\"\" + CELL_RESOURCES.style().title() + \"\\\">\");

If I do this

sb.appendHtmlConstant("<div class=\"" + CELL_RESOURCES.style().title() + "\">");

in the CellList render method then my generated HTML ends up looking like

<div class="title">Wow!</div>

but the CSS that is generated does 开发者_如何学JAVAnot include the "title" class/selector and so no CSS gets applied.

Is there a way of applying CSS styling to parts of the CellList rendering?


Did you call CELL_RESOURCES.style().ensureInjected(); somewhere in your code (preferable as soon as possible in you startup code)? to make sure the css is actually injected?

0

精彩评论

暂无评论...
验证码 换一张
取 消