I want to make a text editable when the user clicks on the text.
So I thought I can handle this by realising this with two components
<h:outputText id="description_" value="#{cc.attrs.description}" />
<h:inputText id="description" value="#{cc.attrs.description}" />
Now the problem is, that both components are displayed at the same time. I would like the behaviour that h:inputText will be hidden/collapsed. When the user clicks on the h:outputText the h:outputText should be hidden and the h:inputText should be shown so that the user can edit the text in the input. If the h:inputText lost its focus the h:outputText should be shown and the h:inputText be hidden.
Is there a JSF solution for this?
<h:outputText>inside a<span>and use plain JavaScript to do the hide/show work, so no need of any ajax somewhat expensive call. - Luiggi Mendoza