This content has been marked as final.
Show 2 replies
-
1. Re: Fetch data from database and display in autocomplete
ishabalov Aug 10, 2007 1:44 PM (in response to kaviarasu)All you need is to implements suggestionAction that goes to the database.
-
2. Re: Fetch data from database and display in autocomplete
kaviarasu Aug 11, 2007 3:58 AM (in response to kaviarasu)hi
shall i create a bean like below
i can able to get the list database how to use this output in the suggestionAction@Stateful @Name("mes") public class Dispaly implements Serializable, ExpertReview { private List<String> country1; @PersistenceContext private EntityManager em; @Begin public String findMessages() { country1 = em.createQuery("select ter from Country ter") .getResultList(); return "aaa"; } @Remove @Destroy public void destroy() {} }
and in pages.xml file<page view-id="/test.xhtml" action="#{mes.findMessages}" />
now can u say how to use the List country in suggestionAction
thank u
regards
kaviarasu