I want to create settings panel for application. The application will store the settings values into database table. The settings panel will be used to display the settings and change the values. I want to represent the values in this way:


This way the user will be able to enter only fixed values. I want to give a change to the user to enter custom values. Like this:

I want to create selectOneMenu with option custom. When the user selects custom the selectOneMenu will be replaced with inputText field where he will be able to enter the custom value. SAVE button will save the data into database. Is this possible without page reload? Maybe with AJAX?
How this can be implemented?
Use
<f:ajax>to display a<h:inputText>whenever the current option equals"custom".