FlexiGridでテーブルを定義しました。すべての変数の呼び出しは問題ありません。1つの列は、Simple ColorPickerJavaScriptで選択した色です。Flexigridの使用を開始する前は、1つの列を次のように定義していました。
<span style="background: <c:out value="${current.colore}" />"> </span>
これは私に選ばれた色の小さな正方形を見せていました。今、私はサモを行う方法を知りませんが、FlexiGridを使用します。
私の質問は、スパンタグをFlexiGridテーブル定義にインポートして、色の値を読み取り、すべての行にその色で1つのボックスをペイントする方法です。
テーブルのコードは次のとおりです。
$(document).ready(function() {
$("#newTable").flexigrid({
url: 'agendaTipoAppuntamentoInitJson.do',
dataType: 'json',
colModel : [
{display: 'ID', name : 'idTipoAppuntamento', width : 40, sortable : false, align: 'center', hide: true},
{display: 'Codice', name : 'codice', width : 60, sortable : false, align: 'left'},
{display: 'Descrizione', name : 'descrizione', width : 130, sortable : false, align: 'left'},
{display: 'Descr. breve', name : 'descrBreve', width : 80, sortable : false, align: 'left'},
{display: 'Colore', name : 'colore', width : 80, sortable : false, align: 'left'},
{display: 'ID Struttura', name : 'idStruttura', width : 60, sortable : false, align: 'left', hide: true},
{display: 'Descr. Struttura', name : 'descrizioneStruttura', width : 150, sortable : false, align: 'left'},
{display: 'ID Spec', name : 'idSpecializzazione', width : 60, sortable : false, align: 'left', hide: true},
{display: 'Descr. Spec', name : 'descrizioneSpecializzazione', width : 150, sortable : false, align: 'left'},
],
usepager: true,
title: 'Gestione tipi appuntamento',
useRp: true,
rp: 15,
showTableToggleBtn: true,
width: 950,
height: 370,
singleSelect: true,
click: editMe
}); });