Additional parameter for FreeMarker to tell if it should load ftl files from cache or not
----------------------------------------------------------------------------------------- Key: OFBIZ-3970 URL: https://issues.apache.org/jira/browse/OFBIZ-3970 Project: OFBiz Issue Type: Improvement Components: ALL COMPONENTS Affects Versions: SVN trunk Reporter: Sascha Rodekamp Fix For: SVN trunk Attachments: OFBIZ-3970_FreeMarkerWorker.java.patch Hi, this patch allows you to tell FreeMarker if it should load the ftl files from cache or not as extension for the method description. If you have a few screens which shouldn't use the cache you can configure them separately. Cheers Sascha -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-3970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sascha Rodekamp updated OFBIZ-3970: ----------------------------------- Attachment: OFBIZ-3970_FreeMarkerWorker.java.patch > Additional parameter for FreeMarker to tell if it should load ftl files from cache or not > ----------------------------------------------------------------------------------------- > > Key: OFBIZ-3970 > URL: https://issues.apache.org/jira/browse/OFBIZ-3970 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Affects Versions: SVN trunk > Reporter: Sascha Rodekamp > Fix For: SVN trunk > > Attachments: OFBIZ-3970_FreeMarkerWorker.java.patch > > > Hi, > this patch allows you to tell FreeMarker if it should load the ftl files from cache or not as extension for the method description. > If you have a few screens which shouldn't use the cache you can configure them separately. > Cheers > Sascha -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916848#action_12916848 ] Scott Gray commented on OFBIZ-3970: ----------------------------------- Hi Sascha, Could you explain the use case for this a little more? Is there any reason to provide this option for templates that are being loaded from a location since they are unlikely to change? (As opposed to templates rendered from strings which certainly could change, from Content records for example) Also, it's hard to tell from a quick look at the patch but it looks like you are changing a method signature without using deprecation on the existing signature which shouldn't be done. Thanks Scott > Additional parameter for FreeMarker to tell if it should load ftl files from cache or not > ----------------------------------------------------------------------------------------- > > Key: OFBIZ-3970 > URL: https://issues.apache.org/jira/browse/OFBIZ-3970 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Affects Versions: SVN trunk > Reporter: Sascha Rodekamp > Fix For: SVN trunk > > Attachments: OFBIZ-3970_FreeMarkerWorker.java.patch > > > Hi, > this patch allows you to tell FreeMarker if it should load the ftl files from cache or not as extension for the method description. > If you have a few screens which shouldn't use the cache you can configure them separately. > Cheers > Sascha -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sascha Rodekamp updated OFBIZ-3970: ----------------------------------- Attachment: OFBIZ-3970_FreeMarkerWorker.java.patch Hi Scott, yes that is exactly the use case, loading content with templates which are stored in the DB and can be modified during the runtime (CMS). But you're right i reverted the changes for templates which are loaded from a location, that is not necessary. I think we don't need a deprecation flag, because the former method signature should be also available. I just overwrite the method. So deprecation is not needed. :-) Have a good day Sascha > Additional parameter for FreeMarker to tell if it should load ftl files from cache or not > ----------------------------------------------------------------------------------------- > > Key: OFBIZ-3970 > URL: https://issues.apache.org/jira/browse/OFBIZ-3970 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Affects Versions: SVN trunk > Reporter: Sascha Rodekamp > Fix For: SVN trunk > > Attachments: OFBIZ-3970_FreeMarkerWorker.java.patch, OFBIZ-3970_FreeMarkerWorker.java.patch > > > Hi, > this patch allows you to tell FreeMarker if it should load the ftl files from cache or not as extension for the method description. > If you have a few screens which shouldn't use the cache you can configure them separately. > Cheers > Sascha -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917260#action_12917260 ] Jacques Le Roux commented on OFBIZ-3970: ---------------------------------------- But Sascha, What happends to those who are already using the renderTemplate older version without cache parameter? It seems that it's deprecated to me... > Additional parameter for FreeMarker to tell if it should load ftl files from cache or not > ----------------------------------------------------------------------------------------- > > Key: OFBIZ-3970 > URL: https://issues.apache.org/jira/browse/OFBIZ-3970 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Affects Versions: SVN trunk > Reporter: Sascha Rodekamp > Fix For: SVN trunk > > Attachments: OFBIZ-3970_FreeMarkerWorker.java.patch, OFBIZ-3970_FreeMarkerWorker.java.patch > > > Hi, > this patch allows you to tell FreeMarker if it should load the ftl files from cache or not as extension for the method description. > If you have a few screens which shouldn't use the cache you can configure them separately. > Cheers > Sascha -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917293#action_12917293 ] Sascha Rodekamp commented on OFBIZ-3970: ---------------------------------------- nothing happen to them. There is a new renderTemplate method with an additional parameter (overloading). > Additional parameter for FreeMarker to tell if it should load ftl files from cache or not > ----------------------------------------------------------------------------------------- > > Key: OFBIZ-3970 > URL: https://issues.apache.org/jira/browse/OFBIZ-3970 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Affects Versions: SVN trunk > Reporter: Sascha Rodekamp > Fix For: SVN trunk > > Attachments: OFBIZ-3970_FreeMarkerWorker.java.patch, OFBIZ-3970_FreeMarkerWorker.java.patch > > > Hi, > this patch allows you to tell FreeMarker if it should load the ftl files from cache or not as extension for the method description. > If you have a few screens which shouldn't use the cache you can configure them separately. > Cheers > Sascha -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-3970. ---------------------------------- Assignee: Jacques Le Roux Resolution: Fixed Thanks Sascha, I should have been tired, and like said Scott it not easy to see from the patch. I see now that you simply added a cover with "true", and yes all is ok. You patch is in trunk at r1003943 > Additional parameter for FreeMarker to tell if it should load ftl files from cache or not > ----------------------------------------------------------------------------------------- > > Key: OFBIZ-3970 > URL: https://issues.apache.org/jira/browse/OFBIZ-3970 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Affects Versions: SVN trunk > Reporter: Sascha Rodekamp > Assignee: Jacques Le Roux > Fix For: SVN trunk > > Attachments: OFBIZ-3970_FreeMarkerWorker.java.patch, OFBIZ-3970_FreeMarkerWorker.java.patch > > > Hi, > this patch allows you to tell FreeMarker if it should load the ftl files from cache or not as extension for the method description. > If you have a few screens which shouldn't use the cache you can configure them separately. > Cheers > Sascha -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917306#action_12917306 ] Sascha Rodekamp commented on OFBIZ-3970: ---------------------------------------- Hi Jacques, no problem, yes i saw it was very late yesterday night, as you made the comment :) No Problem, thanks for the commit! Cheers > Additional parameter for FreeMarker to tell if it should load ftl files from cache or not > ----------------------------------------------------------------------------------------- > > Key: OFBIZ-3970 > URL: https://issues.apache.org/jira/browse/OFBIZ-3970 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Affects Versions: SVN trunk > Reporter: Sascha Rodekamp > Assignee: Jacques Le Roux > Fix For: SVN trunk > > Attachments: OFBIZ-3970_FreeMarkerWorker.java.patch, OFBIZ-3970_FreeMarkerWorker.java.patch > > > Hi, > this patch allows you to tell FreeMarker if it should load the ftl files from cache or not as extension for the method description. > If you have a few screens which shouldn't use the cache you can configure them separately. > Cheers > Sascha -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917527#action_12917527 ] Jacques Le Roux commented on OFBIZ-3970: ---------------------------------------- Sascha, Finally I have deprecated the old version of renderTemplateFromString, see why at http://svn.apache.org/viewvc?rev=1004148&view=rev Also you might be interested by http://download.oracle.com/javase/1.5.0/docs/guide/javadoc/deprecation/deprecation.html and at large http://download.oracle.com/javase/tutorial/java/javaOO/annotations.html Cheers > Additional parameter for FreeMarker to tell if it should load ftl files from cache or not > ----------------------------------------------------------------------------------------- > > Key: OFBIZ-3970 > URL: https://issues.apache.org/jira/browse/OFBIZ-3970 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Affects Versions: SVN trunk > Reporter: Sascha Rodekamp > Assignee: Jacques Le Roux > Fix For: SVN trunk > > Attachments: OFBIZ-3970_FreeMarkerWorker.java.patch, OFBIZ-3970_FreeMarkerWorker.java.patch > > > Hi, > this patch allows you to tell FreeMarker if it should load the ftl files from cache or not as extension for the method description. > If you have a few screens which shouldn't use the cache you can configure them separately. > Cheers > Sascha -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |