ILabelValueBean.javaThe Label/Value pattern — a core UI abstraction used everywhere in ProjectForge to populate dropdown menus, selection lists, and autocomplete widgets. Every combobox, every multi-select, every radio button group in Wicket and React ultimately builds its options from objects implementing this interface.
The interface has just two methods: getLabel() (what the user sees — the display text, typically localized) and getValue() (what the system stores — typically a database ID or enum constant). The generic types <L, V> allow the label and value to be different types — e.g. LabelValueBean<String, Long> for a user picker (label = "John Doe", value = 42L).
The "I" prefix is ProjectForge's Hungarian-style naming convention for interfaces (I = Interface), common in older Java codebases. The implementation is LabelValueBean.
Most label/value beans in the wild use String, String — the value is a stringified ID. ProjectForge chose separate generic types so the value maintains its native type. This matters because:
V = Long, the dropdown's submit handler receives a Long directly — no parsing neededV = MyEnum, the value carries type safety — you can't accidentally pass a String where an enum is expectedIChoiceRenderer and Select2Choice can introspect the generic types at runtime to provide proper type conversionDropDownChoice<ILabelValueBean<String, Long>> — a user picker showing full names with user IDs as valuesList<LabelValueBean<String, String>> as JSON for the React frontend's <Select> componentsKeyValueBean<String, String> (a related interface) for HTML attribute construction — addAttribute("class", "header")This interface is to ProjectForge what Map.Entry is to Java collections — a simple two-element tuple that appears everywhere in the UI layer.