Sandeep Nair 12年 前 Excellent post james. Thanks for sharing. I always wanted to have some logging in velocity template. Thanks for the share. 投票するためにはログインが必要です。 次として送信する: キャンセル
Armaz Mellati 12年 前 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 投票するためにはログインが必要です。 次として送信する: キャンセル Jeffrey Handa Armaz Mellati 12年 前 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') 投票するためにはログインが必要です。 次として送信する: キャンセル
Jeffrey Handa Armaz Mellati 12年 前 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') 投票するためにはログインが必要です。 次として送信する: キャンセル
Jay Patel 12年 前 Awesome post James...Now things will be much easier to write LR apps.. 投票するためにはログインが必要です。 次として送信する: キャンセル
Andrius Kurtinaitis 12年 前 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? 投票するためにはログインが必要です。 次として送信する: キャンセル Andrius Kurtinaitis Andrius Kurtinaitis 12年 前 Strange enough, it even does not fill the reserved-*** variables... 投票するためにはログインが必要です。 次として送信する: キャンセル James Falkner Andrius Kurtinaitis 12年 前 Andrius - I think you want http://issues.liferay.com/browse/LPS-15096 Please add your comments there as it is an important missing functionality. 投票するためにはログインが必要です。 次として送信する: キャンセル
Andrius Kurtinaitis Andrius Kurtinaitis 12年 前 Strange enough, it even does not fill the reserved-*** variables... 投票するためにはログインが必要です。 次として送信する: キャンセル James Falkner Andrius Kurtinaitis 12年 前 Andrius - I think you want http://issues.liferay.com/browse/LPS-15096 Please add your comments there as it is an important missing functionality. 投票するためにはログインが必要です。 次として送信する: キャンセル
James Falkner Andrius Kurtinaitis 12年 前 Andrius - I think you want http://issues.liferay.com/browse/LPS-15096 Please add your comments there as it is an important missing functionality. 投票するためにはログインが必要です。 次として送信する: キャンセル
Laura Dylan 12年 前 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. 投票するためにはログインが必要です。 次として送信する: キャンセル
Tejas Patel 12年 前 thanks for this post.it is very useful for me . 投票するためにはログインが必要です。 次として送信する: キャンセル Andrius Kurtinaitis Tejas Patel 12年 前 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. 投票するためにはログインが必要です。 次として送信する: キャンセル
Andrius Kurtinaitis Tejas Patel 12年 前 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. 投票するためにはログインが必要です。 次として送信する: キャンセル
Amey Panke 11年 前 Thanks James, the post really helped. thanks a ton..!!!!! 投票するためにはログインが必要です。 次として送信する: キャンセル