I see examples using this:
<body fullbleed unresolved>
and also this
<body class="fullbleed unresolved">
Are these lines equivalent?
Because in Grails using the first method causes the exception:
Caused by
[views/layouts/main3.gsp:15] Expecting '=' after attribute name (fullbleed unresolved).
That looks like a Grails issue. It probably only supports official/known boolean attributes (attributes without values) on DOM elements but not on custom elements.
AFAIK in Polymer 0.5 mostly attributes were used but Polymer 1.x tends towards classes. I don't know if the attribute selectors are still supported.
iron-flex-layout only supports fullbleed classes (see https://github.com/PolymerElements/iron-flex-layout/search?utf8=%E2%9C%93&q=fullbleed)
Related
We are migrating struts 1 applications to struts 2.please help me with getting the equivalent struts 2 tags for the following nested tags.
<nested:equal property="dispatch" value="duplicateView">
<body>
</body>
</nested:equal>
<nested:equal property="dispatch" value="updateSuccess">
<body>
</nested:equal>
<nested:notEqual property="dispatch" value="updateSuccess">
<body>
</nested:notEqual>
Thanks in advance.
The nested tags are just for accessing a bean hierarchy, right? You just need to set a value using <s:set> and access the properties as normal.
If the bean hierarchy is known you can just access it directly via normal OGNL syntax, e.g.,
%{whateverRootBeanIs.dispatch.duplicateView}
I am not using Polymer and I am trying to extend the TemplateElement
class ItemTemplate extends TemplateElement{
ItemTemplate.created():super.created();
}
and then register it
document.registerElement('item-template', ItemTemplate,extendsTag:'template');
but when i add the following to my html test page
<template>
template
</template>
<item-template>
item-template
</item-template>
in Chromium it outputs
item-template
which means the new element that extends TemplateElement is active and not acting as a template, any idea why?
E:this is not a duplicate i said i am not using polymer and there is no polymer in the tags and its specifically about the behavior of the html5 TemplateElement
I have no experience with extending elements without Polymer but I'm pretty sure you still need the `is="xx-yy" attribute like
<template is="item-template">
item-template
</template is="item-template">
when you're extending a DOM element.
Maybe there are other measurements necessary to make it work but this should at least bring you a step closer (maybe an error message about what's still missing)
I want to loop over all children of a custom polymer element - for instance, to place each child in a new div.
<template repeat="{{child in children}}">
<div>
{{child}}
</div>
</template>
When I try this, I get the toString() version of child, rather than the element itself. Is there a way to reference the element itself inside the repeat, rather than the result of its toString() method?
Update
A ready-to-use element for Dart Polymer 1.0 is bwu-bind-html
This is not supported. Moustache binding can't insert HTML.
What you can do though is to use a Polymer element that provides that feature.
Please have look at my answer to HTML Tags Within Internationalized Strings In Polymer.dart <safe-html>.
With this element your code would look like:
<template repeat="{{child in children}}">
<div>
<safe-html model="{{child}}"></safe-html>
</div>
</template>
You might need to customize the NodeValidator construction which defines what kind of Elements are allowed to be added.
This feature might pose security risks (XSS) and is therefore not included in Polymer by default.
In Polymer.js, I can do this:
<polymer-element name="test-element" attributes="word" noscript>
<template>Foo {{word}} <content></content></template>
</polymer-element>
<test-element word="bar">baz</test-element>
And the output is Foo bar baz. See http://jsfiddle.net/vV3yS/.
However, if I do the same in Polymer.dart, I just get Foo baz. Worse, if I add lightdom, it works in Polymer.js, but Polymer.dart gives bazFoo.
Can I make Polymer.dart behave the same as Polymer.js does? I'm using 0.9.5.
That is interesting because lightdom was already removed from Polymer.js a while ago (https://github.com/Polymer/docs/issues/243)
It's a while since I used noscript myself but my experience was that it has issues in PolymerDart especially when you extend other elements.
I guess your element would work if you add a script to your element with a field
#published var word;
The link to the issue you created for this problem:
https://code.google.com/p/dart/issues/detail?id=17426
EDIT
polymer-element with attributes but without a script (with noscript) wasn't supported previous to Polymer 0.10.0 but should be supported with the next release (https://code.google.com/p/dart/issues/detail?id=17426)
I need to add an attribute in with in div tag in thymleaf as follows
<div class="mp_snippet_address" itemscope itemtype="http://schema.org/LocalBusiness">
the problem is i could not define the itemscope in div tag
The standard HTML parser in Thymeleaf is a very strict XML parser. You can switch to the less-strict LEGACYHTML5 template mode (then include the nekoHTML 1.9.15+ as a dependency), which allows for 'boolean attributes', but the output may be slightly different than the input templates as I think it performs some kind of tag balancing to massage HTML5 into being well-formed XML.
Support for HTML as per the HTML spec is on the cards for Thymeleaf 3.0, but that version is still a very very very long way away.