Forums de discussion
liferay-ui tags in liferay faces
Muhammed Shafeek V, modifié il y a 10 années.
liferay-ui tags in liferay faces
Regular Member Publications: 140 Date d'inscription: 22/07/13 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.
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, modifié il y a 10 années.
RE: liferay-ui tags in liferay faces
Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 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:
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
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)
That is a very typical/normal technology stack that other developers have been successful with.
Kind Regards,
Neil
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, modifié il y a 10 années.
RE: liferay-ui tags in liferay faces
Regular Member Publications: 140 Date d'inscription: 22/07/13 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.
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, modifié il y a 10 années.
RE: liferay-ui tags in liferay faces
Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 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
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, modifié il y a 10 années.
RE: liferay-ui tags in liferay faces
Regular Member Publications: 140 Date d'inscription: 22/07/13 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.
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, modifié il y a 10 années.
RE: liferay-ui tags in liferay faces
Liferay Legend Publications: 3089 Date d'inscription: 28/10/08 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 :-)
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, modifié il y a 10 années.
RE: liferay-ui tags in liferay faces
Regular Member Publications: 140 Date d'inscription: 22/07/13 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".
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>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..
<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>
Juan Gonzalez, modifié il y a 10 années.
RE: liferay-ui tags in liferay faces
Liferay Legend Publications: 3089 Date d'inscription: 28/10/08 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?
sorry, I can't reproduce. In my case the video elements gets rendered properly.
Can you give the complete stacktrace?
Neil Griffin, modifié il y a 10 années.
RE: liferay-ui tags in liferay faces
Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Here is a parallel post with an answer from Vernon regarding our future support for JSF 2 HTML5 Friendly Markup.