I had a p:inputTextarea which content was replaced by selecting item from h:selectOneMenu that fire p:ajax...
All work very well
here's the code:
Code: Select all
<h:selectOneMenu id="listdropdown" value="#{toBuyBean.aSelectedRecentShoppingListKey}">
<f:selectItems value="#{toBuyBean.aRecentShoppingLists}" />
<p:ajax update="inputtextlist" listener="#{toBuyBean.processValueChangeLoadRecentList}"/>
</h:selectOneMenu>
<br />
<p:ajaxStatus style="width:16px;height:16px;">
<f:facet name="start">
<h:graphicImage value="/images/ajax-loader.gif" />
</f:facet>
<f:facet name="complete">
<h:outputText value="" />
</f:facet>
</p:ajaxStatus>
<br />
<p:inputTextarea id="inputtextlist" value="#{toBuyBean.aToBuyText}" style="width:500px;height:350px;" effectDuration="400"/>
so now it looks like this:
Code: Select all
<h:selectOneMenu id="listdropdown" value="#{toBuyBean.aSelectedRecentShoppingListKey}">
<f:selectItems value="#{toBuyBean.aRecentShoppingLists}" />
<p:ajax update="inputtextlist" listener="#{toBuyBean.processValueChangeLoadRecentList}"/>
</h:selectOneMenu>
<br />
<p:ajaxStatus style="width:16px;height:16px;">
<f:facet name="start">
<h:graphicImage value="/images/ajax-loader.gif" />
</f:facet>
<f:facet name="complete">
<h:outputText value="" />
</f:facet>
</p:ajaxStatus>
<br />
<p:editor id="inputtextlist" value="#{toBuyBean.aToBuyText}" widgetVar="editor" style="width:500px;height:350px;"/>
here how it looks like after 4 times using the <h:selectOneMenu
any ideas?
Regards,
Daniel.