Revision: 3316
Author: seba.wagner
Date: Fri Aug 13 04:44:12 2010
Log: Fix New Ldap Admin Interface Save, Update and Delete
http://code.google.com/p/openmeetings/source/detail?r=3316
Modified:
/trunk/singlewebapp/WebContent/openmeetings/modules/admin/ldap/ldapAdmin.lzx
/trunk/singlewebapp/WebContent/openmeetings/modules/admin/ldap/ldapAdminValueForm.lzx
/trunk/singlewebapp/src/app/org/openmeetings/app/data/basic/dao/LdapConfigDaoImpl.java
/trunk/singlewebapp/src/app/org/openmeetings/app/hibernate/beans/basic/LdapConfig.hbm.xml
/trunk/singlewebapp/src/app/org/openmeetings/app/hibernate/beans/basic/LdapConfig.java
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/admin/ldap/ldapAdmin.lzx
Wed Aug 11 14:49:22 2010
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/admin/ldap/ldapAdmin.lzx
Fri Aug 13 04:44:12 2010
@@ -47,7 +47,7 @@
<netparam><method name="getValue"> return parent.parent.orderby;
</method></netparam>
<netparam><method name="getValue"> return parent.parent.asc;
</method></netparam>
<handler name="ondata" args="value">
- //Debug.write("getOrganisations ",value);
+ if ($debug) Debug.write("getLdapConfigs ",value);
//this.parent.destroy();
this.parent.initValues(value.records);
this.parent.renderContent(value.result);
@@ -58,10 +58,10 @@
<![CDATA[
this.clearList();
for (var i=0;i<records.length;i++){
- new ldapAdminListItem(this._innerlist._inn._inn,{
+ new lz.ldapAdminListItem(this._innerlist._inn._inn,{
obj:records[i],
ldapConfigId:records[i].ldapConfigId,
- tName:records[i].tName,
+ tName:records[i].name,
configFileName:records[i].configFileName
});
}
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/admin/ldap/ldapAdminValueForm.lzx
Wed Aug 11 14:49:22 2010
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/admin/ldap/ldapAdminValueForm.lzx
Fri Aug 13 04:44:12 2010
@@ -20,12 +20,22 @@
<handler name="onnew">
this.ldapConfigId=0;
- this.orgname.setAttribute('text','');
+ this.tName.setAttribute('text','');
+ this.configFileName.setAttribute('text','');
+
+ this.addDomainToUserName.setValue(false);
+ this.domain.setAttribute('text','');
+
+ this.isActive.setValue(false);
+ this.updated.setAttribute('text','');
+ this.updatedby.setAttribute('text','');
+ this.inserted.setAttribute('text','');
+ this.updatedby.setAttribute('text','');
</handler>
<handler name="ondelete" >
if (this.ldapConfigId!=0){
- this.deleteOrganisation.doCall();
+ this.deleteLdapConfigById.doCall();
}
</handler>
@@ -43,6 +53,7 @@
<netparam><method name="getValue"> return canvas.sessionId;
</method></netparam>
<netparam><method name="getValue">return
parent.parent.ldapConfigId;</method></netparam>
<handler name="ondata" args="value">
+ if ($debug) Debug.write("getLdapConfigById ",value);
parent.initFields(value);
</handler>
</netRemoteCallHib>
@@ -51,6 +62,9 @@
<method name="initFields" args="obj">
<![CDATA[
+ if (obj == null) {
+ return;
+ }
this.ldapConfigId = obj.ldapConfigId;
this.tName.setAttribute('text',obj.name);
this.configFileName.setAttribute('text',obj.configFileName);
@@ -74,7 +88,7 @@
this.updated.setAttribute('text','');
}
if(obj.updatedby!=null){
- this.updatedby.setAttribute('text',obj.updatedby.login);
+
this.updatedby.setAttribute('text',obj.updatedby.firstname+' '+obj.updatedby.lastname+'['+obj.updatedby.login+']');
} else {
this.updatedby.setAttribute('text','');
}
@@ -84,10 +98,10 @@
} else {
this.inserted.setAttribute('text','');
}
- if(obj.updatedby!=null){
- this.updatedby.setAttribute('text',obj.updatedby.login);
+ if(obj.insertedby!=null){
+
this.insertedby.setAttribute('text',obj.insertedby.firstname+' '+obj.insertedby.lastname+'['+obj.insertedby.login+']');
} else {
- this.updatedby.setAttribute('text','');
+ this.insertedby.setAttribute('text','');
}
]]>
@@ -128,7 +142,7 @@
<netparam><method name="getValue">return
parent.sendObject;</method></netparam>
<handler name="ondata" args="val">
<![CDATA[
- //Debug.write("saveOrUpdateOrganisation: ",val);
+ if ($debug) Debug.write("saveOrUpdateLdapConfig: ",val);
if (val>0){
//Debug.write("saveOrUpdateUser val greater 0:
",val);
this.parent.parent._turnoverlist.oncallnext.sendEvent();
@@ -163,35 +177,35 @@
<labelCheckbox name="isActive" width="270" y="100" x="120"
fontsize="11" />
<labelText labelid="1110" width="200" y="130" resize="false" x="2"/>
- <labelText name="inserted" y="130" x="120" width="270" text="" />
+ <labelText name="inserted" y="130" x="120" width="270" text=""
bgcolor="0xCCCCCC"/>
<labelText labelid="1111" width="200" y="150" resize="false" x="2"/>
- <labelText name="insertedby" y="120" x="150" width="270" text="" />
+ <labelText name="insertedby" y="150" x="120" width="270" text=""
bgcolor="0xCCCCCC"/>
<labelText labelid="1112" width="200" y="170" resize="false" x="2"/>
- <labelText name="updated" y="170" x="120" width="270" text="" />
+ <labelText name="updated" y="170" x="120" width="270" text=""
bgcolor="0xCCCCCC"/>
<labelText labelid="1113" width="200" y="190" resize="false" x="2"/>
- <labelText name="updatedby" y="190" x="120" width="270" text="" />
+ <labelText name="updatedby" y="190" x="120" width="270" text=""
bgcolor="0xCCCCCC"/>
<view resource="messagebox_info_rsc" x="0" y="220" />
<labelText labelid="1114" x="24" y="220" fontstyle="italic"
multiline="true" width="370" />
- <labelText labelid="1115" width="200" y="260" resize="false" x="2"/>
- <customEdittext name="configFileName" y="260" x="120" width="270"
text="" />
-
- <view resource="messagebox_info_rsc" x="0" y="290" />
-
- <labelText labelid="1116" x="24" y="290" fontstyle="italic"
+ <labelText labelid="1115" width="200" y="280" resize="false" x="2"/>
+ <customEdittext name="configFileName" y="280" x="120" width="270"
text="" />
+
+ <view resource="messagebox_info_rsc" x="0" y="310" />
+
+ <labelText labelid="1116" x="24" y="310" fontstyle="italic"
multiline="true" width="370" />
- <labelText labelid="1117" width="200" y="350" resize="false" x="2"/>
- <labelCheckbox name="addDomainToUserName" width="270" y="350"
x="120" fontsize="11" />
-
- <labelText labelid="1118" width="200" y="380" resize="false" x="2"/>
- <customEdittext name="domain" y="380" x="120" width="270" text=""
/>
+ <labelText labelid="1117" width="200" y="400" resize="false" x="2"/>
+ <labelCheckbox name="addDomainToUserName" width="270" y="400"
x="160" fontsize="11" />
+
+ <labelText labelid="1118" width="200" y="430" resize="false" x="2"/>
+ <customEdittext name="domain" y="430" x="120" width="270" text=""
/>
</class>
=======================================
---
/trunk/singlewebapp/src/app/org/openmeetings/app/data/basic/dao/LdapConfigDaoImpl.java
Wed Aug 11 14:49:22 2010
+++
/trunk/singlewebapp/src/app/org/openmeetings/app/data/basic/dao/LdapConfigDaoImpl.java
Fri Aug 13 04:44:12 2010
@@ -34,8 +34,11 @@
ldapConfig.setName(name);
ldapConfig.setInserted(new Date());
if (insertedby != null) {
+
log.debug("addLdapConfig :1: "+UsersDaoImpl.getInstance().getUser(insertedby));
ldapConfig.setInsertedby(UsersDaoImpl.getInstance().getUser(insertedby));
}
+
+ log.debug("addLdapConfig :2: "+insertedby);
Object idf = HibernateUtil.createSession();
Session session = HibernateUtil.getSession();
@@ -78,8 +81,11 @@
ldapConfig.setName(name);
ldapConfig.setUpdated(new Date());
if (updatedby != null) {
+
log.debug("updateLdapConfig :1: "+UsersDaoImpl.getInstance().getUser(updatedby));
ldapConfig.setUpdatedby(UsersDaoImpl.getInstance().getUser(updatedby));
}
+
+ log.debug("updateLdapConfig :2: "+updatedby);
Object idf = HibernateUtil.createSession();
Session session = HibernateUtil.getSession();
@@ -103,7 +109,7 @@
public LdapConfig getLdapConfigById(Long ldapConfigId) {
try {
- String hql = "Select * From LdapConfig c " +
+ String hql = "select c from LdapConfig c " +
"WHERE c.ldapConfigId = :ldapConfigId "
+
"AND c.deleted LIKE :deleted";
=======================================
---
/trunk/singlewebapp/src/app/org/openmeetings/app/hibernate/beans/basic/LdapConfig.hbm.xml
Wed Aug 11 05:55:21 2010
+++
/trunk/singlewebapp/src/app/org/openmeetings/app/hibernate/beans/basic/LdapConfig.hbm.xml
Fri Aug 13 04:44:12 2010
@@ -13,8 +13,8 @@
<property name="isActive" type="boolean" column="is_active"/>
<property name="inserted" type="java.util.Date" column="inserted"/>
<property name="updated" type="java.util.Date" column="updated"/>
- <many-to-one outer-join="true" insert="false" column="insertedby_id"
lazy="false" update="false" name="insertedby"
class="org.openmeetings.app.hibernate.beans.user.Users"/>
- <many-to-one outer-join="true" insert="false" column="updatedby_id"
lazy="false" update="false" name="updatedby"
class="org.openmeetings.app.hibernate.beans.user.Users"/>
+ <many-to-one outer-join="true" insert="true" column="insertedby_id"
lazy="false" update="true" name="insertedby"
class="org.openmeetings.app.hibernate.beans.user.Users"/>
+ <many-to-one outer-join="true" insert="true" column="updatedby_id"
lazy="false" update="true" name="updatedby"
class="org.openmeetings.app.hibernate.beans.user.Users"/>
<property name="deleted" type="string" column="deleted"/>
</class>
</hibernate-mapping>
=======================================
---
/trunk/singlewebapp/src/app/org/openmeetings/app/hibernate/beans/basic/LdapConfig.java
Wed Aug 11 05:55:21 2010
+++
/trunk/singlewebapp/src/app/org/openmeetings/app/hibernate/beans/basic/LdapConfig.java
Fri Aug 13 04:44:12 2010
@@ -124,8 +124,8 @@
* @hibernate.many-to-one
* column = "insertedby_id"
* class = "org.openmeetings.app.hibernate.beans.user.Users"
- * insert="false"
- * update="false"
+ * insert="true"
+ * update="true"
* outer-join="true"
* lazy="false"
*/
@@ -140,8 +140,8 @@
* @hibernate.many-to-one
* column = "updatedby_id"
* class = "org.openmeetings.app.hibernate.beans.user.Users"
- * insert="false"
- * update="false"
+ * insert="true"
+ * update="true"
* outer-join="true"
* lazy="false"
*/
--
You received this message because you are subscribed to the Google Groups
"OpenMeetings developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/openmeetings-dev?hl=en.