[ |../../index.htm#lansa/vlwebeng02_0140.htm]
現在地:

ウィジェットのイベント定義

イベントが定義されると、JavaScript で実行できるようになります、以下の例では、ユーザーがある項目をクリックした時に、グラフにより "select" イベントが起動されています。イベント・リスナーがブラウザ DOM に追加されます。このイベントが起動されると匿名関数が実行され、関数 fireItemSelected を実行することができます。この結果、RDMLX でこれに相当するイベントが起動します。
// イベント: select
google.visualization.events.addListener( this.m_Chart, 'select', function()
\{
  var 
    selectedItem = pThis.m_Chart.getSelection()\[0\];
    if ( selectedItem ) 
    \{
      pThis.fireItemSelected( ( selectedItem.row + 1 ), pThis.m_DataTable.getValue( selectedItem.row, 1 ), pThis.m_DataTable.getValue( selectedItem.row, 0 ) );
    \}
\});  
 
[ !worddavaf485e25f57cd86bb5b0fc63f3f1b1cc.png|height=32,width=32! |../../index.htm#lansa/vlwebeng02_0140.htm]