Thanks, that makes sense.
Those features would be nice.
I will try and make expressionFiltering work. That at least allows me to see the IN_SET and NOT_IN_SET operators as options now. I'll have to do some custom handling to get the filter to work but at least I'm closer.
Thanks again
Announcement
Collapse
No announcement yet.
X
-
What interface are you hoping for here?
If you consider an ordinary string field (no valueMap and no related DataSource) and the inSet/notInSet operator, the UI to allow people to use such an operator might involve a pop-up where you can input multiple string values. This is not a built-in UI we have right now (although note: you can do this via https://smartclient.com/smartclient-...pressionFilter).
If you were instead hoping that, since this is an FK field, when you pick inSet, the interface switches to a databound multi-select, this also isn't built-in (yet) and has some pretty interesting complexity to it, because:
1. we'd need to switch to a SelectItem and yet preserve the ability to switch operators with an icon to the left
2. the criteria generated are now criteria on the FK field, not on the displayField. This means the UI would be generating criteria for different fields depending on the chosen operator.
So which "validOperators" apply?
In sum, not every operator has a pre-built UI for this specific style of filtering, however, expressionFiltering and the FilterBuilder are other options if this kind of criteria is common in your app.
You could also consider Feature Sponsorship to add more built-in modes.
Leave a comment:
-
Isomorphic If you see the field above that, I have labelId which is the field I use in the grid and display the field label. label is the field displayed.
Removing hidden="true" has no effect.
I did notice that if I switch from using a ComboBoxItem in the ListGridField to a SelectItem, I don't get any options for filtering. Please see the attached images:
Why does SelectItems not work for filtering and comboBoxItems not display IN_SET and NOT_IN_SET filtering operators?
Leave a comment:
-
In the code snippet above, you have set validOperators on a hidden field. This field is not displayed. Set them on the field that is displayed to make them work.
Leave a comment:
-
Hi Blama
Thanks for pointing that out. That did solve some of the issue, but I still don't see all the assigned operators.
Isomorphic Do you have any suggestions?
Leave a comment:
-
Thanks Blama, that is what I was missing.
I have noticed that all assigned operators are not shown in the selection.
Grid Operators:
Assigned Valid Operators:
ListGridField:
I assume that since we're using type="integer" but displaying type="text" the operators are getting confused?
Let me know what you think :)
Best Regards
Leave a comment:
-
Hi zhene,
you need to tell the framework where to look for .ds.xml files, you do this in server.properties by editing project.datasources:
Code:project.datasources: $webRoot/ds, $webRoot/types
Also, I'd load all your Types/DataSources in one call, as you have no hard guarantee that the Types call will be faster than the DataSources call. Just list the Types before any DataSource in the query string.
Best regards
Blama
Leave a comment:
-
Hi Isomorphic,
Thanks for the build, that fixed my error and it all works now.
I tried creating a SimplyType because I use the same operators on multiple fields but I run into this error:
Error 1:
Error 2:
SimpleType Example:
DataSourceField Example:
Index Location:
Folder Locations: (DataSources are in SQL folder)
Any help would be great :)
Regards
Leave a comment:
-
-
Thanks for point that out - yes all the "green properties" (non-method properties) are actually settable in a SimpleType .type.xml file. The docs now reflect this.
EDIT: just a further note: those properties already worked, it's just the documentation that has been updated to reflect pre-existing support.
Leave a comment:
-
Hi Isomorphic,
I think I understand the blocking issue here, at least for methods like SimpleType.editFormatter.
But does this also apply to the "green properties" in the SimpleType instance APIs?
The way I understand it, from a technical perspective valueMap (possible in .ds.xml for both DataSourceField and SimpleType) should be similar to validOperators, which is only possible in .ds.xml DataSourceField.
Shouldn't it then also be possible to set much more properties of .ds.xml DataSourceField also in .ds.xml SimpleType - at least all the "green properties" mentioned in the SmartClient SimpleType instance APIs that are supported clientside in the framework anyway?
Best regards
Blama
Leave a comment:
-
Blama the part of the reference you're looking at shows properties that can be set in XML only. Other properties are on the SimpleType class in the client.data package here. In the SmartClient reference, they are instead combined, since you can set JavaScript functions inside the XML (can't do that with Java / GWT).
zhene there were regressions caught by our automated testing system that caused the build to not be published. They've been corrected and new builds will be up soon.
Leave a comment:
-
We don't see the 28th build. Is it published yet? IsomorphicLast edited by zhene; 31 May 2022, 06:08.
Leave a comment:
-
Hi Isomorphic,
I just realized these .ds.xml docs already exist. But they list much less properties than the SmartClient clientside docs from #11. Is this correct?
Best regards
Blama
Leave a comment:
Leave a comment: