Announcement

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

    Limitations of SelectItem and ComboboxItem

    I'm trying to achieve a type-ahead kind of functionality which when a user starts to type in a city code in a text item, it suggests the city as a drop-down list grid with two columns city code, city name and user should be able to populate the text selecting from the list grid too. User should be able to select multiple cities possibly using checkboxes. Also the list of cities is so huge that user has to do quite a bit of scrolling to select items which should be avoided.

    My approach so far.

    Implement ComboBoxItem or SelectItem which has already dataSource support and remove the pickerIcon and some styling to make it look like text Field.

    If you want to be able to type inside the textItem you need to choose ComboBoxItem (SelectItem doesn't allow this) but ComboboxItem doesn't allow selection of multiple options. I tried to set the ListGrid property which is used to as datasource for ComboboxItem, but it ignores the checkboxes.

    Another shortcoming inspite of using SelectItem I observed. When the list is huge users would prefer to select multiple entries by using the filter in the dropdown list grid. But when you select an entry, then try to filter and select another entry, the one previously selected is lost. So this defeats the whole purpose of having multiple selection option when the list is quite huge. The only way user can select multiple options is by navigating the entire list till he finds what he wants to select.

    People validate if my understanding is correct. Also if any of you had any workarounds to achieve what i wanted, could be of help to me.

    Thanks.

    #2
    Isomorphic,

    Can you please confirm if what I have mentioned are limitations or if I'm missing something.

    Thanks.

    Comment


      #3
      Hi,
      Yes - we currently don't support the feature you're describing directly.
      You could roll your own component based on a TextItem and a ListGrid.
      Alternatively if you're interested in having us build this for you as a Feature Sponsorship, let us know.

      Regards
      Isomorphic Software

      Comment


        #4
        I'm trying to achieve what I wanted using ComboBoxItem itself. I use FormItemCriteriaFunction to change the criteria .

        Code:
        filteredSelect.setPickListFilterCriteriaFunction(new FormItemCriteriaFunction() {
                    @Override
                    public Criteria getCriteria(FormItemFunctionContext formItemFunctionContext) {
                        String searchText = filteredSelect.getEnteredValue();
                        String scz = searchText.contains(",")?searchText.substring(searchText.lastIndexOf(",")+1).trim():searchText;
                        AdvancedCriteria criteria = new AdvancedCriteria(OperatorId.OR, new Criterion[]{
                                new Criterion("Name", OperatorId.ICONTAINS,scz ),
                                new Criterion("Email", OperatorId.ICONTAINS,scz)
                        });
        
                        return criteria;  //To change body of implemented methods use File | Settings | File Templates.
                    }
                });

        The picklist shows as per my need but I need to customize the way I set the value when an Item in the picklist is selected. Any method to do that. I want it to retain the previous item before comma even after new picklist selection based on what is present after the comma. Currently it gets overwritten with what is already present in the textitem.

        Thanks.

        Comment


          #5
          Isomorphic,

          Is there a way to override the behavior of setting the picklist clicked row value to textItem. I don't see any clickhandlers on the Picklist also.

          Thanks.

          Comment


            #6
            I'm trying to roll something similar together.

            curiousgally, did you find a solution for your case?

            Comment

            Working...
            X