cancel
Showing results for 
Search instead for 
Did you mean: 

User details selected from authority.ftl not saving

radder5
Champ in-the-making
Champ in-the-making
Hi,
I'm very new to Alfresco development. Recently done some tutorials on Alfresco customisation (JPotts) and bought the Alfresco Dev Book. My issue though doesn't appear to be covered in there.

I want to add a property to my custom model who is a user of Alfresco. The end game is to assign a simple workflow to them in script.
So, the user name added has to be constrained to a user in the system.
I have tried modeling it like
<blockcode>
<property name="kpccSmiley TongueassedTo">
   <type>d:text</type>
   <mandatory>true</mandatory>
   <constraints>
      <constraint ref="cm:userNameConstraint" />
   </constraints>
</property>
</blockcode>
then in my share custom file, I have used the authority.ftl form component.

The edit form shows fine, and I can use the user picker to select a user. This also is shown in the edit form when the picker closes. However, when the form is saved, the value isn't retained.

Is there a better way to model this? I was thinking cmSmiley Tongueerson but don't really know how to go with that.

Thanks
Conrad
2 REPLIES 2

bhenderson
Champ in-the-making
Champ in-the-making
I am having the same problem listed above in the original post. I would be very interested in seeing the answer to this.

Thanks,
Bruce Henderson

radder5
Champ in-the-making
Champ in-the-making
Hi, I resolved this in a different way that originally intended in my opening post. I used an autocomplete field that looked up to the users api. Not a complete fail safe as it isn't constrained to only these users so if the person doing the data entry is stupid enough to type someone in who isn't in the list then the workflow doesn't work. The intention of the field is clearly to assign it to someone so the training is such that it has to be someone in the lookup list.
I can let you know more details of how I did this autocomplete field if you need it.