mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
Fix to clone a possibleValueSource filter before calling interpret values... added warning to the javadoc on that method - how to make better?
This commit is contained in:
@ -372,6 +372,10 @@ public class QQueryFilter implements Serializable, Cloneable
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
** Replace any criteria values that look like ${input.XXX} with the value of XXX
|
** Replace any criteria values that look like ${input.XXX} with the value of XXX
|
||||||
** from the supplied inputValues map.
|
** from the supplied inputValues map.
|
||||||
|
**
|
||||||
|
** Note - it may be very important that you call this method on a clone of a
|
||||||
|
** QQueryFilter - e.g., if it's one that defined in metaData, and that we don't
|
||||||
|
** want to be (permanently) changed!!
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
public void interpretValues(Map<String, Serializable> inputValues)
|
public void interpretValues(Map<String, Serializable> inputValues)
|
||||||
{
|
{
|
||||||
|
@ -1332,8 +1332,9 @@ public class QJavalinImplementation
|
|||||||
|
|
||||||
if(field.getPossibleValueSourceFilter() != null)
|
if(field.getPossibleValueSourceFilter() != null)
|
||||||
{
|
{
|
||||||
field.getPossibleValueSourceFilter().interpretValues(values);
|
QQueryFilter filter = field.getPossibleValueSourceFilter().clone();
|
||||||
input.setDefaultQueryFilter(field.getPossibleValueSourceFilter());
|
filter.interpretValues(values);
|
||||||
|
input.setDefaultQueryFilter(filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtils.hasContent(ids))
|
if(StringUtils.hasContent(ids))
|
||||||
|
Reference in New Issue
Block a user