Foren

Liferay custom indexed asset and its type name

Sebastian Wikholm, geändert vor 7 Jahren.

Liferay custom indexed asset and its type name

Regular Member Beiträge: 104 Beitrittsdatum: 10.03.11 Neueste Beiträge
I´ve made a custom portlet and implemented indexers, renderers etc for it to be available to both publish in assetpubliser and be searchable by liferay. Allt this is working. What i cant find is how the name of the asset type is given in the searchportlets assettype facet.

The facet is rather standard assetype thingy like

        
"className": "com.liferay.portal.kernel.search.facet.AssetEntriesFacet",
"label": "asset-type",
"fieldName": "entryClassName"

but the search result displays something like:
model.resource.xxxx.model.xxxxxx
When i want it to display a display name like articles and files do ie something like:
Assettype
"MyAsset"

How do you define in the renderer och indexer or wherever how that is displayed in the search portlet? cant find anything to override or any class where that is done? Please help, you´re my only hope emoticon
thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: Liferay custom indexed asset and its type name

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
That's an easy one - it's a resource bundle lookup.

If you provide a language.properties file that is wired in correctly, add a key for model.resource.xxxx.model.xxxxxx with a value of MyAsset and it will magically work.

Also allows for localization of your asset name by filling in the value in your various other language property file overrides.
Sebastian Wikholm, geändert vor 7 Jahren.

RE: Liferay custom indexed asset and its type name

Regular Member Beiträge: 104 Beitrittsdatum: 10.03.11 Neueste Beiträge
I was suspecting that, funny enough all my build-lang do say in the console:"BUILD SUCCESSFULL" but build-lang-cmd returns the following

C:\lr-pg-sdk\build-common-plugin.xml:218: java.io.IOException: Cannot run program "C:\jdk1780\jre\bin\java.exe": CreateProcess error=206, The filename or extension is too long


as you can see all the paths are pretty close to the root, been trying to find a way to get that to work, but im not able to find anything to get that to work