cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to set a default date for a search?

Former Member
0 Kudos
448

Hi,

I'm currently working on a hmc search and I'm prefilling the default values like this:

<referencecollectioneditor create="false" add="true" remove="true" editable="false">
    <restriction attribute="product" sourceattribute="productLP" operator="equal" />
    <restriction attribute="validFrom" operator="equal" />
    <itemlayout> . . . </itemlayout>
 </referencecollectioneditor>
The restriction for the attribute product is working but now I want to set the current date for the attribute validFrom.

How can I prefill the attribute validFrom with the current date so that we don't have to set the date before every search?

Thanks in advance. Yours Oliver.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I guess you can override this method in de.hybris.platform.hmc.generic.nodes.ConditionNode:

 protected GenericConditionChip createGenericConditionChip(DisplayState displayState, ComposedType type, AbstractGenericConditionalSearchChip parent) {
        ...
 }

Looks like it only supports atomic types and Enumurations now.