On Mon, 27 Sep 2010 10:38:38 -0300, Cucchietti Denis <[email protected]> wrote:

Hi Thiago.

Hi!

I have tried with a property conduit but the problem is my new column is not an attribute of my object Structure so I don't know how to use it :

PropertyConduit propCdtAttribute = this.propertyConduitSource.create(String.class, "relation");

You should *implement* your own PropertyConduit. PropertyConduitSource only works for real properties (getXXX() and setXXX()). The above code tries to access getRelation() in String class, which doesn't exist.

It should be something like this (not tested):

class YourPropertyConduit implements PropertyConduit {


        public Object get(Object instance) {

StructureRelationRow structureRelationRow = (StructureRelationRow) instance;
        

                if (listOfParentStructures.contains(structureRelationRow)) {
                        return "Belong to";
                }

                return "Combines";

        }

        public void set(Object instance, Object value) {}

        public Class getPropertyType() {
                return String.class;
        }


}

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to