1
私は自分のCellTableのデザインをカスタマイズするのが好きです。その理由から、私はStackoverflowといくつかのチュートリアルで多くの提案された方法を試しました。それは私のために働かないし、私は理由を知らない。ヒントは大歓迎です。GWT CellTable Styling
GWT 2.8.1が使用されます。
ログ/エラー:
Creating assignment for cellTableStyle()
Creating image sprite classes
Replacing property-based @if blocks
Replacing CSS class names
[ERROR] The following unobfuscated classes were present in a strict CssResource:
[ERROR] gwt-cellTableHoveredRow
[ERROR] gwt-cellTableSelectedRowCell
[ERROR] gwt-cellTableKeyboardSelectedCell
[ERROR] gwt-cellTableLastColumnHeader
[ERROR] gwt-cellTable
[ERROR] gwt-cellTableKeyboardSelectedRow
[ERROR] gwt-cellTableHoveredRowCell
[ERROR] gwt-cellTableFirstColumnHeader
[ERROR] gwt-cellTableKeyboardSelectedRowCell
[ERROR] gwt-cellTableCell
[ERROR] gwt-cellTableHeader
[ERROR] gwt-cellTableSelectedRow
[ERROR] gwt-cellTableOddRow
[ERROR] gwt-cellTableEvenRow
Fix by adding String accessor method(s) to the CssResource interface for obfuscated classes, or using an @external declaration for unobfuscated classes.
[ERROR] Generator 'com.google.gwt.resources.rebind.context.InlineClientBundleGenerator' threw an exception while rebinding 'de.testProject.modules.gui.controls.table.MyCellTableResources'
com.google.gwt.resources.css.ast.CssCompilerException: Missing a CSS replacement
at com.google.gwt.resources.css.ClassRenamer.endVisit(ClassRenamer.java:209)
at com.google.gwt.resources.css.ast.CssStylesheet.traverse(CssStylesheet.java:59)
at com.google.gwt.resources.css.ast.CssVisitor.doTraverse(CssVisitor.java:325)
at com.google.gwt.resources.css.ast.CssVisitor.doAccept(CssVisitor.java:313)
at com.google.gwt.resources.css.ast.CssVisitor.accept(CssVisitor.java:59)
at com.google.gwt.resources.rg.CssResourceGenerator.optimize(CssResourceGenerator.java:1093)
at com.google.gwt.resources.rg.CssResourceGenerator.createAssignment(CssResourceGenerator.java:452)
at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.createFieldsAndAssignments(AbstractClientBundleGenerator.java:752)
at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.createFieldsAndAssignments(AbstractClientBundleGenerator.java:821)
at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.generateIncrementally(AbstractClientBundleGenerator.java:469)
at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:739)
at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:103)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:78)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:262)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:251)
at com.google.gwt.dev.PrecompilationContextCreator$1.getAllPossibleRebindAnswers(PrecompilationContextCreator.java:86)
at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createStaticRebindExpression(UnifyAst.java:519)
at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.createRebindExpression(UnifyAst.java:487)
at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.maybeHandleMagicMethodCall(UnifyAst.java:415)
at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.visit(UnifyAst.java:402)
at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:265)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:76)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:76)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.acceptImmutable(JModVisitor.java:305)
at com.google.gwt.dev.jjs.ast.JMethodCall.visitChildren(JMethodCall.java:275)
at com.google.gwt.dev.jjs.ast.JNewInstance.traverse(JNewInstance.java:74)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
at com.google.gwt.dev.jjs.ast.JBinaryOperation.traverse(JBinaryOperation.java:89)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
at com.google.gwt.dev.jjs.ast.JExpressionStatement.traverse(JExpressionStatement.java:42)
at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:88)
at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:331)
at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:94)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:139)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:135)
at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:83)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:786)
at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:778)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:1401)
at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:896)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.unifyJavaAst(JavaToJavaScriptCompiler.java:1410)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.constructJavaAst(JavaToJavaScriptCompiler.java:1222)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:1140)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:255)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:255)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:202)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:143)
at com.google.gwt.dev.Compiler.compile(Compiler.java:204)
at com.google.gwt.dev.codeserver.Recompiler.doCompile(Recompiler.java:362)
at com.google.gwt.dev.codeserver.Recompiler.compile(Recompiler.java:175)
at com.google.gwt.dev.codeserver.Recompiler.recompile(Recompiler.java:134)
at com.google.gwt.dev.codeserver.Outbox.recompile(Outbox.java:135)
at com.google.gwt.dev.codeserver.JobRunner.recompile(JobRunner.java:113)
at com.google.gwt.dev.codeserver.JobRunner.access$000(JobRunner.java:37)
at com.google.gwt.dev.codeserver.JobRunner$2.run(JobRunner.java:90)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[ERROR] Errors in 'de/testproject/apps/gwt/javaviewer/client/app/testTable/TableTest.java'
[ERROR] Line 47: Failed to resolve 'de.testProject.modules.gui.controls.table.MyCellTableResources' via deferred binding
はコード:
public interface MyCellTableResources extends CellTable.Resources {
@Source({CellTable.Style.DEFAULT_CSS, "resources/gwtcelltable.css" })
public CellTable.Style cellTableStyle();
}
これは私がテーブルを作成する方法である:CSSのCellTableから無CSSクラスで
table = new CellTable<Contact>(10, (CellTable.Resources)GWT.create(MyCellTableResources.class));
すべてエラーはなくなりましたが、テーブルのスタイルを変更できません。
CSSファイルが見えます:
.gwt-cellTable {
color: #00ff00;
background-color: #ff00ff;
}
.gwt-cellTableHeader {
color: #00ff00;
background-color: #ff00ff;
}
.gwt-cellTableFirstColumnHeader {
color: #15ffdd;
}
.gwt-cellTableLastColumnHeader {
color: #15ffdd;
}
.gwt-cellTableCell {
color: #15ffdd;
}
.gwt-cellTableEvenRow {
background: #5500FF;
}
.gwt-cellTableOddRow {
background: #FF0055;
}
.gwt-cellTableSelectedRow {
background: #aaaa00;
}
.gwt-cellTableSelectedRowCell {
background: #aaaa00;
color: #15ffdd;
}
.gwt-cellTableHoveredRow {
background: #ff12ff;
}
.gwt-cellTableHoveredRowCell {
background-color: #15ffdd;
}
.gwt-cellTableKeyboardSelectedRow {
background: #15ffdd;
}
.gwt-cellTableKeyboardSelectedRowCell {
color: #15ffdd;
}
.gwt-cellTableKeyboardSelectedCell {
color: #15ffdd;
}
私が間違って何をしているのですか?もっと何かを含める必要がありますか?
どうもありがとう:たぶん、あなたは
<table>
要素に適用されるcellTableWidget
を意味しました。そんな愚かな間違い – MichaD