Custom Type - Properties Cardinality

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2010 11:56 AM
Is there a way to add, in a custom type definition, a properties that can be repeted N times.
For example, in my case I've to insert the possibility to add more then 1 phone number, composed as 2 properties (prefix and number). How can I define that in my customModel.xml ?
Here my code
How can I repeat the 2 properties prefix and number N times? And how it is rendered within Share form Engine?
Sorry for the easy question, but I cannot find a solution to that…
For example, in my case I've to insert the possibility to add more then 1 phone number, composed as 2 properties (prefix and number). How can I define that in my customModel.xml ?
Here my code
<type name="my:worker"> <title>Worker</title> <parent>cm:content</parent> <properties> […] <property name="my:prefix"> <type>d:text</type> </property> <property name="my:number"> <type>d:text</type> </property> […]
How can I repeat the 2 properties prefix and number N times? And how it is rendered within Share form Engine?
Sorry for the easy question, but I cannot find a solution to that…
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2010 12:12 PM
At the moment the simple and stupid way to model it would be to have two named properties
e.g. prefix1, number1, prefix2, number2.
Or alternativly you could model the number/prefix thing as its own type and associate my:worker with N number/prefix nodes.
Or you could add a new data type for a number/prefix thing.
e.g. prefix1, number1, prefix2, number2.
Or alternativly you could model the number/prefix thing as its own type and associate my:worker with N number/prefix nodes.
Or you could add a new data type for a number/prefix thing.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2010 12:42 PM
At the moment the simple and stupid way to model it would be to have two named properties
e.g. prefix1, number1, prefix2, number2.
Or alternativly you could model the number/prefix thing as its own type and associate my:worker with N number/prefix nodes.
Or you could add a new data type for a number/prefix thing.
Option 1 is what I've now. The problems with this solution are:
- No dynamic cardinality.
- All fields are rendered by form engine.
Option 2 seems quite complex for the usability. Users must add the phone number as a new content and associate that with the "Worker" content, using the picker (association.ftl control).
I don't understand the option number 3. is not the same as option 2? Adding a data type for that means using an association. Right?
No other solutions?
Seems a big limitation to alfresco content model…

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2010 04:20 AM
The problem rise again.
Now my client want to add to the "Commercial Entity" Custom Type a dynamic number of contacts, composed by "Name" and "Phone".
It's the same problem as before. What's the better way to manage that in Alfresco+Share? I really don't understand that…
Now my client want to add to the "Commercial Entity" Custom Type a dynamic number of contacts, composed by "Name" and "Phone".
It's the same problem as before. What's the better way to manage that in Alfresco+Share? I really don't understand that…
