Liferay 6.1 Theme - look and feel - liferay

I have liferay-look-and-feel.xml file:
<?xml version="1.0"?>
<!DOCTYPE look-and-feel PUBLIC "-//Liferay//DTD Look and Feel 6.1.0//EN"
"http://www.liferay.com/dtd/liferay-look-and-feel_6_1_0.dtd">
<look-and-feel>
<compatibility>
<version>6.1.10+</version>
</compatibility>
<theme id="sample-theme" name="Sample Theme">
<settings>
<setting key="portlet-setup-show-borders-default" value="false" />
</settings>
</theme>
</look-and-feel>
I use maven to build my project and build success
But when I open localhost in Eclipse I see:
[ThemeLocalServiceImpl:149] No theme found for specified theme id sample_WAR_sampletheme. Returning the default theme.
What is wrong?

Just remove the property antiJarLocking and set antiResourceLocking to false in Liferay-6.1.10/tomcat-7.0.27/webapps/sample_WAR_sampletheme/META-INF/context.xml.
Read more here.

It is a problem of antiResourceLocking in tomcat 7.
Please check out the blog: No theme found for specified theme id … Returning the default theme

Related

How to configure an attribute to be edited with a RichTextBox editor in SmartEdit?

I noticed that CMSParagraphComponent's content attribute can be edited using a RichTextBox like depicted in below image:
I want to edit my custom attribute in the same way(with the depicted RichTextBox). How can I do that ?
I tried configuring the backoffice-config.xml to use the wysiwyg:
<context merge-by="type" type="MyType" component="editor-area" module="moduleBackoffice">
<editorArea:editorArea xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea">
<editorArea:tab merge-mode="replace" name="hmc.properties">
<editorArea:section name="hmc.properties">
<editorArea:attribute
editor="com.hybris.cockpitng.editor.localized(com.hybris.cockpitng.editor.wysiwyg)"
qualifier="customStringAttribute"/>
</editorArea:section>
</editorArea:tab>
</editorArea:editorArea>
</context>
But this only reflects in backoffice and has no effect on SmartEdit.
How can I use the RichTextBox in smartEdit ?
Hybris version: 6.7.0.3
This can be resolved by creating below Spring bean:
<bean class="de.hybris.platform.cmsfacades.types.service.impl.DefaultComponentTypeAttributeStructure" p:typecode="MyType" p:qualifier="customStringAttribute">
<property name="populators">
<set>
<ref bean="richTextComponentTypeAttributePopulator" />
<ref bean="requiredComponentTypeAttributePopulator" />
</set>
</property>
</bean>
I added above defined bean in my ${extensionname}-spring.xml, restarted the server and everything worked as expected. The MyType's customStringAttribute is now configurable from smartedit in the exact same way as CMSParagraphComponent's content is.

Azure Role Service can`t deploy - WaHostBootstrapper.exe.config missing

I`m trying to deploy New Azure Service (using SDK 2.9) and encounter the following error:
The file provided is not a valid service package.
Invalid application runtime - a runtime component is missing:/base/x64/WaHostBootstrapper.exe.config.
Screenshot of the error
What did I try:
Tried to package the service and saw "base/x64/WaHostBootstrapper.exe.config" exists and not missing. Screenshot of the Package Folder
Tried to deploy other service from different workload (also SDK 2.9) it works.
Tried to compare the content of WaHostBootstrapper.exe.config between the to mentioned sevices and it was identical
Attaching the contents of the file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" />
<supportedRuntime version="v2.0.50727" />
</startup>
<runtime>
<NetFx40_LegacySecurityPolicy enabled="false" />
</runtime>
</configuration>
Any ideas what else can I check or try to do?
Thanks a lot for you help

Packaging a node-webkit app (exe) to Win 8.1 appx

I am attempting to transform a built node-webkit app that I created into an executable appx Win 8.1 Metro App.
After creating my appx package and signing it, and creating my AppxManifest.xml file :
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
<Identity Name="bouveret" Version="1.0.0.0" Publisher="CN=Mc" />
<Properties>
<DisplayName>iMotion</DisplayName>
<PublisherDisplayName>XXX</PublisherDisplayName>
<Logo>logo.png</Logo>
</Properties>
<Prerequisites>
<OSMinVersion>6.2.1</OSMinVersion>
<OSMaxVersionTested>6.2.1</OSMaxVersionTested>
</Prerequisites>
<Resources>
<Resource Language="fr" />
</Resources>
<Applications>
<Application Id="bouveret" Executable="bouveret.exe" EntryPoint="WinMain">
<VisualElements DisplayName="iMotion" Logo="logo.png" SmallLogo="logo.png" Description="iMotion" ForegroundText="light" BackgroundColor="#000000" ToastCapable="false">
<DefaultTile ShowName="allLogos" ShortName="iMotion" WideLogo="logo.png" />
<SplashScreen Image="logo.png" />
<InitialRotationPreference>
<Rotation Preference="portrait" />
</InitialRotationPreference>
</VisualElements>
</Application>
</Applications>
</Package>
I manage to install it via Powershell, but I suspect it doesn't manage to run the entry point for the app. NW apps don't have a C# interface I can use to set a proper entry point.
Anyone has any idea on which entry point should be set? The executable launches itself properly, but the appx package doesn't launch anything : I see the logo on a black background and then it minimizes itself to the desktop without any debug trace.
Thank you.

adding Parse javadoc to Android Studio

Parse provides docs as external Parse-1.5.1-javadoc folder.
I would like to have Parse javadoc connected within Android Studio. How do I achieve that?
I'm using AndroidStudio 0.6 and parse 1.5.1.
Same problem:
Android Studio: How to attach javadoc
Android issue tracker:
https://code.google.com/p/android/issues/detail?id=59220
Here is the only solution I've found so far:
Open /YourProjectDir/.idea/libraries/Parse_versionCode.xml"
Add the following lines:
<JAVADOC>
<root url="https://www.parse.com/docs/android/api/" />
</JAVADOC>
So it should look something like this:
<component name="libraryTable">
<library name="Parse-1.8.3">
<CLASSES>
<root url="jar://$PROJECT_DIR$/app/libs/Parse-1.8.3.jar!/" /> <!-- check version! -->
</CLASSES>
<JAVADOC>
<root url="https://www.parse.com/docs/android/api/" />
</JAVADOC>
<SOURCES />
</library>
</component>

JavaFx 2.0 application referencing external jars

I'm developing a JavaFx 2.0 application using Netbeans 7.
The main application references another class library project added by rightclicking the 'Libraries' folder and selecting 'Add Project...'. Executing the application from netbeans works fine.
When deploying it to a jar file by 'Clean and build' and trying to execute it via console with
java -jar TestApp.jar
I get
Exception in thread "JavaFX-Launcher" java.lang.NoClassDefFoundError: net/pmoule/SomeClass
...
The dist/lib folder of my application contains the referenced library. So IMHO everything should be fine. Looking at the Manifest.MF contained in my application jar I get this
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.2
Created-By: 1.6.0_23-b05 (Sun Microsystems Inc.)
Implementation-Vendor: pmoule
Implementation-Title: TestApp
Implementation-Version: 1.0
Main-Class: com/javafx/main/Main
JavaFX-Application-Class: testapp.TestApp
JavaFX-Version: 2.0
Where is my class path? How do I get Netbeans to add the correct classpath?
I tried adding it manually to the Manifest.MF by editing the one contained in the jar
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.2
Created-By: 1.6.0_23-b05 (Sun Microsystems Inc.)
Implementation-Vendor: pmoule
Implementation-Title: TestApp
Implementation-Version: 1.0
Class-Path: lib/MyLib.jar //THIS IS NEW
Main-Class: com/javafx/main/Main
JavaFX-Application-Class: testapp.TestApp
JavaFX-Version: 2.0
No success and same error.
All samples delivered with the JavaFX 2.0 SDK work by doubleclicking in WindowsExplorer or from the console by entering e.g.
java -jar PathAnimation.jar
But not any of these examples makes a reference to an external jar.
Some research lead me to this question: Netbeans JavaFX 2.0 Application
But without any solution so far.
Thanks for any help!
Found a working solution by myself.
All the external libraries in the dist/lin folder had a size of 0kb. So the exception was correct, of course.
To get my application running I did the following in the project's jfx-impl.xml:
Add the classpath to manifest.mf
<fxjar destfile="${jfx.deployment.dir}/${jfx.deployment.jar}" applicationClass="${main.class}" >
<fileset dir="${build.classes.dir}"/>
<manifest>
<attribute name="Implementation-Vendor" value="${application.vendor}"/>
<attribute name="Implementation-Title" value="${application.title}"/>
<!-- NEW --> <attribute name="Class-Path" value="${jar.classpath}"/> <!-- NEW -->
<attribute name="Implementation-Version" value="1.0"/>
</manifest>
</fxjar>
Create an output dir for web deployment
<property name="jfx.deployment.web.dir" location="${jfx.deployment.dir}/web" />
<mkdir dir="${jfx.deployment.web.dir}" />
Set output dir for fxdeploy task
<fxdeploy width="${jfx.applet.width}" height="${jfx.applet.height}"
outdir="${jfx.deployment.web.dir}" <!-- NEW DIR -->
embedJNLP="true"
outfile="${application.title}">
<info title="${application.title}"
vendor="${application.vendor}"/>
<application name="${application.title}"
appclass="${main.class}"/>
<resources type="eager">
<fileset dir="${jfx.deployment.web.dir}"> <!-- NEW DIR -->
<include name="${jfx.deployment.jar}"/>
<include name="lib/*.jar"/>
<exclude name="**/jfxrt.jar"/>
</fileset>
</resources>
</fxdeploy>
Now, I can deploy my desktop application and execute ist via doubleclick from windows explorer or by entering
java -jar TestApp.jar
There still exists some issue with the content of my newly created web-dir.
The TestApp.jar ist not copied zo dist/web
The referenced external jars are not copied to dist/web
This is fine for me and will be fixed some time later.
Hope this helps anyone else.
In Netbeans, under project => properties => Build => Packaging, did you check "Copy Dependent Libraries" ?
You need to tell the fx:jar task what your classpath dependencies are:
<fxjar destfile="${jfx.deployment.dir}/${jfx.deployment.jar}" applicationClass="${main.class}" >
<fileset dir="${build.classes.dir}"/>
<manifest>
<attribute name="Implementation-Vendor" value="${application.vendor}"/>
<attribute name="Implementation-Title" value="${application.title}"/>
<attribute name="Implementation-Version" value="1.0"/>
</manifest>
<!-- Setup the classpath for the generated .jar here -->
<fx:resources>
<fx:fileset type="jar" dir="lib" includes="MyLib.jar"/>
</fx:resources>
</fxjar>
You also need to use fx:resources tag in your fx:deploy task instead of just resources. That should resolve the last two problems left in your answer.

Resources