I know how to define an entity and an enumeration in OFBiz.
I also know how to use them in OFBiz:
<field name="taxFormId">
<drop-down>
<entity-options entity-name="Enumeration"
description="${description}" key-field-name="enumId">
<entity-constraint name="enumTypeId" operator="equals"
value="TAX_FORMS"/>
<entity-order-by field-name="description"/>
</entity-options>
</drop-down>
</field>
<field name="orderSequenceEnumId"
use-when="partyAcctgPreference!=null"><display-entity
entity-name="Enumeration" key-field-name="enumId"/>
</field>
But what I want to do is not to view them.
Exactly speaking, what I want to do is how to make these attributes turn into
fields in the form automatically through OFBiz.
Your examples just show how to view them.
-----Original Message-----
From: BJ Freeman [mailto:[email protected]]
Sent: 2009年2月19日 19:04
To: [email protected]
Subject: Re: Tricky! About fields in the form
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
how you define an entity is in
framework\entity\dtd\entitymodel.xsd
and is like I gave you an example previous.
tables are entity names (well almost)
and columns are field names.
your attribute would be an Enumeration
your type would be EnumerationType.
you would use a view-entity to see all this in one row.
using the webtool import you would
1) load the EnumerationType
https://demo.hotwaxmedia.com/webtools/control/FindGeneric?entityName=EnumerationType&find=true&VIEW_SIZE=50&VIEW_INDEX=0
2) load the Enumeration with what you attributes
https://demo.hotwaxmedia.com/webtools/control/FindGeneric?entityName=Enumeration&find=true&VIEW_SIZE=50&VIEW_INDEX=0
you can find data entity and form examples by doing a search on the
application folders for Enumeration
Jack Liu sent the following on 2/19/2009 2:24 AM:
> If I want it through xml file, then how should I do?
>
> The xml file maybe seems like this:
> <fields>
> <field attribute='ChUrl' type='A' />
> <field attribute= SupportedCharsets' type='A' />
> <field attribute=' ServerID' type='A' />
> <field attribute='ServerID' type='B' />
> </fields>
>
> While in form, we can get all the attributes of type A.
>
> <form name="xxxxxx" type="single"
> target="createProtocolAttribute?protocolid=${id}">
> <field name="ChlUrl"><text/></field>
> <field name="SupportedCharsets"><text/></field>
> <field name="ServerID"><text/></field>
> <field name="submitButton" title="Add Protocol">
> <submit button-type="button"/>
> </field>
> </form>
>
> -----Original Message-----
> From: David E Jones [mailto:[email protected]]
> Sent: 2009年2月18日 2:28
> To: [email protected]
> Subject: Re: Tricky! About fields in the form
>
>
> Jack,
>
> I suggested configuring these through entity fields instead of in the
> database because that is what is supported right now.
>
> If you want something that adds fields to a Form Widget form based on
> data in the database that would have to be written as it currently
> only feeds from the form definition XML files. That wouldn't be too
> hard to do (ie add functionality to add fields based on the database).
> We decided early on that we wanted these things configured from XML
> files instead of being more database driven (like Compiere and certain
> other frameworks are) because it is easier to revision control and
> manage in a large-scale environment (especially for updates and
> collaboration when multiple people are working on the applications).
>
> So yes, it could certainly be developed as an extension to the current
> Form Widget, but does not exist now.
>
> -David
>
>
> On Feb 17, 2009, at 6:46 AM, Jack Liu wrote:
>
>> Are you sure what I want and you have a good solution?
>> Again:
>> What I want is not drop-down list
>>
>> In table attributetype:
>> Id attribute type
>> 1 ChUrl A
>> 2 SupportedCharsets A
>> 3 ServerID A
>> 4 ServerID B
>>
>>
>> While in form, we can get all the attributes of type A.
>>
>> <form name="xxxxxx" type="single"
>> target="createProtocolAttribute?protocolid=${id}">
>> <field name="ChlUrl"><text/></field>
>> <field name="SupportedCharsets"><text/></field>
>> <field name="ServerID"><text/></field>
>> <field name="submitButton" title="Add Protocol">
>> <submit button-type="button"/>
>> </field>
>> </form>
>>
>> Three fields ChlUrl, SupportedCharsets, ServerID are all fetched
>> from table, not written by hand. Of course, the form maybe looks
>> different, but can reach the same effect as above.
>>
>> Are you sure you can do it? If you can do it, money is not a
>> problem, I think.
>>
>> -----Original Message-----
>> From: BJ Freeman [mailto:[email protected]]
>> Sent: 2009年2月17日 21:20
>> To: [email protected]
>> Subject: Re: Tricky! About fields in the form
>>
> On the list I point people to places they can learn.
> however if you want personal help I will be glad to consult with you
> for
> a fee.
>
> Jack Liu sent the following on 2/17/2009 5:13 AM:
>>>> Could you give me an example in OFBiz?
>>>> I think it's very easy for you to find an example?
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: BJ Freeman [mailto:[email protected]]
>>>> Sent: 2009t217
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJnTyhrP3NbaWWqE4RAuyhAJ94+Qx/5PuzZGvlvaQfJciaxaVAxgCgir++
es56A7pXTtOEi+3kKidfxTw=
=Heja
-----END PGP SIGNATURE-----