Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

コンボ・ボックスの各エントリーは、作業リストのエントリーもしくはコンボ・ボックスのプロパティでハードコーディングされた一連の項目によって定義されます。

作業リストを使用する場合

ドロップダウン・オプションの定義に作業リストを使用する場合、Webroutineを作成して選択された値を格納するフィールドと選択オプションを含む作業リストをWEB_MAPに定義する必要があります。LANSAエディターでWebroutine用に生成されたXSLを開き、以下の手順に従ってください。

  1. 作業リストがWEB_MAPで*HIDDENではない場合は、デフォルト値で作業リストを表わすテーブルがWebページに含まれます。リストをビジュアライズするテーブルは削除します。削除するには、リストで右クリックし、ポップアップ・メニューから、[全てのリスト削除]を選択してください。
  2. [ウェブレット テンプレート]タブをクリックし、上にあるドロップダウン・リストから[標準ウェブレット]を選択、[コンボ ボックス]ウェブレットを探します。
  3. コンボ・ボックス ウェブレットを、値を格納するフィールド上にドラッグし、マウスの左ボタンを離してください。これで、ドロップダウンのオプションが表示されます。
    Image Added
  4. ウェブレットをクリックして、[詳細]タブを確認します。name プロパティとvalueプロパティにウェブレットをドラッグしたフィールドを示す値が設定されていることを確認してください。Webページ表示の際、valueプロパティのフィールドに現在入っている値を使用して選択されたドロップダウン・エントリーが設定されます。ドロップダウンの値が変更されると、適切な値がnameプロパティに指定されたフィールド(この場合、同じフィールド)に入れられます。
  5. listnameプロパティをWEB_MAPに送られる作業リストに変更します。コンボ・ボックス表示はすぐに作業リストの表示に変更されるはずです。
  6. codefieldプロパティとcaptionfieldプロパティに作業リストの適切なフィールドを設定します。

itemsプロパティを使用する場合

コンボ・ボックスのプロパティにハードコーディングされた一連の項目を使用するには、WEB_MAPにフィールドを指定したWebroutineを作成する必要があります。LANSAエディターでWebroutine用に生成されたXSLを開き、以下の手順に従ってください。

  1. [ウェブレット テンプレート]タブをクリックし、上にあるドロップダウン・リストから[標準ウェブレット]を選択、[コンボ ボックス]ウェブレットを探します。
  2. コンボ・ボックス ウェブレットを、値を格納するフィールド上にドラッグし、マウスの左ボタンを離してください。これで、ドロップダウンのオプションが表示されます。Image Added 
  3. ウェブレットをクリックして、[詳細]タブを確認します。name プロパティとvalueプロパティにウェブレットをドラッグしたフィールドを示す値が設定されていることを確認してください。Webページ表示の際、valueプロパティのフィールドに現在入っている値を使用して選択されたドロップダウン・エントリーが設定されます。ドロップダウンの値が変更されると、適切な値がnameプロパティに指定されたフィールド(この場合、同じフィールド)に入れられます。
  4. itemsプロパティの省略記号(...)のボタンを選択して、ドロップダウン・オプションとして使用する項目のリストを設定します。そしてドロップダウンに必要なエントリーの定義に進みます。

Each entry in a combo box is defined by an entry in a working list or a set of items hardcoded in the combo box properties.

If you use a working list:

To use a working list to define the dropdown options, you need to create a webroutine that specifies a field to store the selected value and the working list of options in the WEB_MAP. When you open the XSL generated for the webroutine in the LANSA Editor:

  1.  If the working list was not *HIDDEN on the WEB_MAP a default table representation of the working list will be included on the web page. Delete the table that visualizes the list. To do this, right-click in the list and select Delete Entire List from the pop-up menu.
  2.  Click on the Weblets tab, select Standard Weblets from the drop-down list near the top, and locate the Combo Box weblet.
  3.  Drag the Combo Box weblet onto the field to store the value and release the left-mouse button. This will display with dropdown options.
    Image Removed
  4.  Click on the weblet to review the Details tab. Notice that the name and value properties have been set to indicate the field you dragged the weblet onto. The value property indicates that on the presentation of the web page any value currently in this field will be used to set the selected drop-down entry. When the drop-down value is changed the appropriate value will be placed in the field nominated on the name property – in this case the same field.
  5.  Change the listname property to the working list passed on the WEB_MAP. The combo box representation should immediately change to represent the working list.
  6.  Set the codefield and captionfield properties to the appropriate fields from the working list.

If you use the items property:

To use a set of items hardcoded in the combo box properties, you would need to create a webroutine that specifies a field in its WEB_MAP. When you open the XSL generated for the webroutine in the LANSA Editor:

  1.  Click on the Weblets tab, select Standard Weblets from the drop-down list near the top, and locate the Combo Box weblet.
  2.  Drag the Combo Box weblet onto the field to store the value and release the left-mouse button. This will display with dropdown options.
    Image Removed
  3.  Click on the weblet to review the Details tab. Notice that the name and value properties have been set to indicate the field you dragged the weblet on to. The value property indicates that on the presentation of the web page any value currently in this field will be used to set the selected drop-down entry. When the drop-down value is changed the appropriate value will be placed in the field nominated on the name property – in this case, the same field.
  4.  Set up the list of items to be used as drop-down options by selecting the ellipses button on the items property. Proceed to define the required entries for the drop-down.