-
Improvement
-
Resolution: Fixed
-
Major
-
4.4.0
-
None
-
None
-
4.4 RC1
I'm using a joined view to display some attributes. To be useable for "sub"-attributes, we should sax model path into the attributes because it's a bit difficult to get a "sub"-attribute with his path into an XML stream.
For example, I have this kind of XML:
<view> <content uuid="c2a782be-74d5-4f16-a6b6-97be9790d737" primaryType="ametys:defaultContent" id="content://c2a782be-74d5-4f16-a6b6-97be9790d737" name="nouvelle-action-de-formation-20" title="ACTION 1ERE Classe de 1re générale / 16 30 Formation - Bagnols-sur-Cèze (30200)" language="fr" createdAt="2020-12-18T11:43:19.709Z" creator="bmaurel#population-ldap" lastModifiedAt="2020-12-18T11:43:32.897Z" lastContributor="bmaurel#population-ldap" commentable="true" smallIcon="/plugins/cms/content-types_resources/ideo-formations/resources/img/content/education_16.png" mediumIcon="/plugins/cms/content-types_resources/ideo-formations/resources/img/content/education_32.png" largeIcon="/plugins/cms/content-types_resources/ideo-formations/resources/img/content/education_48.png"> [...] <metadata> <formationReference typeId="content" multiple="false" id="content://995eac75-a25a-422e-84a9-b8c058deaa77" name="classe-de-1re-generale-3" title="1ERE Classe de 1re générale" language="fr" createdAt="2020-06-06T07:48:03.904Z" creator="system-user" lastModifiedAt="2021-01-05T11:11:53.298Z"> <niveauSortie typeId="content" multiple="true" id="content://efcd8566-0775-422a-bd95-b0ba5e359a11" name="ere" title="1ERE" language="fr" createdAt="2020-06-06T00:23:05.828Z" creator="system-user" lastModifiedAt="2020-06-06T00:23:05.869Z"> <libelleEditable typeId="string" multiple="false">1ERE</libelleEditable> </niveauSortie> <niveauCertification typeId="content" multiple="false" id="content://f92ed760-4066-41eb-9071-d11a8eac89ee" name="niveau-4-bac-ou-equivalent" title="niveau 4 (bac ou équivalent)" language="fr" createdAt="2020-06-06T00:01:41.032Z" creator="system-user" lastModifiedAt="2020-06-06T00:01:41.076Z"> <libelleEditable typeId="string" multiple="false">niveau 4 (bac ou équivalent)</libelleEditable> </niveauCertification> </formationReference> <durees entryCount="1"> <entry name="1"> <type typeId="content" multiple="false" id="content://e95a0e93-8ca0-4990-8d8b-4c5216a50624" name="duree-totale-cycle-standard" title="durée totale cycle standard" language="fr" createdAt="2020-06-06T00:01:54.791Z" creator="system-user" lastModifiedAt="2020-06-06T00:01:54.831Z"> <uniqueID typeId="string" multiple="false">REF.186</uniqueID> </type> <duree typeId="double" multiple="false">1.0</duree> <unite typeId="content" multiple="false" id="content://8064cdd4-3ceb-4725-b04f-8173cc1587f6" name="an" title="an" language="fr" createdAt="2020-06-06T00:23:02.671Z" creator="system-user" lastModifiedAt="2020-06-06T00:23:02.709Z"> <libelleEditable typeId="string" multiple="false">an</libelleEditable> <libellePluriel typeId="string" multiple="false">ans</libellePluriel> </unite> </entry> </durees> <formationReference typeId="content" multiple="false" id="content://995eac75-a25a-422e-84a9-b8c058deaa77" name="classe-de-1re-generale-3" title="1ERE Classe de 1re générale" language="fr" createdAt="2020-06-06T07:48:03.904Z" creator="system-user" lastModifiedAt="2021-01-05T11:11:53.298Z"> <natureCertificat typeId="content" multiple="true" id="content://035fd816-3eb2-4b30-88c9-e1ebe347f052" name="diplome-national-ou-diplome-d-etat" title="Diplôme national ou diplôme d'Etat" language="fr" createdAt="2020-06-06T00:23:54.265Z" creator="system-user" lastModifiedAt="2020-06-06T00:23:54.295Z"/> </formationReference> </metadata> [...] </content> <contentType id="content-type.ActionFormation" view="web-display"> <label>Action de formation</label> <description>Action de formation</description> <fieldset role="l" name="benefits"> <label>benefits</label> <metadata name="formationReference" path="formationReference" type="content" multiple="false"> <label>Formation</label> <description>Formation à la base de l'Action de formation</description> <metadata name="niveauSortie" path="formationReference/niveauSortie" type="content" multiple="true"> <label>Niveau de sortie</label> <description>Niveau de sortie</description> <metadata name="libelleEditable" path="formationReference/niveauSortie/libelleEditable" type="string" multiple="false"> <label>Libellé éditable</label> <description>Libellé éditable</description> </metadata> </metadata> <metadata name="niveauCertification" path="formationReference/niveauCertification" type="content" multiple="false"> <label>Niveau de certification</label> <description>Niveau de certification</description> <metadata name="libelleEditable" path="formationReference/niveauCertification/libelleEditable" type="string" multiple="false"> <label>Libellé éditable</label> <description>Libellé éditable</description> </metadata> </metadata> </metadata> <metadata name="durees" path="durees" type="repeater"> <label>Durées</label> <description>Durées</description> <metadata name="type" path="durees/type" type="content" multiple="false"> <label>Type de durée</label> <description>Type de durée</description> <metadata name="uniqueID" path="durees/type/uniqueID" type="string" multiple="false"> <label>ID Ideo2</label> <description>Identifiant Ametys (format court)</description> </metadata> </metadata> <metadata name="duree" path="durees/duree" type="double" multiple="false"> <label>Durée</label> <description>Durée</description> </metadata> <metadata name="unite" path="durees/unite" type="content" multiple="false"> <label>Unité de durée</label> <description>Unité de durée</description> <metadata name="libelleEditable" path="durees/unite/libelleEditable" type="string" multiple="false"> <label>Libellé éditable</label> <description>Libellé éditable</description> </metadata> <metadata name="libellePluriel" path="durees/unite/libellePluriel" type="string" multiple="false"> <label>Libellé pluriel</label> <description>Libellé pluriel</description> </metadata> </metadata> </metadata> </fieldset> <fieldset role="fieldset" name="main"> <label>main</label> <fieldset role="fieldset"> <label>Caractéristiques</label> <metadata name="formationReference" path="formationReference" type="content" multiple="false"> <label>Formation</label> <description>Formation à la base de l'Action de formation</description> <metadata name="natureCertificat" path="formationReference/natureCertificat" type="content" multiple="true"> <label>Nature du certificat</label> <description>Nature du certificat</description> </metadata> </metadata> </fieldset> </fieldset> </contentType> </view>
You can see that model define the path but it's quietly difficult to get the attribute value associate to this path.
Note: I will also sax dataPath to complete this, you can disagree the proposition.
- Est référencé par
-
RUNTIME-3541 Sax model attribute also on composites, repeaters and repeater entries
- Closed