Re: beanmodel ques

2013-05-28 Thread Thiago H de Paula Figueiredo
On Tue, 28 May 2013 10:45:06 -0300, Ken in Nashua   
wrote:



Hi Folks,


Hi!

I want to include both player info and player stats in the same bean  
model.


Check the mailing list archives for that. You'll probably need to  
implement a PropertyConduit and use it in beanModel.add("stats, new  
YourPlayStatsPropertyConduit()); Or just use beanModel.add("stats", null)  
and use  in the template to define how this will be rendered.


--
Thiago H. de Paula Figueiredo

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



RE: beanmodel ques

2013-05-28 Thread Ken in Nashua
Sorry folks...

if I got this

@Entity
@ClassDescriptor(hasCyclicRelationships = true)
@BeanModels(
{ @BeanModel(pageType = PageType.LIST, 
include = "player, gp, g, a, pts", 
exclude="") })
public class PlayerStats implements Cloneable, Serializable {
private static final Log log = LogFactory.getLog(PlayerStats.class);

private Integer id = null;

private Player player = null;

private Year year = null;

can I do this ?

myModel = beanModelSource.createDisplayModel(PlayerStats.class, 
messages);
myModel.add("action", null);
myModel.include("player.number", "player.lastName", "player.lastName", 
"gp", "g", "a", "pts");
myModel.get("player.firstName").sortable(false);
myModel.get("player.lastName").label("Surname");


  

RE: beanmodel ques

2013-05-28 Thread Ken in Nashua
Maybe I should be doing the bean model on PlayerStats

public class PlayerStats implements Cloneable, Serializable {
private static final Log log = LogFactory.getLog(PlayerStats.class);

private Integer id = null;

private Player player = null;

...can I refer to the player from there ?

player.playerNumber 

?
  

RE: beanmodel ques

2013-05-28 Thread Ken in Nashua
Players and stats are keyed by Season.class so there could be at any given time 
one Player instance and one PlayerStats instance to deal with.

Its not immediately apparent to me how to combine properties from both classes 
into the grid bveanmodel