I'm just starting to work with JSF on a project. I have one requirement that I'm thinking might be best met by building a custom UIComponent (or finding one already written), but I'm not familiar enough with JSF to know if I'm heading down the right path.
This would be a component for numeric fields that can be null in the database and for which values from elsewhere in a hierarchy would be used when a given field's value is null. The catch is that I want to be able to show the user that the default is being used, allow them to override it or revert back to the hierarchical default, and to have this visualized for them on the JSF page.
The planned presentation is to have (1) a input text field that shows the current value being used and allows overrides to that field. Next to that field, (2) a checkbox that would indicate whether the value is the default value (null on the db for the current record) or is a local (not null) value, and (3) a hidden input text field that retains the default value. Note that a local value may be equal to the default value, but that just means that the local value has been locked in and not subject to changes in the default value.
This component needs to be able to have multiple instances on the JSF page for different fields and must also be usable in a datatable so that multiple records of a particular database table can be on the page at the same time, editable by the user.
Has anyone built a similar component? Does this sound like a JSF custom UIComponent is the correct answer? Are there any requirements above that can't be met with a custom JSF component?