Question

Is it possible to add a property inside a new aspect that will hold a User from Alfresco's users ?

It will be used to input the User who's responsabile/authorizer of a document having a defined aspect.

Was it helpful?

Solution

The problem is that you've defined the same field twice. First as a d:text property and the second is an association.

In your model you've defined

<property name="txm:vacationPerson">
   <title>Nom et prénom</title>
   <type>d:text</type>
</property>

And as association you've defined:

    <associations>
        <association name="txm:vacationPerson">
            <title>Assignee</title>
            <source>
                <mandatory>false</mandatory>
                <many>false</many>
            </source>
            <target>
                <class>cm:person</class>
                <mandatory>false</mandatory>
                <many>false</many>
            </target>
        </association>
    </associations>

So it's rendering the first field as text and the second field isn't rendered anymore. Remove the first d:text property or rename it.

OTHER TIPS

Yes, and you may choose to use either an assocation or a property. Assuming you want users to pick the person manually, I'd go for the association since the default controls provided by share support picking a person out of the box.

Here is a sample aspect showing both - a property and an association to hold the user.

<aspect name="your:assignee">
  <title>Your Aspect</title>
  <properties>
    <property name="your:assigedPersonUsername">
      <title>Owner</title>
      <type>d:text</type>
    </property>
  </properties>
  <associations>
    <association name="your:assignedPerson">
      <title>Assignee</title>
      <source>
        <mandatory>false</mandatory>
        <many>false</many>
      </source>
      <target>
        <class>cm:person</class>
        <mandatory>false</mandatory>
        <many>false</many>
      </target>
    </association>
  </associations>
</aspect>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top