0% found this document useful (0 votes)
62 views

Stackoverflow Com Questions 30649722 Alfresco Custom Data Lico

The user created a custom data list in Alfresco but is seeing unwanted elements when viewing it in Share. They defined the model and layout in share-config-custom.xml but it is not working correctly. Another user suggested checking the condition in the config tag and uploading all files for further troubleshooting.

Uploaded by

Altair Fonseca
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

Stackoverflow Com Questions 30649722 Alfresco Custom Data Lico

The user created a custom data list in Alfresco but is seeing unwanted elements when viewing it in Share. They defined the model and layout in share-config-custom.xml but it is not working correctly. Another user suggested checking the condition in the config tag and uploading all files for further troubleshooting.

Uploaded by

Altair Fonseca
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Ask Question

Alfresco custom data list layout


Asked 7 years, 9 months ago Modified 7 years, 9 months ago Viewed 2k times

I have created a custom data list in Alfresco, and have populated its model with the desired
data columns. However, when I view the list in Alfresco share, the order is completely off, and
1 there are elements that I have not defined in the model.

I have searched extensively as to how to fix this, and have not been successful. From what I
understand, I need to define the layout in the share-config-custom.xml, which I have attempted
below (snippet of only what I added):

<config evaluator="model-type" condition="orpdl:orpList">


<forms>
<form>
<field-visibility>
<show id="orpdl:programName" />
</field-visibility>
<create-form template="../data-lists/forms/data
<appearance>
<field id="orpdl:programName">
<control template="/org/alfresco/components/form/control
</field>
</appearance>
</form>
</forms>
</config>

<config evaluator="node-type" condition="orpdl:orpList">


<forms>
<form>
<field-visibility>
<show id="orpdl:programName" />
</field-visibility>
<create-form template="../data-lists/forms/data
<appearance>
<field id="orpdl:programName">
<control template="/org/alfresco/components/form/control
</field>
</appearance>
</form>
</forms>
</config>

Run code snippet Expand snippet

Content model:

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
<?xml version="1.0" encoding="UTF-8"?>
<!-- Definition of new Model -->
<model name="orpdl:orpDataListModel" xmlns="http://www.alfresco.org/model/dic

<!-- Optional meta-data about the model -->


<description>Information retrieved from the Opportunity Registration
<author>Alan George</author>
<version>1.0</version>

<!-- Imports are required to allow references to definitions in other


<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" pr
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefi
<import uri="http://www.alfresco.org/model/system/1.0" prefix
<import uri="http://www.alfresco.org/model/datalist/1.0" pref
</imports>

<!-- Introduction of new namespaces defined by this model -->


<namespaces>
<namespace uri="http://www.test.com/model/orpDataListModel/1.
</namespaces>

<constraints>
<constraint name="orpdl:contractTypeList" type="LIST">
<parameter name="allowedValues">
<list>
<value>T&amp;M</value>
<value>FFP</value>
<value>CPFF</value>
<value>CPIF</value>
</list>
</parameter>

Run code snippet Expand snippet

The goal of this code is to have only the programName text box appear. But this is what I'm
seeing:

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
What am I missing?

layout alfresco datalist alfresco-share

Share Improve this question Follow edited Jun 4, 2015 at 18:35 asked Jun 4, 2015 at 16:50
Alan
508 9 24

Please add content model(Where you have defined datalist) as well – Krutik Jayswal Jun 4 2015 at 18:15

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
Please add content model(Where you have defined datalist) as well.  Krutik Jayswal Jun 4, 2015 at 18:15

@KrutikJayswal Just added. –  Alan Jun 4, 2015 at 18:18

Add a comment

Sorted by:
1 Answer Highest score (default)

You are entering wrong condition in <config> tag.


Below
3
<config evaluator="model-type" condition="orpdl:orpDataListModel">

should replace with

<config evaluator="model-type" condition="orpdl:issuesList">

This will also apply to node-type .

Share Improve this answer Follow edited Jun 5, 2015 at 5:43 answered Jun 4, 2015 at 18:24
Krutik Jayswal
3,155 1 15 38

Thanks for your help, however, that was just a typo on my end. I updated the example code to reflect my
current code, with the type and config names being updated to "orpList". I'm still seeing unwanted elements
in my data list. –  Alan Jun 4, 2015 at 18:36

Please see the image.I have deployed code which is in pastebin.com/LVWhLEBd link – Krutik Jayswal Jun
5, 2015 at 5:43

Does the service-context.xml file not belong in /alfresco/module/<project>/context? Otherwise my code is


exactly the same as yours, and I'm still not seeing what you're seeing. I upvoted you for your efforts.
–  Alan Jun 5, 2015 at 12:40

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
can you upload your all file somewhere? – Krutik Jayswal Jun 5, 2015 at 12:44

Let us continue this discussion in chat. – Krutik Jayswal Jun 5, 2015 at 12:47

Add a comment

Not the answer you're looking for? Browse other questions tagged layout alfresco datalist alfresco-share

or ask your own question.

Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com

You might also like