How can I invoke a Spring Webflow transition from a Primefaces actionlistner?
I have a Primefaces component SelectOneMenu
. Whenever the value of the Component changes, I want to invoke the transition in Spring Webflow to display the description on the SelectItem in a outPutText.
I am new to the Spring Webflow and Primefaces.
Please let me know if the following is incorrect.
JSF Code
<h:outputText value="Script " style="font-weight: bold" />
<p:selectOneMenu value="#{selectedDN.cdrScript}" >
<p:ajax event="change" listener="scriptChange" update="scriptDesc" />
<f:selectItems value="#{sctiptOptions}" />
</p:selectOneMenu>
<h:outputText value="#{scriptDesc}" id="scriptDesc" />
Web flow Config for the View
<view-state id="Edit">
<on-entry>
<evaluate expression="scriptService.getOptions()"
result="flowScope.sctiptOptions"/>
<set name="flowScope.scriptDesc" value="selectedDN.cdrScript.scriptDesc"/>
</on-entry>
<transition on="scriptChange">
<set name="flowScope.scriptDesc"
value="flowScope.selectedDN.cdrScript.scriptName"/>
<render fragments="form:scriptDesc" />
</transition>
<transition on="Update" to="Edit">
</transition>
<transition on="Cancel" to="View">
</transition>
</view-state>