Custom Liferay DDMFormFieldType won't appear in Rules Dataprovider Inputs - liferay

I wrote a custom Liferay 7.3 DDMFormFieldType which is mostly a text input field. I used the 7.3 blade example component and slightly modified the generated Soy template.
Basically, everything works fine. I can use my field inside a Liferay Forms. But I can't use this field inside a FormRule as Input parameter for dataproviders.
I thinks this is maybe due to a type mismatch (dataprovider input type is 'text'), but I don't know how to configure this for my fieldtype. What do I need to code in my custom fieldtype, so that it can be used for dataprovider inputs?

I am having a similar issue too. I have found that liferay is looking for specific hard-coded field types such as select, checkbox etc. I don't know if this was fixed in 7.4.

Related

Conditional fields in Liferay Web Content editor

We have a requirement for creating a banner for which we plan to use Web Content Display.
As part of the implementation I have created a structure with the required fields like link-type (drop-down), etc and using corresponding template.
I wish to make a conditional check based on the type of selection in the link-type and show link-to-page or text-box.
I observed that there is no option to have a conditional check in the article editor rendering.
Thus I wish to check whether there is any hack or trick that we can do to achieve the above conditional thing?
Also, can we inject custom Javascript to achieve this as part of the structure?
I finally have to stick to the default options in the liferay structure. I plan to use separator provided by LR to categories the elements to avoid end user (admin) confusion.
P.S. I was not able to locate any cool doc that would help in implementing the suggestion made by #Tobias (sorry, but I guess the wiki link above assumes you to be an expert of LR, and even the sample links in there does not work).

modify the text of conditions of use in liferay

I work with liferay 5.2
I want to change the text which appears after the first login
this text contains the conditions of use
but I didin't find this text in liferay
Please check \portal-web\docroot\html\portal\terms_of_use.jsp .
There are two ways terms of use appear in liferay.
You can set below portal properties in portal-ext.properties to make your web content to visible as term of use content.
Specify the group id and the article id of the Journal article that will
be displayed as the terms of use. The default text will be used if no
Journal article is specified.
terms.of.use.journal.article.group.id=
terms.of.use.journal.article.id=
If you want to just modify some of part of term of use content which Liferay provides then you can override "terms_of_use.jsp" in hook and provide changes in content.

UI Message default value in Liferay portlet

Does anybody know, if in Liferay is possibility to use default value in ui message ? I mean I have two files .properties with translations, for example: en.properties:
welecome=Hallo everybody
someKey=
,and default.properites
welecome=Hallo everybody
someKey=value of some key
I want to achieve, that if I use:
<liferay-ui:message key="welcome" />
<liferay-ui:message key="someKey" />
with English language (where there is no translation for key 'someKey'), the displayed value will be:
Hallo everybody
value of some key
I mean, when there is no translation for some key, liferay portlet will use value from default properties file.
regards
With the standard naming conventions, you typically have files like Language.properties and Language_en.properties. When english language is displayed, but the entry is not contained in Language_en.properties, I expect the value from Language.properties to be shown.
However, in your case you define someKey as an empty value, which means that it's defined as exactly this.
Moreover, Liferay offers a "Language Builder" tool that you can run during development time (in the plugins-sdk just run ant build-lang. It will create configured language files automatically, automatically copying the values from the original file if they are not yet contained in the translated file.
If you have api credentials for bing, it can also use these to get an automatically translated value for various languages, but I'm not a big fan of these. Actually, I'm quite annoyed by automatic translations.

Adding new section in control panel of Liferay

I want to add a new section in control panel of liferay and within that section I want to have my custom-portlet. I did it using ext. However I want to do it with hook . Is it possible ?
I don't think it would be that easy with a hook, because of the following reasons:
You can't modify in a Hook - the class com.liferay.portal.util.PortletCategoryKeys which contains the keys for displaying the different sections. The different sections are hard-coded in this class in a String array ALL.
You can't modify the logic of PortalImpl#isControlPanelPortlet() which uses the PortletCategoryKeys#ALL to determine if the request in question is for a control panel portlet.
Then you also have another method which you can't modify with a Hook and is used extensively PortalImpl#getControlPanelCategory()
Doing it with a hook:
I have not tried this but I think if you need to do it with a hook you would have to change all those JSPs which make use of PortletCategoryKeys#ALL and the methods of PortalImpl as stated above, and provide your custom implementation for all these methods in the JSP.
I would really like to know how you implemented it with an EXT may be just the steps or the methods you have overridden. So that I can try to convert those in terms of a hook.
This is as far as my understanding goes. Hope this helps.
With the advent of Marketplace, ControlPanel has a new category named "Marketplace" and that section is introduced in a plugin. However, I never checked if 6.1 GA2 introduced a new section that this plugin just fills. Check the marketplace plugin if you can find a trace of this section implemented there.
On the other hand, nobody has yet named any section that definitely required a new section (though some have asked me how to solve the same problem). For this reason, you might want to re-think the requirement and choose one of the existing sections. If you don't, at least I'd be interested in the name and purpose of the new section - I might find a first one actually justifying this kind of implementation...

Bug template in Bugzilla

Is there any way to enforce a template in Bugzilla to guide users fill in bugs descriptions ?
Actually, i'd like to put some markup texts in the bug description field and avoid the creation of custom fields.
I've installed version 3.2rc1.
Indeed, just check ../enter_bug.cgi?format=guided , which forms an example of the template feature. Half the work is already done for you.
The mechansism described under 6.2.5 Particular Templates (under the section called bug/create/create.html.tmpl and bug/create/comment.txt.tmpl) works pretty well for us. Even though you say you don't want to create custom fields, adding some arbitrary HTML is easy enough.

Resources