Sandeep Nair Vor 12 Jahren Excellent post james. Thanks for sharing. I always wanted to have some logging in velocity template. Thanks for the share. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Armaz Mellati Vor 12 Jahren 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 Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Jeffrey Handa Armaz Mellati Vor 12 Jahren 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') Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Jeffrey Handa Armaz Mellati Vor 12 Jahren 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') Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Jay Patel Vor 12 Jahren Awesome post James...Now things will be much easier to write LR apps.. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Andrius Kurtinaitis Vor 12 Jahren 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? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Andrius Kurtinaitis Andrius Kurtinaitis Vor 12 Jahren Strange enough, it even does not fill the reserved-*** variables... Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen James Falkner Andrius Kurtinaitis Vor 12 Jahren Andrius - I think you want http://issues.liferay.com/browse/LPS-15096 Please add your comments there as it is an important missing functionality. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Andrius Kurtinaitis Andrius Kurtinaitis Vor 12 Jahren Strange enough, it even does not fill the reserved-*** variables... Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen James Falkner Andrius Kurtinaitis Vor 12 Jahren Andrius - I think you want http://issues.liferay.com/browse/LPS-15096 Please add your comments there as it is an important missing functionality. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
James Falkner Andrius Kurtinaitis Vor 12 Jahren Andrius - I think you want http://issues.liferay.com/browse/LPS-15096 Please add your comments there as it is an important missing functionality. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Laura Dylan Vor 12 Jahren 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. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Tejas Patel Vor 12 Jahren thanks for this post.it is very useful for me . Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Andrius Kurtinaitis Tejas Patel Vor 12 Jahren 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. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Andrius Kurtinaitis Tejas Patel Vor 12 Jahren 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. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Amey Panke Vor 11 Jahren Thanks James, the post really helped. thanks a ton..!!!!! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen