Using Widgets html form templates in FTL files
---------------------------------------------- Key: OFBIZ-3541 URL: https://issues.apache.org/jira/browse/OFBIZ-3541 Project: OFBiz Issue Type: Improvement Reporter: Bruno Busco Attachments: widgetMacrosInFtl.patch The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bruno Busco updated OFBIZ-3541: ------------------------------- Attachment: widgetMacrosInFtl.patch > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Improvement > Reporter: Bruno Busco > Attachments: widgetMacrosInFtl.patch > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842086#action_12842086 ] Jacques Le Roux commented on OFBIZ-3541: ---------------------------------------- Hi Bruno, Just reviewed (not tested) but looks good to me: simple and clean. > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Improvement > Reporter: Bruno Busco > Attachments: widgetMacrosInFtl.patch > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bruno Busco updated OFBIZ-3541: ------------------------------- Attachment: widgetMacrosInFtl.patch Patch updated. Now the Webtools EntityList FTL based screen uses the same renderPrevNext macro used in form based screens. There is still an issue with the commonDisplaying label. I do not know how to have the $ contained in the label to be rendered while using the label in a FTL file. If someone can help... > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Improvement > Reporter: Bruno Busco > Attachments: widgetMacrosInFtl.patch, widgetMacrosInFtl.patch > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842379#action_12842379 ] Jacques Le Roux commented on OFBIZ-3541: ---------------------------------------- Hi Bruno, 2 things I thought about lookups * why not create macro like for currency, etc. instead of an import to be done for each call (this is also true for renderPrevNext) * in a WIP I changed all calls in FTL files (but for Workeffort which call other lookups inside itself) from lookup2 to lookupLayer. This is not a big deal as it's only a simple S/R on all files. But I'd like to avoid the conflicts we will get if we don't synchronize our efforts. At which date do you expect to commit a global work on this? > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Improvement > Reporter: Bruno Busco > Attachments: widgetMacrosInFtl.patch, widgetMacrosInFtl.patch > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842388#action_12842388 ] Bruno Busco commented on OFBIZ-3541: ------------------------------------ Hi Jacques, what do you mean for "create a macro like for currency"? Could you give me some pointer to the pattern you suggest? For #2, this is good to know. We can hold this patch until you commit all your work. There is no hurry. > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Improvement > Reporter: Bruno Busco > Attachments: widgetMacrosInFtl.patch, widgetMacrosInFtl.patch > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bilgin Ibryam updated OFBIZ-3541: --------------------------------- Attachment: widgetMacrosInFtl.patch Bruno, I tested your patch, good work, thanks for it. Also updated the patch, so we don't need to import the macros in each template. Bilgin > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Improvement > Reporter: Bruno Busco > Attachments: widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842432#action_12842432 ] Jacques Le Roux commented on OFBIZ-3541: ---------------------------------------- Thanks BIlgin, What was the point 1, Bruno. Now simples global S/R and, hop là :) > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Improvement > Reporter: Bruno Busco > Attachments: widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842436#action_12842436 ] Bruno Busco commented on OFBIZ-3541: ------------------------------------ Then we could progressively use it in the FTL files but for this I can wait for your work done. Are you OK with this? > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Improvement > Reporter: Bruno Busco > Attachments: widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842435#action_12842435 ] Bruno Busco commented on OFBIZ-3541: ------------------------------------ Thank you Bilgin, so, now Jacques how should we proceed? Can I commit the patch? > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Improvement > Reporter: Bruno Busco > Attachments: widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842441#action_12842441 ] Jacques Le Roux commented on OFBIZ-3541: ---------------------------------------- Bruno, Actually it's not an issue. I can revert all the changes I made in the FTL files and after you will have commited your patch I will apply the changes again but using the macro rather than the js snippet. > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Improvement > Reporter: Bruno Busco > Attachments: widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bruno Busco closed OFBIZ-3541. ------------------------------ Resolution: Fixed Assignee: Bruno Busco Patch committed to trunk rev. 920115, 920116 and 920117. Thank you Bilgin and Jacques. > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Improvement > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bilgin Ibryam updated OFBIZ-3541: --------------------------------- Attachment: widgetMacrosInFtlImprove.patch.diff Bruno, I made some improvements to your code in order to add autocompleter support in ftl lookups. To achieve this, I introduced the initial template file you created and set there all the default values needed by htmlFormMacroLibrary.ftl. This gives more possibilities to get the default values in case they are not fixed strings (like autocompleter url) and keeps the rendering ftl cleaner. I attached the patch here, in case you (or someone else) wants to check it, before committing. Next strep would be to replace all the lookup fields (around 70) in ftl files with new lookup macro. Bilgin > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Improvement > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtlImprove.patch.diff > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bilgin Ibryam reopened OFBIZ-3541: ---------------------------------- > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Improvement > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtlImprove.patch.diff > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-3541: ----------------------------------- Attachment: OFBIZ-3541 Using Widgets html form templates in FTL files.patch This patch (OFBIZ-3541 Using Widgets html form templates in FTL files.patch) is not yet ready to be commited. Actually only handling is needed now and I began to do it. You can see what is nedded to be done at the beginning of the patch. From findEmployee.ftl to findInventoryEventPlan.ftl the work is done. So we need to: * remove the <input type="text" line, keeping the value= attribute if it's no empty * remove the <img src= line complety (including the remaining </a>) If nobody beat me on it I will continue, of course all help would be appreciated. Also I not quite sure that all changes have been done. In other words, this is a 1st pass to be revisited... > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Improvement > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3541 Using Widgets html form templates in FTL files.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtlImprove.patch.diff > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12850589#action_12850589 ] Jacques Le Roux commented on OFBIZ-3541: ---------------------------------------- Bilgin, I did not test nor applied your patch yet. But it seems straightworward to change thereafter (when the above patch will be complete) all the <@formrenderer.renderLookupField by <@htmlTemplate.lookupField Thanks for your help > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Improvement > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3541 Using Widgets html form templates in FTL files.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtlImprove.patch.diff > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12850595#action_12850595 ] Jacques Le Roux commented on OFBIZ-3541: ---------------------------------------- Note that the patch above needs the OFBIZ-3442 patch to be applied before because of the targets changes in controllers. At some point though the old targets should be removed (but we might consider to keep them to allow popup lookups in future?) > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Improvement > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3541 Using Widgets html form templates in FTL files.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtlImprove.patch.diff > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-3541: ----------------------------------- Issue Type: Sub-task (was: Improvement) Parent: OFBIZ-3445 > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Sub-task > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3541 Using Widgets html form templates in FTL files.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtlImprove.patch.diff > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853159#action_12853159 ] Jacques Le Roux commented on OFBIZ-3541: ---------------------------------------- I found a 1st issue in applications/order/webapp/ordermgr/entry/cart/showcart.ftl The product input button at top of the 3d screen of order creation (in Order Manager) is shared between 3 feature : quick add, lookup and add gift certif (last is buggy). Not sure how to handle this correctly yet. > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Sub-task > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3541 Using Widgets html form templates in FTL files.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtlImprove.patch.diff > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853163#action_12853163 ] Jacques Le Roux commented on OFBIZ-3541: ---------------------------------------- To accomodate in the meantime the issue just above needs to have a LookupSupplierProductPopup and a LookupProductPopup besides the default layered lookups. I hope there will not too much cases like this one (should not be, it's very specific) > Using Widgets html form templates in FTL files > ---------------------------------------------- > > Key: OFBIZ-3541 > URL: https://issues.apache.org/jira/browse/OFBIZ-3541 > Project: OFBiz > Issue Type: Sub-task > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3541 Using Widgets html form templates in FTL files.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtl.patch, widgetMacrosInFtlImprove.patch.diff > > > The attached patch introduces a way to let developers to use the templates defined in htmlMacroFormLibrary.ftl in the FTL files. > This was discussed in the mailing list and it seems that we all agree that having this feature could be a good thing. > In the patch I used the renderLookupField in the main.ftl file of the catalog application. By doing this the two lookups that are included in this ftl are now rendered similar to how they are from a form widget. > This allows the Tomahawk theme to render these lookups in the supposed way (with the card icon). > Doing this I changed the macro in the htmlMacroFormLibrary.ftl to have all parameters with a default value so that only the relevant ones must be specified in the FTL. > A new template.ftl file has been added but this only includes the htmlMacroFormLibrary.ftl. I do not know if there is a better way to have the macro available in the FTL file. > Please fill free to comment any of the choise I did so that we could then commit this and extend to other macros. > I guess the next one I will address is the renderNextPrev so that all paginations will look the same in all forms/FTL screens. -- 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 |