Eclipse Code Assist with Composite Component and Custom Namespace fails - eclipse

I made a composite component and declared a custom namespace in my taglib like this:
[...]
<namespace>http://www.#####.info/components</namespace>
<composite-library-name>composites</composite-library-name>
[...]
Now when I use that namespace:
xmlns:wb="http://www.#####.info/components"
Everything 'works Runtime' but Eclipse wont show any Code assist like when I use the 'default' namespace:
xmlns:wbcomposites="http://java.sun.com/jsf/composite/composites"
Is this a normal Eclipse behaviour or did I do something wrong ?
Edit:
For example when i write:
<wb:
And then press [STRG] + [SPACE] the code assist shows me that there are no components.
I think this behaviour would make the "user" think that he has done something wrong ...
I hope there is a way to fix this from my side..

The problem was that i mixed a normal component and a composite in the taglib:
<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
version="2.0">
<namespace>http://abc/components</namespace>
<composite-library-name>composites</composite-library-name>
<tag>
<tag-name>something</tag-name>
<component>
[...]
Now i splitted them into to taglibs and two namespaces ...
This solved also bugs were the normal component was looked up as composite ...

Related

Tableau not loading custom color palette

I have edited Preferences.tps file from my tableau repository to add following code -
<?xml version='1.0'?>
<workbook>
<preferences>
<color-palette name="My Custom Palette" type="regular">
<color>#75787B</color>
<color>#A7A8AA</color>
<color>#BBBCBC</color>
<color>#B7C9D3</color>
<color>#C6BCD0</color>
<color>#E4D77E</color>
<color>#D9C89E</color>
</color-palette>
</preferences>
</workbook>
Upon restarting the Tableau, I still can't see my color pallet in there. I tried searching online for possible solutions and have even replaced the code with custom codes available online. No luck though!
For continuous/ordered data, the type of the color palette would need to be "ordered-sequential" or "ordered-diverging".
See the link below for more info about creating a custom palette and with examples of various types.
https://onlinehelp.tableau.com/current/pro/desktop/en-us/formatting_create_custom_colors.html
For example:
<?xml version='1.0'?>
<workbook>
<preferences>
<color-palette name="My Custom Palette" type="ordered-diverging">
<color>#75787B</color>
<color>#A7A8AA</color>
<color>#BBBCBC</color>
<color>#B7C9D3</color>
<color>#C6BCD0</color>
<color>#E4D77E</color>
<color>#D9C89E</color>
</color-palette>
</preferences>
</workbook>
Ordered-diverging above produces:
If there are multiple versions of Tableau installed, try testing the custom colors on default one. it works.

SAPUI5 Custom Launchpad Tile: Chip definition with Component

I'll add a custom tile for my Fiori Launchpad. More precisely, I like to use a component instead of a view in my Chip Definition File. The reason why is getting the option for eg. load my own I18n or CSS files.
The Chip definition is descriped here. On your Server you can find a description by using this URL: http://:/sap/public/bc/ui2/services/sap/ui2/srvc/chipdefinition.xsd
The chipdefinition.xsd from your own server provides the option loading a custom tile by Component and not by View. The specific tag can be found under: chip => implementation => sapui5 => viewName or componentName.
I would like to use "componentName" instead of "viewName" but I can't find a dokumentation for this specific usage. Does anybody know how to add your own Path/Namespace to access the component.js?
The usage by using "viewName" is descriped as follows: "The viewName comprises package path, the name of the view and the file extension, for example tests.sample.Myview.view.xml." But this syntax doesn't work for "componentName"
Thanks for your Help!!
Jimboh
You could try to implement the tile as SAPUI5 Components.
Instead of a SAPUI5 view (sap.ui.core.mvc.View), try using a component by specifying the component's name instead (sap.ui.core.UIComponent). Note that this refers to the folder where SAPUI5 expects a Component.js file to be found.
/hana/sap/hba/apps/kpi/WebContent/KPITile/resources/Kpi.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2013 SAP AG, All Rights Reserved -->
<chip xmlns="http://schemas.sap.com/sapui2/services/Chip/1">
<implementation>
<sapui5>
<basePath>../../../../../../..</basePath>
<componentName>sap.hba.apps.kpi.WebContent.KPITile.resources</componentName>
</sapui5>
</implementation>
</chip>

Stop Umbraco 7.2.8 tinyMCE editor removing script tags

I've been trying to stop the latest version of Umbraco's tinyMCE editor from automatically stripping any script tags. This was working fine some months ago. Umbraco has not been updated to my knowledge.
I have tried a number of solutions, mostly summed up in this thread: https://our.umbraco.org/forum/using/ui-questions/48866-RTE-not-updating-to-show-new-HTML-tags-in-Umbraco-7
I have edited umbracoSettings.config
<content>
<TidyEditorContent>False</TidyEditorContent>
<errors>...
And have allowed all in validElements in tinyMceConfig.config
<validElements><![CDATA[*[*]]]></validElements>
Finally I changed wed.config in order to force Umbraco to reload.
I still cannot get the script tags to save?
Any suggestions appreciated.
First off, This Is A Very Bad Idea (tm) - don't do it - you'll open it up to all sorts of problems.
The better way to do it is develop a macro that takes a block of text as a parameter, and make that macro useable in the Richtext Edit control.
Your Macro Script can then render the input any way you want, including using script tags (which probably should be part of the macro script). This way you have complete control over what's rendered.
I know this is old but this works on all versions of 7+
To enable javascript to be added to the editor you need to change the following.
You need to replace some of the configs in the config > tinyMceConfig.config file
<![CDATA[+a[id|style|rel|data-id|data-udi|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|
ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/-b[class|style],-em/-i[class|style],
-strike[class|style],-u[class|style],#p[id|style|dir|class|align],-ol[class|reversed|start|style|type],-ul[class|style],-li[class|style],br[class],
img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align|umbracoorgwidth|umbracoorgheight|onresize|onresizestart|onresizeend|rel|data-id],
-sub[style|class],-sup[style|class],-blockquote[dir|style|class],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],
-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],
thead[id|class],tfoot[id|class],#td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],
-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],
-span[class|align|style],-pre[class|align|style],address[class|align|style],-h1[id|dir|class|align|style],-h2[id|dir|class|align|style],
-h3[id|dir|class|align|style],-h4[id|dir|class|align|style],-h5[id|dir|class|align|style],-h6[id|style|dir|class|align|style],hr[class|style],small[class|style],
dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang],object[class|id|width|height|codebase|*],
param[name|value|_value|class],embed[type|width|height|src|class|*],map[name|class],area[shape|coords|href|alt|target|class],bdo[class],button[class],iframe[*],script[language|type|src]]]>
</validElements>
<invalidElements>font</invalidElements>
<!-- this area is for custom config settings that should be added during TinyMCE initialization -->
<customConfig>
<!-- <config key="myKey">mySetting</config>-->
<config key="entity_encoding">raw</config>
<config key="codemirror">
{
"indentOnInit": false,
"path": "../../../../lib/codemirror",
"config": {
},
"jsFiles": [
],
"cssFiles": [
]
}
</config>
<config key="allow_script_urls">true</config>

GWT Internationalization --- <ui:msg> eating spaces

I have been working on an internationalization project recently in which I utilized the GWT i18n module. Everything worked fine until I hit this problem.
Below is a line in my UiBinder xml, as you can see there's a trailing space there.
<ui:msg>Click here </ui:msg>
However, the corresponding entry inside the auto-generated properties file becomes
936CCDB97115E9F35A11D35E3D5B5CAD=Click here<line break>
The space at the end is missing!
I take a look of the generated transient files, it's missing there as well.
Following is the attributes I used in the xml header
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
ui:generateFormat="com.google.gwt.i18n.rebind.format.PropertiesFormat"
ui:generateKeys="com.google.gwt.i18n.rebind.keygen.MD5KeyGenerator"
ui:generateLocales="default"
......>
Any Help is appreciated!
Untested, but I believe that you could use an a nonbreaking space entity.
 

Creating a working copy for Plone 4 custom content types

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.