cancel
Showing results for 
Search instead for 
Did you mean: 

How do I define a custom display-label-id?

gvandyk
Champ in-the-making
Champ in-the-making
Hi,

I would like to define my own display-label-id.

I tried defining it in a "extension/test-context.xml" as follows:

   
   <bean id="ikModels" parent="dictionaryModelBootstrap">
      <property name="labels">
         <list>
            <value>alfresco.extension.workflow.ikModel</value>
         </list>
      </property>
   </bean>

and then defining "extension/workflow/ikModel.properties" as follows:


ikwf_adhoc_due_date=Due Date
ikwf_adhoc_priority=Priority
ikwf_adhoc_assign_to=Assign To
ikwf_adhoc_assignee=Assigned To

I then try and use the label in the web-client-config-custom.xml file using the following format:

<show-property name="bpm:workflowDueDate" display-label-id="ikwf_adhoc_due_date" />

it does not work and simply displays $$ikwf_adhoc_due_date$$ in the webclient.

using:

<show-property name="bpm:workflowDueDate" display-label-id="wf_adhoc_due_date" />

works fine, as this uses the default defined in the webclient.properties file.

My question is "How do you define a custom display-label-id?", it is not a new property but simply a new label.
5 REPLIES 5

kh1
Champ in-the-making
Champ in-the-making
I think you have to update the webclient.properties file.
That's the file were all the labels are matched with the text which you want to see.

correct me if I'm wrong..

gvandyk
Champ in-the-making
Champ in-the-making
Yes, I know that I can update the webclient.properties file. The problem with updating this file, is that is not the prefered way of doing it.

Configuration changes should be done in extensions rather that in the default install location. When the .war redeploys these changes will be lost.

Can I define my own display-labels in the extensions folder, and if so how?

claudio_martins
Champ in-the-making
Champ in-the-making
Using only the label-id as you're trying, you need to update the webclient.properties (this is actually the only way I've found out to make it work).

However, you have another way to create your labels and deploy in separate files. Have a look at the following wiki page:

http://wiki.alfresco.com/wiki/Data_Dictionary_Guide#Model_Localization

roman
Champ in-the-making
Champ in-the-making
if i understand it right…
this is the way i did it:

got an extension via AMP file
and in the amp file
folder structure  alfresco/extension an own webclient properties
this extends the standard labels with your custom label

does it help?

best regards

gavinc
Champ in-the-making
Champ in-the-making
That's correct, if present, a webclient.properties is also loaded from the "alfresco/extension" package, this can either be within an AMP or placed in <tomcat>/shared/classes/alfresco/extension.

Define a new label i.e.

mylabel=My Label

then refer to it in your property-sheet configuration:

<show-property name="bpm:workflowDueDate" display-label-id="mylabel" />

or if you are only supporting one language you can supply it directly:

<show-property name="bpm:workflowDueDate" display-label="My Label" />