cancel
Showing results for 
Search instead for 
Did you mean: 

Property labels in advanced search are not set

roman
Champ in-the-making
Champ in-the-making
Hello community,

i've configured the advanced search:
- added a property from a custom content type
- added some properties from custom aspects


<!– Configuring advanced search –>
<config evaluator="string-compare" condition="Advanced Search">
   <advanced-search>
      <content-types>
         <type name="custom:custom_document" />
      </content-types>
      <custom-properties>
         <meta-data type="custom:custom_document" property="custom:prop_language" />
         <meta-data aspect="custom:marketing_document" property="custom:prop_type" />
         <meta-data aspect="custom:commercial_document" property="custom:prop_organisation" />
      </custom-properties>
   </advanced-search>
</config>

these properties are defined and shown correct in details dialog…

<!– Properties of content type 'custom Document' –>
<config evaluator="node-type" condition="custom:custom_document">
   <property-sheet>
      <show-property name="custom:prop_language" display-label-id="document_language" />
   </property-sheet>
</config>

the search is working fine but the labels of this properties are not shown in the advanced search, but the property name instead (e.g. prop_language)

the alfresco wiki tells:
The <type> attribute is the model type containing the property and the <property> attribute specifies the property to use. The display label for the property will also be taken from the repository model definiton.

any ideas?

best regards
9 REPLIES 9

dhalupa
Champ on-the-rise
Champ on-the-rise
Take a look here for instructions how to define labels for properties and types

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

In that case you do not have specify display-label-id attribute in property sheet configuration

Kind regards,

Denis

roman
Champ in-the-making
Champ in-the-making
Hi Denis,

thanx for reply, but:

1. i've already tried this concept.
and i tried it again, right now. don't know why but can't get it work…
here my definition:

<beans>
   <!– Registration of new models –>   
   <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap"
        depends-on="dictionaryBootstrap">
      <property name="models">
         <list>
            <value>de/swipe/alfresco/model/swipeModel.xml</value>
         </list>
      </property>
      <property name="labels">
         <list>
            <value>de/swipe/alfresco/model/swipeModel</value>
         </list>
      </property>
   </bean>
</beans>

here is my swipeModel.properties:

# content type titles
swipe_swipemodel.type.swipe_swipe_document.title=SWIPe Document
swipe_swipemodel.property.prop_language.title=Language

# aspect titles
swipe_swipemodel.aspect.swipe.swipe_marketing_document.title=Marketing Document
swipe_swipemodel.property.swipe.prop_type.title=Type

swipe_swipemodel.aspect.swipe.swipe_commercial_document.title=Commercial Document
swipe_swipemodel.property.swipe.prop_direction.title=Direction
swipe_swipemodel.property.swipe.prop_Organisation.title=Organisation

now i want that the properties of the aspects are shown in the details view.
of course the aspect is added.
if i remove the <show-property> from <property-sheet> as described in the first post there is no name/title/label shown just the property name (prop_xxx)

so i need the webclient.properties and the display-label-id…

2. i need multi-language support, is this realizable with a model resource bundle?

my problem is: everything is fine with my configuration of aspects and labels… just the advanced search doesn't display the labels, but details view does.

thx,
best regards

roman

dhalupa
Champ on-the-rise
Champ on-the-rise
my problem is: everything is fine with my configuration of aspects and labels… just the advanced search doesn't display the labels, but details view does.

It's not fine Smiley Happy.For some reason, your resource bundle is not loaded although configuration looks ok to me. Try double checking that your bundle is really at specified location within classpath

roman
Champ in-the-making
Champ in-the-making
yes you are right…
my resouce bundle is not loaded.
if i remove the title tag from aspect definition
i get an error when i try to add an aspect…

the model.properties file is in the same package as the model so it got to be the right position, because the model works…

what i can imagine is that the interpretation is wrong:
this is the pattern
<model_prefix>_<model_name>.<model_element>.<element_prefix>.<element_name>.[title|description]
and this is my definition:
swipe_swipemodel.aspect.swipe.marketing_document.title=Marketing Document

my model prefix is 'swipe'
model name is 'swipemodel'
element is 'aspect'

aspect name is 'swipe:marketing_document'
so i think element prefix is 'swipe' and element name is 'marketing_document'

right?

but still error…

what you think?

regards

roman
Champ in-the-making
Champ in-the-making
i have realized that the resource bundle is loaded.
i've tried it with the simple thing, the content type:

in the model declaration removed the <title> tag and
then the content type label is loaded from the xxxmodel.properties file

this means i'm wrong at constructing the statement for aspects and its properties.

can you please take a look at this?

thxxx,
regards

dhalupa
Champ on-the-rise
Champ on-the-rise
I have noticed that you are using 'custom' namespace for your properties. Why don't you use 'swipe' namespace you have registered for model definition? If swipe namespace is used, in that case inside bundle you should have something like this. Note that dot is replaced with underscore..



swipe_swipemodel.property.swipe_prop_direction.title=Direction
swipe_swipemodel.property.swipe_prop_Organisation.title=Organisation

roman
Champ in-the-making
Champ in-the-making
ok,

the first post i've changed it for the forum, really it is swipe in my document.
the content type property is working.

now i will try the aspect properties, i suppose there is a mistake in the alfresco wiki  Smiley Very Happy  (i know i should be very careful with such statements)

but i'll test it and then, if really so, complain  :wink:

thx for your efforts
roman

roman
Champ in-the-making
Champ in-the-making
Ok,

here is the structure described in the wiki:
<model_prefix>_<model_name>.<model_element>.<element_prefix>.<element_name>.[title|description]

and this one led to the solution:
<model_prefix>_<model_name>.<model_element>.<element_prefix>_<element_name>.[title|description]

the '_' instead of a '.' between element_prefix and element_name.
i don't want to be pedantic, but this was the reason my resource bundle hadn't worked…

if i'm right, perhaps someone can correct this thing  :wink:

best regards

PS: one thing i'm still not sure about - multilingual xxxmodel.properties?
how can i implement different languages? different naming of the file?
(something like: xxxmodel_en-US.properties?)

thx

gavinc
Champ in-the-making
Champ in-the-making
I've updated the wiki page in question. Thanks for highlighting the error.