Cell Table Styling

347 views
Skip to first unread message

gangurg gangurg

unread,
Sep 20, 2011, 10:04:57 PM9/20/11
to Google-We...@googlegroups.com
I am trying to come up with styling of Cell Table . However  not able to figure out how . 

Trying to achieve 
1. Should be able to Style any given row of a Cell table 
2, Any Column of a Cell table 
3. dynamically style any particular cell of a cell table . 


I tried to do the style sheet injection means by using resource , but its not helping me . I would appreciate any working example for the same . 






Sudhakar Abraham

unread,
Sep 21, 2011, 3:06:03 AM9/21/11
to Google Web Toolkit
To change the property of .cellTableEvenRow , .cellTableOddRow in
CellTableStyle.css. Inject your CellTableStyle.css in client side
code.

//client side code
interface TableResources extends CellTable.Resources
{
@Source(value = { CellTable.Style.DEFAULT_CSS,
"CellTableStyle.css" })
CellTable.Style cellTableStyle();
}

CellTable table = new CellTable<String>(15, GWT.<TableResources>
create(TableResources.class));

//CellTableStyle.css

.cellTableCell {
height: 35px;
cursor: pointer;
padding: 2px 25px;
}
.cellTableEvenRow {
background: #fffaf0;
font-size:12px;
}

.cellTableOddRow {
background: #fff8e8;
}

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

gangurg gangurg

unread,
Sep 21, 2011, 3:23:09 AM9/21/11
to google-we...@googlegroups.com
Excellent . That worked fine ,  How do i change the style based on the value .
I want to show red color for cells in certain column of the cell Table , if value of that cell  is less than 100 . 



--
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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


Thomas Broyer

unread,
Sep 21, 2011, 5:34:28 AM9/21/11
to google-we...@googlegroups.com, Google-We...@googlegroups.com


On Wednesday, September 21, 2011 4:04:57 AM UTC+2, GWT Kid wrote:
I am trying to come up with styling of Cell Table . However  not able to figure out how . 

Trying to achieve 
1. Should be able to Style any given row of a Cell table 

Use CellTable#setRowStyles
 
2, Any Column of a Cell table 

CellTable#addColumnStyleName
 
3. dynamically style any particular cell of a cell table .

Override getCellStyleNames in your Column-s.

Zbyněk Kočí

unread,
Apr 1, 2014, 5:02:53 AM4/1/14
to google-we...@googlegroups.com
Hello, every single hint from you all for apply own style for this is about the same and causes an error:
"Caused by: java.lang.RuntimeException: Deferred binding failed for 'com.rpc.client.mainEntryPoint$TableResources' (did you forget to inherit a required module?)"

There is no solution yet, just one post about it but still isnt solved or even answered. Could anyone help me with this because you didnt say a word about changing or implementing something else... confused

gwt.xml:
<inherits name="com.google.gwt.user.User"/>
<inherits name="com.google.gwt.resources.Resources"/>

Dne středa, 21. září 2011 9:06:03 UTC+2 Sudhakar Abraham napsal(a):

Thomas Broyer

unread,
Apr 1, 2014, 5:06:13 AM4/1/14
to google-we...@googlegroups.com


On Tuesday, April 1, 2014 11:02:53 AM UTC+2, Zbyněk Kočí wrote:
Hello, every single hint from you all for apply own style for this is about the same and causes an error:
"Caused by: java.lang.RuntimeException: Deferred binding failed for 'com.rpc.client.mainEntryPoint$TableResources' (did you forget to inherit a required module?)"

There must be other errors up in the log. There's a reason why deferred binding failed.

Zbyněk Kočí

unread,
Apr 1, 2014, 5:16:09 AM4/1/14
to google-we...@googlegroups.com
Log:
onModuleLoad() threw an exception

Exception while loading module com.rpc.client.mainEntryPoint. See Development Mode for details.

java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:411) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.RuntimeException: Deferred binding failed for 'com.rpc.client.mainEntryPoint$TableResources' (did you forget to inherit a required module?) at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53) at com.google.gwt.core.shared.GWT.create(GWT.java:72) at com.google.gwt.core.client.GWT.create(GWT.java:86) at com.rpc.client.mainEntryPoint.onModuleLoad(mainEntryPoint.java:150) ... 9 more Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries) at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:610) at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:470) at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49) ... 12 more

Is it ok now? Or need something exactly from Devmode? BTW thanks for your fast response

Dne úterý, 1. dubna 2014 11:06:13 UTC+2 Thomas Broyer napsal(a):

Thomas Broyer

unread,
Apr 1, 2014, 5:30:18 AM4/1/14
to google-we...@googlegroups.com
Look at the Development Mode window (or the equivalent view in Eclipse if that's what you're using), the answer must be there.
(feel free to copy/paste the whole log if you need help understanding it)

Zbyněk Kočí

unread,
Apr 1, 2014, 5:50:33 AM4/1/14
to google-we...@googlegroups.com
Im using NetBeans
00:43:37,382 [DEBUG] Rebinding com.rpc.client.mainEntryPoint.TableResources     
     00:43:37,393 [DEBUG] Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
         00:43:37,394 [DEBUG] Preparing method cellTableStyle 
             00:43:37,396 [DEBUG] Finding resources 
                 00:43:37,396 [ERROR] Resource CellTable.css not found. Is the name specified as ClassLoader.getResource() would expect?

I understand this so I need to know where should I save my own CellTable.css which is actually in root of webpages.

00:43:37,400 [ERROR] Deferred binding failed for 'com.rpc.client.mainEntryPoint.TableResources'; expect subsequent failures  
        00:43:37,425 [ERROR] Unable to load module entry point class com.rpc.client.mainEntryPoint (see associated exception for details)
java.lang.RuntimeException: Deferred binding failed for 'com.rpc.client.mainEntryPoint$TableResources' (did you forget to inherit a required module?)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)
at com.google.gwt.core.shared.GWT.create(GWT.java:72)
at com.google.gwt.core.client.GWT.create(GWT.java:86)
at com.rpc.client.mainEntryPoint.onModuleLoad(mainEntryPoint.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:411)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:724)
Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:610)
at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:470)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
	at com.google.gwt.core.shared.GWT.create(GWT.java:72)
at com.google.gwt.core.client.GWT.create(GWT.java:86)
at com.rpc.client.mainEntryPoint.onModuleLoad(mainEntryPoint.java:150)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:411)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
 at java.lang.Thread.run(Thread.java:724)
00:43:37,426 [ERROR] Failed to load module 'com.rpc.main' from user agent 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36' at localhost:51831 

Hope this helps you 
 

Dne úterý, 1. dubna 2014 11:30:18 UTC+2 Thomas Broyer napsal(a):

Alberto Mancini

unread,
Apr 1, 2014, 6:08:10 AM4/1/14
to google-we...@googlegroups.com
Hi,
try to place the css file in the same package where  TableResources is;
com.rpc.client if i understand well.

Hope it helps.
   Alberto


--
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-tool...@googlegroups.com.

To post to this group, send email to google-we...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages