Forums

Home » Liferay Portal » English » Liferay Legacy »

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Anyone successfuly run a Flex Portlet? Anand Pikle October 1, 2007 6:34 PM
RE: Anyone successfuly run a Flex Portlet? Eduardo Arizcuren January 31, 2008 1:44 PM
RE: Anyone successfuly run a Flex Portlet? amal lehiani April 23, 2008 1:00 AM
RE: Anyone successfuly run a Flex Portlet? Dan Sobotincic April 23, 2008 5:28 AM
RE: Anyone successfuly run a Flex Portlet? amal lehiani April 24, 2008 4:38 AM
RE: Anyone successfuly run a Flex Portlet? amal lehiani April 25, 2008 12:30 AM
RE: Anyone successfuly run a Flex Portlet? Nguyễn Sinh Thành May 13, 2008 8:44 PM
RE: Anyone successfuly run a Flex Portlet? Dan Sobotincic June 7, 2008 9:06 AM
RE: Anyone successfuly run a Flex Portlet? Francois Andry November 17, 2008 9:31 AM
RE: Anyone successfuly run a Flex Portlet scott shealy November 17, 2008 12:39 PM
RE: Anyone successfuly run a Flex Portlet Francois Andry November 19, 2008 3:42 PM
RE: Anyone successfuly run a Flex Portlet? 24kelly 24kelly 24kelly November 19, 2008 7:45 AM
RE: Anyone successfuly run a Flex Portlet? Francois Andry November 20, 2008 8:47 AM
RE: Anyone successfuly run a Flex Portlet? Paul Timothy Preiss February 7, 2009 12:33 PM
RE: Anyone successfuly run a Flex Portlet? Richard Knight March 16, 2009 2:13 PM
RE: Anyone successfuly run a Flex Portlet? Zoltan Kutasi March 26, 2009 5:13 AM
RE: Anyone successfuly run a Flex Portlet? Jonas Yuan May 22, 2009 12:18 PM
RE: Anyone successfuly run a Flex Portlet? Jonas Yuan May 22, 2009 12:25 PM
RE: Anyone successfuly run a Flex Portlet? Richard Knight June 13, 2009 9:01 AM
RE: Anyone successfuly run a Flex Portlet? Jonas Yuan July 16, 2009 6:27 AM
RE: Anyone successfuly run a Flex Portlet? Smilelws2010 lwz February 24, 2011 10:49 AM
RE: Anyone successfuly run a Flex Portlet? Pankaj Sinha May 12, 2010 9:37 PM
RE: Anyone successfuly run a Flex Portlet? Pankaj Sinha May 20, 2010 4:42 AM
RE: Anyone successfuly run a Flex Portlet? New ToLiferay September 8, 2010 9:29 AM
RE: Anyone successfuly run a Flex Portlet? Smilelws2010 lwz February 24, 2011 10:48 AM
Anand Pikle
Anyone successfuly run a Flex Portlet?
October 1, 2007 6:34 PM
Answer

Anand Pikle

Rank: New Member

Posts: 1

Join Date: October 1, 2007

Recent Posts

I am evaluating the Liferay Portal, and Flex application support is one of the key criteria for success. While I have been able to success get a JSP/Struts portlet up and running, my flex web application (deployed as a JSP) runs independently but not as a portlet. The portal page just hangs and refuses to load completely. I cannot get anything useful from the logs.

If anyone has any working test code or pointers they can share, that will be greatly helpful!!

Thanks in advance!!

Anand
Eduardo Arizcuren
RE: Anyone successfuly run a Flex Portlet?
January 31, 2008 1:44 PM
Answer

Eduardo Arizcuren

Rank: New Member

Posts: 3

Join Date: October 16, 2007

Recent Posts

Hi,

if you only want to run precompiled flex applications with no remoting objects it is very eassy. Build a flash portlet and you have it; for instance you can build a JspPortlet with object and embed tags pointing to swf file url. You may code some lines to have flash respond to maximized, minimized portlet state.

If what you want is to have flex applications compiled on the fly and consume data from remote objects, you shoud have to use a flex data services framework. There are a few like Adobe lifecycle data services, BalzeDS, GraniteDS, Red5.

If you like to use Adobe lifecycle data services there is something done for you. You can have a look to Adobe lifecycle data services developer's guide in the paragraph: Integrating Flex Applications with Portal Servers.

Adobe lifecycle data services developers guide: integrating flex applications with portal servers

They provide a way to have a custom JspPortlet with on the fly compilation.

But unfortunately, it is not a complete solution, they have not provide a way to set a remote object in portlet-session scope or portlet-request scope, so if you define a remote object as session scope it will be accesible for every portlet who shares servlet session.

If you have problems with Adobe LCDS solution you can ask me.

Anyway, I encourage people with experience in flex applications embedded in portlets consuming remote objects to share his knowledge with us.

PD: it seems that flex is a kind of tabu in portal's world.
amal lehiani
RE: Anyone successfuly run a Flex Portlet?
April 23, 2008 1:00 AM
Answer

amal lehiani

Rank: New Member

Posts: 3

Join Date: April 23, 2008

Recent Posts

Hi

I've developed a simple flex portlet (I'm using flex 3)
(http://www.adobe. com/devnet/ flex/articles/ flex_portals_ 05.html)

But it didn't work on Liferay 4.4.2

If someone has a flex portlet working on liferay
Please send me.

Thanks in advance
Dan Sobotincic
RE: Anyone successfuly run a Flex Portlet?
April 23, 2008 5:28 AM
Answer

Dan Sobotincic

Rank: New Member

Posts: 10

Join Date: July 24, 2007

Recent Posts

I recently was able to get a couple of Flex3 applications working and deployed as a portlet on 4.3.3 (they should work fine on 4.4.2) as well. One is a stand alone Flex app with no data services and the other is a simple RSS one that uses the open source BlazeDS to call a public web service and display news items. The only issue I have is that when you move around portal and come back to a page that has the flex app, it always reloads the flex app and reinitializes it.

I was planning to document the portlets and either put them up on my site and/or donate them to the community here. However, in the meantime if you let me know exactly what errors you are getting I should be able to help.

By the way, I found that I had to download and use the swfobject to embed the flex application inside the portlet. It is a great library and can be found at: http://code.google.com/p/swfobject

Let me know if I can help.
Thanks.
amal lehiani
RE: Anyone successfuly run a Flex Portlet?
April 24, 2008 4:38 AM
Answer

amal lehiani

Rank: New Member

Posts: 3

Join Date: April 23, 2008

Recent Posts

Hi

I'm working with the ext environment
I've added the flex ant lib folders from "lcds" to \ext\txt-web\docroot\WEB-INF
and I've changed my web.xml like this

<?xml version="1.0"?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">

<display-name>LiveCycle Data Services Samples</display-name>

<context-param>
<param-name>flex.class.path</param-name>
<param-value>/WEB-INF/flex/hotfixes,/WEB-INF/flex/jars</param-value>
</context-param>


<!-- Http Flex Session attribute and binding listener support -->
<listener>
<listener-class>flex.messaging.HttpFlexSession</listener-class>
</listener>

<!-- Http Flex Session attribute and binding listener support -->
<listener>
<listener-class>flex.messaging.HttpFlexSession</listener-class>
</listener>

<!-- MessageBroker Servlet -->
<servlet>
<servlet-name>MessageBrokerServlet</servlet-name>
<display-name>MessageBrokerServlet</display-name>
<servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
<init-param>
<param-name>services.configuration.file</param-name>
<param-value>/WEB-INF/flex/services-config.xml</param-value>
</init-param>
<init-param>
<param-name>flex.write.path</param-name>
<param-value>/WEB-INF/flex</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet>
<servlet-name>FlexMxmlServlet</servlet-name>
<display-name>MXML Processor</display-name>
<description>Servlet wrapper for the Mxml Compiler</description>
<servlet-class>flex.bootstrap.BootstrapServlet</servlet-class>
<init-param>
<param-name>servlet.class</param-name>
<param-value>flex.webtier.server.j2ee.MxmlServlet</param-value>
</init-param>
<init-param>
<param-name>webtier.configuration.file</param-name>
<param-value>/WEB-INF/flex/flex-webtier-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet>
<servlet-name>FlexSwfServlet</servlet-name>
<display-name>SWF Retriever</display-name>
<servlet-class>flex.bootstrap.BootstrapServlet</servlet-class>
<init-param>
<param-name>servlet.class</param-name>
<param-value>flex.webtier.server.j2ee.SwfServlet</param-value>
</init-param>
<!-- SwfServlet must be initialized after MxmlServlet -->
<load-on-startup>2</load-on-startup>
</servlet>

<servlet>
<servlet-name>FlexForbiddenServlet</servlet-name>
<display-name>Prevents access to *.as/*.swc files</display-name>
<servlet-class>flex.bootstrap.BootstrapServlet</servlet-class>
<init-param>
<param-name>servlet.class</param-name>
<param-value>flex.webtier.server.j2ee.ForbiddenServlet</param-value>
</init-param>
</servlet>

<servlet>
<servlet-name>FlexInternalServlet</servlet-name>
<servlet-class>flex.bootstrap.BootstrapServlet</servlet-class>
<init-param>
<param-name>servlet.class</param-name>
<param-value>flex.webtier.server.j2ee.filemanager.FileManagerServlet</param-value>
</init-param>
<load-on-startup>10</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>MessageBrokerServlet</servlet-name>
<url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>FlexMxmlServlet</servlet-name>
<url-pattern>*.mxml</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>FlexSwfServlet</servlet-name>
<url-pattern>*.swf</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>FlexForbiddenServlet</servlet-name>
<url-pattern>*.as</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>FlexForbiddenServlet</servlet-name>
<url-pattern>*.swc</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>FlexInternalServlet</servlet-name>
<url-pattern>/flex-internal/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
<jsp-config>
<taglib>
<taglib-uri>FlexTagLib</taglib-uri>
<taglib-location>/WEB-INF/lib/flex-bootstrap-jsp.jar</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/portlet</taglib-uri>
<taglib-location>/WEB-INF/tld/liferay-portlet.tld</taglib-location>
</taglib>
</jsp-config>

</web-app>



There are no errors when I start tomcat
but the flex part of my portlet didn't appear

Thanks.
amal lehiani
RE: Anyone successfuly run a Flex Portlet?
April 25, 2008 12:30 AM
Answer

amal lehiani

Rank: New Member

Posts: 3

Join Date: April 23, 2008

Recent Posts

Hi

how to configure liferay for flex portlet :what are all the jars and packages necessary .

Thanks
Nguyễn Sinh Thành
RE: Anyone successfuly run a Flex Portlet?
May 13, 2008 8:44 PM
Answer

Nguyễn Sinh Thành

Rank: New Member

Posts: 8

Join Date: April 28, 2006

Recent Posts

Hi all.
I want to embed MXML code into JSP file. Please tell me how to declare . I'm developing a flex portlet but I had a problem: I added flex-bootstrap.jar lib in to /WEB-INF/lib folder and I had error: Current URL /web/guest/home generates exception: Unable to read TLD "META-INF/taglib.tld" from JAR file "file:/C:/cvsroot/lportal/ext/servers/tomcat/webapps/ROOT/WEB-INF/lib/flex-bootstrap.jar": java.lang.NullPointerException.
taglib.tld is missing. Where can I download it?

Please help me. Thank you very much.
Dan Sobotincic
RE: Anyone successfuly run a Flex Portlet?
June 7, 2008 9:06 AM
Answer

Dan Sobotincic

Rank: New Member

Posts: 10

Join Date: July 24, 2007

Recent Posts

I have been able to embed a Flex swf file in a liferay portlet by using a library called SWFObject. Once you download the jar and put it into your jsp based portlet project I modify the view.jsp based on the documentation from SWF. It looks like:

<script type="text/javascript"
jQuery(
funtion() {
var so = new SWFObject("myswf.swf","MySWF","100%","700","7");
so.addParam("loo","true");
/* there is a bunch more addParam calls you can put here */
so.write("mycontent");
}
);
</script>

The only issue I still have is that everytime I navigate between portal pages it restarts my flex application. Anyone else figure that one out?
Francois Andry
RE: Anyone successfuly run a Flex Portlet?
November 17, 2008 9:31 AM
Answer

Francois Andry

Rank: New Member

Posts: 6

Join Date: November 12, 2008

Recent Posts

On my Blog (http://fandry.blogspot.com), I have posted the steps necessary to create a Liferay Portlet with BlazeDS.
The Portlet access a public Web Service. I am using BlazeDS as a proxy for WebService access, but the configuration would work also for RPC/AMF, Messaging and HttpService data access.

The blog post URL is: http://fandry.blogspot.com/2008/11/liferay-portlets-using-blazeds.html

-Francois
scott shealy
RE: Anyone successfuly run a Flex Portlet
November 17, 2008 12:39 PM
Answer

scott shealy

Rank: New Member

Posts: 2

Join Date: December 12, 2007

Recent Posts

So does anyone know if it is possible to prevent the flex/flash app from reloading between portal navigations?

TIA.
S.
24kelly 24kelly 24kelly
RE: Anyone successfuly run a Flex Portlet?
November 19, 2008 7:45 AM
Answer

24kelly 24kelly 24kelly

Rank: New Member

Posts: 3

Join Date: October 1, 2008

Recent Posts

This blog is great, i sucessful integrated the flex portlet into liferay.

How can i read/acess the userid of the Liferay user in the flex mxml?
Francois Andry
RE: Anyone successfuly run a Flex Portlet
November 19, 2008 3:42 PM
Answer

Francois Andry

Rank: New Member

Posts: 6

Join Date: November 12, 2008

Recent Posts

Flex Application (*.swf) refreshing is not specific to portal technology. Anytime a user refresh the page of the browser,
the flex application will be refreshed. What you will need it to store the state of your application (every fields/states) in a
shared object (e.g. discussion on the subject).

If performance issues linked to shockwave files refresh are potenitally an issue for your application, you could consider using Ajax (via jquery which is part of Liferay) instead.
Francois Andry
RE: Anyone successfuly run a Flex Portlet?
November 20, 2008 8:47 AM
Answer

Francois Andry

Rank: New Member

Posts: 6

Join Date: November 12, 2008

Recent Posts

A good place to look at Personalization in Liferay is this LR forum/post post on getting User Attributes.

-Francois
Paul Timothy Preiss
RE: Anyone successfuly run a Flex Portlet?
February 7, 2009 12:33 PM
Answer

Paul Timothy Preiss

Rank: New Member

Posts: 3

Join Date: September 17, 2008

Recent Posts

We have very successfully integrated Flex and Liferay using BlazeDS using AMF ( not a fan of webservice speeds). You can check out one of the portlets at www.iasahome.org/web/home/repo.

The integration was very easy to implement and we plan to add full service builder support for it to our own implementation (sorry we cant share the code) but will be happy to help anyone wishing to do this successfully.
Richard Knight
RE: Anyone successfuly run a Flex Portlet?
March 16, 2009 2:13 PM
Answer

Richard Knight

Rank: New Member

Posts: 4

Join Date: March 16, 2009

Recent Posts

We (www.portletoasis.com) have successfully been able to create Flex portlets using GraniteDs (AMF channel) in Liferay. The great
thing about GraniteDs is that you can consume hibernate objects (annotated with EJB 3.0 annotations)
and fetch both eager/lazy associations from Flex. You also have the option of using Adobe LCDS on
a multi-core cpu server without charge; however, GraniteDs provides Seam integration as well
as Acegi Security.
Zoltan Kutasi
RE: Anyone successfuly run a Flex Portlet?
March 26, 2009 5:13 AM
Answer

Zoltan Kutasi

Rank: New Member

Posts: 5

Join Date: October 28, 2008

Recent Posts

HI

I'm in the middle of a project, where I have to implement a reporting tool in Liferay with Flex and Granite.

The mayor problem is, that I have to do some authorization.
The preferred choice is, that when a user logs in to liferay, he can view this Flex Portlet, and I need to set up the UI with the account information. But I cannot get the actual logged-in user info from the FLex app. With Granite, I initiated a RemoteObject call, and on the Java side I can get the HTTPRequest, and Session (through GraniteContext), but those ones are not helping me, they're different types (the request is org.apache.catalina.connector.RequestFacade, or something). If I call the getRemoteUser with them, I always get null, but of course on the JSP wrapper, it works, because I believe the Portal specially made the request object that way from the original request, and basically, when I stdout the request and session content, I can see, they are totaly different (cookies are mostly the same though).

Either I need to get the correct servletRequest/portletRequest, which contains the appropriate info, or I need to write a huge amount of code, to create this with granite rather than getting the Tomcat object.


So, how could I obtain the logged in user with preferabbly a RemoteObject call ? Would it work with a HTTPService call (to a servlet, or JSP, and return the data back with XML)?


Bear in mind, I have very short knowledge in LifeRay, and I started to work in Flex & GraniteDS in February.
Using liferay-portal-tomcat-6.0-5.0.1, Flex3.0, and Granite 1.2.0


Thanks
Kutasi Zoltan
Jonas Yuan
RE: Anyone successfuly run a Flex Portlet?
May 22, 2009 12:18 PM
Answer

Jonas Yuan

Rank: Liferay Master

Posts: 937

Join Date: April 26, 2007

Recent Posts

Hi Zoltan,

The project ( liferay-portal-tomcat, Flex 3.0, and Granite 1.2.0) is interesting. Could you please give us any updates on your current project. I guess many projects will benefit a lot from your current project.

Thanks

Jonas Yuan
Jonas Yuan
RE: Anyone successfuly run a Flex Portlet?
May 22, 2009 12:25 PM
Answer

Jonas Yuan

Rank: Liferay Master

Posts: 937

Join Date: April 26, 2007

Recent Posts

Hi Richard,

Thank you. Where can we find your Flex portlets? It would be nice that you could share these Flex portlets.

Thanks

Jonas Yuan
Richard Knight
RE: Anyone successfuly run a Flex Portlet?
June 13, 2009 9:01 AM
Answer

Richard Knight

Rank: New Member

Posts: 4

Join Date: March 16, 2009

Recent Posts

Hello,

I apologize for taking so long to respond. As it turns out, there has been a tremendous amount of progress made in ironing out the various nuances in Flex portlet development. We've come up with 2 primary courses examining how the portlet 168 and 286 specifications intersect with using Flex to create portlets. The classes will be offered in July/August. Here is a brief rundown:

Essential Flex Portlet Development (online)
- Portlet Architecture & a Hello World Flex Portlet
- User profile information & Portlet Preferences
- Standard Role-Based Portlet Security
- Using the Flex webtier compiler for dynamic content
- Accessing Liferay's SOAP services with JSR 286 features
- "serveResource" method, action urls, etc.
- Portlet Communication: session-information and public shared render parameters.
- JSR 286 portlet events

Advanced Flex Portlet Development (onsite, scheduleable)
- Fine-grained Portlet permissions with Liferay APIs
- Integrating Liferay's Spring services with Flex
- Advanced AJAX-based portlet communication with Flex-Flex portlets / Flex-other types of portlets
- Advanced server&client-side portlet communication with BlazeDs / Java.
- Spring & EJB 3.0 (lazy-init) integration using GraniteDs.

Note: This last approach allows for Flex-data binding, deeply nested object access in Flex, and first-class
Flex classes generated from Java classes.

Both classes will give a survey of various approaches to security, data-access, data-sharing, portlet preferences, etc. In general, the portlet-compliant case is examined first, then special attention is given to Liferay-specific approaches/APIs. You should be able
to walk away with a toolbox of approaches and boiler-plate code to accomplish various tasks. You should also have an idea of a suitable approach to use for your specific situation.

Thanks,
Richard
www.portletoasis.com
Jonas Yuan
RE: Anyone successfuly run a Flex Portlet?
July 16, 2009 6:27 AM
Answer

Jonas Yuan

Rank: Liferay Master

Posts: 937

Join Date: April 26, 2007

Recent Posts

Hi Richard

Thank you so much!

Flex portlet looks good. Do you have any example for demo? Can I download your flex portlets and hot-deploy them in Liferay portal?

Thanks

Jonas Yuan
-----------------
Liferay Books
Liferay Portal 5.2/5.3 Systems Development
Liferay Portal 4.4/5.0 Enterprise Intranets
Pankaj Sinha
RE: Anyone successfuly run a Flex Portlet?
May 12, 2010 9:37 PM
Answer

Pankaj Sinha

Rank: Junior Member

Posts: 29

Join Date: April 26, 2010

Recent Posts

I need ur help...
i have been trying to integrate flex app as portlet in liferay for last so many days, but could't find any solution to it except that embedding a swf file to the jsp page...i was successful in that, but that didn't serve my perpose..i want two or three flex based portlet in a page communicating with each other...

making the page as embedded and giving link to a html page will also not work as in this case only 1 portlet can be there in a page....

Please help....
Pankaj Sinha
RE: Anyone successfuly run a Flex Portlet?
May 20, 2010 4:42 AM
Answer

Pankaj Sinha

Rank: Junior Member

Posts: 29

Join Date: April 26, 2010

Recent Posts

Hi All,
I was successful in writing inline flex code in jsp file, that is, instead of embeddign .swf file, writing flex codes in view.jsp file served my purpose...

Thanx & regards,
Pankaj
New ToLiferay
RE: Anyone successfuly run a Flex Portlet?
September 8, 2010 9:29 AM
Answer

New ToLiferay

Rank: New Member

Posts: 8

Join Date: August 16, 2010

Recent Posts

Could you please provide a sample demo to write flex into the jsp?

Thanks for you time.
Smilelws2010 lwz
RE: Anyone successfuly run a Flex Portlet?
February 24, 2011 10:48 AM
Answer

Smilelws2010 lwz

Rank: Junior Member

Posts: 86

Join Date: December 16, 2010

Recent Posts

hey Pankaj,

I would like to know more about incorporating flex in liferay,

Can you document the steps to write flex in jsp here so that it will be helpful for al of us here.

Regards
Smilelws2010 lwz
RE: Anyone successfuly run a Flex Portlet?
February 24, 2011 10:49 AM
Answer

Smilelws2010 lwz

Rank: Junior Member

Posts: 86

Join Date: December 16, 2010

Recent Posts

Jonas,

Did you get to work with flex and liferay, If so can you write a wiki or document the steps here so that every one can benefit from the same.

Thanks