|
| Hi,
is there somebody who ever tried to customize the search in accelerator?
For a start I just used one of the customizable fields in catentry (FIELD5) and tried to add it to the catentry search.
I added the field5 to CatEntrySearchDialogResult and made all the other changes described for adding the keyword search. This works fine.
Then I did the customization of the search as described in "WebSphere Commerce Accelerator Customization Guide". Only difference: Accelerator uses the AdvancedCatEntrySearchDataBean.
My problem: when I use field5 as search criteria, it is just ignored. I don't get any error messages.
I found out that it is not part of the select statement, however the where predicate for field5 is generated. But it is not added to the final select statement.
anyone has an idea? I attached the code of CustomCatEntrySearchListDataBean. (I use WCToolkit 5.6)
Thanks in advance!
public class CustomCatEntrySearchListDataBean extends AdvancedCatEntrySearchListDataBean{
protected java.lang.String field5;
/**
* ExtendedCatEntrySearchListDataBean constructor comment.
*/
public CustomCatEntrySearchListDataBean() {
super();
}
public void populate() {
ECTrace.entry(ECTraceIdentifiers.COMPONENT_SEARCH, this.getClass().getName(),
"Custompopulate()");
ECTrace.trace(ECTraceIdentifiers.COMPONENT_SEARCH, this.getClass().getName(),
"setPredefinedAttributes()", "field5 = "+ field5 );
super.initialize();
Field5Query cq = new Field5Query();
super.setRuleQuery(cq);
super.setPredefinedAttributes();
if(field5 != null){
try {
cq.addSelectAttribute(field5Query.CATENTRY_Field5_Attr, RuleQuery.AND_Operator, field5);
} catch (Exception e) {
e.printStackTrace();
}
}
}
super.setIsAllNull(false);
super.execute();
ECTrace.exit(ECTraceIdentifiers.COMPONENT_SEARCH, this.getClass().getName(),
"populateCustom()");
}
public String getField5() {
return(field5);
}
public void setField5(String newField5) {
field5 = newField5;
}
|
|