Any hint or advice?
--
Regards,
Michael Xu (xudong)
www.wizitsoft.com | Office: (8610) 6267 0615 ext 806 | Mobile: (86) 135 0135
9807 | Fax: (8610) 62670096
On Thu, Jan 7, 2010 at 12:29 PM, Michael Xu (xudong)
wrote:
> hi all,
>
> In ofbiz form, we can use lookup controller for fields which link to
> entities. But the lookup controller only support to return single value. How
> to implement a multiple lookup?
>
> Looking into source code, it seems that we have to extend a new controller
> in form widget schema and implement it in the form render. Is it a correct
> way to go?
>
> BTW: In my opinion, it is not flexible to extend form widget in current
> design. (correct me if I am wrong). Let's take one example.
>
> target="createGlAccountOrganization" title="" default-map-name="account"
> header-row-style="header-row" default-table-style="basic-table">
>
>
> description="${accountCode} - ${accountName} [${glAccountId}]">
>
>
>
>
> ...
>
>
> Here, we have to use tag to tell system to render a HTML
> drop-down component. But what if a customized field? Then do we have to
> change form widget schema for that field? And then add the render logic in
> the long switch-cases?
>
> Maybe we can refactor the design, like this:
>
> target="createGlAccountOrganization" title="" default-map-name="account"
> header-row-style="header-row" default-table-style="basic-table">
>
>
>
>
>
>
>
>
> ...
>
>
> with the new design, then we don't need to break the schema and change the
> core code of render logic. Instead, we just need to implement a new
> controller from a predefined controller interface. And then we can reuse it
> in all forms.
>
> (In here, due to the limitation of current form widget, we have to give up
> form and use FTL directly.)
>
> --
> Regards,
> Michael Xu (xudong)
> www.wizitsoft.com | Office: (8610) 6267 0615 ext 806 | Mobile: (86) 135
> 0135 9807 | Fax: (8610) 62670096
>