additional filelds

Use this forum for all questions related to the source code of OpenEMM

Moderator: moderator

additional filelds

Postby marcin » Thu Jul 19, 2012 7:42 pm

OpenEMM-2011 on centOS
I have follow instructions at development-f7/topic1789.html in order to add additional fields.

mysql table was altered using following :

alter table customer_1_tbl add (company char(50) , address char(50) , city char(50) , state char(3) , zip char(12) , phone char(20), fax char(20));

As recommend, I edit /home/openemm/webapps/openemm/recipient/recipient-list.jsp with following:

<display:column class="name" headerClass="head_name"
<bean:message key="recipient.gender.${recipient.gender}.short" />
<display:column class="name" headerClass="head_name"
property="firstname" titleKey="recipient.Firstname" sortable="true" />
<display:column class="name" headerClass="head_name"
property="lastname" titleKey="recipient.Lastname" sortable="true" />
<display:column class="name" headerClass="head_name"
property="company" titleKey="recipient.Comapany" sortable="true" />
<display:column class="name" headerClass="head_name"
property="address" titleKey="recipient.Address" sortable="true" />
<display:column class="name" headerClass="head_name"
property="city" titleKey="recipient.City" sortable="true" />
<display:column class="name" headerClass="head_name"
property="state" titleKey="recipient.State" sortable="true" />
<display:column class="name" headerClass="head_name"
property="zip" titleKey="recipient.Zip" sortable="true" />
<display:column class="name" headerClass="head_name"
property="phone" titleKey="recipient.Phone" sortable="true" />
<display:column class="name" headerClass="head_name"
property="fax" titleKey="recipient.Fax" sortable="true" />
<display:column class="name" headerClass="head_name"
property="email" titleKey="mailing.E-Mail" sortable="true"
paramId="recipientID" paramProperty="customerID"
url="/${ACTION_VIEW}" />
<display:column class="edit" >

I have also patch the in following matter:

Map customerData = new HashMap<String, Object>();

customerData.put("gender", row.get("GENDER"));
customerData.put("firstname", row.get("FIRSTNAME"));
customerData.put("lastname", row.get("LASTNAME"));
customerData.put("email", row.get("EMAIL"));
customerData.put("company", row.get("COMPANY"));
customerData.put("address", row.get("ADDRESS"));
customerData.put("city", row.get("CITY"));
customerData.put("state", row.get("STATE"));
customerData.put("zip", row.get("ZIP"));
customerData.put("phone", row.get("PHONE"));
customerData.put("fax", row.get("FAX"));

And recompiled it

However the RECIPIENTS link shows following error:

An error occurred
Cause: org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: ServletException in 'recipient/recipient-list.jsp': javax.servlet.jsp.JspException: Exception: [.LookupUtil] Error looking up property "company" in object type "org.agnitas.beans.impl.RecipientImpl". Cause: Unknown property 'company'

Is there anything more that I need to do?
Posts: 1
Joined: Thu Jul 19, 2012 5:49 pm

Re: additional filelds

Postby maschoff » Sat Jul 21, 2012 9:15 pm

I suggest to wait a few weeks because OpenEMM 2012 will allow you to customize the profile fields shown in the recipient table via its GUI.
OpenEMM Maintainer
Site Admin
Posts: 2144
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany

Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest