Troy,
You're on your own afaik.
Here's the code for my custom QBE template-level processing. You might
find it helpful for yours.
-- Curt
//********************************************************************
//**************************************************************************
**************
/**
* An event which is triggered in edit mode when the user clicks on
the "Search"
* button after specifying selection criteria. This should be tied to
a button on the page
*<br><br>
*/
//********************************************************************
//**************************************************************************
**************
public final int onSearchWebEvent( String args[] )
{
int command = PROCEED_WITH_BUILTIN_HANDLING;
try
{
//CSpLog.send(this, CSpLog.ERROR, "onSearchWebEvent: calling restore");
restorePageValues();
//get the web vars, needed by qbe controls:
Hashtable webvars = CSpider.getWebVars();
//start by clearing any existing criteria on the row container
//note: this leaves foreign key criteria intact
_crc.clearDynamicCriteria();
columnloop:
for (Enumeration e =
_topsectionbinding._bindings.elements();e.hasMoreElements();)
{
ColumnBinding cb = (ColumnBinding) e.nextElement();
//CSpLog.send(this, CSpLog.ERROR, "beginning field:
"+cb._displayfield.getName());
if (cb._displayfield instanceof CSpStaticText)
{
//don't try to get qbe values from static text fields
continue columnloop;
} //if (cb._displayfield instanceof CSpStaticText)
CSpValue value =cb._displayfield.getValue();
Object objvalue = NetDynamicsUtility.convertCSpValue(this,
value);
//CSpLog.send(this, CSpLog.ERROR, "the value of the field
is "+objvalue);
//if field was not displayed, or no qbe value specified, skip
if (NetDynamicsUtility.blankObject(this, objvalue))
{
//CSpLog.send(this, CSpLog.ERROR, "blank/null value,
skip field");
continue columnloop;
}//if (NetDynamicsUtility.blankObject(this, objvalue))
//see if upshifting or downshifting required
switch (cb._inputformat)
{
case SectionBinding.INPUT_UPSHIFT:
objvalue = objvalue.toString().trim().toUpperCase();
break; //case SectionBinding.INPUT_UPSHIFT:
case SectionBinding.INPUT_DOWNSHIFT:
objvalue = objvalue.toString().trim().toLowerCase();
break; //case SectionBinding.INPUT_UPSHIFT:
}//switch (cb._inputformat)
//CSpLog.send(this, CSpLog.ERROR, "the value of the field
is "+objvalue);
switch (cb._bindtype)
{
case HMSDisplayField.BIND_QBE_COLUMN:
//CSpLog.send(this, CSpLog.ERROR, "binding
type=BIND_QBE_COLUMN");
//now get any QBE info on this field. There should be
some, but, if none
//found, just skip to the next
CSpQBEControl qbecontrol = cb._displayfield.getQBEControl();
if (qbecontrol==null)
{
//CSpLog.send(this, CSpLog.ERROR, "qbe control is null,
skipping field");
continue columnloop;
}//if (qbecontrol==null)
qbecontrol.readWebValues(webvars);
//set criteria based on query type
switch (qbecontrol.getQueryType())
{
case CSpQBEControl.NO_QUERY_TYPE:
//CSpLog.send(this, CSpLog.ERROR, "query type is
NO_QUERY_TYPE, skipping field");
continue columnloop;
case CSpQBEControl.IMPLICIT_QUERY_TYPE:
//CSpLog.send(this, CSpLog.ERROR, "query type is IMPLICIT");
//CSpLog.send(this, CSpLog.ERROR, "single criterion
value is not blank, will be set");
if (!(objvalue instanceof Number))
{
//CSpLog.send(this, CSpLog.ERROR, "implicit string
equals operator will be used");
_crc.addDynamicCriterion (
cb._colpos,
HMSGeneralSelect.HMS_EQUAL_TO_STR_OPERA
HMSGeneralSelect.HMS_EQUAL_TO_STR_OPERATOR,
objvalue
);
}//if (!(objvalue instanceof Number))
else
{
//CSpLog.send(this, CSpLog.ERROR, "implicit int equals
operator will be used");
_crc.addDynamicCriterion (
cb._colpos,
HMSGeneralSelect.HMS_EQUAL_TO_INT_OPERA
HMSGeneralSelect.HMS_EQUAL_TO_INT_OPERATOR,
objvalue
);
}//else
break; //case CSpQBEControl.IMPLICIT_QUERY_TYPE:
case CSpQBEControl.EXPLICIT_QUERY_TYPE:
//CSpLog.send(this, CSpLog.ERROR, "query type is EXPLICIT");
int hmsexcriterionoperator=0;
try
{
hmsexcriterionoperator
=NetDynamicsUtility.getHMSCriterionOperator
(this,
qbecontrol.getSelectedQueryOperator());
}//try
catch (Exception ndex)
{
//CSpLog.send(this, CSpLog.ERROR,
//"error caught calling
NetDynamicsUtility.getHMSCriterionOperator: "
// + ndex + ", will skip this field");
continue columnloop;
}//catch (Exception ndex)
//CSpLog.send(this, CSpLog.ERROR, "the HMS
criterion operator="+
// hmsexcriterionoperator);
if (!qbecontrol.betweenQueryOperator())
{
// CSpLog.send(this, CSpLog.ERROR, "this is not a
'between' operator");
//only one value argument
// CSpLog.send(this, CSpLog.ERROR, "single criterion
value is not blank, will be set");
_crc.addDynamicCriterion (
cb._colpos,
hmsexcriterionoperator,
objvalue
);
}//if (!qbecontrol.betweenQueryOperator())
else
{
// CSpLog.send(this, CSpLog.ERROR, "this IS a
'between' operator");
Object objmaxvalue
=NetDynamicsUtility.convertCSpValue(this, qbecontrol.getMaxValue());
//see if upshifting or downshifting required
switch (cb._inputformat)
{
case SectionBinding.INPUT_UPSHIFT:
objmaxvalue = objmaxvalue.toString().trim().toUpperCase();
break; //case SectionBinding.INPUT_UPSHIFT:
case SectionBinding.INPUT_DOWNSHIFT:
objmaxvalue = objmaxvalue.toString().trim().toLowerCase();
break; //case SectionBinding.INPUT_UPSHIFT:
}//switch (cb._inputformat)
//CSpLog.send(this, CSpLog.ERROR, "max
value="+objmaxvalue);
// CSpLog.send(this, CSpLog.ERROR, "at least one
range criterion nonblank, will set");
//range argument (e.g. between a and b)
_crc.addDynamicCriterion (
cb._colpos,
hmsexcriterionoperator,
objvalue,
objmaxvalue
);
}//else
break; //case CSpQBEControl.EXPLICIT_QUERY_TYPE:
}//switch (qbecontrol.getQueryType())
break; //case HMSDisplayField.BIND_QBE_COLUMN:
default: //diagnostic only
//CSpLog.send(this, CSpLog.ERROR, "binding type is NOT
BIND_QBE_COLUMN");
}//switch (cb._bindtype)
}//for (Enumeration e =
_topsectionbinding._bindings.elements();e.hasMoreElements;)
_crc.serializeToSession();
_browsepage.load();
} // try
catch (Exception ex)
{
writeLog ( this, HMSLog.ERROR, "onSearchWebEvent" + ex );
command = STOP_PROCESSING;
} // catch
return (command);
} // public final int onSearchWebEvent( String args[] )
At 10:59 AM 10/19/99 -0400, Troy Mckinnon wrote:
>Hey,
>
>does anyone know if there is an easy way to make QPE with list boxes work
>for multiple selections...
>or do I have to write my own doQBEMulti() method to handle the ORs?
>
>Cheers
>
>Troy
>
>Troy McKinnon
>Technical Team Leader
>Integrated Quality Management System
>Software Solutions Group
>Nortel Networks - (Dept. 1P64)
>(613) 765-7685 or ESN (395) 7685
>
>_________________________________________________________________________
>
>For help in using, subscribing, and unsubscribing to the discussion
>forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
>
>For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]