I want to set/unset readonly attribute of certain field in backoffice editor area based upon the property that is defined in local.properties.
I tried doing following:
<editorArea:attribute qualifier="xyz" readonly="spring.getBean('configurationService').getConfiguration().getBoolean('make.me.readonly')"/>
but there was schema validation error and also it didn't change the field attribute.
First you need to register "configurationService" so that it could be used in config.xml.
By default only the services mentioned in,
platformbackoffice.available.bean.names.for.spel=labelService,enumerationService,exceptionTranslationService,backofficeTypeUtils can be used within config.xml.
To include "configurationService" add the below piece of code to your backoffice-spring.xml.
<cng:list-extender bean="fixedBeanResolver" property="availableBeanNames">
<cng:add value-type="java.lang.String">
<value>configurationService</value>
</cng:add>
</cng:list-extender>
And then make the service call from config.xml,
<editorArea:attribute qualifier="xyz" readonly="#configurationService.getConfiguration().getBoolean('make.me.readonly')"/>
Related
I created a custom entity with a string property qst_type. I would like to change this property programmatically before saving. I think you should use the hook_entity_presave or hook_ENTITY_TYPE_presave. Unfortunately I can not change this property with this hook.
it might be simple question but I cannot do it for 6 hours.
I want to add checkbox to Backoffice > Catalog > Products Properties tab.
My question are
how to add checkbox
If it should be written into jsp file where to look for that file.
what file to write functionality of the checkbox
You need to add it in backoffice-config.xml files. You need to override properties tab and add your model attribute here. If your attribute type is boolean, zk framework automatically appear checkbox for this attribute. If it is in another type you need to add custom editor for this attribute.
For example below example ovveride tab.
<context type="Customer" merge-by="type" component="editor-area">
<editorArea:editorArea>
<editorArea:tab name="hmc.tab.common" position="1">
<editorArea:section name="hmc.properties">
<editorArea:attribute qualifier="myAttribute" />
</editorArea:section>
</editorArea:tab>
</editorArea:editorArea>
</context>
You can also view new attributes in Addmistration tab unbound section by default.
Suppose I want to edit the attribute ExtensionName of a user in Active Directory. This attribute is a part of the Object Class top. Also this attribute is listed in the user attributes of the User-msdn link.
But this aatribute is not listed in the attribute editor tab of the User properties in Active Directory Users and Computers. How to edit such attributes which are not a part of attribute editor?
This attribute should show in ADUC. Verify you don't have "Show only attributes that have values" checked in the filter options.
I'm new to Liferay and I have the following situation:
I would like to add extra properties to document metadata field types in Liferay 6.1.20.
For example, I would like to add property 'readonly' to select boxes (see image), as it is a user requirement to show some controls disabled.
Should I use the Expando functionality, a jsp override hook or another approach?
I think Expando functionality, a jsp override hook are a good approach.But using Expando you cannot create it as mandatory field.
I am using the people picker user control of SharePoint in my aspx page. I have set the AllowEmpty property of people picker control as false.
But, still the required field validation is not occurring for the control. I don't want to use a required field validation control explicitly for validating this. Any insights?
Regards,
Raghuraman.V
In order to enable/disable validation for Entity Editor based controls (like People Editor) the following properties should be specified in combination:
AllowEmpty - represents whether an empty entity is allowed
ValidatorEnabled - represents whether a Validator is enabled
So, in your case to disable empty values, ValidatorEnabled="true" should be provided also like shown below:
<wssawc:PeopleEditor
AllowEmpty="false"
ValidatorEnabled="true"
id="userPicker"
runat="server"
SelectionSet="User,SecGroup"
/>