Dear OpenMeetings Developers,
We would appreciate your guidance in migrating from OM-3.0.7 to
OM-3.1.2 our customization to invite SOAP attendees.
We would like to separate the invitee's name and email from the
Recipient field for entry.
In OM-3.1.2, the Recipients field has been enhanced by using
UserMultiChoice class.
1. To enter External Invitees, is it possible to organize a pair of
Name and EMail fields , as Sub-Radio group (External Invitee), within
the Recipients Radio group ? A Java method would add these to Recipients
field. (For already registered users, Recipient field would work as is).
2. To insert the concatenation of above two fields into Recipients, we
tried to do it two ways - both compiled fine, but did not work to do the
needful.
a) We tried JavaScript method in InvitationDialog.html but Recipient
field was not able to take it from there
<head>
<script>
function insertName(val){
recipients.value = "\"" + fullname.value + "\"" + " " +
"<" + email.value + ">" ;
}
</script>
</head>
. .. .. ..
<td><label wicket:for="email"><wicket:message key="226"
/></label></td>
<td><input type="text" wicket:id="email" class="input"
onblur="insertName(this);"/></td>
b) Create a User object and insert that into ArrayList, which is then
inserted into Recipients as below.
3. We have created the Java code as "updateRecipients()" method, that
should be called on blur (or end of change) for the email field.
We call it as follows from the email field:
rdi.add(new TextField<String>("email", email))
.add( new AjaxFormComponentUpdatingBehavior("onblur"){
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(AjaxRequestTarget target) {
url.setModelObject(null);
updateRecipients();
updateButtons(target);
}
}).setOutputMarkupId(true);
4. In updateRecipients(), we have a User object for the
External ID. We were able to compile this successfully, but it is not
working. What are we still missing?
private IModel<String> fullname = Model.of((String)null);
private IModel<String> email = Model.of((String)null);
// . . . Code to get fullname and email separately, and
parse out firstname, lastname
// Setup User object for external ID
UserDao userDao= new UserDao();
List<User> u1list = new ArrayList<User>();
User u1 = new User();
u1 = userDao.getNewUserInstance(null);
u1.setType(Type.external);
u1.setFirstname(firstname);
u1.setLastname(lastname);
IModel<String> us1 = Model.of((String)null);
us1.setObject("\"" + fullname.getObject() + "\"" + " "
+ "<" + email.getObject() + ">" );
u1.setExternalId(us1.getObject());
// Even this one did not help
// u1.getAddress().setEmail( email.getObject() );
// APPLY:
java.util.List.add(org.apache.openmeetings.db.entity.user.User)
u1list.add( u1 );
// Either of these lines one by one, did not help:
// recipients.setModelObject(u1list);
recipients.getModelObject().add(u1);
--
Regards,
Susheel Jalali
Coscend Communications Solutions
www.Coscend.com
----------------------------------------------------------------
CONFIDENTIALITY NOTICE: See 'Confidentiality Notice Regarding E-mail
Messages from Coscend Communications Solutions' posted at:
http://www.Coscend.com/Terms_and_Conditions.html