Jonas X. Yuan 13 Anos atrás Nice feature! Thanks a lot, Ray! Por favor, autentique-se para votar. Responda como... Cancelar
Joseph Toman 13 Anos atrás Thanks for getting this up so quickly. So,... If instead of a Velocity template we were working in XSL could we accomplish the same thing? I'm not so much interested in the generic XSL required, but the way an XSL template interacts with the Liferay environment. For instance the Velocity template above depends on a lot of Java objects, are those all available if you use XSL ? If so, how do you get access to them (and their methods)? Thanks again, it was a good talk. Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Joseph Toman 13 Anos atrás You can access all the same things from XSL. You just have to know your way around the xalan java language support. Por favor, autentique-se para votar. Responda como... Cancelar Joseph Toman Ray Augé 13 Anos atrás Thanks. I had not found any documentation on this previously, but know that I know Liferay is using Xalan, a number of articles pop up when I do a search on that term. Thanks again. Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Joseph Toman 13 Anos atrás - Editado I added the same template implemented as XSLT for you!It's completely functionally equivalent. Por favor, autentique-se para votar. Responda como... Cancelar Joseph Toman Ray Augé 13 Anos atrás Hey, cool! Thanks, that'll save me a lot of head scratching! Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Joseph Toman 13 Anos atrás - Editado Note that while you're working with XSL, that there is a small bug in the error processing xsl template which causes your template errors to be swallowed up and never made available.copy portal-impl.jar!/com/liferay/portlet/journal/dependencies/error.xsl to your WEB-INF/classes folder (with full path) and remove the $companyId variable of the languageUtil:get method.That will also save you lots of head scratching. Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Joseph Toman 13 Anos atrás You can access all the same things from XSL. You just have to know your way around the xalan java language support. Por favor, autentique-se para votar. Responda como... Cancelar Joseph Toman Ray Augé 13 Anos atrás Thanks. I had not found any documentation on this previously, but know that I know Liferay is using Xalan, a number of articles pop up when I do a search on that term. Thanks again. Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Joseph Toman 13 Anos atrás - Editado I added the same template implemented as XSLT for you!It's completely functionally equivalent. Por favor, autentique-se para votar. Responda como... Cancelar Joseph Toman Ray Augé 13 Anos atrás Hey, cool! Thanks, that'll save me a lot of head scratching! Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Joseph Toman 13 Anos atrás - Editado Note that while you're working with XSL, that there is a small bug in the error processing xsl template which causes your template errors to be swallowed up and never made available.copy portal-impl.jar!/com/liferay/portlet/journal/dependencies/error.xsl to your WEB-INF/classes folder (with full path) and remove the $companyId variable of the languageUtil:get method.That will also save you lots of head scratching. Por favor, autentique-se para votar. Responda como... Cancelar
Joseph Toman Ray Augé 13 Anos atrás Thanks. I had not found any documentation on this previously, but know that I know Liferay is using Xalan, a number of articles pop up when I do a search on that term. Thanks again. Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Joseph Toman 13 Anos atrás - Editado I added the same template implemented as XSLT for you!It's completely functionally equivalent. Por favor, autentique-se para votar. Responda como... Cancelar Joseph Toman Ray Augé 13 Anos atrás Hey, cool! Thanks, that'll save me a lot of head scratching! Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Joseph Toman 13 Anos atrás - Editado Note that while you're working with XSL, that there is a small bug in the error processing xsl template which causes your template errors to be swallowed up and never made available.copy portal-impl.jar!/com/liferay/portlet/journal/dependencies/error.xsl to your WEB-INF/classes folder (with full path) and remove the $companyId variable of the languageUtil:get method.That will also save you lots of head scratching. Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Joseph Toman 13 Anos atrás - Editado I added the same template implemented as XSLT for you!It's completely functionally equivalent. Por favor, autentique-se para votar. Responda como... Cancelar Joseph Toman Ray Augé 13 Anos atrás Hey, cool! Thanks, that'll save me a lot of head scratching! Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Joseph Toman 13 Anos atrás - Editado Note that while you're working with XSL, that there is a small bug in the error processing xsl template which causes your template errors to be swallowed up and never made available.copy portal-impl.jar!/com/liferay/portlet/journal/dependencies/error.xsl to your WEB-INF/classes folder (with full path) and remove the $companyId variable of the languageUtil:get method.That will also save you lots of head scratching. Por favor, autentique-se para votar. Responda como... Cancelar
Joseph Toman Ray Augé 13 Anos atrás Hey, cool! Thanks, that'll save me a lot of head scratching! Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Joseph Toman 13 Anos atrás - Editado Note that while you're working with XSL, that there is a small bug in the error processing xsl template which causes your template errors to be swallowed up and never made available.copy portal-impl.jar!/com/liferay/portlet/journal/dependencies/error.xsl to your WEB-INF/classes folder (with full path) and remove the $companyId variable of the languageUtil:get method.That will also save you lots of head scratching. Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Joseph Toman 13 Anos atrás - Editado Note that while you're working with XSL, that there is a small bug in the error processing xsl template which causes your template errors to be swallowed up and never made available.copy portal-impl.jar!/com/liferay/portlet/journal/dependencies/error.xsl to your WEB-INF/classes folder (with full path) and remove the $companyId variable of the languageUtil:get method.That will also save you lots of head scratching. Por favor, autentique-se para votar. Responda como... Cancelar
Shagul Khajamohideen 13 Anos atrás Nice exercise Ray!!! Por favor, autentique-se para votar. Responda como... Cancelar
Abdelrahman Mohamed El Ghanam 13 Anos atrás Great article .. i will surely try it out .. thanks ray.. Por favor, autentique-se para votar. Responda como... Cancelar
Richard Knight 12 Anos atrás - Editado On this line of thinking with WCM...Like many windows applications having an embedded FileBrowser to pick a file to use in the application, how would you create a custom portlet that uses the existing WCM portlet as a means to create and choose a wcm entry to embed in the custom portlet. Any pointers would be greatly appreciated, since I don't want to recreate the entire functionality of the WCM portlet from scratch. Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Richard Knight 12 Anos atrás The RSS portlet does exactly this using a special tag so you can embed a custom header and/or footer to it. The tag is <liferay-ui:journal-article /> (see the code of the RSS portlet, it's pretty simple. There is also the example in the configuration.jsp on how to make a selection of a WCM article and store it in a preference.) Por favor, autentique-se para votar. Responda como... Cancelar Richard Knight Ray Augé 12 Anos atrás Thanks Ray, you are always so speedy with responses. I'll take a look. Thanks Again! Por favor, autentique-se para votar. Responda como... Cancelar Richard Knight Richard Knight 12 Anos atrás One other question, is there anyway to do the same kind of thing with the Document Library or with the Image Library (File Chooser/Viewer) functionality? Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Richard Knight 12 Anos atrás As soon s I get a chance I'll give an example of this. We don't have any canned examples that I'm aware of, but we should and so I'll make sure to come up with some shortly. Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Richard Knight 12 Anos atrás The RSS portlet does exactly this using a special tag so you can embed a custom header and/or footer to it. The tag is <liferay-ui:journal-article /> (see the code of the RSS portlet, it's pretty simple. There is also the example in the configuration.jsp on how to make a selection of a WCM article and store it in a preference.) Por favor, autentique-se para votar. Responda como... Cancelar Richard Knight Ray Augé 12 Anos atrás Thanks Ray, you are always so speedy with responses. I'll take a look. Thanks Again! Por favor, autentique-se para votar. Responda como... Cancelar Richard Knight Richard Knight 12 Anos atrás One other question, is there anyway to do the same kind of thing with the Document Library or with the Image Library (File Chooser/Viewer) functionality? Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Richard Knight 12 Anos atrás As soon s I get a chance I'll give an example of this. We don't have any canned examples that I'm aware of, but we should and so I'll make sure to come up with some shortly. Por favor, autentique-se para votar. Responda como... Cancelar
Richard Knight Ray Augé 12 Anos atrás Thanks Ray, you are always so speedy with responses. I'll take a look. Thanks Again! Por favor, autentique-se para votar. Responda como... Cancelar Richard Knight Richard Knight 12 Anos atrás One other question, is there anyway to do the same kind of thing with the Document Library or with the Image Library (File Chooser/Viewer) functionality? Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Richard Knight 12 Anos atrás As soon s I get a chance I'll give an example of this. We don't have any canned examples that I'm aware of, but we should and so I'll make sure to come up with some shortly. Por favor, autentique-se para votar. Responda como... Cancelar
Richard Knight Richard Knight 12 Anos atrás One other question, is there anyway to do the same kind of thing with the Document Library or with the Image Library (File Chooser/Viewer) functionality? Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Richard Knight 12 Anos atrás As soon s I get a chance I'll give an example of this. We don't have any canned examples that I'm aware of, but we should and so I'll make sure to come up with some shortly. Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Richard Knight 12 Anos atrás As soon s I get a chance I'll give an example of this. We don't have any canned examples that I'm aware of, but we should and so I'll make sure to come up with some shortly. Por favor, autentique-se para votar. Responda como... Cancelar
Richard Knight 12 Anos atrás - Editado Hey Ray,Have you had a chance to develop any examples for as you spoke of above?....One other question, is there anyway to do the same kind of thing with the Document Library or with the Image Library (File Chooser/Viewer) functionality? Thanks,Richard Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Richard Knight 12 Anos atrás I was trying really hard to actually get this into 6.1 as prepackaged components that you could just use. Unfortunately I did not get to do it.That being said, there is a partial component in 6.1 that could probably be re-purposed as a general solution (which is currently dependent on the control panel). That is the Asset Relation chooser (you can find this in the Related Assets section located in the editors of various assets). It let's you choose from any Asset type to create relations and returns reference information. But if it could be re-worked to specify the types available in particular instance (say limited to doclib references), then it could become very useful.Now, if you're trying to do this in 6.0 or earlier, the best possible examples are those found in the Web Content article editor. You have fields of type Document Library and Image Gallery with associated chooser. These are tied to a particular implementation for that portlet, but they are the best ootb examples that I can think of.Good luck Richard and my apologies for the very late reply! Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Richard Knight 12 Anos atrás I was trying really hard to actually get this into 6.1 as prepackaged components that you could just use. Unfortunately I did not get to do it.That being said, there is a partial component in 6.1 that could probably be re-purposed as a general solution (which is currently dependent on the control panel). That is the Asset Relation chooser (you can find this in the Related Assets section located in the editors of various assets). It let's you choose from any Asset type to create relations and returns reference information. But if it could be re-worked to specify the types available in particular instance (say limited to doclib references), then it could become very useful.Now, if you're trying to do this in 6.0 or earlier, the best possible examples are those found in the Web Content article editor. You have fields of type Document Library and Image Gallery with associated chooser. These are tied to a particular implementation for that portlet, but they are the best ootb examples that I can think of.Good luck Richard and my apologies for the very late reply! Por favor, autentique-se para votar. Responda como... Cancelar
Ismael Ferrer 12 Anos atrás I am developing a war portlet that should allow the user to select a web content and store it in a preference.I'm taking as a model the RSS portlet as you suggested, but rss/select_journal_article.jspf imports asset_publisher/article_search.jsp that uses ArticleSearch and ArticleDisplayTerms classes wich are in portal-impl.jar.Is there a way to make that work without including portal-impl.jar in the portlet war?Thanks! Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Ismael Ferrer 12 Anos atrás Oh! never include portal-impl.jar!Regarding those two classes, I've been meaning to do something like move this into the portal-service.jar. While not an ideal solution, for the short term I would simply take those two java classes and pull them into your plugin. I don't think they have any dependencies that are not already public, except from one small exception that could be solved by taking one method from JournalIUtil and pulling into the ArticleSearch class directly.The long term fix is of course to implement the nice asset choosers we talked about. Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Ismael Ferrer 12 Anos atrás Oh! never include portal-impl.jar!Regarding those two classes, I've been meaning to do something like move this into the portal-service.jar. While not an ideal solution, for the short term I would simply take those two java classes and pull them into your plugin. I don't think they have any dependencies that are not already public, except from one small exception that could be solved by taking one method from JournalIUtil and pulling into the ArticleSearch class directly.The long term fix is of course to implement the nice asset choosers we talked about. Por favor, autentique-se para votar. Responda como... Cancelar
(Você) 12 Anos atrás [...] http://www.liferay.com/web/raymond.auge/blog/-/blogs/advanced-web-content-example-with-ajax... [...] Read More Por favor, autentique-se para votar. Responda como... Cancelar
Francisco A Aranda 12 Anos atrás Great article, I've learned a lot from it. But instead of the webcontent/name attribute, how I do access the webcontent title, not the structure name attribute? Thanks! Por favor, autentique-se para votar. Responda como... Cancelar
Randy Parsons 12 Anos atrás Not sure what I'm doing wrong! I was so hoping this would be the answer to my issue of displaying multiple web content based on the same Structure. I have followed the instructions and understand most of what is going on, but I never get any content listing, even though I have added two WC using the structure 'WIDGET'. I did change the structureId in the code to what I called mine ('WIDGET') but still get nothing showing up. After refreshing the page the 'No Widgets' does appear briefly but then disappears (yes I did deselect the 'Cacheable' option). I would have thought that if no results are found then this information would continue to display. Is there setting I'm missing? (I have tried in 6.0.10 EE, 6.0.6 CE and 6.1 CE all with same results)I also tried using the XSLT version as well with the same results. Any suggestions. Por favor, autentique-se para votar. Responda como... Cancelar
Vaibhav Mittal 11 Anos atrás - Editado Hi Ray! I am using Liferay 6.1. I am trying to make a web content using structure and templates. I have choosed lang xsl for templates. I have one textfield and 1 image in structure. But when i preview web content it shows internal server error. From logs i got this: 08:39:42,949 INFO [PortalImpl:4873] Current URL /c/journal/view_article_content?cmd=preview&groupId=19&articleId=14248&version=1.0 generates exception: com.liferay.portal.kernel.templateparser.TransformException: Unhandled exceptionBelow is my xsl:<?xml version="1.0"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html" omit-xml-declaration="yes"/> <xsl:template match="/"> <html> <body> <xsl:value-of disable-output-escaping="yes" select="root/dynamic-element[@name='textarea']/dynamic-content"/> <br/> <img> <xsl:attribute name="src"> <xsl:value-of disable-output-escaping="yes" select="root/dynamic-element[@name='image']/dynamic-content"/> </xsl:attribute> </img> </body> </html> </xsl:template></xsl:stylesheet>I have copied portal-impl.jar!/com/liferay/portlet/journal/dependencies/error.xsl to tomcat/weebapps/Root/WEB-INF/classes folder but have not changed anything because 2 things are not clear to me 1.) what to do with full path 2.) not geeting how to remove $companyId variable of the languageUtil:get method because what i can found is only $companyId variable.Can you shed some light on this? Por favor, autentique-se para votar. Responda como... Cancelar
Marc-Olivier Picard 11 Anos atrás Not sure what ime doing wrong about this... my response data is always null.I tried return it in a json format in the RESOURCE_PHASE doing someting like { "jsonArray": $jsonArray } with no luck i removed it and tried with #set ($V = $jsonArray.put($jsonObject)) $jsonFactory.serialize($jsonArray)but still no luck. here is my call and alert that tells me the responseData is null.AUI().use( "aui-base", "aui-io-plugin", "aui-io-request", function(A) { A.io.request( "${request.resource-url}", { data: { }, dataType: "json", on: { success: function(event, id, obj) { alert(this.get('responseData')); }, failure: function(event, id, obj) { alert("ajax call failure "); } } } ); } );any thoughts? Por favor, autentique-se para votar. Responda como... Cancelar
truong mai 10 Anos atrás Hi Ray, it's amazing topic. But I have a question: I always receive null object "hits" when running this web content. What is the problem? Por favor, autentique-se para votar. Responda como... Cancelar
Giannis Foufas 9 Anos atrás Hello,Could you please provide an example in liferay 6.2? Thank you very much Por favor, autentique-se para votar. Responda como... Cancelar