Sandeep Nair Hace 12 años Excellent post james. Thanks for sharing. I always wanted to have some logging in velocity template. Thanks for the share. Por favor identifíquese para votar. Contestar como... Cancelar
Armaz Mellati Hace 12 años Very useful, thanks. I am also thinking combining this with the information from this blog : http://www.liferay.com/web/jeffrey.handa/blog/-/blogs/11281793 (using java-code inside a hook accessible through Spring) It should be a good alternative in many usecases Por favor identifíquese para votar. Contestar como... Cancelar Jeffrey Handa Armaz Mellati Hace 12 años Thank James, this is great. @ Armaz - I was thinking the exact same thing for logging from the script console. The following works when you set the script type to Groovy.logFactory = String.getClass().forName('com.liferay.portal.kernel.log.LogFactoryUtil')log = logFactory.getLog('mylog')log.error('Logging from Groovy Script') Por favor identifíquese para votar. Contestar como... Cancelar
Jeffrey Handa Armaz Mellati Hace 12 años Thank James, this is great. @ Armaz - I was thinking the exact same thing for logging from the script console. The following works when you set the script type to Groovy.logFactory = String.getClass().forName('com.liferay.portal.kernel.log.LogFactoryUtil')log = logFactory.getLog('mylog')log.error('Logging from Groovy Script') Por favor identifíquese para votar. Contestar como... Cancelar
Jay Patel Hace 12 años Awesome post James...Now things will be much easier to write LR apps.. Por favor identifíquese para votar. Contestar como... Cancelar
Andrius Kurtinaitis Hace 12 años A few more gotchas using preview mode (view_article_content) action:- no javascript (AUI., Liferay.) works out of the box. It would be very usefull for rendering collapsible lists etc. What do I need to include to have it working?- no $request variable, because the view_article_content action does not fill it. What can do here? Por favor identifíquese para votar. Contestar como... Cancelar Andrius Kurtinaitis Andrius Kurtinaitis Hace 12 años Strange enough, it even does not fill the reserved-*** variables... Por favor identifíquese para votar. Contestar como... Cancelar James Falkner Andrius Kurtinaitis Hace 12 años Andrius - I think you want http://issues.liferay.com/browse/LPS-15096 Please add your comments there as it is an important missing functionality. Por favor identifíquese para votar. Contestar como... Cancelar
Andrius Kurtinaitis Andrius Kurtinaitis Hace 12 años Strange enough, it even does not fill the reserved-*** variables... Por favor identifíquese para votar. Contestar como... Cancelar James Falkner Andrius Kurtinaitis Hace 12 años Andrius - I think you want http://issues.liferay.com/browse/LPS-15096 Please add your comments there as it is an important missing functionality. Por favor identifíquese para votar. Contestar como... Cancelar
James Falkner Andrius Kurtinaitis Hace 12 años Andrius - I think you want http://issues.liferay.com/browse/LPS-15096 Please add your comments there as it is an important missing functionality. Por favor identifíquese para votar. Contestar como... Cancelar
Laura Dylan Hace 12 años Is this a joke? You're trying to convince me that this is a "feature"? The hoops you had to jump through above is astounding. In a JSP with the proper tags this all would have been reduced to ~10-15 lines. Instead, you're trying to use the wrong tools for the job.. you're developing crazy code in a textarea, it isn't versioned or deployable between different environments (e.g. QA to Prod), and it's in Velocity. This is a bad approach all around. Stop using Velocity. Stop convincing people to paste their code into a text area. And make it really easy for me to query and transform content in my own custom portlets.This is a huge example where Liferay is out of touch with developers and the marketplace. Por favor identifíquese para votar. Contestar como... Cancelar
Tejas Patel Hace 12 años thanks for this post.it is very useful for me . Por favor identifíquese para votar. Contestar como... Cancelar Andrius Kurtinaitis Tejas Patel Hace 12 años Thank you James for the link to JIRA. I agree with the conclusions of the discussion there. I just wanted a small workaround until the issue is resolved.I was wrong about the $reserved-* variables. They are in place.Remaining problems concerning the preview are the following:- no usual JavaScripts included- no $request variable.If I try to preview an article using a template depending on these features, I get garbage.I think, it is possible to solve these issues without doing a full "preview in a page" functionality. It is possible to include default JavaScript and fill the $request with all info excluding the page context if the page is not currently available. Por favor identifíquese para votar. Contestar como... Cancelar
Andrius Kurtinaitis Tejas Patel Hace 12 años Thank you James for the link to JIRA. I agree with the conclusions of the discussion there. I just wanted a small workaround until the issue is resolved.I was wrong about the $reserved-* variables. They are in place.Remaining problems concerning the preview are the following:- no usual JavaScripts included- no $request variable.If I try to preview an article using a template depending on these features, I get garbage.I think, it is possible to solve these issues without doing a full "preview in a page" functionality. It is possible to include default JavaScript and fill the $request with all info excluding the page context if the page is not currently available. Por favor identifíquese para votar. Contestar como... Cancelar
Amey Panke Hace 11 años Thanks James, the post really helped. thanks a ton..!!!!! Por favor identifíquese para votar. Contestar como... Cancelar