Primefaces rating component with JSF2 - primefaces

I am trying to use primefaces 3.3 with JSF 2. When I try to access the page , the components are not getting displayed.
There are some JS error on the page.
Uncaught ReferenceError: $ is not defined :
Uncaught ReferenceError: PrimeFaces is not defined
<p:rating starts="10"/>
Any Idea?

Add h:head to your page. See;
http://www.primefaces.org/gettingStarted.html

Related

'dialog' is not a known element in Angular 9 with Ivy

After upgrading to Angular RC.3 and switching to Ivy in a project I get the following error:
Error: dialog is not a known element: 1. If dialog is an Angular component, then verify that it is part of this module. 2. To allow any element add NO_ERRORS_SCHEMA to the #NgModule.schemas of this component.
Indeed I have a markup like this using a <dialog>-element:
<dialog [attr.open]="open ? '' : null"></dialog>
Even though the browser coverage is not 100% dialog is still a valid HTML element.
Did they miss to support it? Is this a bug in Anglaur or Ivy? Can I only use the dialog-element, when I also use NO_ERRORS_SCHEMA in the components?*
* Which I actually don't want to activate.

smooch web messenger embedded mode no longer working?

I've updated the code for embedded mode according to the smooch documentation
https://docs.smooch.io/guide/web-messenger/#styling-the-conversation-interface
On this page
https://www.vetchat.com.au/smooch/
But it is no longer working, just displays as default.
Has this error in console
Uncaught TypeError: Cannot read property 'appendChild' of null
at Object.render (web-messenger.js:88)
at e.__onWebMessengerHostReady__ ((index):141)
at Object.<anonymous> (index.js:4)
at Object.<anonymous> (smooch.4.0.4.min.js:178)
at e (bootstrap b9ab67f504327dcb9c27:19)
at bootstrap b9ab67f504327dcb9c27:62
at bootstrap b9ab67f504327dcb9c27:62
I'm not much of a dev, was hoping someone advise if i am doing something wrong?
Looking at the source code of your page, it looks like the init part has some errors in it.
Currently, it's :
Smooch.init({appId: '<app-id>'});
embedded: true
Smooch.render(document.getElementById('chat-container'));
when it should be
Smooch.init({
appId: '<app-id>',
embedded: true
});
Smooch.render(document.getElementById('chat-container'));
I hope this helps.

Paper-dropdown-menu : error with Polymer 2.0

Hi stackoverflow users,
I want to use the paper-dropdown-menu with polymer 2.0 but when I click on the element, the error below occurs :
Uncaught TypeError: Cannot assign to read only property 'target' of object '#<AnimationPlaybackEvent>'
at b.Animation.<anonymous> (web-animations-next-animation.js:223)
I have installed paper-dropdown-menu #2.0-preview.
I tried the very simple example code from the docs:
<paper-dropdown-menu label="Dinosaurs">
<paper-listbox class="dropdown-content" selected="1">
<paper-item>allosaurus</paper-item>
<paper-item>brontosaurus</paper-item>
<paper-item>carcharodontosaurus</paper-item>
<paper-item>diplodocus</paper-item>
</paper-listbox>
</paper-dropdown-menu>
Could you help me ?
Thank you.
Phil
This appears to be a compatibility issue with the web-animations-js library. They released a build on April 13, 2017 that started causing this issue with the 1.x version of paper-drowpdown-menu as well. Anyone doing a bower update after this date will probably see the same behavior until it's resolved.
Adding this to your bower.json file should fix the behavior for you:
"web-animations-js": "web-animations/web-animations-js#2.2.2"
I've filed an issue w/ paper-dropdown-menu regarding this breaking dependency: https://github.com/PolymerElements/paper-dropdown-menu/issues/241

Angular 2 how to use Applets

I have currently a problem with embeding my Applet .jar file into my Angular 2 Project.
Most of the solution mention using the <applet></applet> tag but I get the following error when i try it:
Unhandled Promise rejection: Template parse errors:
'applet' is not a known element:
1. If 'applet' is an Angular component, then verify that it is part of this module.
2. If 'applet' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '#NgModule.schemas' of this component to suppress this message.
How do I solve this?
Ok, HTML5 replaced <applet></applet> with <object></object>.
Tried it and now it works

Can Polymer extend Electron's webview component?

In Electron (Atom-Shell), I'm trying to use Polymer 0.5 to extend Electron's webview tag (to add some custom attributes while retaining all of webview's methods). But I'm getting a NotSupportedError when I try to use my custom component. Is there a way to make this work?
Here's how I'm extending the webview:
<polymer-element name="my-webview" extends="webview">
<script>
Polymer({
// I'll add some custom attributes later
});
</script>
</polymer-element>
But when I try to use my-webview (either of these ways):
<my-webview src="http://example.com"></my-webview>
<webview is="my-webview" src="http://example.com"></webview>
...I get this error:
Uncaught NotSupportedError: Failed to execute 'registerElement' on
'Document': Registration failed for type 'my-webview'. The tag name
specified in 'extends' is a custom element name. Use inheritance
instead.
Now, it's true that Electron's webview is indeed a custom element. But Polymer happily extends other custom elements, right?
It seems like one problem might be that "webview" doesn't have a '-' in its name, so Polymer's findTypeExtension doesn't realize it's a custom element.
Is there any way to work around this and convince Polymer that webview needs to be extended through inheritance, like other custom elements?