Java の動的データテーブルに問題があります。1 つの単純なトグル パネルで複数の動的データ テーブルを作成しています。Datatable が生成され、フォーム (jsp ページ) に適切に表示されます。テーブルにもデータが入力されています。テーブル内のコマンドリンクをクリックすると、モーダル パネルが開きますが、データは表示されません。ページを再度更新すると、コマンドリンクをクリックすると、モーダルパネルにデータが表示されます。
したがって、データテーブルが生成されたときに初めて問題が発生し、最初のボタンクリックでモーダルパネルに必要なデータが表示されないリンクをクリックします。しかし、戻って同じページに戻ると、必要なデータがモーダルパネルに表示されます。これに対する解決策を教えてください。
また、ページのビューソースを1回目と2回目で比較すると、DATA_TABLE_NAMEのように最初はフォーム名なしでデータテーブル名が表示され、2回目はformName:DATA_TABLE_NAMEなどのフォーム名でデータテーブル名が表示されるので、奇妙なことに気付きました。
データテーブルのログを 2 回コピーしています。これは初めて:
17:04:14,327 WARN [HtmlLabelRenderer] Attribute 'for' of label component with id scopeItemsForm:taskMoreInfoNonScopePanelForm:j_id_jsp_151042
17:04:14,327 WARN [HtmlLabelRenderer] Attribute 'for' of label component with id scopeItemsForm:taskMoreInfoNonScopePanelForm:j_id_jsp_151042
17:04:14,327 WARN [HtmlLabelRenderer] Attribute 'for' of label component with id scopeItemsForm:taskMoreInfoNonScopePanelForm:j_id_jsp_151042
17:04:14,327 WARN [HtmlLabelRenderer] Attribute 'for' of label component with id scopeItemsForm:taskMoreInfoNonScopePanelForm:j_id_jsp_151042
17:04:14,327 WARN [HtmlLabelRenderer] Attribute 'for' of label component with id scopeItemsForm:taskMoreInfoNonScopePanelForm:j_id_jsp_151042
17:04:14,327 WARN [HtmlLabelRenderer] Attribute 'for' of label component with id scopeItemsForm:taskMoreInfoNonScopePanelForm:j_id_jsp_151042
17:04:14,343 WARN [HtmlLabelRenderer] Attribute 'for' of label component with id scopeItemsForm:taskMoreInfoNonScopePanelForm:j_id_jsp_151042
17:04:14,343 WARN [HtmlLabelRenderer] Attribute 'for' of label component with id scopeItemsForm:taskMoreInfoNonScopePanelForm:j_id_jsp_151042
17:04:14,343 WARN [HtmlLabelRenderer] Attribute 'for' of label component with id scopeItemsForm:taskMoreInfoNonScopePanelForm:j_id_jsp_151042
17:04:14,343 WARN [HtmlLabelRenderer] Attribute 'for' of label component with id scopeItemsForm:taskMoreInfoNonScopePanelForm:j_id_jsp_151042
17:04:14,343 WARN [UIComponentBase] WARNING: Component scopeItemsForm:j_id165 just got an automatic id, because there was no id assigned yet.
17:04:14,343 WARN [UIComponentBase] WARNING: Component scopeItemsForm:j_id166 just got an automatic id, because there was no id assigned yet.
17:04:14,343 WARN [UIComponentBase] WARNING: Component ST_DATATBL_ID_0:j_id167 just got an automatic id, because there was no id assigned yet
17:04:14,343 WARN [UIComponentBase] WARNING: Component ST_DATATBL_ID_0:j_id168 just got an automatic id, because there was no id assigned yet
17:04:14,358 WARN [UIComponentBase] WARNING: Component ST_DATATBL_ID_0:j_id169 just got an automatic id, because there was no id assigned yet
17:04:14,358 WARN [UIComponentBase] WARNING: Component ST_DATATBL_ID_0:j_id170 just got an automatic id, because there was no id assigned yet
17:04:14,358 WARN [UIComponentBase] WARNING: Component ST_DATATBL_ID_0:j_id171 just got an automatic id, because there was no id assigned yet
17:04:14,358 WARN [UIComponentBase] WARNING: Component ST_DATATBL_ID_0:j_id172 just got an automatic id, because there was no id assigned yet
17:04:14,358 WARN [UIComponentBase] WARNING: Component ST_DATATBL_ID_0:j_id173 just got an automatic id, because there was no id assigned yet
17:04:14,358 WARN [UIComponentBase] WARNING: Component ST_DATATBL_ID_0:j_id174 just got an automatic id, because there was no id assigned yet
17:04:14,358 WARN [UIComponentBase] WARNING: Component ST_DATATBL_ID_0:j_id175 just got an automatic id, because there was no id assigned yet
17:04:14,358 WARN [UIComponentBase] WARNING: Component ST_DATATBL_ID_0:j_id176 just got an automatic id, because there was no id assigned yet
17:04:14,358 WARN [UIComponentBase] WARNING: Component ST_DATATBL_ID_0:j_id177 just got an automatic id, because there was no id assigned yet
17:04:14,358 WARN [UIComponentBase] WARNING: Component ST_DATATBL_ID_0:j_id178 just got an automatic id, because there was no id assigned yet
17:04:14,358 WARN [UIComponentBase] WARNING: Component ST_DATATBL_ID_0:j_id179 just got an automatic id, because there was no id assigned yet
そして2回目はこちら
16:49:34,264 WARN [UIComponentBase] WARNING: Component scopeItemsForm:ST_DATATBL_ID_0:j_id105 just got an automatic id, because there was no id assigned yet. If this compo
16:49:34,264 WARN [UIComponentBase] WARNING: Component scopeItemsForm:ST_DATATBL_ID_0:j_id106 just got an automatic id, because there was no id assigned yet. If this compo
16:49:34,264 WARN [UIComponentBase] WARNING: Component scopeItemsForm:ST_DATATBL_ID_0:j_id107 just got an automatic id, because there was no id assigned yet. If this compo
16:49:34,264 WARN [UIComponentBase] WARNING: Component scopeItemsForm:ST_DATATBL_ID_0:j_id108 just got an automatic id, because there was no id assigned yet. If this compo
16:49:34,279 WARN [UIComponentBase] WARNING: Component scopeItemsForm:ST_DATATBL_ID_0:j_id109 just got an automatic id, because there was no id assigned yet. If this compo
16:49:34,279 WARN [UIComponentBase] WARNING: Component scopeItemsForm:ST_DATATBL_ID_0:j_id110 just got an automatic id, because there was no id assigned yet. If this compo
16:49:34,279 WARN [HtmlImageRendererBase] ALT attribute is missing for : null
16:49:34,279 WARN [UIComponentBase] WARNING: Component scopeItemsForm:ST_DATATBL_ID_0:j_id111 just got an automatic id, because there was no id assigned yet. If this compo
16:49:34,295 WARN [UIComponentBase] WARNING: Component scopeItemsForm:ST_DATATBL_ID_0:j_id112 just got an automatic id, because there was no id assigned yet. If this compo
16:49:34,295 WARN [UIComponentBase] WARNING: Component scopeItemsForm:ST_DATATBL_ID_0:j_id113 just got an automatic id, because there was no id assigned yet. If this compo
16:49:34,295 WARN [HtmlImageRendererBase] ALT attribute is missing for : null
16:49:34,295 WARN [UIComponentBase] WARNING: Component scopeItemsForm:ST_DATATBL_ID_0:j_id114 just got an automatic id, because there was no id assigned yet. If this compo
16:49:34,295 WARN [UIComponentBase] WARNING: Component scopeItemsForm:ST_DATATBL_ID_0:j_id115 just got an automatic id, because there was no id assigned yet. If this compo
初めての HTML コードは次のようになります。
<table class="rich-table " id="ST_DATATBL_ID_0" border="0" cellpadding="0" cellspacing="0" width="100%">
<colgroup span="12"></colgroup>
<thead class="rich-table-thead">
<tr class="rich-table-header ">
<th class="rich-table-headercell " id="ST_DATATBL_ID_0:j_id107" width="20"></th>
<th class="rich-table-headercell " id="ST_DATATBL_ID_0:j_id108" width="2"></th>
<th class="rich-table-headercell " id="ST_DATATBL_ID_0:j_id109">ITEM #<img alt="" class="rich-spacer " height="1" id="ST_DATATBL_ID_0:j_id110" src="/pgsportal/a4j/g/3_3_3.Finalimages/spacer.gif.jsf" width="10%" />
<a href="#" id="ST_DATATBL_ID_0:j_id111" name="ST_DATATBL_ID_0:j_id111" onclick="A4J.AJAX.Submit('scopeItemsForm',event,{'status':'notrequired','similarityGroupingId':'ST_DATATBL_ID_0:j_id111','parameters':{'ST_DATATBL_ID_0:j_id111':'ST_DATATBL_ID_0:j_id111'} ,'containerId':'j_id0'} );return false;">
2番目の時間は次のようになります。
<table class="rich-table " id="scopeItemsForm:ST_DATATBL_ID_0" border="0" cellpadding="0" cellspacing="0" width="100%">
<colgroup span="12"></colgroup>
<thead class="rich-table-thead"><tr class="rich-table-header ">
<th class="rich-table-headercell " id="scopeItemsForm:ST_DATATBL_ID_0:j_id107" width="20"></th><th class="rich-table-headercell " id="scopeItemsForm:ST_DATATBL_ID_0:j_id108" width="2"></th>
<th class="rich-table-headercell " id="scopeItemsForm:ST_DATATBL_ID_0:j_id109">ITEM #
<img alt="" class="rich-spacer " height="1" id="scopeItemsForm:ST_DATATBL_ID_0:j_id110" src="/pgsportal/a4j/g/3_3_3.Finalimages/spacer.gif.jsf" width="10%" />
<a href="#" id="scopeItemsForm:ST_DATATBL_ID_0:j_id111" name="scopeItemsForm:ST_DATATBL_ID_0:j_id111" onclick="A4J.AJAX.Submit('scopeItemsForm',event,{'status':'notrequired','similarityGroupingId':'scopeItemsForm:ST_DATATBL_ID_0:j_id111','parameters':{'scopeItemsForm:ST_DATATBL_ID_0:j_id111':'scopeItemsForm:ST_DATATBL_ID_0:j_id111'} ,'containerId':'j_id0'} );return false;"><img src="../images/down_arrow.png" /></a>