Hi Daniel, Thanks for your detailed proposal. I checked your work and it's interesting way.
Can you open an issue on https://issues.apache.org/jira, I will commit your widget improvement in code base. Nicolas On 23/01/2020 22:03, Daniel Watford wrote: > Hello, > > In a current project being built on top of Ofbiz I have a form for > editing details of a freight transport job. Each job has multiple > roles performed by different parties - Shipper, Consignee, Agent, > BILL_TO_PARTY, etc. > > The client required that the party contact details for each role be > editable on the same form as the Job to allow operators to more easily > capture job details. > > Building the form using the form widget xml was overly verbose and > wasn't a good solution in cases where multiple parties might hold a > role - e.g. there can be multiple billing parties for a job. > > I ended up using FTL macros for rendering each of the roles on the form. > > I've started looking at how I might move from the FTL macros back to > the Form Widget, but have run into the problem of duplicate form input > names when including a form multiple times on a screen. > > To resolve this I tried using the FlexibleStringExpander for a form > field's parameter name. > > I've created a branch here: > https://github.com/danwatford/ofbiz-framework/tree/flexible-form-parameter-name > > > And a demonstration of how it might be used > here: > https://github.com/danwatford/ofbiz-framework/tree/flexible-form-parameter-name-demo > > To use the demonstration, build the branch and loadAll demo data. > Run ofbiz and visit https://localhost:8443/partymgr > image.png > > The demo displays 5 Persons and 5 PartyGroups in random order, using a > different included form for each type. > > Click on Update > image.png > > The next form shows all the fields that were posted. > > > Any issues that might come up from using FlexibleStringExpander for > parameter names in this way? > > Thanks, > > Dan. > > --
pEpkey.asc
Description: application/pgp-keys
