Party - adding extra fields.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Party - adding extra fields.

Peter Dirickson
Hi Ofibz users,

 

I'm new to Ofbiz and I want to add new fields for the Party - contact form.

 

Here is what I did, please any help.

 

I want to add extra fields to the contact us form, so I added into
entitymodel.xml those two fields:

 

<field name="comments" type="comment"></field>

<field name="new_product " type="comment"></field>

 

Under entity-name="PartyContactMech"

 

And those fields were created ok after restarting.

 

Then I added into
\apps\party\script\org\ofbiz\party\contact\PartyContactMechServices.xml

 

<call-map-processor
xml-resource="org/ofbiz/party/contact/ContactMechMapProcs.xml"

                processor-name="contactMech" in-map-name="parameters"
out-map-name="context3"/>

<string-to-field string="comments" field-name="comments"
map-name="context3"/>

<string-to-field string="new_product" field-name="new_product"
map-name="context3"/>

 

Under <simple-method method-name="createPartyContactMech"
short-description="Create a PartyContactMech">

 

And also apps\party\script\org\ofbiz\party\contact\ContactMechMapProcs.xml

 

<simple-map-processor name="contactMech">

 

            <process field="comments"><copy/></process>

            <process field="new_product"><copy/></process>

 

But it's not saving into the DB the info typed into those 2 fields created
in contact.ftl template.

 

Am I missing something? My big question is do I need to change/add something
in the ContactMechService.java?

 

Thanks,

 

Peter.

 

Reply | Threaded
Open this post in threaded view
|

Re: Party - adding extra fields.

yong lin-2
 There is a check-on-start attribute of datasource in entityengine.xml,only
the value is true , ofbiz restart check entity changed.

2006/8/31, Peter Dirickson <[hidden email]>:

>
> Hi Ofibz users,
>
>
>
> I'm new to Ofbiz and I want to add new fields for the Party - contact
> form.
>
>
>
> Here is what I did, please any help.
>
>
>
> I want to add extra fields to the contact us form, so I added into
> entitymodel.xml those two fields:
>
>
>
> <field name="comments" type="comment"></field>
>
> <field name="new_product " type="comment"></field>
>
>
>
> Under entity-name="PartyContactMech"
>
>
>
> And those fields were created ok after restarting.
>
>
>
> Then I added into
> \apps\party\script\org\ofbiz\party\contact\PartyContactMechServices.xml
>
>
>
> <call-map-processor
> xml-resource="org/ofbiz/party/contact/ContactMechMapProcs.xml"
>
>                processor-name="contactMech" in-map-name="parameters"
> out-map-name="context3"/>
>
> <string-to-field string="comments" field-name="comments"
> map-name="context3"/>
>
> <string-to-field string="new_product" field-name="new_product"
> map-name="context3"/>
>
>
>
> Under <simple-method method-name="createPartyContactMech"
> short-description="Create a PartyContactMech">
>
>
>
> And also apps\party\script\org\ofbiz\party\contact\ContactMechMapProcs.xml
>
>
>
> <simple-map-processor name="contactMech">
>
>
>
>            <process field="comments"><copy/></process>
>
>            <process field="new_product"><copy/></process>
>
>
>
> But it's not saving into the DB the info typed into those 2 fields created
> in contact.ftl template.
>
>
>
> Am I missing something? My big question is do I need to change/add
> something
> in the ContactMechService.java?
>
>
>
> Thanks,
>
>
>
> Peter.
>
>
>
>
>