Home » Eclipse Projects » Eclipse Scout » Loading master detail data on tabboxes(Loading master detail data on tabboxes)
|
Re: Loading master detail data on tabboxes [message #1535514 is a reply to message #1534068] |
Mon, 29 December 2014 19:19 |
|
Hello there,
I have not tried it yet. But I'll also need some kind of lazy loading in my app. My approach would be the org.eclipse.scout.rt.client.ui.form.fields.tabbox.AbstractTabBox.execTabSelected(IGroupBox) callback. There I would call a service to fill the TableFieldData according to the selected IGroupBox. The only open question for me is, how i can specifically invoke the importFormData method just for this particular table field, in order to get it displayed on the screen as well?
Regards, Peter
|
|
| | |
Re: Loading master detail data on tabboxes [message #1545452 is a reply to message #1545444] |
Sun, 04 January 2015 09:59 |
Tore Van Grembergen Messages: 19 Registered: July 2014 Location: Bassevelde |
Junior Member |
|
|
Dear Peter,
No realy sure what you mean.
What I have done is in the "load service" add different calls for all the tabs
(Don't know if it is a good way, but it seems to be working)
I have know something like :
....
cSQLVertalingen = "call sp_tdtdrankv_selectdetail(:drankNr) ";
oVertalingen = SQL.select(cSQLVertalingen, formData);
formData.getVertalingenTable().clearRows();
for (Object[] oVertaling : oVertalingen) {
formData.getVertalingenTable().addRow(oVertaling);
}
cSQLAccvoorraadfiches = "call sp_tdtaccfch_selectdetailmetdranknr(:drankNr, :taalnr)";
oAccvoorraadfiches = SQL.select(cSQLAccvoorraadfiches, formData, new NVPair("taalnr", nTaalnr));
formData.getAccijnsvoorraadfichesTable().clearRows();
for (Object[] oAccvoorraadfiche : oAccvoorraadfiches) {
formData.getAccijnsvoorraadfichesTable().addRow(oAccvoorraadfiche);
}
cSQLAromas = "call sp_tdtdrankar_selectdetail(:taalnr, :drankNr, :aromanr)";
oAromas = SQL.select(cSQLAromas, formData, new NVPair("taalnr", nTaalnr), new NVPair("aromanr", 0));
formData.getAromasTable().clearRows();
for (Object[] oAroma : oAromas) {
formData.getAromasTable().addRow(oAroma);
}
cSQLKeurmerken = "call sp_tdtdrankkm_selectdetail(:taalnr, :drankNr, :keurmerknr)";
oKeurmerken = SQL.select(cSQLKeurmerken, formData, new NVPair("taalnr", nTaalnr), new NVPair("keurmerknr", 0));
formData.getKeurmerkenTable().clearRows();
for (Object[] oKeurmerk : oKeurmerken) {
formData.getKeurmerkenTable().addRow(oKeurmerk);
}
cSQLSmaken = "call sp_tdtdranksm_selectdetail(:taalnr, :drankNr, :smaaknr)";
oSmaken = SQL.select(cSQLSmaken, formData, new NVPair("taalnr", nTaalnr), new NVPair("smaaknr", 0));
formData.getSmakenTable().clearRows();
for (Object[] oSmaak : oSmaken) {
formData.getSmakenTable().addRow(oSmaak);
}
cSQLGistingswijzen = "call sp_tdtdrnkgst_selectdetail(:taalnr, :drankNr, :gistwnr)";
oGistingswijzen = SQL.select(cSQLGistingswijzen, formData, new NVPair("taalnr", nTaalnr), new NVPair("gistwnr", 0));
formData.getGistingswijzenTable().clearRows();
for (Object[] oGistingswijze : oGistingswijzen) {
formData.getGistingswijzenTable().addRow(oGistingswijze);
}
....
As far as I think it is working; I have one call to the server to fill in the formData object, but I have different calls to the database server.
Kind regards
Tore
|
|
| | |
Goto Forum:
Current Time: Wed Sep 18 21:15:42 GMT 2024
Powered by FUDForum. Page generated in 0.03697 seconds
|