Toolbarを表示したい その2

Urumaにはすでに、ToolBarComponentとToolItemComponentのUIComponentが用意されていました。スキーマ(uruma.xsd)にもToolbarのアトリビュートがあるので、設定値は読み込めそうです。


UrumaのサンプルPJ(RSS)のworkbench.xmlに「toolBar」を追加します。

<?xml version="1.0" encoding="UTF-8"?>
<template xmlns="http://uruma.sandbox.seasar.org">
  <workbench title="Uruma Example - RSS Reader" initWidth="1024"
    initialPerspectiveId="defaultPerspective" initHeight="800"
    image="uruma" statusLine="true"
    saveAndRestore="true" menuBar="true" 
    coolBar="true" fastViewBars="true"
    perspectiveBar="true" progressIndicator="true" >

    <toolBar>
      <toolItem text="選択時Enable" enablesDependingId="table"
        enablesFor="SELECTION" />
      <toolItem text="非選択時Enable" enablesDependingId="table"
        enablesFor="NONE" />
      <toolItem text="1つだけ選択時Enable" enablesDependingId="table"
        enablesFor="SINGLE" />
      <toolItem text="2つだけ選択時Enable" enablesDependingId="table"
        enablesFor="PAIR" />
      <toolItem text="2つ以上選択時Enable" enablesDependingId="table"
        enablesFor="MULTI" />
    </toolBar>
    
    <perspective id="defaultPerspective" name="RSS" fixed="false"
      icon="uruma">
      <part ref="feedTreeView" ratio="30" position="LEFT" />
      <part ref="feedListView" ratio="70" position="TOP" />
      <part ref="feedBrowserView" ratio="50" position="BOTTOM" />
    </perspective>

  </workbench>
</template>


実行するとエラーが。RCPだとToolBarのスキーマがうまく使えないようです。スタンドアロンならうまく読めてます。

スタンドアロンに影響がでるので、ヘタにスキーマに手が出せないですね。。。

SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'perspective'. One of '{"http://uruma.sandbox.seasar.org":compositeChild}' is expected.

まとめ

手詰まりw アプローチを変えてみよう。