Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

[jboss-user] [JBoss Seam] - Re: @DataModel(scope=CONVERSATION)
 banned, why?

scott.stark@jboss.org

2007-07-16


well, there was problem when I use facelet composition (2 levels templating) and my @DataModel private Map myMap was not tied to a proxy-based collection. The map can be displayed in a table at the first time when the composed page was rendered. But I wanted such control: there was a s:button in the same page calling showFacts() which will set the boolean renderMyMapTable to true. If I click this button and load (in fact) the same page, the map table was not loaded any more. Seam might treat them as two different pages....

There is a work around to this. Put all the Map.Entry in myMap to a list (type: List<Map.Entry<MyKey, MyValue>>) and make the list conversation bean managed. Write a getter for this list and expose the getter in business interface. Ask <h:dataTable> to iterate the myMapEntryList if the boolean render flag is set to true. This way the map table can be shown/folded as many times as the user wishes. Tested it and it works well.


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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4064467
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.