onControlInitialized method of IControlListener interface
hi, i have a dmf:datagrid and there are checkbox and label in the each row of the datagrid.if the label equals to 0 i would like to make checkbox invisible, otherwise it will be visible.this scenario works for almost all checkboxes but except 1 checkbox:first checkbox.in additiion a check box which the rows label is not zero is visible.normally it should not be visible because its label is different from 0.table looks like this:
checkbox label
---------------- --------------
invisible 0
visible 0
visible 0
visible 1
code is in the onControlInitialized(Form arg0, Control arg1) method of IControlListener interface like this:
for (int i = 0; i < rows.size(); i++) {
dgr = rows.get(i);
dgr.setAccessible(true);
it = dgr.getContainedControls();
if (it.hasNext()) {
c = (Checkbox) it.next();// checkboxı al
System.out.println(c.getName());
}
if (it.hasNext()) {
it.next();// bir tane es geç
}
if (it.hasNext()) {
l = (Label) it.next();// return valueyu al
}
if (c != null) {
if (l != null && l.getLabel().equals("0")) {
c.setValue(true);
} else if (l != null && !l.getLabel().equals("0")) {
c.setVisible(false);
} else {
try {
throw new Exception("l null EXCEPTION");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
} else {
try {
throw new Exception("c null EXCEPTION");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
// if (it.hasNext()) {
//
// m = (Label) it.next();//queueitem idvalueyu al
// if(m.getLabel().equals("1b0237298005e9e9")){
// System.out.println("eşiittir");
// }
// else if(m.getLabel().equals("1b02372980365c08")){
// System.out.println("eşiittir2");
// }
// }
}
dg2.getDataProvider()
.sort("return_value", DataProvider.SORTDIR_FORWARD,
DataProvider.SORTMODE_NUMERIC);
// }
}
anybody who sees the problem?
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 153 General Questions
- 149 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 33 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories