In this scenario, what columns are you trying to display in your table, and 
what class would you be using for your row data? 

On Dec 23, 2010, at 12:11 PM, Gerrick Bivins wrote:

> Hi all,
> I have another question about data binding.  Let's say I have a java Bean 
> which contains some other Beans as it properties. 
> For example( not the exact code but I tried to simplify for this example):
> 
> //base Bean 
> class MyBaseBean
> {
>    //custom class that contains some base functionality for handling 
> change/veto events of beans 
>    // but not listed here to try and simplify the example
> }
> 
> class A<T extends Number> extends BaseBean{
>    T getProperty();
>    void setProperty(T property) throws VetoException;
>    String getPropertyName();
>    void setPropertyName(String name) throws VetoException;
> } 
> 
> class B extends MyBean
> {
>     A propb1;
>     A propb2;
>    ...
>    A getPropb1(){...};
>    void setPropb1(A pb1) throws VetoException{...};
> 
>    A getPropb2(){...};
>    void setPropb2(A pb2) throws VetoException{...};
>    ...
> }
>  and some other similar Beans
> ...
> class C extends MyBaseBean
> {
>    A propc1;
>     A propc2;
>    ...
>    A getPropc1(){...};
>    void setPropc1(A pc1) throws VetoException{...};
> 
>    A getPropc2(){...};
>    void setPropc2(A pc2) throws VetoException{...};
>    ...
> }
> 
> What I'm trying to do is display the data of  class C and B in a table 
> without having to write a separate table for each. Seems like I should be 
> able to accomplish this
> since to display classes C and B I just need to drill down to each of their 
> properties of type "class A" and pluck the data off each property for the 
> row. 
> In Flex (sorry for the reference but it's the world I'm coming from), I could 
> define a callback function that gave access to the bound object and the 
> row,column index of 
> the table, which allowed me to get at the appropriate data for the cell. 
> 
> I tried looking through some of the binding tutorials and most of them 
> described how to use what I call the "dot notation" to set up the bindings,
> which works if I want to create a separate table for each class (C and B). 
> I can't claim to fully understand the *BindMapping functionality in Pivot yet 
> so maybe I'm missing something there.
> Thanks for any pointers/help here. Hopefully my question is clear enough.
> Gerrick
> 

Reply via email to