[jira] [Comment Edited] (OFBIZ-11957) Form-Fields of certain types won't render IDs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Comment Edited] (OFBIZ-11957) Form-Fields of certain types won't render IDs

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-11957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17181130#comment-17181130 ]

Jacques Le Roux edited comment on OFBIZ-11957 at 8/20/20, 11:42 AM:
--------------------------------------------------------------------

bq. I tested it on the branch that I provided for the pull request by adding a submit field with an id to the first form in PartyForms.xml and it worked for me (means the id got rendered in the HTML code).
I used trunk HEAD as it's the branch that we use for improvements and bug fix. I used the same test that in my comment above and got the same result: no Ids in any of the 6 {{type="submit"}} fields. You should try by yourself...

bq.Wouldn't it be better to make a new issue for other kinds of fields, since I just made this issue for form fields and it could be kind of confusing if we start to add other changes to it now.
Till now, we maintain the signatures of the *FormMacroLibrary.ftl macros (all are form fields) to be the same and we try to do that in the same Jira/commit. You may check past cases. I must say that's often forgotten (I forgot multi-times :D ) and done in several commits. But, for sake of history and maintenance,  it's better to keep those changes tied.
BTW (unrelated), we could argue that's it's not necessary as most of the other macros (than HTML) have no implementations, so why maintain all that (I often ask myself this question)? But in some cases (mostly Fo) they have and implementation. So it's better to not forget those, and grouping the change is easier for future maintenance.

bq. most of the field do not have this kind of declaration and since ID is not really a necessary field for HTML-elements and HAS to be unique for it to work, it would be a really bad idea to give it a default value.
Right!



was (Author: jacques.le.roux):
bq. I tested it on the branch that I provided for the pull request by adding a submit field with an id to the first form in PartyForms.xml and it worked for me (means the id got rendered in the HTML code).
I used trunk HEAD as it's the branch that we use for improvements and bug fix. I used the same test that in my comment above and got the same result: no Ids in any of the 6 {{type="submit"}} fields. You should try by yourself...

bq.Wouldn't it be better to make a new issue for other kinds of fields, since I just made this issue for form fields and it could be kind of confusing if we start to add other changes to it now.
Till now, we maintain the signatures of the *FormMacroLibrary.ftl macros (all are form fields) to be the same and we try to do that in the same Jira/commit. You may check past cases. I must say that's often forgotten (I forgot multi-times :D ) and done in several commits. But, for sake of history and maintenance,  it's better to keep those changes tied.
BTW (unrelated), we could argue that's it's not necessary as most of the other macros (than HTML) have no implementations, so why maintain all that (I often ask myself this question)? But in some cases (mostly Fo) they have and implementation. So it's better to not forget those, and group the change is easier for future maintenance.

bq. most of the field do not have this kind of declaration and since ID is not really a necessary field for HTML-elements and HAS to be unique for it to work, it would be a really bad idea to give it a default value.
Right!


> Form-Fields of certain types won't render IDs
> ---------------------------------------------
>
>                 Key: OFBIZ-11957
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11957
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: Trunk
>            Reporter: Dennis Balkir
>            Assignee: Dennis Balkir
>            Priority: Minor
>
> While implementing some OFBiz-Forms, I noticed, that certain types of form-fields will not render the set ID.
> Field-Types that won't work for sure are {{submit}} and {{hyperlink}} where the set name for the parameter {{id-name}} simply will not be rendered in the HTML-Code that is generetad by OFBiz.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)