Hi.

Faces ignores setId in backing bean. In the generated HTML faces uses
its own id.

I do these things:
1. Generate component in backing bean
2. set id
3. Store component in map
4. Call map from jsf with binding.

Here some code:
1.+ 2. + 3.:
String key = “myKey”;
comp =
FacesContext.getCurrentInstance().getApplication().createComponent(HtmlInputText.COMPONENT_TYPE);
comp.setId("_" + key);
componentMap.put(key,comp);

4.
<t:inputText binding="#{backingbean.componentMap[‚myKey’]}"/>

My id shout be “id=subview_xxx:yyy:_myKey” but in HTML it is something
like “id=subview_xxx:yyy:_idJsp18”
What is wrong? I need my id in java for later usage. Why faces overrides
my id. Other settings work fine. I set the background color with “style”
and it works. I set value and my value is shown. … ?!?
In debug I see next creation my id. On HTML it is ignored.

Plz help

Best regards

Christian


Reply via email to