I'm adding some uiinput components programmatically from the bean directly as following:
UIInput uiField = (HtmlInputText) application.createComponent(HtmlInputText.COMPONENT_TYPE);
uiField.setId(fieldId);
Note that I don't want to bind this component to any of the bean properties.
And the problem is, when retrieving the component by id, the value is always null even after populating the field in the form and submitting the form.
UIInput uiField = (UIInput) facesContext.getViewRoot().findComponent(fieldId);
String value = uiField.getValue().toString(); //null
Please advise.