Can someone to answer how to handle p:ajax event in webflow?!
I have in my page
When I'm clicking every tab the next tab with related goods to this category should appear.Code:<p:tabView id="tabView" var="category" value="#{showcaseBean.categories}">
So I have to catch
in my showcaseBean and fetch the related goods from database likeCode:<p:ajax event=”tabChange” listener=”#{showcaseBean.onChange}” />
This ShowcaseService can work with database only through flow.xml file (because transaction is bound to flow).Code:ShowcaseService.getGoodsByCategory(Category category) {}
So I cannot make something like
Instead of it I have to reflect this fetching in flow.xml likeCode:(inside ShowcaseBean) ShowcaseService showcaseService = new ShowcaseService(); showcaseService.getGoodsByCategory(Category category)
But examples (that I have seen) show the handling only JSF action (in flow.xml ) likeCode:<transition on="changeTab"> <evaluate expression="showcaseService.getGoodsByCategory(showcaseBean.selectedCategory)" /> </transition>
where cancelBooking taken fromCode:<transition on="cancelBooking"> <evaluate expression="bookingService.cancelBooking(bookings.selectedRow)" /> </transition>
So how can I reflect ”tabChange” eventCode:<p:commandButton id="cancel" value="Cancel" action="cancelBooking"/>
in flow.xml to invoke method getGoodsByCategory of ShowcaseService?Code:<p:ajax event=”tabChange” listener=”#{showcaseBean.onChange}” />
It's strange if webflow works with action events only!


Reply With Quote