掲示板

What Framework should I use to replace the Icefaces in Liferay?

thumbnail
14年前 に Stanley Kurtz Matias de Lima によって更新されました。

What Framework should I use to replace the Icefaces in Liferay?

New Member 投稿: 17 参加年月日: 09/10/08 最新の投稿
Hi everybody!

I'm have problems to build portlets using Icefaces in Liferay.
The problem is 'User Session Expired' message. For more details see the link:

http://www.liferay.com/web/guest/community/forums/-/message_boards/message/4168285

Unfortunately seems that this problem wasn't solved yet.

Does anyone have any suggestions for other Framework that I can use?
That is as efficient as Icefaces.

Thank you!
thumbnail
14年前 に Victor Zorin によって更新されました。

RE: What Framework should I use to replace the Icefaces in Liferay?

Liferay Legend 投稿: 1228 参加年月日: 08/04/14 最新の投稿
Have a look at groovy grails, it seems to have much tighter integration with Liferay.
thumbnail
14年前 に Gordon Augat によって更新されました。

RE: What Framework should I use to replace the Icefaces in Liferay?

Regular Member 投稿: 107 参加年月日: 06/08/16 最新の投稿
The Vaadin Framework looks promising and will be included in Liferay 5.3.
thumbnail
14年前 に Victor Zorin によって更新されました。

RE: What Framework should I use to replace the Icefaces in Liferay?

Liferay Legend 投稿: 1228 参加年月日: 08/04/14 最新の投稿
Just another note, selection of a framework should probably depend on intended lifespan of your project.
- If it is a quick Proof-of-Concept for a small company, any framework can be used because speed and cost of development are the major factor in decision making
- If this is to produce your own product which is going to be maintained for a very long run (>3 years), apply extreme caution here.
Utilization of core/classic frameworks that comply with established Java-specs such as JSRs could a more cost effective option here, even if slightly bigger code-cutting effort is required.
In the past 4-5 years, several bleeding-edge and cool front-and-backend code generation frameworks and 3rd party commercials&OS products have come to Liferay and disappeared. The only framework which has survived is liferay struts (core system), the rest were gone, together with those open-source enthusiasts that have kindly ported them across.
thumbnail
14年前 に Stanley Kurtz Matias de Lima によって更新されました。

RE: What Framework should I use to replace the Icefaces in Liferay?

New Member 投稿: 17 参加年月日: 09/10/08 最新の投稿
OK!
Thanks for the alert.
14年前 に Chicon Samu によって更新されました。

RE: What Framework should I use to replace the Icefaces in Liferay?

Regular Member 投稿: 120 参加年月日: 07/08/30 最新の投稿
We are using richfaces instead of icefaces and it works fine!
thumbnail
14年前 に Alex Wallace によって更新されました。

RE: What Framework should I use to replace the Icefaces in Liferay?

Liferay Master 投稿: 640 参加年月日: 07/11/05 最新の投稿
We have a few IceFaces portlets in production. We use a the connection monitor and have a lifecycle listener to extend the session when the portlet is being used...

Its not perfect, but reasonable to some extent... We try to switch screen modes frequently in the portlet (to maximize and down back to normal) to prevent issues further..

I'd really like icefaces to mature in Liferay, because it is a great framework... Asside from this connection keep alive that flakes sometimes, it works great.

I would really like to know what is Liferay's and IceFaces posture about these issues because I read a lot of discouraging things in the forum and see no reply from, say Niel regarding that...
thumbnail
14年前 に Stanley Kurtz Matias de Lima によって更新されました。

RE: What Framework should I use to replace the Icefaces in Liferay?

New Member 投稿: 17 参加年月日: 09/10/08 最新の投稿
I'd really like icefaces to mature in Liferay, because it is a great framework... Asside from this connection keep alive that flakes sometimes, it works great.

I would really like to know what is Liferay's and IceFaces posture about these issues because I read a lot of discouraging things in the forum and see no reply from, say Niel regarding that...


I fully.
I think Icefaces is a great framework, but I read a lot things of discouraging in the Liferay's forum too.
I would like to know the opinion of Neil Griffin about this issue. I sent an e-mail recently to him, but not getting answer yet.

Thank you for your opinion Alex Wallace.
I will try to use your suggestion to solve my problem.
Do you have any example how can I do it?

Thanks a lot!
thumbnail
14年前 に Alex Wallace によって更新されました。

RE: What Framework should I use to replace the Icefaces in Liferay?

Liferay Master 投稿: 640 参加年月日: 07/11/05 最新の投稿
To use the connection monitor, which suppresses the 'Session Expired' popup, all you need to do is include the following in your jspx/xhtml:

<ice:outputConnectionStatus />

You can set style for the different states it has...

As far as a lifecycle listener to keep the session alive with every click, the JavaScript code you execute from it depends on your version of liferay... A lifecycle listener is registerd in faces-config.xml which references a class that implements a certain interface... The info on how to do this is readily available on the net... I can still provide my examples if this is what you are after.

This doesn't completly remove the issue completly, but it helps us to a point that we have fortunately not heard complains so far. (fingers crossed)

Hope this helps!
thumbnail
14年前 に Stanley Kurtz Matias de Lima によって更新されました。

RE: What Framework should I use to replace the Icefaces in Liferay?

New Member 投稿: 17 参加年月日: 09/10/08 最新の投稿
Thanks for your help Alex Wallace!

I'll try to do what you said. But, if you can send me your examples I'll be grateful.

Thanks a lot! emoticon
thumbnail
14年前 に Deryk Sinotte によって更新されました。

RE: What Framework should I use to replace the Icefaces in Liferay?

New Member 投稿: 18 参加年月日: 07/08/07 最新の投稿
Thanks for opening a JIRA in our tracking system:

Liferay and Icefaces - User Session Expired

I've responded and made some suggestions in that case.
thumbnail
14年前 に Stanley Kurtz Matias de Lima によって更新されました。

RE: What Framework should I use to replace the Icefaces in Liferay?

New Member 投稿: 17 参加年月日: 09/10/08 最新の投稿
Thanks for your attention Deryk!

I will try to follow their suggestions as well.

Thank you! emoticon
thumbnail
14年前 に Alex Wallace によって更新されました。

RE: What Framework should I use to replace the Icefaces in Liferay?

Liferay Master 投稿: 640 参加年月日: 07/11/05 最新の投稿
A phase listener is registered in faces-config.xml like this:


    <lifecycle>
        <phase-listener>com.whatever.icefaces.lifecycle.LiferaySessionKeepAlive</phase-listener>
    </lifecycle>


My class looks like this:


public class LiferaySessionKeepAlive implements PhaseListener {

    /**                                                                                                                                                                       
     * Script to keep the liferay session alive while only ajax requests are being performed                                                                                  
     * closes the warning box if necessary.                                                                                                                                   
     */
    private final static String KEEP_ALIVE_SCRIPT = new StringBuffer().append(" try { if ('noWarning' == sessionRenewAtWarning()) { sessionRenew(); } } catch(e) {} ").toString();

    @Override
    public void afterPhase(PhaseEvent event) {
        JavascriptContext.addJavascriptCall(FacesContext.getCurrentInstance(), KEEP_ALIVE_SCRIPT);
    }

    @Override
    public void beforePhase(PhaseEvent event) {
    }

    @Override
    public PhaseId getPhaseId() {
        return PhaseId.RENDER_RESPONSE;
    }
}


the KEEP_ALIVE_SCRIPT calls a function that I have defined in an override in ext/ext-web/docroot/html/common/themes/session_timeout.jsp, but you can put it elsewhere :



                                // Renews the session only if the session expiring warning is shown.
                                // By finding the warning box, and clicking it's Extend button
                                // Returns true if an Extend was issued, false otherwise.
                                function sessionRenewAtWarning(){
                                    var jqryWarn = new jQuery;
                                    var warnElm = jqryWarn.find('.popup-alert-notice');
                                    if (warnElm.length &gt; 0) {
                                        // Match content of warning with session expiration warning language
                                        if (Liferay.Language.get('warning-your-session-will-expire').indexOf(warnElm[0].firstChild.nodeValue) == 0) {
                                            // click the extend button
                                            warnElm.find('.popup-alert-close').click();
                                            return true;
                                        }
                                    }
                                    return "noWarning";
                                }


                                // Renews the session and resets the client timer
                                function sessionRenew() {
                                    if (Liferay.Session._stateCheck) {
                                        window.clearTimeout(Liferay.Session._stateCheck);
                                        Liferay.Session._stateCheck = null;
                                    }
                                    Liferay.Session.init(
                                    {
                                        autoExtend: &lt;%= PropsValues.SESSION_TIMEOUT_AUTO_EXTEND %&gt;,
                                        timeout: &lt;%= sessionTimeout %&gt;,
                                        timeoutWarning: &lt;%= sessionTimeoutWarning %&gt;,
                                        redirectOnExpiration: &lt;%= PropsValues.SESSION_TIMEOUT_REDIRECT_ON_EXPIRE %&gt;
                                    }
                                    );
                                    jQuery.ajax(
                                    {
                                        url: Liferay.Session._sessionUrls.extend
                                    }
                                    );
                                }


There it is... Hope it helps...
thumbnail
14年前 に Victor Zorin によって更新されました。

RE: What Framework should I use to replace the Icefaces in Liferay?

Liferay Legend 投稿: 1228 参加年月日: 08/04/14 最新の投稿
Thanks Deryk
Would be also great to learn about possible security implications when using Icefaces within Liferay portal specifically.

Looking into html code produced by Icefaces portlet and seeing iframe html tags is very discouraging. From our point of view, session timeout is not really an issue, as it can be easily hidden from user, it is an indication of very loose bridging, that produces several sessions with own non-correlated lifespans and unrelated processing action chains. Iframes and security around them are also implemented differently by browsers. May be someone with fundamental Icefaces knowledge can come up with a different, much tighter, way of integration with the portal container.

Does IceFaces Portlet pass all requests through Liferay authentication/authorization framework?; or it is better, for the time being, to consider this framework as a stand-alone web application running on the same webapp server? This way developers will be implicitly made aware about the need to allocate additional effort and money towards cross-app integration and security.
thumbnail
14年前 に Alex Wallace によって更新されました。

RE: What Framework should I use to replace the Icefaces in Liferay?

Liferay Master 投稿: 640 参加年月日: 07/11/05 最新の投稿
Hi Victor!

I would not say that IceFaces is a stand alone app because I can use all the Liferay Services, and I can get a handle on ThemeDisplay and PortletDisplay and everything else they provide. My portlet presence and decorations are controlled by the poral permissions.

I know who is logged and can check their roles, permissions, etc. I know who owns the portlet and the layout and thus can make decisions at the UI and code level, in the bean and in the services, on who can do what...

Now, I know I'm not talking to a newbie, so I'm sure I could be missing something... Could you elaborate a bit on a use case in which the above mentioned artifacts don't work security wise?

Thanks!
thumbnail
14年前 に Victor Zorin によって更新されました。

RE: What Framework should I use to replace the Icefaces in Liferay?

Liferay Legend 投稿: 1228 参加年月日: 08/04/14 最新の投稿
Hi Alex
It is very comforting to hear that someone is successfully using these portlets in a commercial environment.
No, I do not have IceFaces experience, had to get into it due to issues experienced by several clients. We still have to make a detailed analysis of code including session handling, will report in a forum if any critical issues are found.