0

I'm using struts+spring+hibernate.

On my .jsp page, I have two autocompleter drop down menus. Each one returns a list of VOs from their specific table in the database, which is then used to call a search action that searches from another table. Menu A links to table A, and menu B links to table B, and they are used to search in table C. However, table B has a foreign key that links it to table A Table C has a foreign key that links it to table B.

I would like it to be that when the user picks an option from menu A, menu B is updated so it only includes options that contain the proper foreign key. The user then can pick something specific from menu B and have the action search table C only for rows containing the proper foreign key. If the user does not touch table B, then the action will search for all rows in table C containing all foreign keys from Table B that match the one chosen in table A.

I hope this is understandable and let me know if I need to clarify. I've been googling for some time and it might be a simple solution but I can't find anything. Thanks.

4

1 回答 1

0

您必须将第二个自动完成器的小部件的 href 绑定到旧的 json 查询 + 使用的额外参数

jQuery.struts2_jquery_ui.bind(widget,options_auto_iban_widget);

我只是发布了一个示例:How to reload the struts2-jquery autocompleter X with value selected from another struts2-jquery autocompleter Y

于 2013-10-10T16:35:28.280 回答