Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
toggle
Muhammed Shafeek V
liferay-ui tags in liferay faces
20 septembre 2013 06:28
Réponse

Muhammed Shafeek V

Rang: Regular Member

Publications: 118

Date d'inscription: 21 juillet 2013

Publications Récentes

Hi,
I am shafeek. Working as a Senior software engineer in small scale firm. We have a project and we decided to do that project in a liferay faces environment. Now I have a requirement that user can able comment like dislike and share content(images , video) which displayed in a our portlet. can someone suggest the ui component for doing these activities please? I know there is liferay-ui:disscussion tag for commenting purpose, but I also here about that liferay faces does't suppot liferay-ui:disscussion tag. Is it right? If it is right, even though the liferay faces project developed by the liferay team they can't able to integrate liferay ui tags , If the fact is like this I am worried. We are using liferay 6.1.1 and + liferay faces + prime faces+ hibenate+ Mysql, is it a right decision? I need a sincere reply and sorry for my language.
Thanks in Advance.
Neil Griffin
RE: liferay-ui tags in liferay faces
30 septembre 2013 12:00
Réponse

Neil Griffin

LIFERAY STAFF

Rang: Liferay Legend

Publications: 2041

Date d'inscription: 26 juillet 2005

Publications Récentes

Hi Shafeek,

Thanks for using Liferay Portal and Liferay Faces. I'll try to provide you with some answers to your questions:

If it is right, even though the liferay faces project developed by the liferay team they can't able to integrate liferay ui tags , If the fact is like this I am worried.


The Liferay Faces project is maturing and we plan on adding Facelet equivalents of various liferay-ui: JSP component tags. Our VDLDocs provide a list of components that we currently have implemented but we don't have liferay-ui:discussion yet. The task would basically involve creating a Facelet composite component equivalent of liferay-portal /portal-web/docroot/html/taglib/ui/discussion/page.jsp

Now I have a requirement that user can able comment like dislike and share content(images , video) which displayed in a our portlet. can someone suggest the ui component for doing these activities please?


Since you are using PrimeFaces, I would recommend that you use a combination of the following:

- p:rating
- p:inputTextarea or liferay-ui:input-editor
- ui:repeat (for iterating over existing threaded discussion entries)

We are using liferay 6.1.1 and + liferay faces + prime faces+ hibenate+ Mysql, is it a right decision?


That is a very typical/normal technology stack that other developers have been successful with.

Kind Regards,

Neil
Muhammed Shafeek V
RE: liferay-ui tags in liferay faces
6 octobre 2013 23:10
Réponse

Muhammed Shafeek V

Rang: Regular Member

Publications: 118

Date d'inscription: 21 juillet 2013

Publications Récentes

Hi Neil,
Thanks for your reply. I think liferay:ui tags are inevitable part of liferay development.

http://www.whitebyte.info/programming/introduction-into-commentbox

https://github.com/nickrussler/commentbox

Please go through above links, If these things help you for developing discussion tag that will be great pleasure to me. Of course, If I have that much of comfort in contributing liferay faces I will make a try. But unfortunately I don't have that much of experience in liferay faces.


Sincerly,
Shafeek.
Neil Griffin
RE: liferay-ui tags in liferay faces
7 octobre 2013 12:21
Réponse

Neil Griffin

LIFERAY STAFF

Rang: Liferay Legend

Publications: 2041

Date d'inscription: 26 juillet 2005

Publications Récentes

Hi Shafeek,

The commentbox project looks very nice. Thanks for pointing that out and for your willingness to help. We hope to start a development sprint in early 2014 at which time we will be able to prioritize development for Facelet versions of liferay-ui components. Please click on the "watch" link in JIRA for FACES-1762 to follow the status of liferay-ui:discussion.

Kind Regards,

Neil
Muhammed Shafeek V
RE: liferay-ui tags in liferay faces
22 octobre 2013 03:27
Réponse

Muhammed Shafeek V

Rang: Regular Member

Publications: 118

Date d'inscription: 21 juillet 2013

Publications Récentes

Hi Neil,
In my project I have requirement to play videos. So we want a video player like youtube have. I know there are some html5 opensource project for playing videos. And also jsf 2.2 supports html5 tags(<video>). But now I realized that liferay faces does,t support html5. Now I am literally stuck up. Help me to solve my problem...

Thank in Advance,
Shafeek.
Juan Gonzalez
RE: liferay-ui tags in liferay faces
24 octobre 2013 01:52
Réponse

Juan Gonzalez

LIFERAY STAFF

Rang: Liferay Legend

Publications: 1865

Date d'inscription: 28 octobre 2008

Publications Récentes

From my point of view you have three options:

1-Write the HTML5 elements and replace the values with EL expressions.
2-Write a custom JSF component to render the video markup linked to your "dynamic" video URL/thumbnail (using Expression Language).
3-Use JSF 2.2 html5 passthrough attributes in <video> and <source> elements, so you can create dynamic video/thumbnail URL using "normal" Expression Language. I didn't test this but should work.

From 6.1 you can enable Xuggler so Liferay creates a multibrowser video file that would be reproducible using HTML5 <video> element or flash player:

https://www.liferay.com/es/community/wiki/-/wiki/Main/Preview+Generation#section-Preview+Generation-Audio+and+Video+Previews

You can use this URLs for your <video> and <source> elements.

From 6.2 you can use a new feature which lets you add a video in a web content using CKEditor, so probably you can use <liferay-ui:input-editor> and then render the web content as is.

As you can see, there are some options :-)
Muhammed Shafeek V
RE: liferay-ui tags in liferay faces
23 octobre 2013 22:49
Réponse

Muhammed Shafeek V

Rang: Regular Member

Publications: 118

Date d'inscription: 21 juillet 2013

Publications Récentes

Hi Juan,
First upon thank you for you replay. As you said I had user html5 video tag in my liferayfaces portlet, at that time I got an exception which says that "java.lang.UnsupportedOperationException".
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough">
<h:head>
<title>JSF 2.2</title>

<!-- Chang URLs to wherever Video.js files will be hosted -->
<link href="${renderRequest.contextPath}/css/video-js.css"
rel="stylesheet" type="text/css"></link>
<!-- video.js must be in the <head> for older IEs to work. -->
<script src="${renderRequest.contextPath}/js/video.js"></script>

<!-- Unless using the CDN hosted version, update the URL to the Flash SWF -->
<script>
videojs.options.flash.swf = "video-js.swf";
</script>
</h:head>
<h:body>

<h:form id="form">
<video id="example_video_1" class="video-js vjs-default-skin"
controls="controls" preload="none" width="640" height="264"
poster="http://video-js.zencoder.com/oceans-clip.png" data-setup="{}">
<source src="#{player.url}" type='video/mp4' />

<track kind="captions"
src="${renderRequest.contextPath}/css/demo.captions.vtt"
srclang="en" label="English"></track>
<!-- Tracks need an ending tag thanks to IE9 -->
</video>




</h:form>
</h:body>
</html>
that is my xhtml file and I am using liferay 6.1.1 and latest liferay faces jars like liferay-faces-bridge-api-3.1.3-ga4.jar,liferay-faces-bridge-impl-3.1.3-ga4.jar and so on..
Juan Gonzalez
RE: liferay-ui tags in liferay faces
24 octobre 2013 01:51
Réponse

Juan Gonzalez

LIFERAY STAFF

Rang: Liferay Legend

Publications: 1865

Date d'inscription: 28 octobre 2008

Publications Récentes

Hi Muhammed,

sorry, I can't reproduce. In my case the video elements gets rendered properly.

Can you give the complete stacktrace?
Neil Griffin
RE: liferay-ui tags in liferay faces
24 octobre 2013 13:56
Réponse

Neil Griffin

LIFERAY STAFF

Rang: Liferay Legend

Publications: 2041

Date d'inscription: 26 juillet 2005

Publications Récentes

Here is a parallel post with an answer from Vernon regarding our future support for JSF 2 HTML5 Friendly Markup.