This discussion is archived
2 Replies Latest reply: Dec 6, 2012 7:17 AM by 761975 RSS

Filter results for New Search Criteria of Advanced Search

761975 Newbie
Currently Being Moderated
Hi,

I'm new to oaf.
I have added extended VO item to seeded advanced search region as new search criteria by personalization.
When i try to search for new criteria the results are not filtering and my extended CO logic as follows:

IN PFR:
if(oapagecontext.getParameter(oaquerybean.getGoButtonName()) != null || oapagecontext.getParameter(oaquerybean.getPersonalizeGoButtonName()) != null)
{
OAAdvancedSearchBean oaadvancedsearchbean = (OAAdvancedSearchBean)oawebbean.findChildRecursive("assetAdvSearch");
boolean flag = true;
if(oaadvancedsearchbean != null)
{
int i = oaadvancedsearchbean.getDisplayedCriteriaCount();
String s4 = oapagecontext.getParameter("advancedSearchRadioGroup");
for(int j = 0; j < i; j++)
{
String s6 = (new StringBuilder()).append("Value_").append(Integer.toString(j)).toString();
String s7 = (new StringBuilder()).append("Condition_").append(Integer.toString(j)).toString();
String s8 = oaadvancedsearchbean.getOriginalUINodeName(s6);
if(s8.equals("XXAssocMsgInput"))
{
String xx=oapagecontext.getParameter(s6);
oapagecontext.writeDiagnostics(this, "criteria value: "+xx, 105);
if (xx !=null) {                                 
StringBuffer stringbuffer = new StringBuffer(100);
// Setting whereClause at Runtime to restrict the query
OAApplicationModule rootam = oapagecontext.getApplicationModule(oawebbean);
OAApplicationModule childAM = (OAApplicationModule)rootam.findApplicationModule("XXAdvSearchAM");
OAViewObject vvo1 = (OAViewObject)childAM.findViewObject("XXAdvSearchVO1");
Serializable[] parameters = {xx};
childAM.invokeMethod("getAssociateWith", parameters);

In AMImpl:

public void getAssociateWith(String xx)
{
OAViewObject vo = (OAViewObject)getXXAdvSearchVO1();
Vector parameters = new Vector(2);
StringBuffer whereClause = new StringBuffer(100);
int clauseCount = 0;
int bindCount = 0;
vo.setWhereClauseParams(null); // Always reset
if ((xx!=null) && (!("".equals(xx.trim()))))
{
whereClause.append(" ASSOCIATE_WITH LIKE :");
whereClause.append(++bindCount);
parameters.addElement(xx);
clauseCount++;
}
vo.setWhereClause(whereClause.toString());
writeDiagnostics(this,"In AMIMPL whereclause:"+whereClause.toString(),119);
if (bindCount >0)
{
Object[] params=new Object[bindCount];
parameters.copyInto(params);
vo.setWhereClauseParams(params);
writeDiagnostics(this,"In AMIMPL XXAdvSearchVO:"+vo.getQuery(),120);
writeDiagnostics(this,"In AMIMPL VO Cnt:"+vo.getRowCount(),121);
}
vo.executeQuery();
writeDiagnostics(this,"After query = " + vo.getQuery(),123);

}

In diagnostics, parameter is not getting assigned with the value ..
Can you anyone suggest the inputs?

Thanks,
mallik

Edited by: 758972 on Jul 29, 2012 1:09 PM
  • 1. Re: Filter results for New Search Criteria of Advanced Search
    Parag Narkhede Explorer
    Currently Being Moderated
    Mallik,

    Is it the same requirement which we were discussing in another thread, to add search criteria in advance serch bean through personalization.

    If yes, let me try at my end and will let you know..

    --Parag Narkhede                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
  • 2. Re: Filter results for New Search Criteria of Advanced Search
    761975 Newbie
    Currently Being Moderated
    Hi Parag,

    Did you have any updates on this?

    mallik

    Edited by: 758972 on Dec 6, 2012 9:17 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points