Orbeonフォームを使用していて、div
またはspan
(またはxforms:output
などの非Xタグ)で動的クラス名を設定して、そのCSSクラスで設定することができます。Orbeonフォームで動的クラス名を受け入れるために使用できるHTMLタグ
<div class="color-with-{if(/fetch/data1='Yes') then 'green' else 'red'}">
しかし、これは機能しません。フォームがレンダリングされた後にHTMLソースコードを見ると、その動的部分が処理されなかったようです。
<div class="color-with-{if(/fetch/data1='Yes') then 'green' else 'red'}"
id="xf-279">
しかし、この動的割り当ては、Orbeonタグではかなり機能します。
<xforms:output value="if ((xxforms:valid(instance('account-opening-setup'),true()))
and (xxforms:valid(instance('form-variables'),true())))
then 'Complete' else 'Incomplete'"
class="validation-{if ((xxforms:valid(instance('account-opening-setup'),true()))
and (xxforms:valid(instance('form-variables'),true()))) then 'complete'
else 'incomplete'}" />
私はコントロールのグループは、そのクラスのCSSをたどるように、動的にクラス名を割り当てるために使用できるHTMLタグをお知らせください。
そうです。私はxhtml名前空間を追加するときに動作しています。優れた答え。どうもありがとう。 – Jayy
パーフェクト、これを確認していただきありがとうございます。 – avernet