Projet

General

Profil

Autocomplete and Autocompleted association usage

Ajouté par Kevin Keung il y a plus de 9 ans

Hi,

In some use case, the data list in different project sites may be required different settings.

Is it possible to use the autocomplete.ftl using the entity lists located in the current site?

Also is it possible to use the autocomplete-association.ftl using the className object located in the current site?

Any advice would be appreciated.


Réponses (5)

RE: Autocomplete and Autocompleted association usage - Ajouté par Matthieu Laborie il y a plus de 9 ans

Hi,

Right now there is no way to constraint autocomplete to a particular siteId.

Maybe a way to do this is to allow "datasource param (ds)" to accept template parameter like {siteId} or {nodeRef} like pageLinkTemplate
and then in autocomplete.ftl and autocomplete-association.ftl pass it to autocomplete-picker.js widget for parsing the template and send siteId to the backend.

It will give :

           <field id="my-field" set="mainInfo" >
        <control template="/org/alfresco/components/form/controls/autocomplete.ftl">
           <control-param name="ds">becpg/autocomplete/linkedvalue/values/st:sites/cm:{siteId}/cm:documentLibrary/...</control-param>
        </control>
        </field>

             or
           <field id="my--assoc-field" set="mainInfo" >
                    <control template="/org/alfresco/components/form/controls/autocomplete-association.ftl">
            <control-param name="ds">becpg/autocomplete/targetassoc/associations/pjt:project?classNames=pjt:project,bcpg:entityTplAspect&siteId={siteId}</control-param>
            <control-param name="pageLinkTemplate">entity-details?nodeRef={nodeRef}</control-param>
          </control>
           </field>

           etc...

Of course backend dataSource should be modified to handle siteId.

If you are interrested in implemented it let me know. Il have add an unprioritized ticket for reminder #1160.

Best regards
Matthieu

RE: Autocomplete and Autocompleted association usage - Ajouté par Kevin Keung il y a plus de 9 ans

Hi Matthieu,

Yes, I'm interested. Could you show me how to change the backend dataSource to support the siteId? Thank you.

Best Regards,
Kevin

RE: Autocomplete and Autocompleted association usage - Ajouté par Kevin Keung il y a plus de 9 ans

Hi Matthieu,

In PLM module, I've noticed that there is hyperlink of associated objects.
Could you also show me how to add this hyperlink for associated objects in project module?

Best Regards,
Kevin

RE: Autocomplete and Autocompleted association usage - Ajouté par Matthieu Laborie il y a plus de 9 ans

Hi,

What do you mean by hyperlink. Can you provide me an example.

Regards
Matthieu

RE: Autocomplete and Autocompleted association usage - Ajouté par Kevin Keung il y a plus de 9 ans

Hi Matthieu,

Sorry for missing detail.

In PLM, the semi-finished products in the "composition list" under finished product are associated using auto-completed association. There was a link to the semi-finished product entity like 'Quiche pastry'.

I would like to do the same thing in Project module. The associated task under "deliverable list" can link to the corresponding task under "task list".

Regards,
Kevin

    (1-5/5)