[jboss-user] [JBoss Seam] - Re: Problems using Ajax4jsf to Seam Hibernate3 sample app
smartbinary
do-not-reply at jboss.com
Fri Sep 29 10:58:18 EDT 2006
The problem was the command button action was associated to a method returning a navigation rule ... from HotelBookingAction.java:
| @Begin(join=true)
| public String find()
| {
| hotel = null;
| String searchPattern = searchString==null ? "%" : '%' + searchString.toLowerCase().replace('*', '%') + '%';
| hotels = bookingDatabase.createQuery("from Hotel where lower(name) like :search or lower(city) like :search or lower(zip) like :search or lower(address) like :search")
| .setParameter("search", searchPattern)
| .setMaxResults(50)
| .list();
|
| return "main";
| }
|
I overloaded that method for use with an action listener:
| @Begin(join=true)
| public void find(ActionEvent actionEvent)
| {
| this.find();
| }
|
And updated the A4J tag ... from main.xhtml:
| <a4j:commandButton value="Find Hotels" actionListener="#{hotelBooking.find}" styleClass="button" reRender="hotelFrm"/>
|
All is well now ... JSF+Facelets+A4J+Seam+Hibernate (jFASH) ... no "springs" attached :D
--
THX TO CLEM fom the mailing list for the recommendation:
https://ajax4jsf.dev.java.net/servlets/ReadMsg?list=users&msgNo=1087
Regard,
Todd
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975165#3975165
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975165
More information about the jboss-user
mailing list