# Business Logic — FUW00110SF01DBean.removeElementFromListData() [34 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW00110SF.FUW00110SF01DBean` |
| Layer | View Bean (Web View / Presentation Tier) |
| Module | `FUW00110SF` (Package: `eo.web.webview.FUW00110SF`) |

## 1. Role

### FUW00110SF01DBean.removeElementFromListData()

This method provides a **generic, key-based element removal** mechanism for the repeating (iterative) item lists managed by the `FUW00110SF01DBean` view bean. In the context of the service contract screen (a web form for managing service contracts and their line items), the UI supports adding and removing repeating sections — such as item counts, selected indices, true values, and label values — dynamically as users build or modify their service configuration.

The method implements a **routing/dispatch pattern**: it examines the `key` parameter to determine which of four internal `X33VDataTypeList` collections (`list_size_list`, `sel_index_list`, `true_value_list`, `label_value_list`) the caller intends to modify, and then removes the element at the specified `index` from that collection — provided the index is within bounds. This design avoids exposing individual list-manipulation methods to the UI layer, centralizing removal logic in a single dispatch entry point.

As a utility method on a `DBean` (Detail Bean), it plays the role of a **shared presentation-tier helper** that is called by the screen controller or JSP binding code during form submission or AJAX-driven dynamic updates. It does not interact with any database, SC (Service Component), or CBS (Common Business Service) — its scope is purely view-state mutation. The method also serves as an inheritance base: several subclasses (`FUW00110SFBean`, `FUW00110SF04DBean`) override it to add domain-specific list types before delegating to `super.removeElementFromListData()`.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["removeElementFromListData(key, index)"])
    CHECK_KEY_NULL{"key is not null"}
    CHECK_ITEMSU{"key equals Items count"}
    CHECK_SEL{"key equals Selected value"}
    CHECK_TRUEVAL{"key equals Item actual value"}
    CHECK_LABEL{"key equals Item label"}
    BOUNDS1{"index within list_size bounds"}
    BOUNDS2{"index within sel_index bounds"}
    BOUNDS3{"index within true_value bounds"}
    BOUNDS4{"index within label_value bounds"}
    REMOVE1["list_size_list.remove(index)"]
    REMOVE2["sel_index_list.remove(index)"]
    REMOVE3["true_value_list.remove(index)"]
    REMOVE4["label_value_list.remove(index)"]
    END_NODE(["Return void"])

    START --> CHECK_KEY_NULL
    CHECK_KEY_NULL -->|false| END_NODE
    CHECK_KEY_NULL -->|true| CHECK_ITEMSU
    CHECK_ITEMSU -->|true| BOUNDS1
    CHECK_ITEMSU -->|false| CHECK_SEL
    CHECK_SEL -->|true| BOUNDS2
    CHECK_SEL -->|false| CHECK_TRUEVAL
    CHECK_TRUEVAL -->|true| BOUNDS3
    CHECK_TRUEVAL -->|false| CHECK_LABEL
    CHECK_LABEL -->|true| BOUNDS4
    CHECK_LABEL -->|false| END_NODE
    BOUNDS1 -->|true| REMOVE1
    BOUNDS1 -->|false| END_NODE
    REMOVE1 --> END_NODE
    BOUNDS2 -->|true| REMOVE2
    BOUNDS2 -->|false| END_NODE
    REMOVE2 --> END_NODE
    BOUNDS3 -->|true| REMOVE3
    BOUNDS3 -->|false| END_NODE
    REMOVE3 --> END_NODE
    BOUNDS4 -->|true| REMOVE4
    BOUNDS4 -->|false| END_NODE
    REMOVE4 --> END_NODE
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The **item type discriminator** that identifies which repeating list collection to operate on. It acts as a routing key matching one of four UI repeating item identifiers: "Items count" (items count / list size for the repeating section), "Selected value" (selected index for dropdown or selection controls), "Item actual value" (the true/actual data value bound to the repeating item), or "Item label" (the display label text for the repeating item). If `null`, the method exits silently without performing any operation. |
| 2 | `index` | `int` | The **zero-based position** within the target list collection whose element should be removed. Must be a non-negative integer strictly less than the size of the target list; otherwise, the removal is silently skipped to prevent `IndexOutOfBoundsException`. |

**Instance fields read by this method:**

| Field | Type | Business Meaning |
|-------|------|-----------------|
| `list_size_list` | `X33VDataTypeList` | Repeating item count list (Long type, item ID: `list_size`) — tracks how many items exist in each repeating section of the service contract form. |
| `sel_index_list` | `X33VDataTypeList` | Selected value list (Long type, item ID: `sel_index`) — tracks the selected index for dropdown or selection controls within repeating sections. |
| `true_value_list` | `X33VDataTypeList` | Item actual value list (String type, item ID: `true_value`) — holds the actual data values bound to repeating form fields. |
| `label_value_list` | `X33VDataTypeList` | Item label list (String type, item ID: `label_value`) — holds the display label text for repeating form fields. |

## 4. CRUD Operations / Called Services

This method performs **no database operations**, does not call any SC (Service Component) or CBS (Common Business Service), and does not query or modify any entity tables. It operates purely on in-memory view-state collections.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| — | — | — | — | No CRUD or service calls. This method mutates only presentation-tier `X33VDataTypeList` collections held by the view bean. |

## 5. Dependency Trace

This method is invoked from various screen classes in both `koptWebF` and `koptWebR` that extend or delegate to the FUW00110SF bean hierarchy. The following callers were found:

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:FUW00110SF01 (Base DBean) | Direct call from JSP/controller binding | `list_size_list.remove(index)` [D — in-memory] |
| 2 | Screen:FUW00110SFBean | `FUW00110SFBean.removeElementFromListData(key, index)` → `super.removeElementFromListData(key, index)` | `list_size_list.remove(index)` [D — in-memory] |
| 3 | Screen:FUW00110SF04DBean | Direct override (same implementation as base) | `list_size_list.remove(index)` [D — in-memory] |
| 4 | Screen:FUW00901SF | `FUW00901SFBean.removeElementFromListData(key, index)` → `super.removeElementFromListData(key, index)` | `list_size_list.remove(index)` [D — in-memory] |
| 5 | Screen:FUW00907SF | `FUW00907SFBean.removeElementFromListData(key, index)` → `super.removeElementFromListData(key, index)` | `list_size_list.remove(index)` [D — in-memory] |
| 6 | Screen:FUW00912SF01DBean | Direct override (redefined with its own logic) | `list_size_list.remove(index)` [D — in-memory] |
| 7 | Screen:FUW00914SF | `FUW00914SFBean.removeElementFromListData(key, index)` → `super.removeElementFromListData(key, index)` | `list_size_list.remove(index)` [D — in-memory] |
| 8 | Screen:FUW00916SF | `FUW00916SFBean.removeElementFromListData(key, index)` → `super.removeElementFromListData(key, index)` | `list_size_list.remove(index)` [D — in-memory] |
| 9 | Screen:FUW00917SF | `FUW00917SFBean.removeElementFromListData(key, index)` → `super.removeElementFromListData(key, index)` | `list_size_list.remove(index)` [D — in-memory] |
| 10 | Screen:FUW00919SF | `FUW00919SFBean.removeElementFromListData(key, index)` → `super.removeElementFromListData(key, index)` | `list_size_list.remove(index)` [D — in-memory] |
| 11 | Screen:FUW00926SF | `FUW00926SFBean.removeElementFromListData(key, index)` → `super.removeElementFromListData(key, index)` | `list_size_list.remove(index)` [D — in-memory] |
| 12 | Screen:FUW00927SF | `FUW00927SFBean.removeElementFromListData(key, index)` → `super.removeElementFromListData(key, index)` | `list_size_list.remove(index)` [D — in-memory] |
| 13 | Screen:FUW00931SF | `FUW00931SFBean.removeElementFromListData(key, index)` → `super.removeElementFromListData(key, index)` | `list_size_list.remove(index)` [D — in-memory] |
| 14 | Screen:FUW00946SF | `FUW00946SFBean.removeElementFromListData(key, index)` → `super.removeElementFromListData(key, index)` | `list_size_list.remove(index)` [D — in-memory] |
| 15 | Screen:FUW00947SF | `FUW00947SFBean.removeElementFromListData(key, index)` → `super.removeElementFromListData(key, index)` | `list_size_list.remove(index)` [D — in-memory] |

**Note:** The remaining callers (FUW00957SF, FUW00959SF, FUW00961SF, FUW00964SF variants) follow the same delegation pattern — they override the method to add domain-specific list branches and call `super.removeElementFromListData(key, index)` to handle the base list types.

## 6. Per-Branch Detail Blocks

**Block 1** — [IF] `key != null` (L654)

> Guard clause: if `key` is null, the method returns immediately without performing any operation.

| # | Type | Code |
|---|------|------|
| 1 | SET | N/A — no assignments, early return if condition fails |

**Block 2** — [IF-ELSE-IF-ELSE-IF-ELSE-IF-ELSE-IF] `key.equals("Items count")` [項目数="Items count"] (L657)

> Dispatch branch: when `key` matches the repeating item type "Items count" (item ID: `list_size`), the method removes the element at `index` from the `list_size_list` collection after verifying the index is within bounds.

| # | Type | Code |
|---|------|------|
| 1 | SET | `index >= 0 && index < list_size_list.size()` — bounds check // comment: "指定のインデックスが現在のリストの範囲内なら、そのインデックスの内容を削除する" (If the specified index is within the current list range, remove the content at that index) |
| 2 | CALL | `list_size_list.remove(index)` — removes element from items count list // comment: "指定のインデックスが現在のリストの範囲内なら、そのインデックスの内容を削除する" (If the specified index is within the current list range, remove the content at that index) |

**Block 3** — [ELSE-IF] `key.equals("Selected value")` [選択値="Selected value"] (L663)

> Dispatch branch: when `key` matches the repeating item type "Selected value" (item ID: `sel_index`), the method removes the element at `index` from the `sel_index_list` collection after verifying the index is within bounds.

| # | Type | Code |
|---|------|------|
| 1 | SET | `index >= 0 && index < sel_index_list.size()` — bounds check // comment: "指定のインデックスが現在のリストの範囲内なら、そのインデックスの内容を削除する" (If the specified index is within the current list range, remove the content at that index) |
| 2 | CALL | `sel_index_list.remove(index)` — removes element from selected value list // comment: "指定のインデックスが現在のリストの範囲内なら、そのインデックスの内容を削除する" (If the specified index is within the current list range, remove the content at that index) |

**Block 4** — [ELSE-IF] `key.equals("Item actual value")` [項目実値="Item actual value"] (L669)

> Dispatch branch: when `key` matches the repeating item type "Item actual value" (item ID: `true_value`), the method removes the element at `index` from the `true_value_list` collection after verifying the index is within bounds.

| # | Type | Code |
|---|------|------|
| 1 | SET | `index >= 0 && index < true_value_list.size()` — bounds check // comment: "指定のインデックスが現在のリストの範囲内なら、そのインデックスの内容を削除する" (If the specified index is within the current list range, remove the content at that index) |
| 2 | CALL | `true_value_list.remove(index)` — removes element from actual value list // comment: "指定のインデックスが現在のリストの範囲内なら、そのインデックスの内容を削除する" (If the specified index is within the current list range, remove the content at that index) |

**Block 5** — [ELSE-IF] `key.equals("Item label")` [項目ラベル="Item label"] (L675)

> Dispatch branch: when `key` matches the repeating item type "Item label" (item ID: `label_value`), the method removes the element at `index` from the `label_value_list` collection after verifying the index is within bounds.

| # | Type | Code |
|---|------|------|
| 1 | SET | `index >= 0 && index < label_value_list.size()` — bounds check // comment: "指定のインデックスが現在のリストの範囲内なら、そのインデックスの内容を削除する" (If the specified index is within the current list range, remove the content at that index) |
| 2 | CALL | `label_value_list.remove(index)` — removes element from label list // comment: "指定のインデックスが現在のリストの範囲内なら、そのインデックスの内容を削除する" (If the specified index is within the current list range, remove the content at that index) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|-----------------|
| `list_size_list` | Field | Items count list — holds Long-type values representing the count/size of repeating sections on the service contract form. Item ID: `list_size`. |
| `sel_index_list` | Field | Selected value list — holds Long-type values representing selected indices for dropdown or selection controls within repeating sections. Item ID: `sel_index`. |
| `true_value_list` | Field | Item actual value list — holds String-type values representing the actual bound data values for repeating form fields. Item ID: `true_value`. |
| `label_value_list` | Field | Item label list — holds String-type values representing the display labels for repeating form fields. Item ID: `label_value`. |
| X33VDataTypeList | Class | A typed list collection provided by the Fujitsu X33 web framework for managing repeating view data items in a structured, type-safe manner. |
| `DBean` | Acronym | Detail Bean — a view bean component in the X33 framework that holds detail/screen-specific data and behavior for a single screen. |
| `FUW00110SF` | Module | Service Contract screen module — a web application module for managing service contracts and their line items in the telecom billing/ordering system. |
| Items count | UI term | The repeating item type identifier for the items count field — controls how many items exist in a repeating section of the service contract form. Japanese: 項目数. |
| Selected value | UI term | The repeating item type identifier for the selected value field — controls the selected index for dropdown/selection controls within repeating sections. Japanese: 選択値. |
| Item actual value | UI term | The repeating item type identifier for the actual data value field — holds the real data values bound to repeating form fields. Japanese: 項目実値. |
| Item label | UI term | The repeating item type identifier for the display label field — holds the human-readable label text for repeating form fields. Japanese: 項目ラベル. |
| X33 | Acronym | Fujitsu X33 — the proprietary web application framework used by the organization for building enterprise web screens. |
| SC | Acronym | Service Component — a backend service layer class (naming pattern: `EKK\d{6}SC`) that handles business logic and database operations. |
| CBS | Acronym | Common Business Service — a shared service component (naming pattern: `EKK\d{6}CBS`) providing reusable cross-screen business operations. |
| View Bean | Pattern | A presentation-tier Java bean that holds UI state (form data, lists, selections) and bridges the JSP/JSF view layer with the underlying business logic. |
