[
https://issues.apache.org/jira/browse/OFBIZ-11409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17044195#comment-17044195
]
Pierre Smits edited comment on OFBIZ-11409 at 2/25/20 7:49 AM:
---------------------------------------------------------------
HI [~jamesyong],
I haven't done a thorough analysis of MVVM and Knockout, but this ticket would
benefit (and thus adopters and fellow contributors) when some documents/pages
regarding both subjects are linked.
After a cursory review of the patch, I have - for now - only one question.
In the patch you added following changes to a form in EmployeeForms.xml
{code:java}
/- <field name="firstName" required-field="true"><text/></field>
- <field name="middleName"
title="${uiLabelMap.PartyMiddleInitial}"><text size="4" maxlength="4"/></field>
- <field name="lastName" required-field="true"><text/></field>
+ <field name="firstName" data-bind="textInput:firstName"
required-field="true"><text/></field>
+ <field name="middleName" data-bind="textInput:middleName"
title="${uiLabelMap.PartyMiddleInitial}"><text size="4" maxlength="4"/></field>
+ <field name="lastName" data-bind="textInput:lastName"
required-field="true"><text/></field>
{code}
What is the impact of these changes on the user experience, when the user
doesn't use a MVVM aware/enabled theme?
Given that the project not only has forms where this can be applied, but also
Freemarker templates and other elements/objects that are used to render the UI,
I suggest to have more applications shown (and explained) in the PoC.
Maybe you should not do this via patch files, but a feature branch in your
public Github repo?
was (Author: pfm.smits):
HI [~jamesyong],
I haven't done a thorough analysis of MVVM and Knockout, but this ticket (and
thus adopters and fellow contributors) if some documents/pages regarding both
subjects would be linked.
After a cursory review of the patch, I have - for now - only one question.
In the patch you added following changes to a form in EmployeeForms.xml
{code:java}
/- <field name="firstName" required-field="true"><text/></field>
- <field name="middleName"
title="${uiLabelMap.PartyMiddleInitial}"><text size="4" maxlength="4"/></field>
- <field name="lastName" required-field="true"><text/></field>
+ <field name="firstName" data-bind="textInput:firstName"
required-field="true"><text/></field>
+ <field name="middleName" data-bind="textInput:middleName"
title="${uiLabelMap.PartyMiddleInitial}"><text size="4" maxlength="4"/></field>
+ <field name="lastName" data-bind="textInput:lastName"
required-field="true"><text/></field>
{code}
What is the impact of these changes on the user experience, when the user
doesn't use a MVVM aware/enabled theme?
Given that the project not only has forms where this can be applied, but also
Freemarker templates and other elements/objects that are used to render the UI,
I suggest to have more applications shown (and explained) in the PoC.
Maybe you should not do this via patch files, but a feature branch in your
public Github repo?
> POC for Dynamic Screen Using MVVM
> ---------------------------------
>
> Key: OFBIZ-11409
> URL: https://issues.apache.org/jira/browse/OFBIZ-11409
> Project: OFBiz
> Issue Type: Improvement
> Components: base
> Affects Versions: Trunk
> Reporter: James Yong
> Priority: Minor
> Fix For: Trunk
>
> Attachments: OFBIZ-11409.patch
>
>
> Proof of concept for Model–view–viewmodel (MVVM) in form widgets.
> Added data-bind attribute to the field tag.
> Only implemented for Text field.
> Go to [https://localhost:8443/humanres/control/NewEmployee] to try the
> following field:
> # First name
> # Middle name
> # Last name
> Added Full Name field at the bottom to demonstrate computed property.
> mbrohl: here is a link to the discussion on the dev mailing list:
> https://lists.apache.org/thread.html/r1cddbc8041e5a6559bfad979bc8570581a3d1f662a0f8692c7ee9e59%40%3Cdev.ofbiz.apache.org%3E
--
This message was sent by Atlassian Jira
(v8.3.4#803005)