Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • zhene
    replied
    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

    Leave a comment:


  • Isomorphic
    replied
    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:


  • zhene
    replied
    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:

    Click image for larger version

Name:	Screenshot 2022-07-21 102815.png
Views:	277
Size:	7.7 KB
ID:	268375Click image for larger version

Name:	Screenshot 2022-07-21 102832.png
Views:	240
Size:	25.4 KB
ID:	268376

    Why does SelectItems not work for filtering and comboBoxItems not display IN_SET and NOT_IN_SET filtering operators?​

    Leave a comment:


  • Isomorphic
    replied
    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:


  • zhene
    replied
    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:


  • Blama
    replied
    Hi zhene,

    I'm pretty sure the capitalisation of the 1st two is wrong Equals->equals and NotEqual->notEqual.

    Can you have a look what difference this makes?


    Best regards
    Blama

    Leave a comment:


  • zhene
    replied
    Thanks Blama, that is what I was missing.

    I have noticed that all assigned operators are not shown in the selection.

    Grid Operators:
    Click image for larger version

Name:	availableOperators.png
Views:	142
Size:	11.7 KB
ID:	268160

    Assigned Valid Operators:
    Click image for larger version

Name:	FieldExample.png
Views:	124
Size:	72.1 KB
ID:	268161

    ListGridField:
    Click image for larger version

Name:	gridFIeld.png
Views:	117
Size:	91.3 KB
ID:	268162

    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:


  • Blama
    replied
    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
    Adjust this to your folder names.

    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:


  • zhene
    replied
    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:
    Click image for larger version

Name:	Error1.png
Views:	131
Size:	186.9 KB
ID:	268146
    Error 2:
    Click image for larger version

Name:	Error2.png
Views:	120
Size:	140.9 KB
ID:	268147
    SimpleType Example:
    Click image for larger version

Name:	SimpleTypeExample.png
Views:	133
Size:	60.0 KB
ID:	268148
    DataSourceField Example:
    Click image for larger version

Name:	FieldExample.png
Views:	124
Size:	10.3 KB
ID:	268149
    Index Location:
    Click image for larger version

Name:	index.png
Views:	119
Size:	15.6 KB
ID:	268150
    Folder Locations: (DataSources are in SQL folder)
    Click image for larger version

Name:	FolderLocation.png
Views:	127
Size:	24.8 KB
ID:	268151

    Any help would be great :)

    Regards

    Leave a comment:


  • Blama
    replied
    Hi Isomorphic,

    I can see the change in the docs here, thanks.

    Best regards
    Blama

    Leave a comment:


  • Isomorphic
    replied
    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:


  • Blama
    replied
    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:


  • Isomorphic
    replied
    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:


  • zhene
    replied
    We don't see the 28th build. Is it published yet? Isomorphic
    Last edited by zhene; 31 May 2022, 06:08.

    Leave a comment:


  • Blama
    replied
    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:

Working...
X