掲示板

Is GWT compatible with Liferay 7

7年前 に Damien Guillermet によって更新されました。

Is GWT compatible with Liferay 7

Junior Member 投稿: 44 参加年月日: 15/07/09 最新の投稿
Dear Liferay staff,

I would like to know if a GWT based portlet can be integrated in Liferay 7, due to its major architecture change.
If the response is yes, is there anything to help, tutorial or code? Otherwise please let me know so I can move to another solution right now emoticon

Best regards,
Damien.

Related posts:
GWT application deployment under Liferay 7 CE GA3
thumbnail
7年前 に David H Nebinger によって更新されました。

RE: Is GWT compatible with Liferay 7

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
Short answer is yes, detailed answer is that I'm not sure how to go about it.

From a regular OSGi portlet, you have your portlet class w/ annotations and properties to indicate what js, css to load, so that is going to be covered. If you launch the GWT portlet using a JSP page, you can use a regular portlet and a view.jsp to kick everything off. If there is a GWT specific portlet class to use, subclass it and put the annotation/properties in the subclass.

In your bnd.bnd file, you should specify your web context root so you can access js, scripts and assets from the front end.

Remember that paths to your assets are going to be like /o/web-context/my-asset sort of format.

So Sampsa has been working on Vaadin 7 portlet deployment to Liferay 7 and, since it is GWT based, indicates that GWT is going to work as portlets, you're just left to building out the mechanisms yourself, as far as I know.
7年前 に Damien Guillermet によって更新されました。

RE: Is GWT compatible with Liferay 7

Junior Member 投稿: 44 参加年月日: 15/07/09 最新の投稿
Hello David and sorry for my delayed response!

If you launch the GWT portlet using a JSP page
> Yes I use a view.jsp to initialize my GWT client app (entry point).

So Sampsa has been working on Vaadin 7 portlet deployment to Liferay 7
> Are you speaking about the Sampsa Vaadin 7 Liferay 7 post ?

I understand that I have to declare the web context path ; either in bnd.bnd file, in manifest or in liferay-plugin-package.properties (L6 convention). So the property to declare is : Web-ContextPath: /myWebContextPath
but I still don't understand what this has to do with GWT ? I mean GWT generates random files (for its rpc service, css, etc.) and the nocache.js file is supposed to access them via relative path.
Furthermore I can't load them like the nocache.js file via the header-portlet-javascript directive due to their random names. And even if it's possible you wrote that we can access files with relative path like
/o/web-context/my-asset
but how the nocache.js file is supposed to guess that ?

Given the following WAR structure:

    WEB-INF/
        lib/
            [...]
        classes/
            com/liferay/my_gwt_portlet/
                    client/
                        ClientApp.java (gwt entry point)
                        MyGWTService.java (gwt rpc remote service)
                        MyGWTServiceAsync.java (async. counterpart)
                    server/
                        MyGWTServiceImpl (implements our client service, extends gwt rpc remote service servlet)
                    shared/
                        [...]
                MyGWTModule.gwt.xml (gwt module definition)
                MyLiferayPortlet.java (extends LiferayPortlet)
        web.xml
        portlet.xml
        [...]
    META-INF/
        MANIFEST.MF
    html/
        view.jsp
        config.jsp
        [...]
    MyGWTModule/
        MyGWTModule.nocache.js
        138A918BBC4F0DC7B0CA9F19943CD05E.gwt.rpc
        AF12CCBE4D5A14270A82C2D7721AAE22.cache.js
        js/
        gwt/
        css/
        [...]
    js/
        main.js
        [...]
    css/
        [...]


Regards,
Damien.
7年前 に Daniel Chan によって更新されました。

RE: Is GWT compatible with Liferay 7

Junior Member 投稿: 32 参加年月日: 16/02/22 最新の投稿
Hello David

I am newbie to Liferay7 and I have a number of GWT application written for Liferay 6.

I encounter the same problem. Please kindly help to provide the detail or demo program integrated into Liferay7 Bundle

Regrds
Daniel