Integrate UI Component in a Polymer Project?

Good Morning,

I created a “UI Component” in my project from Cuba, however, I am using Polymer UI to develop the app. Does anyone know how I can integrate this component (with Java classes and JavaScript code) into the Polymer project?

In a project with pure Cuba I have managed to do it, since the “Controller” screen allows me to edit Java code and others, but in Polymer I do not know how to do this.

Thank you very much,
Greetings.

Hi,
If your UI component based on vaadin/GWT then unfortunately there is no easy way to integrate it into Polymer UI. If it is a wrapper of some JavaScript component then it’s very easy to create Polymer Web Component based on it. See an example of using jquery-week-calendar as Polymer component: sample-booking/modules/polymer-client/src/booking-events-calendar at master · cuba-platform/sample-booking · GitHub .

Hello,

First, thanks for your response. Yes, it is a JavaScript component, so I am going to look at how it is integrated into the HTML code of the screen to be displayed, since I am interested, if I do not manage to do it, I will consult you again if it does not bother you.

Thank you very much,
Greetings.

Hello,

I do not know if we are really talking about the same thing. As you can see in the screen capture that happened to you, I have two Java classes, and a JavaScript file, that is what is not integrated into my project, the functionality in Java, since I do not have the view of the Controller inside Cuba.

ssssss

Thank you,
Greetings.

You cannot use Java code in Polymer client, you have to write your wrapper on JavaScript

Hello,

This component has been created as a “JavaScript Component” in CUBA, to be able to use it in Polymer what should it do? Because it’s supposed to be a JavaScript component …

Thank you,
Regards.

Hello @jordi.gisbert.ponsoda

if I understood you correctly, you’ve integrated your component into Generic UI by this manual: link.
In this case you cannot use it in Polymer UI.

It means that you have to integrate your component both for Generic and Polymer UI’s.

Best regards,
Daniil.

Hello,

Yes, thanks for the answer, it became clear to me.

I take this opportunity to ask you a different question and something simpler, although I do not know how to do it since I am a newbie. I want to have a button with an action that when I click on it, I open another screen that I have in Cuba (I speak of Cuba, I leave aside Polymer). That is, with a button can open another screen created by me.

Thank you,
Regards

Please clarify, is this question still related to the topic subject?

No, but that’s why I said it, so as not to have to open a new topic, since it’s supposed to be a quick question.

Thank you,
Greetings.

Okay, understand you.

But please create a new topic and I’ll answer you. It will help other users to find a solution for this task faster.

Regards.

Hi,

Created :slight_smile:

Thanks.