Control for multiple text values in Alfresco Share - alfresco

I have a custom data model that has a few fields similar to this:
<property name="my:Property1">
<title>Property1</title>
<type>d:text</type>
<multiple>true</multiple>
</property>
The problem is that it is rendered as a single textbox in Share.
Is there any control I can use within a form to manage a text property that allow multiple values?

No the OOTB one accepts and renders it as a comma separated values. It should be fairly straightforward to construct a custom one that fits your need though.
There is an open issue for this at Alfresco (cast a vote on it :))
https://issues.alfresco.com/jira/browse/ALF-3144

I stumbled upon this recently 2/7/2015 and had the same issue of needing to create a table or a property value that you can add or delete records too. I stumbled upon this github repository https://github.com/msvoren/alfresco-datatable-property
but i noticed that it had some errors in the javascript from being several years old. I have since updated the javascript to work with alfresco community 5.0.c
Git Hub Repo

Related

Alfresco evaluator to get all documents not in a workflow

I'm quite new to Alfresco, pardon my imprecise question.
I have an Alfresco version 5.2.4, with share.
I have a custom action on documents I can call with a button inside document details page, but this button needs to be visible only when that document is not inside a custom workflow I created.
Can I do that with an evaluator? If so, how? Have I to add some custom property to the document model?
Thanks to all
I found the answer, I should just use
evaluator.doclib.indicator.activeWorkflows
basic type

NetSuite Integration Through Asp.net

I am doing NetSuite Integration for my product in ASP.NET.
I have created a Custom List in NetSuite account and I want to add values to this list through ASP.NETcode.
Please someone can help me with the sample code ?
The easy fix is to just convert the custom list to a custom record. There is a checkbox for that on the custom list editor screen. Then you can add values as you normally would for a custom record. Totally supported and logical to do if the list elements vary.
This URL will show you how to add values to a custom list, manually. https://netsuite.custhelp.com/app/answers/detail/a_id/10069/kw/create%20custom%20list.
According to this page (https://netsuite.custhelp.com/app/answers/detail/a_id/10242/kw/suitescript%20update%20custom%20list), SuiteScript does not allow custom lists to be edited. I have, previously, found ways around what they say can't be done. Though, that is only advisable if you want to keep updating the code to make sure they don't break it with updates... :)

XPage Theme Creation and ExtLib Support

I have been trying to find a resource for learning how to develop my own themes for IBM (Lotus) Notes XPage applications and company server defaults, but I have been unable to find a way to do it. I have found plenty of information on how themes work, and I know they are a collection of css that can be server specific and application specific and they can even inherit from one another etc. but I have been unable to actually find the correct naming scheme. Of course I can write my own css and connect the classes etc that I write to a control to change text and background and so on, but as far as I understand the entire point of using a theme is to not have to do this step.
How do I find the proper naming scheme to create my own themes which also support the extension library controls?
thanks in advance!
After spending a great deal of time trying to work out an answer to this question, and with the links that #Naveen wrote in the comments of the question, I feel this question warrants a real answer.
First off, the link to this wiki is great if you are trying to create your own XPage theme. I had found something similar before posting this question. This article which was also listed by Naveen in the comments is also a great source if you are trying to find a way to expand the XPage Theme and need a way to get the control name for the Theme's XML file, however it will NOT work for the Extension Library Controls! This is because at least most, if not all extension library controls rely on dojo, and they use the dojo themes in conjunction with the XPages Theme. There might be a way to turn this off in the controls' All Property tabs, but this is a situation where it might be easier to additionally create a dojo theme yourself.
I feel that the creation of a dojo theme is a question of its own and I do not want to go into it really here, but I will say that there are four default dojo themes which are a bit basic. Upon creation of your own theme, you can import a dojo theme by using the following code:
<resource dojoTheme="true">
<content-type>text/css</content-type>
<href>/.ibmxspres/dojoroot/dijit/themes/tundra/tundra.css</href>
</resource>
and by also using
<control>
<name>ViewRoot</name>
<property mode="concat">
<name>styleClass</name>
<value>body</value>
</property>
<property>
<name>styleClass</name>
<value>tundra</value>
</property>
</control>
where body is your own html-body style and tundra is the dojo theme. This will make sure that the ExtLib controls at the very least have some sort of a style and are not always completely transparent, or have some other unwanted default style.
If you do not wish to write your own style, it is possible to only override a few classes. Finding these classes can be difficult, but they are found both on the server and on the client, and you can reference them. The file will be located in the:
..\Notes\Data\domino\js\dojo-1.5.2\dijit\themes
file. Additionally, you can use firebug or any other browser's inspect element option to find out what css classes are being used for that control. I have found no way to alter the naming scheme, or better put, create your own classes and set the style in the designer and have it make any difference. The only option that I have found is to override the class already given in my css.
I hope this helps any future person.

Access a component's fields from a custom deployer

I'm trying to create a custom deployer in Tridion 2011 SP1 that can index a component to a solr instance once published. Everything is working fine but I've come across a bit of a problem with the way it indexes the components fields.
I can access the meta data fields okay by using the Component.getCustomMeta() method and parsing the XML. Accessing the normal fields however does not seem to be possible without reading in the file that is being output and parsing the output. This is not entirely feasible as the markup may change and it seems to be a long way around doing what should (hopefully) be a simple thing.
I've had a trawl through the docs and there doesn't seem to be anything available to get the field values so am I at a loss here and will need to parse the output or am I missing something somewhere?
Content fields are not exposed as such on the delivery side, content is exposed as, not surprisingly, "content".
If you really need the fields, you need to:
Produce a "parseable" output for your component presentations
Parse the component presentations as they get published.
Look at implementations like DD4T for similar approaches.
In short - you cannot do it, because Tridion does not expose it Out of the Box. The only way to do it is by changing the content output format through a template.
We have done an alternative workaround to achieve for the similar requirement. One down side with the implementation is extra rendering of Component Presentations in XML and duplicate of xml storage in broker.
Here is what we have done:
Created a Dynamic CT (XML representation of content) GetComponentAsXML and mapped to all schemas
All the Page Templates has a C# TBB that looks up the content that we need to push to SOLR
C# TBB does the RenderComponentPresentation with above Dynamic CT GetComponentAsXML, this pushes the XML (engine.RenderComponentPresentation(component.Id, componentTemplateURI)
Deployer now gets the content in xml format, in addition to the other type of component presentations (like ascx, emebedded on page etc..)
Hope this information helps.

OpenXML: Creating reusable Content Controls with binding

I need to attach specific XML to a word document so the elements will show up in the right places. This I can do with OpenXML SDK.
The thing is I want too be able to define the Content Controls already bounded in some sort of template so other people can create the real document template the xml will be attached to. Ok not sure people will undestand what I mean so I will explain further.
There may be many different document templates that will use the same XML data and so the same Content Controls. It's up to someone else to create the document.
Scenario: Some dude that's not a programmer needs to create a new form for the usual info because of some changes ( new layout or somehting ). This has nothing to do with the XML info, that stays the same.
Optimal solution for "some dude" would be to create the document in Word and drag the Content Controls into place ( or some solution similiar). Then when the XML gets added to the document there is no problem as the Content Controls are pre-binded.
Now there are a few points here:
1) Can Content Controls be pre-binded? If there is no XML at the path won't it just stay empty without problems?
2) Will binding Content Controls to CustomXML's like this still work in future versions of Word because of the i4i lawsuit?
3) Is there perhaps another optimal solution better then this?
Thanks in advance.
EDIT:
To be more clear. I wan't to create Content Controls that would have some name to identify them and a databound xpath. However at that moment there is nothing at the path.
Another user comes in and creates a form, decides the layout on so on, and then adds the Content Controls into the places he wants the info to be.
Later on the info for item X is requested using the new form. So a copy of that form will be taken and the CustomXML will be added into the Docx file. Now because the XML shchema was known beforehand and used when deciding the paths for the CC's this XML data will be bound to the Content Controls.
One great option would be to use VSTO (Visual Studio for Office) to build a set of document templates that have your prebinding code attached. These two articles provide a good start into looking into this type of a solution:
Creating a Template By Using Content
Controls
Binding Content Controls to Custom
XML Parts
There are two threads that discuss some details of this: 1 and 2.
One of the benefits about using VSTO is that you can hook the Content Control events: Content Control Event Model in Word 2007.
If VSTO is not an option, you can always look at Add Custom XML Parts to Documents Without Starting Microsoft Office.
This should be very straightforward. Custom controls are not impacted by the i4i lawsuit and you can name them using the tag property in each control (warning - it is limited to 64 characters).

Resources