[jboss-user] [JBoss Seam] - DataModel refresh

miloslav.vlach do-not-reply at jboss.com
Sun Jun 17 06:22:14 EDT 2007


Hi all,

I have problem with this scenario.

I have a list action which load the entities and display it in dataTable. The backing bean looks like this:


  | @Name("componentLayoutListAction")
  | public class ComponentLayoutListAction {
  | 	@In
  | 	Session ses;
  | 	
  | 	@In(create=true)
  | 	Configuration configuration;
  | 	
  | 	@Logger
  | 	Log log;
  | 	
  | 	
  | 	@DataModel
  | 	List<ComponentLayout> componentLayoutList;
  | 	
  | 	@SuppressWarnings("unchecked")
  | 	@Factory("componentLayoutList")
  | 	public void init() {
  | 
  | 		componentLayoutList = ses.createCriteria(ComponentLayout.class)
  | 			.add(Restrictions.eq("lang", configuration.getLang())).list();
  | 		log.info("loaded component list....#0", componentLayoutList);		
  | 		
  | 	}
  | 	
  | 	public void reset() {
  | 		log.info("reseting....");
  | 		componentLayoutList = null;
  | 	}
  | }
  | 

>From the list I have add action (or update) which add or remove children from the entity listed in previous action.

After update is browser redirected to the list action (back), but there is problem, that the children count doesn't change. If I click on menu and invoke the list action again the good results are rendered.

the edit.page.xml

  | <page view-id="/admin/actions/componentlayout/edit.xhtml">
  | 	<navigation>
  | 		<rule if-outcome="updated">
  | 			<redirect view-id="/admin/actions/componentlayout/list.xhtml" />
  | 		</rule>
  | 	</navigation>
  | </page>
  | 

Know somebody where could be a problem ?

Thanks Mila

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055016#4055016

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055016



More information about the jboss-user mailing list