3 Replies Latest reply on May 17, 2007 12:13 PM by Luis Daniel Rangel Tovar

    Injecting properties using CRUD framework

    Phil Haigh Novice


      I am working with the CRUD framework, with everything configured in components.xml.

      What I'm trying to add is the concept of last_updated_by - this is just a string that will be equal to #{identity.username}

      I can do this fine for a new object:

       <factory name="vacancy" value="#{vacancyDAO.instance}" />
       <fwk:entity-home name="vacancyDAO"

       <component name="newVacancy" class="com.example.model.Vacancy">
       <property name="last_updated_by">#{identity.username}</property>
       <property name="created_by">#{identity.username}</property>

      However, without extending entity-home and making a real class for the component, I'm at a bit of a loss of how to insert that #{identity.username} property to an existing object when calling vacancy.update.

      Is there a way to do this? (I don't believe you can inject a property direct to a POJO Entity?)