ActionView Filter only archived records

Hi All
How to filter only archived record for ActionView ?

ActionViewBuilder actionView =
ActionView.define(I18n.get(“Historic colleague Archived Timesheets”))
.model(Timesheet.class.getName())
.add(“grid”, “timesheet-grid”)
.add(“form”, “timesheet-form”);

actionView.domain("(self.statusSelect = 3 OR self.statusSelect = 4)");

Hi,

What is your “statutSelect” ?
I did it with <domain>self.archived = true</domain>

Hi @matthias
statusSelect is timesheet status (approved, refused)
Already tried it!
There is CRITERIA.java that add archived is null or archived = false.
I want to add archive criteria. it seems not possible passing it in domain.

Thanks

1 « J'aime »

This class
axelor-core/src/main/java/com/axelor/rpc/Criteria.java
Line: 145

You make me read the doc further ^^

 The action view requires following elements:

    <view> - specify the view to use

        type - the view type

        name - the view name

    <view-param> - define additional view parameter

        name - parameter name

        value - parameter value

    <domain> - specify a domain filter to restrict search (jpql where clause)

    <context> - define the base context for the action

        name - context variable name

        expr - context variable value expression

The <view-param> parameter name accept following option :

    forceEdit - force to open in editable mode

    showSingle - show the only record in form view

    showRecord - show the record by given id in form view

    reload-dotted - whether to refresh the grid when switching back from form view

    showArchived - whether to include archived records

    search-filters - name of custom search filters

The answer is :

<view-param name="showArchived" value="true"/>
1 « J'aime »

I used that solution.
I also was looking to job Java side. However it’s work perfectly.

Fabio

1 « J'aime »

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.