I need to make some changes in catalog_rule_form.xml based on Magento_CatalogRule/view/adminhtml/ui_component/catalog_rule_form.xml
I tried to override this file in custom module and place new file in view/adminhtml/ui_component/catalog_rule_form.xml
Module has sequence declaration in module.xml like this:
<sequence>
<module name="Magento_CatalogRule"/>
</sequence>
does not work.
Also i tried to place it in app/design/adminhtml/Vendor/Theme/Magento_CatalogRule/ui_component/catalog_rule_form.xml
same result.
Does anyone could help me with this. How can i override this form?
Related
I have created a root annotations file which does reference an annotations file. But all annotations are ignored. If I include the annotations in the root annotation file everything works fine.
The root annotation file:
*<GoogleCustomizations>
<Include type="Annotations" href="http://myhost.net/System/GoogleCustomSearch/SozialversicherungAnnotationsSiteList.xml"
</GoogleCustomizations>*
The annotations file:
*<?xml version="1.0" encoding="UTF-8" ?>
<Annotations>
<Annotation about="http://www.tagesanzeiger.ch">
<Label name="_cse_xyxyxyxyxyx"/>
</Annotation>
</Annotations>*
Thanks for any help!
I have solved my problem when I read the instructions found at Linked Custom Search Engine
You have to include the link to your xml file hosted on your site in the CSE url with the cref param and remove the cx param as well.
With the help of the excellent Google support I could solve my problem. The solution is:
Upload the root annotations file under the section "Annotations-Feeds" and not under the section "CSE-Annotations". (The root annotations file and the referenced annotations file as shown in my question are correct.)
Wait up to 72 hours until the changes work.
If you want to search a whole website, don't forget to add the wildcard character (e.g. "www.tagesanzeiger.ch/*" and not just "www.tagesanzeiger.ch").
I have now seriously started experimenting with GWT, and I am stuck of course. I am trying with a very simple internationalization and when I add locale to my URL as following it doesn't work and always default data is fetched.
http://127.0.0.1:8888/DoTime.html?gwt.codesvr=127.0.0.1:9997&locale=sv_SE
In the following picture you can see structure of the project. The name of the application is "DoTime".
In the file /client/properties/DoTimeConstants_sv_SE.properties I have
localeTest = Vi skriver något på svenska för att testa om vi kan få det på svenska med locale.
appTitle = DoTime på svenska
In the corresponding file /client/DoTimeConstants I have
package com.dotime.client;
import com.google.gwt.i18n.client.Constants;
public interface DoTimeConstants extends Constants {
#DefaultStringValue("haha we are writing something in default to test locale")
String localeTest();
#DefaultStringValue("DoTime default title")
String appTitle();
}
I the file /client/properties/DoTimeMessages_sv_SE.properties I have
#DefaultMessage("''{0}'' is not a valid symbol.")
String invalidSymbol(String symbol);
#DefaultMessage("Last update: {0,date,medium} {0,time,medium}")
String lastUpdate(Date timestamp);
In the corresponding file /client/DoTimeMessages I have
package com.dotime.client;
import com.google.gwt.i18n.client.Messages;
import java.util.Date;
public interface DoTimeMessages extends Messages {
#DefaultMessage("''{0}'' en symbol på svenska.")
String invalidSymbol(String symbol);
#DefaultMessage("Senaste uppdatering: {0,date,medium} {0,time,medium}")
String lastUpdate(Date timestamp);
}
In the file DoTime.gwt.xml I have add locale="sv_SE" and added inherit I18N:
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0//EN"
"http://google-web-toolkit.googlecode.com/svn/releases/2.0/distro-source/core/src/gwt-module.dtd">
<module rename-to="DoTime">
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<!-- Specify the app entry point class. -->
<entry-point class='com.dotime.client.DoTime'/>
<inherits name="com.google.gwt.i18n.I18N"/>
<extend-property name="locale" values="sv_SE"/>
<!-- Specify the app servlets. -->
<servlet path='/DoTimeService' class='com.dotime.server.DoTimeServiceImpl'/>
</module>
In my entry point method I fetch appTitle which returns the default value correctly
String appTitle = constants.appTitle();
but when I change my url by adding &locale=sv_SE nothing happens and I still have the default value.
I did try first by only having locale file extension locale=sv without any luck and later changed to sv_SE but it didn't work anyway. What is it I am missing? Do you have any idea? Many thanks for some clues.
Your properties files must be name the exact same as the Constants or Messages interfaces, except for the locale suffix and file extension. Specifically here, they must be in the same package; you cannot put them in some other package (the properties subpackage in this case) and expect GWT to find them.
Side notes:
I think the locale in the gwt.xml and in the URL has to be written in the Java notation, using a dash as separator rather than an underscore.
you shouldn't use the <servlet> tag in your gwt.xml; they're used by the GWTTestCase runtime, but then you'd rather make a test-specific module that <inherits> your app module, rather than put those declarations in your app module.
I have created a custom Plone content type in my package i.e. my.product.
I am in need of integrating a working copy support: so that a "published" document (in my case, a published content type) stays online while it is being edited. Basically, I want to take advantage of 'Working Copy Support (Iterate)' provided by plone.app.iterate to achieve what is explained here. This will provide me with ability to check-in/check-out my changes.
Is this possible in Plone 4 with custom content types using Archetypes? How would one go about it if yes?
I added the following two files inside my.product/my/product/profiles/default folder and it appears to work:
diff_tool.xml
<?xml version="1.0"?>
<object>
<difftypes>
<type portal_type="MyCustomType">
<field name="any" difftype="Compound Diff for AT types"/>
</type>
</difftypes>
</object>
repositorytool.xml
<?xml version="1.0"?>
<repositorytool>
<policymap>
<type name="MyCustomType">
<policy name="at_edit_autoversion"/>
<policy name="version_on_revert"/>
</type>
</policymap>
</repositorytool>
I have never used plone.app.iterate, but this is the generic approach how to solve the problem.
Actions are installed by plone.app.iterate GenericSetup profile. You can see actions here:
https://github.com/plone/plone.app.iterate/blob/master/plone/app/iterate/profiles/default/actions.xml
Pay note to the line *available_expr* which tells when to show the action or not. It points to helper view with the conditition.
The view is defined here
https://github.com/plone/plone.app.iterate/blob/master/plone/app/iterate/browser/configure.zcml#L7
The checks that are performed for the content item if it's archiveable
https://github.com/plone/plone.app.iterate/blob/master/plone/app/iterate/browser/control.py#L47
Most likely the failure comes from if not interfaces.IIterateAware.providedBy condition. Your custom contennt must declare this interface. However, you can confirm this putting a pdb breakpoint in checkin_allowed(self) and step it though line-by-line and see what happens with your content type.
I'm trying to replicate the loading of a property file of seam in javaee6 but still don't know where to start.
In seam we can load a property file as a seam component by defining it in the components.xml:
<component name="propertyBean" class="PropertyBean" scope="application" auto-create="true" startup="true">
<property name="filename">myPropertyFile.properties</property>
<property name="reload">true</property>
</component>
And then we can access it in code:
PropertyBean.getInstance().getProperty("myProperty");
Is there a javaee6 feature that will replicate this functionality? Or in spring it's called PropertyPlaceholder.
In c#, we can do it by adding configuration property in appsettings.xml. And access via ConfigurationManager.
Thanks,
czetsuya
Unfortunately, there's nothing like a property component manager from seam into javaee6, but I was able to find something similar, a property loader.
It works by having a qualifier:
#Qualifier
#Retention(RUNTIME)
#Target({METHOD, FIELD, PARAMETER, TYPE})
public #interface ConfiguredBy {
#Nonbinding public String value();
}
With a parameter that serves as the name of the property file.
The whole approach is describe here:
http://john-ament.blogspot.com/2010/03/writing-property-loader-in-java-ee-6.html
For example, I have added two rules (rule1.drl and rule2.drl) in Guvnor.
Normally I can retrieve those rules combined by creating a changeset.xml like:
<change-set ...>
<add>
<resource source='http://localhost/guvnor/org.drools.guvnor.Guvnor/package/name/LATEST.drl' type='DRL' basicAuthentication="enabled" username="username" password="password" />
</add>
</change-set>
And load the changeset.xml by codes:
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("Test Agent", kaconf);
kagent.applyChangeSet(ResourceFactory.newClassPathResource("changeset.xml"));
knowledgeBase = kagent.getKnowledgeBase();
But how I can retrieve specific rule only? e.g. rule2.drl
Of course I can change the url in changeset.xml to
<resource source='http://localhost/guvnor/org.drools.guvnor.Guvnor/package/name/LATEST/rule2.drl' type='DRL' basicAuthentication="enabled" username="username" password="password" />
But I found that the response file miss the package name and all the import statements, for example:
package com.packname;
import namespace.EntityA;
When we need to execute especific drl package we use diferent changeset for each package/snapshot.
If the rules are related use different pojos for separate the rule, because you know the guvnor compile all your rules from a package in one big .drl, this could be slow if you have a hundred of rule-then-end's and iterate it with different pojo instances.
The URL patterns for packages and individual assets is different. For assets (e.g. DRLs) the pattern is:
<resource source='http://localhost:9090/drools-guvnor/rest/packages/test/assets/MyRule/source' type='DRL' />
My workaround to this problem is to create two different packages, one for rule1.drl and one for rule2.drl. So my program read these two rule by two different changeset.