WebJar Integration on Cuba Platform 7.2

Hi…
Is it possible to provide a sample carousal project or any other WebJar integration on Cuba 7.2. The existing Project on Cuba Labs is implemented on Cuba 6.7, i tried to migrate the project to Cuba Platform 7.2, but unfortunately getting many errors… And i’m unable to find a detailed documentation except this

Thanks in advance…

Hi… I’ve attached the carousal-component.zip (1.5 MB) , it throws the following error:

Task :app-web-toolkit:buildWidgetSet
Compiling module com.company.carousalcomponent.web.toolkit.ui.AppWidgetSet
   Tracing compile failure path for type 'com.company.carousalcomponent.web.toolkit.ui.client.CarouselComponentConnector'
      [ERROR] Errors in 'file:/home/user/IdeaProjects/carousal-component/modules/web-toolkit/src/com/company/carousalcomponent/web/toolkit/ui/client/CarouselComponentConnector.java'
         [ERROR] Line 29: No source code is available for type com.company.carousalcomponent.web.ui.client.carouselcomponent.CarouselComponentState; did you forget to inherit a required module?
   [ERROR] Aborting compile due to errors in some input files

> Task :app-web-toolkit:buildWidgetSet FAILED

Hi…
I managed to solve the above mentioned error. Now the Project successfully running. But when i open the screen which has the carousal component. Then the project goes hanging. But, not getting any error. Please help me to resolve the problem.

I have attached the project carousel-component.zip (1.5 MB) …

Thanks in advance…

Hi,

You have an issue with your GWT code and you can see the error in the JS console in the browser.

First, I’d recommend you to add jQuery dependency to you component - it will eliminate one JS issue.

@WebJarResource({
        "jquery:jquery.min.js",
        "jrcarousel/1.0.0/dist/jRCarousel.min.js"
})
public class CarouselComponent extends AbstractComponent {

The second thing - you had a problem with the GWT code. I guess native function should look like this:

    public native void createCarousel(String elementId)
    /*-{
         //JS code here
    }-*/;

If you add those updates, your application won’t fail. But the widget won’t display too, unfortunately. To simplify debug, you can disable JS minification in the build file by adding style flag, this will show better diagnostic in the browser’s JS console:

    task buildWidgetSet(type: CubaWidgetSetBuilding) {
        widgetSetClass = 'com.company.carouselcomponent.web.toolkit.ui.AppWidgetSet'
        style='DETAILED' //this!
    }

Also, you can try this video to learn debug: Debugging Essentials - YouTube It is a bit outdated, but client side debug hasn’t changed I guess.

Hope this will help.

Yeah… Thank you… It solved the issue…