Base on user's entry in editable cell I would like to display concrete style. What I am trying to do is a very base validation.
I've tried already override getCellStyleNames in Anonymous new Column() {}, but this work on start, base on model values, but what would work, after user change value of that cell?
Please help.
You're very close.
Override
getCellStyleNamesin the new Column() {} is the first half of the solution.The second half:
Hope this would help!
The following code is a trivia but complete example.
A celltable with two column is defined. Each cell in the first column displays a simple question. Each cell in the second column is an editable cell which allows you to enter you answer to the question shown in first column. If your answer is correct, then the text of the answer will be styled as bold and black. Otherwise, the text will be styled as red in normal font weight.
Source code of the trivia GWT app:
Companion css file:
Screenshot1: Right after the app started. The column of answers was empty.
Screenshot2: After I entered answers. Apparently I answered the first one correctly but not the second one.