How can one destroy or reinitialise say seam session context variable. I've got values (extracted from database) in List, for a pulldown menu outjeced to session in @factory method. When I add/update record in db, I would like to refresh the session var.
I manullay invoke the @factory methods after insert/update/delete record, but context var values remain unchanged. may be @factory method, only outject if invoked by seam? | | @Factory(scope=ScopeType.SESSION) | public List<SelectItem> getOrganisationListAll() { | | log.info("Loading organisationListAll..."); | | OrganisationList orgList = (OrganisationList) Component.getInstance(OrganisationList.class, true); | orgList.setOrder("longName asc"); | orgList.refresh(); | | List<Organisation> orgs = orgList.getResultList(); | | List<SelectItem> orgSelectItems = new ArrayList<SelectItem>(); | for (Organisation org : orgs) { | orgSelectItems.add(new SelectItem(org.getId().toString(), org.getLongName())); | } | | log.info("Loaded organisationListAll: " + orgSelectItems.size()); | | return orgSelectItems; | } | | | //I invoke vollowing, after insert/update/delete of record. | //Query in above methods gets records correctly but "organisationListAll" doesn't get refreshed. | | public void reloadContextVar() { | ... | getOrganisationListAll(); | ... | } | New records are only laoded if I log off/on. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097387#4097387 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097387 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user