Lookup Search filter only has =,<>,not null and null options

Issue #26 resolved
Former user created an issue

Hi Team,

Thanks a lot for this wonderful component.

I need solution for the following two scenario. I doubt if it should come under bug or not

  1. I want lookup column search filter should behave like a String filter. But I am able to see only =,<>,not null and null options. No Like and Contains options are listed down

  2. I want to restrict user to input via lookup popup only. I tried for textbox disabling options. But the entire lookup component gets disabled. How to proceed with this scenario.

Thanks, Magesh

Comments (15)

  1. Panemu Ind repo owner

    Hi Astri, please analize this issue. Take a note that LookupColumn hold complex object unlike text ur number columns. You can work on tiwulfx v.2. We can backported later. Thanks

  2. Magesh Somasundaram

    Hi Team,

    Any update or any workaround for this issue? Please provide your thought.So that I can plan my deliverables.

    Thanks, Magesh

  3. Astri Afrianti

    Hi Magesh,

    Currently I'm working on this Issue, It's not finished yet, especially the second point (restrict user to input via lookup popup only)

    It's still on my forked. Hope I can finish this issue tomorrow so it can be reviewed soon.

    Cheers, Astri

  4. Panemu Ind repo owner

    setDisableManualInput(boolean) is added in LookupField and LookupColumn to serve this purpose

  5. magesh waran

    The Foreign table reference value is not displayed in search box. It is empty. Can we able to search the table with forign key? Please refer the screenshot

  6. Amrullah

    Hi Magesh,

    I am afraid I don't really understand what you want.

    You can type "Tanzanian Shilling" in the search box can't you?

  7. magesh waran

    Hi Jingglang,

    Yes I am able to search like that. But what I thought was it would look good if this search box works like the same as others by taking the field value on what we right click.

    I have done the code changes as below on TableControl.java -> tableRightClickListener

    if (column instanceof LookupColumn) {
                            Object lookupObject = column.getCellData(row);
                            String lookupPropName = ((LookupColumn) column).getLookupPropertyName().toString();
                            try {
                                Field field = lookupObject.getClass().getDeclaredField(lookupPropName);
                                field.setAccessible(true);
                                clm.setDefaultSearchValue(field.get(lookupObject).toString());
                                field.setAccessible(false);
                            } catch (NoSuchFieldException | SecurityException
                                    | IllegalArgumentException
                                    | IllegalAccessException excp) {
                                throw new RuntimeException(excp);
                            }
                        }else{
                            clm.setDefaultSearchValue(column.getCellData(row));
                        }
    

    I am able to see the value in defaultsearch on debug, but it is not displaying in the search box.

    Still what you have told is correct we can type and serach the row.

    If possible have a check and provide your view.

    Thanks,

    Magesh

  8. Amrullah

    Hi Magesh,

    I've pushed some changes to java8 branch in regard with default search value for LookupColumn. (commit id: 13dff5f)

    Please let me know if it solve your problem so I can close this issue.

  9. magesh waran

    Hi Jingglang,

    This works as expected, thanks for your quick turnaround.

    Please close the defect

    Thanks, Magesh

  10. Log in to comment