AEM 6.1: I had a one cq:Dialog node with structure below:
+- myDialog
|- cq:Dialog
|- content
|- layout
|- items
|- myTab
|- somethingInside
I did a little change that adds two things and removes myTab. I have current structure in code:
+- myDialog
|- cq:Dialog
|- content
|- layout
|- items
|- myNewTab
|- myNewestTab
I created a zip package using AEM standard packaging and install it on author, then I get:
+- myDialog
|- cq:Dialog
|- content
|- layout
|- items
|- myTab
|- somethingInside
|- myNewTab
|- myNewestTab
However, after the second deploy or even reinstalling package it removes myTab node and works okay. Is it a known AEM issue or I did something wrong here?
My _cq_dialog.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:cq="http://www.day.com/jcr/cq/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog"
jcr:title="Text & Title">
<content jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<layout jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/tabs"
type="nav" />
<items jcr:primaryType="nt:unstructured">
<myNewTab jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/section"
jcr:title="New Tab">
<layout jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns" />
<items jcr:primaryType="nt:unstructured">
<column jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<items jcr:primaryType="nt:unstructured">
</items>
</column>
</items>
</myNewTab>
<myNewestTab jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/section"
jcr:title="Newest Tab">
<layout jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns" />
<items jcr:primaryType="nt:unstructured">
<column jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<items jcr:primaryType="nt:unstructured">
</items>
</column>
</items>
</myNewestTab>
</items>
</content>
</jcr:root>
It might possible that you have not saved it after removing the myTab node. Thus, when you had created a package, it contains all the three nodes i.e. myTab, myNewTab, myNewestTab.
Notice your dialog.xml does not contain any <myTab> element. Thus, if you reinstall it didn't created myTab node.
Try it again with more experiments and share if it happens again.
Hope it explains your point.
:)
Related
Is there a way to create additional menus to a wabspace in Sulu CMS (1.6)? I only see the main manu in the options:
Thx a lot!
Andreas
You can add more navigations using the XML definition of a webspace. The default webspace from the sulu-minimal repository is located at app/Resources/webspaces/example.com.xml and already contains a navigation tag.
You can add more contexts like this:
<webspace>
<!-- other tags -->
<navigation>
<contexts>
<context key="main">
<meta>
<title lang="en">Main Navigation</title>
</meta>
</context>
<context key="footer">
<meta>
<title lang="en">Footer Navigation</title>
</meta>
</context>
</contexts>
</navigation>
<!-- other tags -->
</webspace>
How to add header and footer to checkout page. I used the override method. I created checkou_index_index.xml file in following path layout\override\theme\Magento\blank in my custom theme.
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="minicart" remove="false" />
<referenceContainer name="header.panel" remove="false" />
<referenceBlock name="top.search" remove="false" />
<referenceBlock name="catalog.compare.link" remove="false" />
<referenceBlock name="catalog.topnav" remove="false"/>
<referenceContainer name="footer-container" remove="false"/>
</body>
</page>
But I received following error.
Overriding view file 'C:\/xampp\/htdocs\/my_website\/app\/design\/frontend\/Vendor\/basic\/Magento_Checkout\/layout\/override\/theme\/Magento\/blank\/checkout_index_index.xml' does not match to any of the files
What is the cause of this error and how to fix this error?
First you have to create custom theme and once its done then create checkout_index_index.xml file in app/design/frontend/Magenticians/Mytheme/Magento_Checkout/layout and paste this code:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="minicart" remove="false" />
<referenceContainer name="header.panel" remove="false" />
<referenceBlock name="top.search" remove="false" />
<referenceBlock name="catalog.compare.link" remove="false" />
<referenceBlock name="catalog.topnav" remove="false"/>
<referenceContainer name="footer-container" remove="false"/>
</body>
</page>
Then create customcss.css in app/design/frontend/Magenticians/Mytheme/web/css and paste this code:
.action-auth-toggle
{
display: block;
}
Now open a default.xml file of your custom theme and paste this code:
<head>
<css src="css/customcss.css" />
</head>
After the implementation, don't forget to run necessary CLI commands.
Try putting your custom xml file in:
C:\xampp\htdocs\my_website\app\design\frontend\Vendor\basic\Magento_Checkout\view\frontend\layout\checkout_index_index.xml
Because, if i'm not mistaken, the file to override is in:
C:\xampp\htdocs\my_website\vendor\magento\module-checkout\view\frontend\layout\checkout_index_index.xml
Hope this helps you.
I am new in wix and creating a window service. I have created my service and successfully added in window service but when I run it stopped due to error.
<?xml version="1.0" encoding="UTF-8"?>
<?define Name = "New Window Service" ?>
<?define Manufacturer = "GAT" ?>
<?define UpgradeCode = "{0d4fb541-bb66-4df8-bdab-893564e191fc}" ?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"
>
<Product Id="*" Name="$(var.Name)" Manufacturer="$(var.Manufacturer)" Version="1.0.0.0" UpgradeCode="$(var.UpgradeCode)" Language="1033">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<Media Id="1" Cabinet="GAT.GATAC.ServiceLayer.WindowsServiceHost.cab" EmbedCab="yes" />
<MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="ROOTDIRECTORY" Name="$(var.Manufacturer)">
<Directory Id="INSTALLFOLDER" Name="$(var.Name)" />
</Directory>
</Directory>
</Directory>
<DirectoryRef Id="INSTALLFOLDER">
<Component Id="$(var.GAT.GATAC.ServiceLayer.WindowsServiceHost.TargetFileName)">
<CreateFolder />
<File Id="$(var.GAT.GATAC.ServiceLayer.WindowsServiceHost.TargetFileName)" Source="D:\Projects\GATAC\GAT.GATAC.ServiceLayer.WindowsServiceHost\bin\Release\GAT.GATAC.ServiceLayer.WindowsServiceHost.exe" KeyPath="yes" Vital="yes" />
<File Id="GAT.GATAC.ServiceLayer.WindowsServiceHost.exe.config"
Name="MyProduct.exe.config"
Source="D:\Projects\GATAC\GAT.GATAC.ServiceLayer.WindowsServiceHost\bin\Release\GAT.GATAC.ServiceLayer.WindowsServiceHost.exe.config"
Vital="yes"
KeyPath="no"
DiskId="1" />
<RemoveFile Id="ALLFILES" Name="*.*" On="both" />
<util:XmlFile Id="ModifyServiceLocation" Action="setValue" ElementPath="/configuration/connectionStrings/add[\[]#name='DefaultConnection'[\]]/#connectionString" File="D:\Projects\GATAC\GAT.GATAC.ServiceLayer.WindowsServiceHost\bin\Release\GAT.GATAC.ServiceLayer.WindowsServiceHost.exe.config" Value="Data Source=[DB_SERVER];Initial Catalog=[DB_DATABASE];User Id=[DB_USER];Pwd=[DB_PASSWORD]"/>
<ServiceInstall Id="ServiceInstaller"
Type="ownProcess"
Name="GAT.GATAC.ServiceLayer.WindowsServiceHost"
DisplayName="$(var.Name)"
Description="A Test Service that logs dummy text on an interval to a text file."
Start="auto"
ErrorControl="normal"
/>
<ServiceControl Id="ServiceInstaller"
Stop="both"
Remove="both"
Name="GAT.GATAC.ServiceLayer.WindowsServiceHost"
Wait="yes" />
</Component>
</DirectoryRef>
<Feature Id="MainApplication" Title="Main Application" Level="1">
<ComponentRef Id="$(var.GAT.GATAC.ServiceLayer.WindowsServiceHost.TargetFileName)" />
</Feature>
</Product>
</Wix>
when I saw in installation folder of service there is only exe file so how to copy all dependencies of window service in this folder my code is following.When I copy files manually in installation folder it works.Do I need to harvest
Yes, you need to include ALL files in your wxs as components you want to install.
If you have a few dependencies, you can just add them as File components yourself. If there are a lot of files consider using heat to generate the wxs file for you and you can copy the file elements into your wxs code. If the file dependencies may change frequently, consider using heat to always generate the wxs and include it as a linked file in your main installer project.
Ideally all your dependencies are being included in the GAT.GATAC.ServiceLayer.WindowsServiceHost project's bin folder so you can just use $(var.GAT.GATAC.ServiceLayer.WindowsServiceHost.TargetDir)DependencyFileName as the Source for the file.
This 'solution' doesn't look to work any longer in the Luna version:
Copy path/file name in Eclipse to clipboard
This is actually a must have feature for a rich IDE!
You can use start explorer (alternate link) or Copy path plugin.
Short cut key to copy path to clipboard in star explorer is : Ctrl+Alt+
C
Standard eclipse eclipse doest have such key. You can select resource in Package/Project/Navigator view and press Alt+Enter to open property dialog and then copy path from here.
I am using Eclipse Java EE IDE for Web Developers.Version: Luna Release (4.4.0)
Build id: 20140612-0600
You can right mouse click on the file and select "Copy Qualified Name".
For this particular example, the path in clipboard is
/TestingProject/src/com/website/testing/App1.java
Use the EasyShell plugin
If using Eclipse 4.14 or later, from Dec 2019 or later, neither StartExplorer nor Path Tools nor Copy as Path works.
Instead, use EasyShell, which works great!
Instructions:
Unsure no text or code is selected.
Right-click anywhere in your open Eclipse file editor, including on empty space near your code, or in the Project Explorer pane.
Go to "EasyShell" --> "Copy Full Path to Clipboard", or "Copy Qualified Name to Clipboard" (see screenshot below).
You now have the file path copied. Paste it wherever you want.
Totally unrelated aside
Additional note: as far as good Ecliplse plugins go in general, I also highly recommend the DevStyle plugin, set to "Dark Gray (Darkest Dark)" Workbench theme, with the DevStyle "Editor theme" (syntax highlighting) set to Sublime Text 3 (Monokai), by Jeremy Shepherd <-- Update Feb 2020: dead links. Instead, I've copied and pasted the contents of Jeremy Shepherd's .xml file at the bottom of this answer.
Sublime Text 3 (Monokai) - by Jeremy Shepherd--theme-25808.xml:
<?xml version="1.0" encoding="utf-8"?>
<colorTheme id="25808" name="Sublime Text 3 (Monokai)" modified="2014-04-11 19:52:55" author="Jeremy Shepherd">
<searchResultIndication color="#757575" />
<filteredSearchResultIndication color="#757575" />
<occurrenceIndication color="#000000" />
<writeOccurrenceIndication color="#000000" />
<findScope color="#111111" />
<deletionIndication color="#D25252" />
<sourceHoverBackground color="#000000" />
<singleLineComment color="#75715E" italic="false" />
<multiLineComment color="#75715E" italic="false" />
<commentTaskTag color="#CCDF32" italic="false" underline="true" strikethrough="false" />
<javadoc color="#76725E" italic="false" />
<javadocLink color="#76725E" italic="false" underline="true" strikethrough="false" />
<javadocTag color="#FD2971" italic="false" />
<javadocKeyword color="#C2BFA6" italic="false" />
<class color="#56D8F0" bold="false" underline="false" strikethrough="false" />
<interface color="#D197D9" />
<method color="#FFFFFF" />
<methodDeclaration color="#7BE12A" />
<bracket color="#D8D8D8" />
<number color="#7FB347" />
<string color="#E7DD6C" />
<operator color="#D8D8D8" />
<keyword color="#F12971" bold="false" />
<annotation color="#FFFFFF" />
<staticMethod color="#BED6FF" />
<localVariable color="#E7F8F2" />
<localVariableDeclaration color="#F12971" />
<field color="#7BE12A" />
<staticField color="#EFC090" />
<staticFinalField color="#EFC090" />
<deprecatedMember color="#D25252" underline="false" strikethrough="true" />
<enum color="#7BE12A" />
<inheritedMethod color="#BED6FF" />
<abstractMethod color="#BED6FF" />
<parameterVariable color="#79ABFF" />
<typeArgument color="#BFA4A4" />
<typeParameter color="#BFA4A4" />
<constant color="#EFB571" />
<background color="#272822" />
<currentLine color="#3E3D32" />
<foreground color="#F8F8F2" />
<lineNumber color="#72736A" />
<selectionBackground color="#757575" />
<selectionForeground color="#D0D0D0" />
</colorTheme>
Sublime Text 3 (Monokai) - by Jeremy Shepherd--theme-25808.epf:
Too long to post here. See my dotfiles project to download it instead.
You know when you click new in Eclipse and choose other. From there you can add css file. However, for some reason I can't. I have nowhere to choose css for the file. Please help.
This code works for me in this situation
scene.getStylesheets().add(YourMainClass.class.getResource("YourCSS.css").toExternalForm());
Some downloads of Eclipse don't have the Web Developer Tools included - these are what include the CSS support.
You can install these in 'Install New Software...', 'Work with' the main Eclipse repository and look in the 'Web, XML, Java EE and OSGi Enterprise Development' section.
Alternatively for JavaFX development you should look at the e(fx)clipse build of Eclipse which has many JavaFX tools.
Try this on the fxml document
<?xml version="1.0" encoding="UTF-8"?>
<?import java.net.URL?>
<?import javafx.scene.effect.Reflection?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<StackPane id="StackPane" fx:id="stackpane" prefHeight="200" prefWidth="400" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="myrectanglefxapp.MyRectangleFxController">
<stylesheets>
<URL value="#MyCSS.css" />
</stylesheets>
<children>
<Rectangle id="myrectangle" fx:id="rectangle" arcHeight="30" arcWidth="30" height="100" onMouseClicked="#handleMouseClick" width="200" />
<Text text="My Rectangle">
<effect>
<Reflection />
</effect>
<font>
<Font name="Verdana Bold" size="18.0" />
</font>
</Text>
</children>
</StackPane>
Import java.net.URL
put stylesheets
URL value="#MyCSS.css"