Extjs - 如何在表单数据之前加载组合框数据

发布于 2024-10-27 15:41:41 字数 292 浏览 1 评论 0原文


我有一个包含几个组合框的表单,它们的数据来自服务器。
我需要在加载表单数据(从服务器)之前加载组合框的所有数据。
如果 Extjs 允许同步请求,我将使每个组合同步,然后加载表单数据。
但据我所知,一切都需要通过回调完成,这使得表单有点“重用较少”
知道如何解决吗? 为了清楚起见,我正在谈论编辑员工详细信息的情况,例如,其表单数据包含:
名字、姓氏、城市 ID(bombo)、国家 ID(组合) 而加载city_id和country_id的组合框数据对于selectedValue问题至关重要。

谢谢

I have a form that contains several comboxes that their data is coming from the server.
I need to load all of the combobox's data before the form data is loading (from the server).
If Extjs had allow synchronized requests, I would make every combo as synchronized, and after that loading the form data.
but as far as i know, everything needs to be done via callbacks, which makes the form a bit "re-use-less"
Any idea how to salve it?
Just to make it clear, I am talking about a situation of editing an employee details for example, which its form data contains:
first_name, last_name, city_id(bombo),country_id(combo)
And loading the combobox data of city_id and country_id is critical for the selectedValue issue.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鸵鸟症 2024-11-03 15:41:41
combo_store.load();

combo_store.on('load', function(st, records, options)
{
    // callback called after data loading in combo
    // you can load other data
});
combo_store.load();

combo_store.on('load', function(st, records, options)
{
    // callback called after data loading in combo
    // you can load other data
});
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文