Hello!
I'm developing some code. On it, im trying to set the display values of a SearchAttributeGroup object depending on the value previously selected in a SearchObjectTypeDropDownList. This is my code (the in variable type_name is the type selected in the dropdown list):
private void setSelectSearchAttributeGroupTypes(String type_name) throws Exception {
IDfSession session;
try {
createSessionManager("MyRep","dmadmin","admin");
session = sMgr.getSession("MyRep");
IDfQuery query = clientx.getQuery();
query.setDQL("select * from dmi_dd_attr_info where type_name='"+type_name+"'");
IDfCollection col = query.execute(session,DfQuery.DF_READ_QUERY);
SearchAttributeGroup attgSelectTypes= (SearchAttributeGroup)getControl("attributesearchcriteria",SearchAttributeGroup.class);
attgSelectTypes.clear();
while (col.next()){
SearchAttributeTag tag=new SearchAttributeTag();
tag.setAttribute(col.getString("attr_name"));
attgSelectTypes.addSelectableSearchAttribute(tag); (AdvSearchExArogestion.java:204)
}
col.close();
clientx = null;
sMgr = null;
} catch (Exception ex) {
throw ex;
}
}
But I get the following error:
java.lang.NullPointerException
at com.documentum.web.form.BodyControlTag.getForm(BodyControlTag.java:324)
at com.documentum.web.form.BodyControlTag.createControl(BodyControlTag.java:337)
at com.documentum.web.form.BodyControlTag.getControl(BodyControlTag.java:410)
at com.documentum.web.formext.control.docbase.search.SearchAttributeGroup.addSelectableSearchAttribute(SearchAttributeGroup.java:296)
at com.emc.xcelerator.advsearch.AdvSearchEx.setSelectSearchAttributeGroupTypes(AdvSearchEx.java:204)
at com.emc.xcelerator.advsearch.AdvSearchEx.selectSearchAttributeGroupTypes(AdvSearchEx.java:232) (The call to the setSelectSearchAttributeGroupTypes method)
How can I solve it?
Thanks in advance!