tieniber / GridSearch

A Mendix widget package to add custom multi-field searching to data grids and template grids.
6 stars 18 forks source link

Sometimes error after switching between view and overview page and selecting a filter on overview page #21

Closed GielvanaltenaFF closed 5 years ago

GielvanaltenaFF commented 5 years ago

We are using the dropdown dynamic widget on a overview page in Mendix 7.21.0. When I open a view page, come back to the overview page, and select a filter, I sometimes get a system error.

I have removed all other widgets from the overview and view page, with the same result.

I have tried different search attributes as a filter, with the same result.

Below are the error messages. It seems that the dropdown dynamic widget is doing the wrong xpath query. The listview is showing Productiestaat entity. The widget should query the Productiestaat entity with Status as search attribute, but is looking into the Productieregel entity with Status as search attribute and Productieregel has no Status attrubute.

Please help.

1) This Mendix version is not compatible with list view controls. The List view controls use is limited.

2) Executing query with old implementation due to detected exception in new implementation: Can't find table by name 'x1Productie.Productieregel' in entities 'x1Productie.Productieregel' (alias for 'Productie.Productieregel'), 'Productie.Productieregel' and can't find attribute with name 'Status' in entity Productie.Productieregel while parsing path 'x1Productie.Productieregel/Status'

3) Exception while retrieving data for list widget 'Productie.SNP_Opdracht_ViewProductie.listView1' on page 'Productie.Productiestaat_View' .............. Entity 'Productie.Productieregel' doesn't contain association 'Status'. Entity is used in path 'Productie.Productieregel'., exception occurred on mapping the following query: SELECT x1Productie.Productieregel.ID FROM Productie.Productieregel AS x1Productie.Productieregel WHERE c1productie$productieregel_productie.productie$productieid = ? AND x1Productie.Productieregel/Status = 'COMPLEET', exception occurred on mapping the following query: SELECT Productie.Productieregel/* FROM Productie.Productieregel WHERE Productie.Productieregel.ID IN (SELECT x1Productie.Productieregel.ID FROM Productie.Productieregel AS x1Productie.Productieregel WHERE c1productie$productieregel_productie.productie$productieid = ? AND x1Productie.Productieregel/Status = 'COMPLEET') ORDER BY Code ASC LIMIT 50

tieniber commented 5 years ago

The search widget should have a property where you enter the name of the list widget that you’ll be searching, or optionally a CSS class. Is there a chance you have a list on both the overview and view pages with the same name (or class)? The search widget might be finding the wrong grid/list to fire a search upon, which would explain this error.

tieniber commented 5 years ago

Closing due to inactivity. Please feel free to comment here if you feel there is an issue still outstanding.