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

James Yong commented on OFBIZ-11409:
------------------------------------

Hi Michael,

When the improvement is completed, we can put widget form and grid in the same 
page for editing.

Like KnockoutJS, a data-bind attribute is used for declaring the behaviours of 
the widget field.

The behaviours occur only at the browser, Some possible benefits include:
 # Binding the field’s value to a javascript map which we can use to submit the 
changes to the server.
 # Rendering the table rows at the browser side. Adding and removing rows are 
done in situ.
 # Displaying rows total sum. Compute on the fly when any of the dependent 
value changes.

ViewModel of the MV(VM) handles the heavy lifting to support the declared 
behaviours. ViewModel is defined in Javascript in an ftl file under 
platform-specific html tag, and can be replaced with a customised 
implementation.

> 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)

Reply via email to