Projet

General

Profil

questions about data lists.

Ajouté par Mark Wells il y a presque 10 ans

I noticed that the project lists ( i.e., Hierarchy of projects) allows for this data to be used in of data model list like creating a project. I can't find any documentation or details or how to make that work so if anyone could provide some insights into that would be great.


Réponses (5)

RE: questions about data lists. - Ajouté par Matthieu Laborie il y a presque 10 ans

Hi,

We used custom control to make that happen, you have choice between DynamicList constraint in your models aka project sponsor

<constraint name="pjt:sponsors" 
            type="fr.becpg.repo.dictionary.constraint.DynListConstraint">
            <parameter name="path">
                <list>
                    <value>/System/ProjectLists/bcpg:entityLists/Sponsors</value>
                </list>
            </parameter>
            <parameter name="constraintType">
                <value>bcpg:listValue</value>
            </parameter>
            <parameter name="constraintProp">
                <value>bcpg:lvValue</value>
            </parameter>
</constraint>

Or autocomplete control on your form aka project hierarchy:

                                         <field id="pjt:projectHierarchy1" set="mainInfo" >
                        <control template="/org/alfresco/components/form/controls/autocomplete.ftl">
                            <control-param name="ds">becpg/autocomplete/linkedvalue/values/System/ProjectLists/bcpg:entityLists/project_Hierarchy
                            </control-param>
                        </control>
                    </field>
                    <field id="pjt:projectHierarchy2" set="mainInfo" >
                        <control template="/org/alfresco/components/form/controls/autocomplete.ftl">
                            <control-param name="ds">becpg/autocomplete/linkedvalue/values/System/ProjectLists/bcpg:entityLists/project_Hierarchy
                            </control-param>
                            <control-param name="parent">pjt_projectHierarchy1
                            </control-param>
                        </control>
                    </field>

Both need becpg-core amp, have a look at autocomplete documentation
https://www.becpg.fr/redmine/projects/becpg-community/wiki/Controls or sources

Hope it helps
Regards

RE: questions about data lists. - Ajouté par Mark Wells il y a presque 10 ans

Thanks for the quick reply. I appreciate that.

RE: questions about data lists. - Ajouté par Kevin Keung il y a plus de 9 ans

I've noticed that the sponsors are using dynListConstraint and project hierarchy are using autocomplete control.

After adding the corresponding values by maintaining the corresponding lists in Administration beCPG. The values in the project hierarchy are shown immediately but the values in sponsors required restart alfresco.

Is this expected behavior? Any other consideration or limitation when using DynListConstraint and autocomplete control?

RE: questions about data lists. - Ajouté par Matthieu Laborie il y a plus de 9 ans

Hi,

You have a button under becpg Admin "reload model" for that.

Regards

RE: questions about data lists. - Ajouté par Kevin Keung il y a plus de 9 ans

Thanks, I will try.

    (1-5/5)