[Yanel-dev] IMS meetings review page
Ioannis Iordanidis
ioannis at wyona.com
Fri Apr 1 23:55:22 CEST 2011
Hi Michael
Thank you for the pointer to look into the EntryImpl.java class
I have edited the MeetingImpl.java class to enable the short description
field be reviewed and edited if possible.
Below is a diff of what I have done.
Essentially the decscription field how now become a NodeList
and the getDescription() method used the XMLHelper class to get the text.
I have tested it and it works but only partially: The rich text is
always blank, but:
- if you leave it blank it does not overwrite the existing entry
- if you put an entry it does save it.
So I am guessing here, there seems to be a problem with the rich text
editor picking up and displaying what is already written to file.
Regards,
Giannis
Index:
../imstat-realm/res-types/model/src/java/org/imstat/model/impl/MeetingImpl.java
===================================================================
---
../imstat-realm/res-types/model/src/java/org/imstat/model/impl/MeetingImpl.java
(revision 57643)
+++
../imstat-realm/res-types/model/src/java/org/imstat/model/impl/MeetingImpl.java
(working copy)
@@ -32,9 +32,11 @@
private Date meetingEndDate;
private String meetingType;
private String meetingWebsite;
+ private NodeList descriptionNodeList;
private String contactLastname;
private String contactFirstname;
private String contactEmail;
+ private String contactPhone;
/**
* @param in InputStream containing XML representation of a meeting
@@ -48,6 +50,7 @@
title = (String) xpath.evaluate("/me:meeting/me:title", doc,
XPathConstants.STRING);
city = (String)
xpath.evaluate("/me:meeting/me:location/me:city", doc,
XPathConstants.STRING);
state = (String)
xpath.evaluate("/me:meeting/me:location/me:state", doc,
XPathConstants.STRING);
+ log.warn("DEBUG: State: " + state);
country = (String)
xpath.evaluate("/me:meeting/me:location/me:country", doc,
XPathConstants.STRING);
meetingStartDate = parseDate((String)
xpath.evaluate("/me:meeting/me:valid-from", doc, XPathConstants.STRING));
@@ -55,9 +58,14 @@
meetingType = (String)
xpath.evaluate("/me:meeting/me:meeting-type", doc, XPathConstants.STRING);
meetingWebsite = (String)
xpath.evaluate("/me:meeting/me:meeting-website", doc,
XPathConstants.STRING);
+ descriptionNodeList = (NodeList)
xpath.evaluate("/me:meeting/xhtml:body", doc, XPathConstants.NODESET);
+ log.warn("DEBUG: Desc: " + getDescription());
+
contactLastname = (String)
xpath.evaluate("/me:meeting/me:contact-person/me:lastname", doc,
XPathConstants.STRING);
contactFirstname = (String)
xpath.evaluate("/me:meeting/me:contact-person/me:firstname", doc,
XPathConstants.STRING);
contactEmail = (String)
xpath.evaluate("/me:meeting/me:contact-person/me:email", doc,
XPathConstants.STRING);
+ contactPhone = (String)
xpath.evaluate("/me:meeting/me:contact-person/me:phone", doc,
XPathConstants.STRING);
+ log.warn("DEBUG: Phone: " + contactPhone);
}
/**
@@ -145,8 +153,22 @@
public String getContactEmail() {
return contactEmail;
}
-
+
/**
+ * @see org.imstat.model.api.Meeting#getContactPhone()
+ */
+ public String getContactPhone() {
+ return contactPhone;
+ }
+
+ /**
+ * @see org.imstat.model.api.Meeting#getDescription()
+ */
+ public String getDescription() {
+ return XMLHelper.stringFromNodeList(descriptionNodeList, 0);
+ }
+
+ /**
* Parse date
* @param s Date as string
*/
More information about the Yanel-development
mailing list