| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!-- Reviewed: no -->
- <!-- EN-Revision: 15851 -->
- <sect2 id="zend.dojo.form.elements">
- <title>Dijitに特有のフォーム要素</title>
- <para>
- ビュー・ヘルパーが提供される各々のフォームdijitには、
- 対応する<classname>Zend_Form</classname>要素があります。
- dijitパラメータを操作するための以下のメソッドがそれらすべてにあります:
- </para>
- <itemizedlist>
- <listitem><para>
- <code>setDijitParam($key, $value)</code>:
- dijitパラメータを一つセットします。
- dijitパラメータがすでに存在すれば、上書きされます。
- </para></listitem>
- <listitem><para>
- <code>setDijitParams(array $params)</code>:
- 一度にいくつかのdijitパラメータをセットします。
- 渡されたパラメータにマッチする既存のパラメータは上書きされます。
- </para></listitem>
- <listitem><para>
- <code>hasDijitParam($key)</code>:
- 与えられたdijitパラメータが定義されたか存在している場合はtrueを返します。
- それ以外はfalseを返します。
- </para></listitem>
- <listitem><para>
- <code>getDijitParam($key)</code>:
- 与えられたdijitパラメータを返します。
- 利用できない場合は null値を返します。
- </para></listitem>
- <listitem><para>
- <code>getDijitParams()</code>:
- dijitパラメータを全て返します。
- </para></listitem>
- <listitem><para>
- <code>removeDijitParam($key)</code>:
- 与えられたdijitパラメータを除去します。
- </para></listitem>
- <listitem><para>
- <code>clearDijitParams()</code>:
- 現行定義されたdijitパラメータを全て消去します。
- </para></listitem>
- </itemizedlist>
- <para>
- Dijitパラメータは、<code>dijitParams</code> public プロパティに保存されます。
- このように、あなたは単にこのプロパティを要素の上に置くことによって、
- 既存のフォーム要素をdijit使用可能にすることができます;
- あなたは、単にパラメータを操作するのを容易にするために、
- 上記のアクセッサを持っていません。
- </para>
- <para>
- その上、dijitに特有の要素は以下に該当するデコレーターの独特な一覧を実装します:
- </para>
- <programlisting language="php"><![CDATA[
- $element->addDecorator('DijitElement')
- ->addDecorator('Errors')
- ->addDecorator('HtmlTag', array('tag' => 'dd'))
- ->addDecorator('Label', array('tag' => 'dt'));
- ]]></programlisting>
- <para>
- 実質的に、Dijit要素が、標準的なViewHelperデコレーターの代わりに使われます。
- </para>
- <para>
- 最後に、ベースDijit要素により、
- 確実にDojoビュー・ヘルパー・パスがビューの上に置かれることになります。
- </para>
- <para>
- Dijit要素、DijitMultiの変化は<code>Multi</code> abstract フォーム要素の機能を提供します。
- そして、開発者が 'multiOptions' を指定できるようにします。
- - 一般的に select の option またはラジオ のoptionです。
- </para>
- <para>
- 以下のdijit要素は、標準的なZend Framework配布において出荷されます。
- </para>
- <sect3 id="zend.dojo.form.elements.button">
- <title>ボタン</title>
- <para>
- <link linkend="zend.form.standardElements.button">標準的なボタン要素</link>に
- 由来していないので、
- 同じ機能を実装して、ドロップインの代わりとして使うことができます。
- 以下の機能が公開されます:
- </para>
- <itemizedlist>
- <listitem><para>
- 名前が提供されないならば、
- <code>getLabel()</code>はボタン・ラベルとして要素名を利用します。
- さらに、翻訳メッセージにマッチした翻訳アダプターが利用できれば、
- それは名前を翻訳します。
- </para></listitem>
- <listitem><para>
- <code>isChecked()</code>は、
- 提出される値がラベルにマッチするかどうか決定します;
- もしマッチするなら、それはtrueを返します。
- これは、フォームが提出されたとき、どのボタンが使われたかについて決定することに役立ちます。
- </para></listitem>
- </itemizedlist>
- <para>
- さらに、デコレーターの<code>DijitElement</code>及び
- <code>DtDdWrapper</code>だけがボタン要素のために使われます。
- </para>
- <example id="zend.dojo.form.elements.button.example">
- <title>ボタンdijit要素の使用例</title>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'Button',
- 'foo',
- array(
- 'label' => 'Button Label',
- )
- );
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.dojo.form.elements.checkBox">
- <title>チェックボックス</title>
- <para>
- <link linkend="zend.form.standardElements.checkbox">標準的なチェックボックス要素</link>
- に由来していないので、
- それは同じ機能を実装します。
- これは、以下のメソッドが公開されることを意味します
- </para>
- <itemizedlist>
- <listitem><para>
- <code>setCheckedValue($value)</code>:
- 要素がチェックされたときに使う値を設定します。
- </para></listitem>
- <listitem><para>
- <code>getCheckedValue()</code>:
- チェックされたときに要素で使う値を取得します。
- </para></listitem>
- <listitem><para>
- <code>setUncheckedValue($value)</code>:
- チェックされていないときに要素で使う値を設定します。
- </para></listitem>
- <listitem><para>
- <code>getUncheckedValue()</code>:
- チェックされていないときに要素で使う値を取得します。
- </para></listitem>
- <listitem><para>
- <code>setChecked($flag)</code>:
- 要素をチェック済みにするか否か設定します。
- </para></listitem>
- <listitem><para>
- <code>isChecked()</code>:
- 要素が現在チェック済みか判断します。
- </para></listitem>
- </itemizedlist>
- <example id="zend.dojo.form.elements.checkBox.example">
- <title>チェックボックスdijit要素の使用例</title>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'CheckBox',
- 'foo',
- array(
- 'label' => 'A check box',
- 'checkedValue' => 'foo',
- 'uncheckedValue' => 'bar',
- 'checked' => true,
- )
- );
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.dojo.form.elements.comboBox">
- <title>コンボボックス及びフィルタリング選択</title>
- <para>
- コンボボックス
- <link linkend="zend.dojo.view.dijit.form">dijitビュー・ヘルパー・文書</link>
- にみられるように、コンボボックスは選択とテキスト入力の混合です。
- そして、自動補完及び、提示された選択肢の代わりを指定できるようにします。
- フィルタリング選択は同じことですが、任意の入力を許しません。
- </para>
- <note>
- <title>ラベル値を返すコンボボックス</title>
- <para>
- コンボボックスはラベル値を返します。
- 期待に反するオプション値は返しません。
- この理由から、コンボボックスは<code>InArray</code>バリデーターを自動登録しません。
- (FilteringSelectsがそうするけれども)
- </para>
- </note>
- <para>
- コンボボックスとフィルタリング選択フォーム要素は、
- dojo.dataデータ・ストア(使用された場合)を指定することだけでなく、
- 選ばれた選択肢を調べて、セットするためにアクセッサとミューテーターを提供します。
- それらはDijitMultiから拡張します。
- そして、それは<code>setMultiOptions()</code>及び<code>setMultiOption()</code>メソッドによって
- 選ばれた選択肢を指定することができます。
- さらに、以下のメソッドを利用できます:
- </para>
- <itemizedlist>
- <listitem><para>
- <code>getStoreInfo()</code>:
- 現行で設定されているデータストア情報を全て取得します。
- 現行で設定されたデータがなければ、空の配列を返します。
- </para></listitem>
- <listitem><para>
- <code>setStoreId($identifier)</code>:
- ストアの識別変数を設定します。
- (通常、Dojoで 'jsId' 属性によって言及されます)
- これは、有効なjavascript変数の名前でなければなりません。
- </para></listitem>
- <listitem><para>
- <code>getStoreId()</code>:
- ストアの識別変数名を取得します。
- </para></listitem>
- <listitem><para>
- <code>setStoreType($dojoType)</code>:
- 使用するデータストアクラスを設定します;
- 例えば "dojo.data.ItemFileReadStore"
- </para></listitem>
- <listitem><para>
- <code>getStoreType()</code>:
- 使用するdojoデータストアクラスを取得します。
- </para></listitem>
- <listitem><para>
- <code>setStoreParams(array $params)</code>:
- データ・ストア・オブジェクトを構成するために使われるパラメータをいずれも設定します。
- 例えば、 dojo.data.ItemFileReadStore データストアでは
- dojo.dataオブジェクトを返す場所を指す 'url' パラメータを期待します。
- </para></listitem>
- <listitem><para>
- <code>getStoreParams()</code>:
- 現行で設定されているデータストアパラメータをいずれも取得します;
- もしなければ、空の配列を返します。
- </para></listitem>
- <listitem><para>
- <code>setAutocomplete($flag)</code>:
- ユーザーが要素から離れるとき、選ばれた項目が使われるかどうかを示します。
- </para></listitem>
- <listitem><para>
- <code>getAutocomplete()</code>:
- 自動補完フラグの値を取得します。
- </para></listitem>
- </itemizedlist>
- <para>
- dojo.dataストアが要素で登録されなければ、
- 登録された選択肢の配列のキーを検証する<code>InArray</code>バリデーターを
- この要素はデフォルトで登録します。
- <code>setRegisterInArrayValidator(false)</code>を呼び出すことでも、
- <code>registerInArrayValidator</code>設定キーにfalse値を渡すことでも、
- このふるまいを抑制することができます。
- </para>
- <example id="zend.dojo.form.elements.comboBox.selectExample">
- <title>コンボボックスdijit要素を選択肢入力として使う</title>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'ComboBox',
- 'foo',
- array(
- 'label' => 'ComboBox (select)',
- 'value' => 'blue',
- 'autocomplete' => false,
- 'multiOptions' => array(
- 'red' => 'Rouge',
- 'blue' => 'Bleu',
- 'white' => 'Blanc',
- 'orange' => 'Orange',
- 'black' => 'Noir',
- 'green' => 'Vert',
- ),
- )
- );
- ]]></programlisting>
- </example>
- <example id="zend.dojo.form.elements.comboBox.datastoreExample">
- <title>コンボボックスdijit要素をデータ・ストアと一緒に使う</title>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'ComboBox',
- 'foo',
- array(
- 'label' => 'ComboBox (datastore)',
- 'storeId' => 'stateStore',
- 'storeType' => 'dojo.data.ItemFileReadStore',
- 'storeParams' => array(
- 'url' => '/js/states.txt',
- ),
- 'dijitParams' => array(
- 'searchAttr' => 'name',
- ),
- )
- );
- ]]></programlisting>
- </example>
- <para>
- 前述の例は<code>ComboBox</code>の代わりに
- <code>FilteringSelect</code>を使用します。
- </para>
- </sect3>
- <sect3 id="zend.dojo.form.elements.currencyTextBox">
- <title>通貨テキストボックス</title>
- <para>
- 通貨テキストボックスは、主に通貨入力をサポートするためにあります。
- 通貨はローカライズされるかもしれず、小数も非小数もサポートできます。
- </para>
- <para>
- 内部的には、通貨テキストボックスは
- <link linkend="zend.dojo.form.elements.numberTextBox">数値テキストボックス</link>や
- <link linkend="zend.dojo.form.elements.validationTextBox">検証テキストボックス</link>および
- <link linkend="zend.dojo.form.elements.textBox">テキストボックス</link>に由来します;
- それらのクラスのメソッドが全て利用可能です。
- さらに、下記の制約メソッドを使用できます:
- </para>
- <itemizedlist>
- <listitem><para>
- <code>setCurrency($currency)</code>:
- 使用する通貨種類を設定します;
- <ulink url="http://en.wikipedia.org/wiki/ISO_4217">ISO-4217</ulink>
- 仕様に従うでしょう。
- </para></listitem>
- <listitem><para>
- <code>getCurrency()</code>:現行の通貨種類を取得します。
- </para></listitem>
- <listitem><para>
- <code>setSymbol($symbol)</code>: 3文字からなる<ulink
- url="http://en.wikipedia.org/wiki/ISO_4217">ISO-4217</ulink>
- 通貨記号を設定します。
- </para></listitem>
- <listitem><para>
- <code>getSymbol()</code>:
- 現行の通貨記号を取得します。
- </para></listitem>
- <listitem><para>
- <code>setFractional($flag)</code>:
- 通貨で小数を許すかどうか設定します。
- </para></listitem>
- <listitem><para>
- <code>getFractional()</code>:
- 小数フラグの状態を取得します。
- </para></listitem>
- </itemizedlist>
- <example id="zend.dojo.form.elements.currencyTextBox.example">
- <title>通貨テキストボックスdijit要素の使用例</title>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'CurrencyTextBox',
- 'foo',
- array(
- 'label' => 'Currency:',
- 'required' => true,
- 'currency' => 'USD',
- 'invalidMessage' => 'Invalid amount. ' .
- 'Include dollar sign, commas, and cents.',
- 'fractional' => false,
- )
- );
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.dojo.form.elements.dateTextBox">
- <title>日付テキストボックス</title>
- <para>
- 日付テキストボックスは、
- カレンダー・ドロップダウンで日付(クライアント側日付確認とフォーマッティングだけでなく)
- を選ぶために提供します。
- </para>
- <para>
- 内部的に、日付テキストボックスは
- <link linkend="zend.dojo.form.elements.validationTextBox">検証テキストボックス</link>
- および<link linkend="zend.dojo.form.elements.textBox">テキストボックス</link>
- に由来します;
- それらのクラスのメソッドが全て利用可能です。さらに、
- 個別の制約を設定するために下記のメソッドを使用できます:
- </para>
- <itemizedlist>
- <listitem><para>
- <code>setAmPm($flag)</code>及び<code>getAmPm()</code>:
- 時刻でAM/PM 文字列を使うかどうか
- </para></listitem>
- <listitem><para>
- <code>setStrict($flag)</code>及び<code>getStrict()</code>:
- 入力を確認した時にマッチする厳しい正規表現を使うかどうか。
- デフォルトはfalseですが、空白文字やいくつかの省略形を許します。
- </para></listitem>
- <listitem><para>
- <code>setLocale($locale)</code>及び<code>getLocale()</code>:
- 指定した要素で使うロケールを設定または取得します。
- </para></listitem>
- <listitem><para>
- <code>setDatePattern($pattern)</code>及び
- <code>getDatePattern()</code>:
- 日付をフォーマットする<ulink
- url="http://www.unicode.org/reports/tr35/#Date_Format_Patterns">
- unicode 日付形式パターン</ulink>を提示または取得します。
- </para></listitem>
- <listitem><para>
- <code>setFormatLength($formatLength)</code>及び
- <code>getFormatLength()</code>:
- 使用する形式の長さの種類を提示または取得します;
- "long"、"short"、"medium"または"full"のどれか一つです。
- </para></listitem>
- <listitem><para>
- <code>setSelector($selector)</code>及び
- <code>getSelector()</code>:
- セレクタのスタイルを提示または取得します;
- "date" や "time" のどちらかでしょう。
- </para></listitem>
- </itemizedlist>
- <example id="zend.dojo.form.elements.dateTextBox.example">
- <title>日付テキストボックスdijit要素の使用例</title>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'DateTextBox',
- 'foo',
- array(
- 'label' => 'Date:',
- 'required' => true,
- 'invalidMessage' => 'Invalid date specified.',
- 'formatLength' => 'long',
- )
- );
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.dojo.form.elements.editor">
- <title>エディタ</title>
- <para>
- エディタはリッチなHTML内容を作成して、
- 編集するために利用できるWYSIWYGエディタを提供します。
- dijit.Editorはプラグイン可能で、
- 必要に応じてカスタム・プラグインで拡張されるかもしれません;
- 詳しくは<ulink
- url="http://dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/advanced-editing-and-display/editor-rich-text">
- dijit.Editorドキュメント</ulink>をご覧下さい。
- </para>
- <para>
- エディタ・フォーム要素は、
- 下記のいくつかのアクセッサとミューテーターを
- いろいろなdijitパラメータを操作するために提供します:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis>captureEvents</emphasis>は、
- 編集エリア自体と連携するイベントです。
- 捕獲したイベントを操作するために以下のアクセッサとミューテーターを利用できます:
- </para>
- <itemizedlist>
- <listitem><para><code>addCaptureEvent($event)</code></para></listitem>
- <listitem><para><code>addCaptureEvents(array $events)</code></para></listitem>
- <listitem><para><code>setCaptureEvents(array $events)</code></para></listitem>
- <listitem><para><code>getCaptureEvents()</code></para></listitem>
- <listitem><para><code>hasCaptureEvent($event)</code></para></listitem>
- <listitem><para><code>removeCaptureEvent($event)</code></para></listitem>
- <listitem><para><code>clearCaptureEvents()</code></para></listitem>
- </itemizedlist>
- </listitem>
- <listitem>
- <para>
- <emphasis>events</emphasis>は、
- onClickやonKeyUpなどのような標準的なDOMイベントです。
- イベントを操作するために以下のアクセッサとミューテーターを利用できます:
- </para>
- <itemizedlist>
- <listitem><para><code>addEvent($event)</code></para></listitem>
- <listitem><para><code>addEvents(array $events)</code></para></listitem>
- <listitem><para><code>setEvents(array $events)</code></para></listitem>
- <listitem><para><code>getEvents()</code></para></listitem>
- <listitem><para><code>hasEvent($event)</code></para></listitem>
- <listitem><para><code>removeEvent($event)</code></para></listitem>
- <listitem><para><code>clearEvents()</code></para></listitem>
- </itemizedlist>
- </listitem>
- <listitem>
- <para>
- <emphasis>plugins</emphasis>はエディターにツールバーのための追加のツールや、
- 許可する追加スタイルなどの機能を加えます。
- プラグインを操作するために以下のアクセッサとミューテーターを利用できます:
- </para>
- <itemizedlist>
- <listitem><para><code>addPlugin($plugin)</code></para></listitem>
- <listitem><para><code>addPlugins(array $plugins)</code></para></listitem>
- <listitem><para><code>setPlugins(array $plugins)</code></para></listitem>
- <listitem><para><code>getPlugins()</code></para></listitem>
- <listitem><para><code>hasPlugin($plugin)</code></para></listitem>
- <listitem><para><code>removePlugin($plugin)</code></para></listitem>
- <listitem><para><code>clearPlugins()</code></para></listitem>
- </itemizedlist>
- </listitem>
- <listitem>
- <para>
- <emphasis>editActionInterval</emphasis>は、
- アンドゥ操作のためにイベントをまとめるために使われます。
- デフォルトでこの値は3秒です。
- <code>setEditActionInterval($interval)</code>メソッドが値を設定するために使われるかもしれません。
- 一方で、<code>getEditActionInterval()</code>が値を取得します。
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>focusOnLoad</emphasis>は、
- ページが読み込まれたとき、
- この指定のエディタがフォーカスを受けるかどうか判断するために使われます。
- デフォルトでこれはfalseです。
- メソッド<code>setFocusOnLoad($flag)</code>が値を設定するために使われるかもしれません。
- 一方で、<code>getFocusOnLoad()</code>が値を取得します。
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>height</emphasis>はエディターの高さを指定します;
- デフォルトでこれは300pxです。
- メソッド<code>setHeight($height)</code>が値を設定するために使われるかもしれません。
- 一方で、<code>getHeight()</code>が値を取得します。
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>inheritWidth</emphasis>は、
- エディタが親コンテナの幅と単純にデフォルトの100%幅のどちらを使うか決定するために使われます。
- デフォルトでこれはfalseです。
- (すなわち、画面の幅一杯を満たします)
- メソッド<code>setInheritWidth($flag)</code>が値を設定するために使われるかもしれません。
- 一方で、<code>getInheritWidth()</code>が値を取得します。
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>minHeight</emphasis>はエディターの高さの最小値を設定します;
- デフォルトでこれは1emです。
- メソッド<code>setMinHeight($height)</code>が値を設定するために使われるかもしれません。
- 一方で、<code>getMinHeight()</code>が値を取得します。
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>styleSheets</emphasis>は、
- どの追加CSSスタイルシートがエディタの表示に影響を及ぼすために使われるか示します。
- デフォルトでは何も登録されず、それはページ・スタイルを継承します。
- エディタ・スタイルシートを操作するために以下のアクセッサとミューテーターを利用できます:
- </para>
- <itemizedlist>
- <listitem><para><code>addStyleSheet($styleSheet)</code></para></listitem>
- <listitem>
- <para><code>addStyleSheets(array $styleSheets)</code></para>
- </listitem>
- <listitem>
- <para><code>setStyleSheets(array $styleSheets)</code></para>
- </listitem>
- <listitem><para><code>getStyleSheets()</code></para></listitem>
- <listitem><para><code>hasStyleSheet($styleSheet)</code></para></listitem>
- <listitem><para><code>removeStyleSheet($styleSheet)</code></para></listitem>
- <listitem><para><code>clearStyleSheets()</code></para></listitem>
- </itemizedlist>
- </listitem>
- </itemizedlist>
- <example id="zend.dojo.form.elements.editor.example">
- <title>エディタdijit要素の使用例</title>
- <programlisting language="php"><![CDATA[
- $form->addElement('editor', 'content', array(
- 'plugins' => array('undo', '|', 'bold', 'italic'),
- 'editActionInterval' => 2,
- 'focusOnLoad' => true,
- 'height' => '250px',
- 'inheritWidth' => true,
- 'styleSheets' => array('/js/custom/editor.css'),
- ));
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.dojo.form.elements.horizontalSlider">
- <title>水平スライダー</title>
- <para>
- 水平スライダーは、
- ある範囲で数値を選択するためのスライダーUI部品を提供します。
- 内部的には、それはフォームによって送信されるhidden要素の値をセットします。
- </para>
- <para>
- 水平スライダーは、<link
- linkend="zend.dojo.form.elements.slider">抽象的なスライダーdijit要素</link>に由来します。
- さらに、スライダー・ルールとルール・ラベルをセットして設定するための、
- いろいろなメソッドがあります。
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <code>setTopDecorationDijit($dijit)</code>及び
- <code>setBottomDecorationDijit($dijit)</code>:
- スライダーのトップかボトムで使うdijitの名前をセットします。
- これは、接頭辞 "dijit.form." を含んではいけません。
- むしろ final 名だけ
- - "HorizontalRule" または "HorizontalRuleLabels" のうちの1つ -
- を含まなければなりません。
- </para>
- </listitem>
- <listitem>
- <para>
- <code>setTopDecorationContainer($container)</code>及び
- <code>setBottomDecorationContainer($container)</code>:
- ルールのコンテナ要素のために使用する名前を指定します;
- 例えば、'topRule' や 'topContainer'など。
- </para>
- </listitem>
- <listitem>
- <para>
- <code>setTopDecorationLabels(array $labels)</code>及び
- <code>setBottomDecorationLabels(array $labels)</code>:
- RuleLabels dijit型のうちの1つで使用するラベルをセットします。
- これらは、インデックスを付けられた配列でなければなりません;
- 与えられたラベル位置(例えば始めまたは終わり)をスキップするために、
- 一つの空の場所を指定します。
- </para>
- </listitem>
- <listitem>
- <para>
- <code>setTopDecorationParams(array $params)</code>及び
- <code>setBottomDecorationParams(array $params)</code>:
- 与えられたルール、
- またはRuleLabels dijitを構成するときに使うdijitパラメータです。
- </para>
- </listitem>
- <listitem>
- <para>
- <code>setTopDecorationAttribs(array $attribs)</code>及び
- <code>setBottomDecorationAttribs(array $attribs)</code>:
- 与えられたルールまたはRuleLabels HTML要素コンテナのために指定するHTML属性です。
- </para>
- </listitem>
- <listitem>
- <para>
- <code>getTopDecoration()</code>及び
- <code>getBottomDecoration()</code>:
- 上記のミューテーターによって提示されたように、
- 与えられたルールまたはRuleLabels定義のためにすべてのメタデータを取得します。
- </para>
- </listitem>
- </itemizedlist>
- <example id="zend.dojo.form.elements.horizontalSlider.example">
- <title>水平スライダーdijit要素使用例</title>
- <para>
- <!-- TODO -->
- The following will create a horizontal slider selection with
- integer values ranging from -10 to 10. The top will have labels
- at the 20%, 40%, 60%, and 80% marks. The botton will have rules
- at 0, 50%, and 100%. Each time the value is changed, the hidden
- element storing the value will be updated.
- </para>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'HorizontalSlider',
- 'horizontal',
- array(
- 'label' => 'HorizontalSlider',
- 'value' => 5,
- 'minimum' => -10,
- 'maximum' => 10,
- 'discreteValues' => 11,
- 'intermediateChanges' => true,
- 'showButtons' => true,
- 'topDecorationDijit' => 'HorizontalRuleLabels',
- 'topDecorationContainer' => 'topContainer',
- 'topDecorationLabels' => array(
- ' ',
- '20%',
- '40%',
- '60%',
- '80%',
- ' ',
- ),
- 'topDecorationParams' => array(
- 'container' => array(
- 'style' => 'height:1.2em; font-size=75%;color:gray;',
- ),
- 'list' => array(
- 'style' => 'height:1em; font-size=75%;color:gray;',
- ),
- ),
- 'bottomDecorationDijit' => 'HorizontalRule',
- 'bottomDecorationContainer' => 'bottomContainer',
- 'bottomDecorationLabels' => array(
- '0%',
- '50%',
- '100%',
- ),
- 'bottomDecorationParams' => array(
- 'list' => array(
- 'style' => 'height:1em; font-size=75%;color:gray;',
- ),
- ),
- )
- );
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.dojo.form.elements.numberSpinner">
- <title>NumberSpinner</title>
- <para>
- A number spinner is a text element for entering numeric values; it
- also includes elements for incrementing and decrementing the value
- by a set amount.
- </para>
- <para>
- The following methods are available:
- </para>
- <itemizedlist>
- <listitem><para>
- <code>setDefaultTimeout($timeout)</code>及び
- <code>getDefaultTimeout()</code>: set and retrieve the default
- timeout, in milliseconds, between when the button is held
- pressed and the value is changed.
- </para></listitem>
- <listitem><para>
- <code>setTimeoutChangeRate($rate)</code>及び
- <code>getTimeoutChangeRate()</code>: set and retrieve the
- rate, in milliseconds, at which changes will be made when a
- button is held pressed.
- </para></listitem>
- <listitem><para>
- <code>setLargeDelta($delta)</code>及び
- <code>getLargeDelta()</code>: set and retrieve the amount by
- which the numeric value should change when a button is held
- pressed.
- </para></listitem>
- <listitem><para>
- <code>setSmallDelta($delta)</code>及び
- <code>getSmallDelta()</code>: set and retrieve the delta by
- which the number should change when a button is pressed once.
- </para></listitem>
- <listitem><para>
- <code>setIntermediateChanges($flag)</code>及び
- <code>getIntermediateChanges()</code>: set and retrieve the
- flag indicating whether or not each value change should be
- shown when a button is held pressed.
- </para></listitem>
- <listitem><para>
- <code>setRangeMessage($message)</code>及び
- <code>getRangeMessage()</code>: set and retrieve the message
- indicating the range of values available.
- </para></listitem>
- <listitem><para>
- <code>setMin($value)</code>及び<code>getMin()</code>: set and
- retrieve the minimum value possible.
- </para></listitem>
- <listitem><para>
- <code>setMax($value)</code>及び<code>getMax()</code>: set and
- retrieve the maximum value possible.
- </para></listitem>
- </itemizedlist>
- <example id="zend.dojo.form.elements.numberSpinner.example">
- <title>NumberSpinner dijit要素の使用例</title>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'NumberSpinner',
- 'foo',
- array(
- 'value' => '7',
- 'label' => 'NumberSpinner',
- 'smallDelta' => 5,
- 'largeDelta' => 25,
- 'defaultTimeout' => 500,
- 'timeoutChangeRate' => 100,
- 'min' => 9,
- 'max' => 1550,
- 'places' => 0,
- 'maxlength' => 20,
- )
- );
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.dojo.form.elements.numberTextBox">
- <title>NumberTextBox</title>
- <para>
- A number text box is a text element for entering numeric values;
- unlike NumberSpinner, numbers are entered manually. Validations and
- constraints can be provided to ensure the number stays in a
- particular range or format.
- </para>
- <para>
- Internally, NumberTextBox derives from <link
- linkend="zend.dojo.form.elements.validationTextBox">ValidationTextBox</link>
- and <link linkend="zend.dojo.form.elements.textBox">TextBox</link>;
- それらのクラスのメソッドが全て利用可能です。さらに、
- 個別の制約を設定するために下記のメソッドを使用できます:
- </para>
- <itemizedlist>
- <listitem><para>
- <code>setLocale($locale)</code>及び<code>getLocale()</code>:
- specify and retrieve a specific or alternate locale to use with
- this dijit.
- </para></listitem>
- <listitem><para>
- <code>setPattern($pattern)</code>及び
- <code>getPattern()</code>: set and retrieve a <ulink
- url="http://www.unicode.org/reports/tr35/#Number_Format_Patterns">number
- pattern format</ulink> to use to format the number.
- </para></listitem>
- <listitem><para>
- <code>setType($type)</code>及び<code>getType()</code>: set and
- retrieve the numeric format type to use (should be one of
- 'decimal', 'percent', or 'currency').
- </para></listitem>
- <listitem><para>
- <code>setPlaces($places)</code>及び<code>getPlaces()</code>:
- set and retrieve the number of decimal places to support.
- </para></listitem>
- <listitem><para>
- <code>setStrict($flag)</code>及び<code>getStrict()</code>: set
- and retrieve the value of the strict flag, which indicates how
- much leniency is allowed in relation to whitespace and
- non-numeric characters.
- </para></listitem>
- </itemizedlist>
- <example id="zend.dojo.form.elements.numberTextBox.example">
- <title>数値テキストボックスdijit要素の使用例</title>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'NumberTextBox',
- 'elevation',
- array(
- 'label' => 'NumberTextBox',
- 'required' => true,
- 'invalidMessage' => 'Invalid elevation.',
- 'places' => 0,
- 'constraints' => array(
- 'min' => -20000,
- 'max' => 20000,
- ),
- )
- );
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.dojo.form.elements.passwordTextBox">
- <title>PasswordTextBox</title>
- <para>
- PasswordTextBox is simply a ValidationTextBox that is tied to a
- password input; its sole purpose is to allow for a dijit-themed text
- entry for passwords that also provides client-side validation.
- </para>
- <para>
- Internally, NumberTextBox derives from <link
- linkend="zend.dojo.form.elements.validationTextBox">ValidationTextBox</link>
- and <link linkend="zend.dojo.form.elements.textBox">TextBox</link>;
- それらのクラスのメソッドが全て利用可能です。
- </para>
- <example id="zend.dojo.form.elements.passwordTextBox.example">
- <title>パスワードテキストボックスの使用例</title>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'PasswordTextBox',
- 'password',
- array(
- 'label' => 'Password',
- 'required' => true,
- 'trim' => true,
- 'lowercase' => true,
- 'regExp' => '^[a-z0-9]{6,}$',
- 'invalidMessage' => 'Invalid password; ' .
- 'must be at least 6 alphanumeric characters',
- )
- );
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.dojo.form.elements.radioButton">
- <title>RadioButton</title>
- <para>
- RadioButton wraps standard radio input elements to provide a
- consistent look and feel with other dojo dijits.
- </para>
- <para>
- RadioButton extends from DijitMulti, which
- allows you to specify select options via the
- <code>setMultiOptions()</code>及び<code>setMultiOption()</code>
- methods.
- </para>
- <para>
- By default, this element registers an <code>InArray</code> validator
- which validates against the array keys of registered options. You
- can disable this behavior by either calling
- <code>setRegisterInArrayValidator(false)</code>, or by passing a
- false value to the <code>registerInArrayValidator</code>
- configuration key.
- </para>
- <example id="zend.dojo.form.elements.radioButton.example">
- <title>ラジオボタンdijit要素の使用例</title>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'RadioButton',
- 'foo',
- array(
- 'label' => 'RadioButton',
- 'multiOptions' => array(
- 'foo' => 'Foo',
- 'bar' => 'Bar',
- 'baz' => 'Baz',
- ),
- 'value' => 'bar',
- )
- );
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.dojo.form.elements.simpletextarea">
- <title>シンプルテキストエリア</title>
- <para>
- SimpleTextarea acts primarily like a standard HTML textarea. However, it
- does not support either the rows or cols settings. Instead, the
- textarea width should be specified using standard CSS measurements.
- Unlike Textarea, it will not grow automatically
- </para>
- <example id="zend.dojo.form.elements.simpletextarea.example">
- <title>シンプルテキストエリアdijit要素の使用例</title>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'SimpleTextarea',
- 'simpletextarea',
- array(
- 'label' => 'SimpleTextarea',
- 'required' => true,
- 'style' => 'width: 80em; height: 25em;',
- )
- );
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.dojo.form.elements.slider">
- <title>Slider abstract element</title>
- <para>
- Slider is an abstract element from which
- <link linkend="zend.dojo.form.elements.horizontalSlider">HorizontalSlider</link>
- and
- <link linkend="zend.dojo.form.elements.verticalSlider">VerticalSlider</link>
- both derive. It exposes a number of common methods for configuring
- your sliders, including:
- </para>
- <itemizedlist>
- <listitem><para>
- <code>setClickSelect($flag)</code>及び
- <code>getClickSelect()</code>: set and retrieve the flag
- indicating whether or not clicking the slider changes the
- value.
- </para></listitem>
- <listitem><para>
- <code>setIntermediateChanges($flag)</code>及び
- <code>getIntermediateChanges()</code>: set and retrieve the
- flag indicating whether or not the dijit will send a
- notification on each slider change event.
- </para></listitem>
- <listitem><para>
- <code>setShowButtons($flag)</code>及び
- <code>getShowButtons()</code>: set and retrieve the flag
- indicating whether or not buttons on either end will be
- displayed; if so, the user can click on these to change the
- value of the slider.
- </para></listitem>
- <listitem><para>
- <code>setDiscreteValues($value)</code>及び
- <code>getDiscreteValues()</code>: set and retrieve the number
- of discrete values represented by the slider.
- </para></listitem>
- <listitem><para>
- <code>setMaximum($value)</code>及び<code>getMaximum()</code>:
- スライダーの最大値を設定します。
- </para></listitem>
- <listitem><para>
- <code>setMinimum($value)</code>及び<code>getMinimum()</code>:
- スライダーの最小値を設定します。
- </para></listitem>
- <listitem><para>
- <code>setPageIncrement($value)</code>及び
- <code>getPageIncrement()</code>: set the amount by which the
- slider will change on keyboard events.
- </para></listitem>
- </itemizedlist>
- <para>
- Example usage is provided with each concrete extending class.
- </para>
- </sect3>
- <sect3 id="zend.dojo.form.elements.submitButton">
- <title>SubmitButton</title>
- <para>
- While there is no Dijit named SubmitButton, we include one here to
- provide a button dijit capable of submitting a form without
- requiring any additional javascript bindings. It works exactly like
- the <link linkend="zend.dojo.form.elements.button">Button
- dijit</link>.
- </para>
- <example id="zend.dojo.form.elements.submitButton.example">
- <title>サブミットボタンdijit要素の使用例</title>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'SubmitButton',
- 'foo',
- array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Submit Button!',
- )
- );
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.dojo.form.elements.textBox">
- <title>TextBox</title>
- <para>
- TextBox is included primarily to provide a text input with
- consistent look-and-feel to the other dijits. However, it also
- includes some minor filtering and validation capabilities,
- represented in the following methods:
- </para>
- <itemizedlist>
- <listitem><para>
- <code>setLowercase($flag)</code>及び
- <code>getLowercase()</code>: set and retrieve the flag
- indicating whether or not input should be cast to lowercase.
- </para></listitem>
- <listitem><para>
- <code>setPropercase($flag)</code>及び
- <code>getPropercase()</code>: set and retrieve the flag
- indicating whether or not the input should be cast to Proper
- Case.
- </para></listitem>
- <listitem><para>
- <code>setUppercase($flag)</code>及び<code>getUppercase()</code>: set and retrieve
- the flag indicating whether or not the input should be cast to UPPERCASE.
- </para></listitem>
- <listitem><para>
- <code>setTrim($flag)</code>及び<code>getTrim()</code>: set and
- retrieve the flag indicating whether or not leading or trailing
- whitespace should be stripped.
- </para></listitem>
- <listitem><para>
- <code>setMaxLength($length)</code>及び
- <code>getMaxLength()</code>: set and retrieve the maximum
- length of input.
- </para></listitem>
- </itemizedlist>
- <example id="zend.dojo.form.elements.textBox.example">
- <title>テキストボックスdijit要素の使用例</title>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'TextBox',
- 'foo',
- array(
- 'value' => 'some text',
- 'label' => 'TextBox',
- 'trim' => true,
- 'propercase' => true,
- )
- );
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.dojo.form.elements.textarea">
- <title>Textarea</title>
- <para>
- Textarea acts primarily like a standard HTML textarea. However, it
- does not support either the rows or cols settings. Instead, the
- textarea width should be specified using standard CSS measurements;
- rows should be omitted entirely. The textarea will then grow
- vertically as text is added to it.
- </para>
- <example id="zend.dojo.form.elements.textarea.example">
- <title>テキストエリアdijit要素の使用例</title>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'Textarea',
- 'textarea',
- array(
- 'label' => 'Textarea',
- 'required' => true,
- 'style' => 'width: 200px;',
- )
- );
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.dojo.form.elements.timeTextBox">
- <title>TimeTextBox</title>
- <para>
- TimeTextBox is a text input that provides a drop-down for selecting
- a time. The drop-down may be configured to show a certain window of
- time, with specified increments.
- </para>
- <para>
- Internally, TimeTextBox derives from <link
- linkend="zend.dojo.form.elements.dateTextBox">DateTextBox</link>,
- <link
- linkend="zend.dojo.form.elements.validationTextBox">ValidationTextBox</link>
- and <link linkend="zend.dojo.form.elements.textBox">TextBox</link>;
- それらのクラスのメソッドが全て利用可能です。さらに、
- 個別の制約を設定するために下記のメソッドを使用できます:
- </para>
- <itemizedlist>
- <listitem><para>
- <code>setTimePattern($pattern)</code>及び
- <code>getTimePattern()</code>: set and retrieve the <ulink
- url="http://www.unicode.org/reports/tr35/#Date_Format_Patterns">unicode
- time format pattern</ulink> for formatting the time.
- </para></listitem>
- <listitem><para>
- <code>setClickableIncrement($format)</code>及び
- <code>getClickableIncrement()</code>: set the <ulink
- url="http://en.wikipedia.org/wiki/ISO_8601">ISO-8601</ulink>
- string representing the amount by which every clickable element
- in the time picker increases.
- </para></listitem>
- <listitem><para>
- <code>setVisibleIncrement($format)</code>及び
- <code>getVisibleIncrement()</code>: set the increment visible
- in the time chooser; must follow ISO-8601 formats.
- </para></listitem>
- <listitem><para>
- <code>setVisibleRange($format)</code>及び
- <code>getVisibleRange()</code>: set and retrieve the range of
- time visible in the time chooser at any given moment; must
- follow ISO-8601 formats.
- </para></listitem>
- </itemizedlist>
- <example id="zend.dojo.form.elements.timeTextBox.example">
- <title>時刻テキストボックスdijit要素の使用例</title>
- <para>
- The following will create a TimeTextBox that displays 2 hours
- at a time, with increments of 10 minutes.
- </para>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'TimeTextBox',
- 'foo',
- array(
- 'label' => 'TimeTextBox',
- 'required' => true,
- 'visibleRange' => 'T04:00:00',
- 'visibleIncrement' => 'T00:10:00',
- 'clickableIncrement' => 'T00:10:00',
- )
- );
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.dojo.form.elements.validationTextBox">
- <title>ValidationTextBox</title>
- <para>
- ValidationTextBox provides the ability to add validations and constraints to a text
- input. Internally, it derives from <link
- linkend="zend.dojo.form.elements.textBox">TextBox</link>, and adds the following
- accessors and mutators for manipulating dijit parameters:
- </para>
- <itemizedlist>
- <listitem><para>
- <code>setInvalidMessage($message)</code>及び
- <code>getInvalidMessage()</code>: set and retrieve the tooltip
- message to display when the value does not validate.
- </para></listitem>
- <listitem><para>
- <code>setPromptMessage($message)</code>及び
- <code>getPromptMessage()</code>: set and retrieve the tooltip
- message to display for element usage.
- </para></listitem>
- <listitem><para>
- <code>setRegExp($regexp)</code>及び<code>getRegExp()</code>:
- set and retrieve the regular expression to use for validating
- the element. The regular expression does not need boundaries
- (unlike PHP's preg* family of functions).
- </para></listitem>
- <listitem><para>
- <code>setConstraint($key, $value)</code>及び
- <code>getConstraint($key)</code>: set and retrieve additional
- constraints to use when validating the element; used primarily
- with subclasses. Constraints are stored in the 'constraints'
- key of the dijit parameters.
- </para></listitem>
- <listitem><para>
- <code>setConstraints(array $constraints)</code>及び
- <code>getConstraints()</code>: set and retrieve individual
- constraints to use when validating the element; used primarily
- with subclasses.
- </para></listitem>
- <listitem><para>
- <code>hasConstraint($key)</code>: test whether a given
- constraint exists.
- </para></listitem>
- <listitem><para>
- <code>removeConstraint($key)</code>及び
- <code>clearConstraints()</code>: remove an individual or all
- constraints for the element.
- </para></listitem>
- </itemizedlist>
- <example id="zend.dojo.form.elements.validationTextBox.example">
- <title>ValidationTextBox dijit要素の使用例</title>
- <para>
- The following will create a ValidationTextBox that requires a
- single string consisting solely of word characters (i.e., no
- spaces, most punctuation is invalid).
- </para>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'ValidationTextBox',
- 'foo',
- array(
- 'label' => 'ValidationTextBox',
- 'required' => true,
- 'regExp' => '[\w]+',
- 'invalidMessage' => 'Invalid non-space text.',
- )
- );
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.dojo.form.elements.verticalSlider">
- <title>VerticalSlider</title>
- <para>
- VerticalSlider is the sibling of <link
- linkend="zend.dojo.form.elements.horizontalSlider">HorizontalSlider</link>,
- and operates in every way like that element. The only real
- difference is that the 'top*' and 'bottom*' methods are replaced by
- 'left*' and 'right*', and instead of using HorizontalRule and
- HorizontalRuleLabels, VerticalRule and VerticalRuleLabels should be
- used.
- </para>
- <example id="zend.dojo.form.elements.verticalSlider.example">
- <title>VerticalSlider dijit要素の使用例</title>
- <para>
- The following will create a vertical slider selection with
- integer values ranging from -10 to 10. The left will have labels
- at the 20%, 40%, 60%, and 80% marks. The right will have rules
- at 0, 50%, and 100%. Each time the value is changed, the hidden
- element storing the value will be updated.
- </para>
- <programlisting language="php"><![CDATA[
- $form->addElement(
- 'VerticalSlider',
- 'foo',
- array(
- 'label' => 'VerticalSlider',
- 'value' => 5,
- 'style' => 'height: 200px; width: 3em;',
- 'minimum' => -10,
- 'maximum' => 10,
- 'discreteValues' => 11,
- 'intermediateChanges' => true,
- 'showButtons' => true,
- 'leftDecorationDijit' => 'VerticalRuleLabels',
- 'leftDecorationContainer' => 'leftContainer',
- 'leftDecorationLabels' => array(
- ' ',
- '20%',
- '40%',
- '60%',
- '80%',
- ' ',
- ),
- 'rightDecorationDijit' => 'VerticalRule',
- 'rightDecorationContainer' => 'rightContainer',
- 'rightDecorationLabels' => array(
- '0%',
- '50%',
- '100%',
- ),
- )
- );
- ]]></programlisting>
- </example>
- </sect3>
- </sect2>
- <!--
- vim:se ts=4 sw=4 et:
- -->
|