Hi… I want to describe an idea for a new OFBiz module or Add-on to webtools! If you imagine a customizable OFBiz on the fly! The investor will choose the fields that he wants with out the extra fields on the page! How? You can do it by many ways , lets choose the table (Entity) PERSON as an example and we don't need the field gender to be shown :
1)we can create an additional Tables let say (PERSON_FIELDS) this table has a flag that says that the field gender is not necessary ,so we Must make a query on this table to see which are the necessary fields and we most put additional code in the ftl or form files (HARD).
2)another suggestion is to add an extra attribute to the entitymodel.xml file entities ,this way: <!--///////////////////////////////////////begin//////////////////////////////--> <entity entity-name="Person" package-name="org.ofbiz.party.party" title="Person Entity"> <field name="partyId" type="id-ne" necessary="Y"></field> <field name="firstName" type="name"></field> <field name="middleName" type="name"></field> <field name="lastName" type="name"></field> <field name="personalTitle" type="name" necessary="N"></field> <field name="suffix" type="name" necessary="N"></field> <field name="nickname" type="name" necessary="N"></field> <field name="memberId" type="id" necessary="N"></field> <field name="gender" type="indicator" necessary="N"></field> <field name="birthDate" type="date"></field> <field name="height" type="floating-point" necessary="N"></field> <field name="weight" type="floating-point" necessary="N"></field> <field name="mothersMaidenName" type="long-varchar" encrypt="true"></field> <field name="maritalStatus" type="indicator" necessary="N"></field> <field name="socialSecurityNumber" type="long-varchar" encrypt="true" necessary="N"></field> <field name="passportNumber" type="long-varchar" encrypt="true" necessary="N"></field> <field name="passportExpireDate" type="date" necessary="N"></field> <field name="totalYearsWorkExperience" type="floating-point" necessary="N"></field> <field name="comments" type="comment" necessary="N"></field> <field name="companyName" type="name" necessary="N"><!-- free-form company name, used when we don't yet have enough info for a PartyRelationship --></field> <prim-key field="partyId"/> <relation type="one" fk-name="PERSON_PARTY" rel-entity-name="Party"> <key-map field-name="partyId"/> </relation> <index name="FIRST_NAME_IDX"> <index-field name="firstName"/> </index> <index name="LAST_NAME_IDX"> <index-field name="lastName"/> </index> </entity> <!--///////////////////////////////////////end////////////////////////////////-->
As you can see this attribute tell the developers that this field can be cancelled , and if this field is not written so the default value is necessary="Y". After that we can create a webpage that choose the entity fields that are necessary="N" then they can be checked or not. If they are checked the field could be deleted from the XML directly and this will affect the view lyer , the logic layer and the entity layer. And this customization is done once only when installing the framework.
So what are your opinions on this issue ? Bye for now…CRM_ERP team _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
Free forum by Nabble | Edit this page |