[
https://issues.apache.org/jira/browse/OFBIZ-4035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17042669#comment-17042669
]
Michael Brohl edited comment on OFBIZ-4035 at 2/23/20 10:06 AM:
----------------------------------------------------------------
Two PRs created:
[[https://github.com/apache/ofbiz-framework/pull/22||https://github.com/apache/ofbiz-framework/pull/23]
[[https://github.com/apache/ofbiz-framework/pull/23||https://github.com/apache/ofbiz-framework/pull/23]
Since the core functionality required by this ticket was already implemented,
the first PR introduces documentation in the widget-form.xsd describing how the
functionality can be used.
The second PR extends the first PR and introduces unit tests. The potentially
controversial issue is that to implement the tests I felt it was necessary to
mock out static methods, functionality that's not available from Mockito, and
therefore brought in a test dependency on JMockit.
To provide unit tests for MacroFormRenderer without using a mocking library
like JMockit will require the class to be refactored which I deemed a bit of a
risky change at this point, particularly without existing tests to prove
correct behaviour is maintained.
was (Author: danwatford):
Two PRs created:
[[https://github.com/apache/ofbiz-framework/pull/22||https://github.com/apache/ofbiz-framework/pull/23]
[https://github.com/apache/ofbiz-framework/pull/22|https://github.com/apache/ofbiz-framework/pull/23]
[]|https://github.com/apache/ofbiz-framework/pull/23]
[[https://github.com/apache/ofbiz-framework/pull/23||https://github.com/apache/ofbiz-framework/pull/23]
[https://github.com/apache/ofbiz-framework/pull/23]
[]|https://github.com/apache/ofbiz-framework/pull/23]
Since the core functionality required by this ticket was already implemented,
the first PR introduces documentation in the widget-form.xsd describing how the
functionality can be used.
The second PR extends the first PR and introduces unit tests. The potentially
controversial issue is that to implement the tests I felt it was necessary to
mock out static methods, functionality that's not available from Mockito, and
therefore brought in a test dependency on JMockit.
To provide unit tests for MacroFormRenderer without using a mocking library
like JMockit will require the class to be refactored which I deemed a bit of a
risky change at this point, particularly without existing tests to prove
correct behaviour is maintained.
> change the id Attribute for input fields in the model macro form renderer
> from String to FlexibleStringExpander
> ---------------------------------------------------------------------------------------------------------------
>
> Key: OFBIZ-4035
> URL: https://issues.apache.org/jira/browse/OFBIZ-4035
> Project: OFBiz
> Issue Type: Improvement
> Components: ALL COMPONENTS
> Affects Versions: Trunk
> Reporter: Sascha Schumann
> Assignee: Daniel Watford
> Priority: Major
> Labels: patch-available
> Attachments: OFBIZ-4035_ModelFormField.java.patch
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> hi there,
> here a little useful improvement. i changed the ID Field of an input field in
> in the macro form renderer from a normal String to a flexible String
> expander.
> The advantage is that i can use ${} variables in the id description, that
> helps me for example creating automatically unique id's.
> Cheers
> Sascha
--
This message was sent by Atlassian Jira
(v8.3.4#803005)