Hi all,
Env :
1.GWT Version : 2.3.0
2.SGWT Version : SmartGWT 2.5 EE (Eval) build - 15.06.2011
3.OS : Ubuntu 9.10
4.Browser : Firefox 3.5.8 (Also I tried on Firefox 5.0 : result is the same).
5.DB Version : Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
I'm trying to make comboboxitem with optiondatasource work normally for three weeks but no success :(.
here is a simplest example about this :
1. Server side datasource XML file (SQLDatasource) :
2. and the client code :
3. Server side Logs (When not working):
problem is that "firstNameItem.setValue(9114);" not works every time when i refresh the page.
Did I miss something ?
Is there any example about ComboboxItem and OptionDatasource ?
Also sometimes I see 9114(firstname_Id) not the description. If i click cursor into combobox and then leave the text is appeard.
For clear explanation I'll attach images here.
Any Ideal will be appreciated.
Regards,
Paata Lominadze.
Env :
1.GWT Version : 2.3.0
2.SGWT Version : SmartGWT 2.5 EE (Eval) build - 15.06.2011
3.OS : Ubuntu 9.10
4.Browser : Firefox 3.5.8 (Also I tried on Firefox 5.0 : result is the same).
5.DB Version : Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
I'm trying to make comboboxitem with optiondatasource work normally for three weeks but no success :(.
here is a simplest example about this :
1. Server side datasource XML file (SQLDatasource) :
Code:
<DataSource
ID="FirstNameDS"
serverType="sql"
tableName="info.firstnames"
qualifyColumnNames="false">
<fields>
<field name="firstname_Id" type="integer" title="ID" hidden="true" primaryKey="true" />
<field name="firstname" type="text" title="Firstname"/>
</fields>
<operationBindings>
<operationBinding operationId="searchFromDBCustomForCombos" operationType="fetch">
<selectClause>
t.firstname_Id,
t.firstname
</selectClause>
<tableClause>firstnames t</tableClause>
<whereClause><![CDATA[
t.deleted = 0
#if($criteria.firstname) AND t.firstname like ($criteria.firstname)||'%' #end
]]>
</whereClause>
</operationBinding>
</operationBindings>
</DataSource>
Code:
public class CallCenter implements EntryPoint {
public void onModuleLoad() {
try {
// form
DynamicForm form = new DynamicForm();
form.setPadding(10);
form.setAutoFocus(true);
form.setWidth100();
form.setTitleWidth(80);
form.setNumCols(2);
form.setTitleOrientation(TitleOrientation.TOP);
// comboboxitem
final ComboBoxItem firstNameItem = new ComboBoxItem();
// title for this comboboxitem
firstNameItem.setTitle("სახელი");
firstNameItem.setName("firstname_Id");
firstNameItem.setWidth(270);
firstNameItem.setFetchMissingValues(true);
firstNameItem.setFilterLocally(true);
firstNameItem.setAddUnknownValues(false);
// datasource
DataSource firstNamesDS = DataSource.get("FirstNameDS");
// fetch name
firstNameItem.setOptionOperationId("searchFromDBCustomForCombos");
firstNameItem.setOptionDataSource(firstNamesDS);
firstNameItem.setValueField("firstname_Id");
firstNameItem.setDisplayField("firstname");
Criteria criteria = new Criteria();
firstNameItem.setOptionCriteria(criteria);
firstNameItem.setAutoFetchData(true);
DSRequest dsRequest = new DSRequest();
dsRequest.setOperationId("searchFromDBCustomForCombos");
firstNamesDS.fetchData(criteria, new DSCallback() {
@Override
public void execute(DSResponse response, Object rawData,
DSRequest request) {
// this works sometimes !!!!!!!!!!!!!!!!!
firstNameItem.setValue(9114);
}
}, dsRequest);
form.setFields(firstNameItem);
RootPanel.get().add(form);
} catch (Exception e) {
e.printStackTrace();
SC.say(e.toString());
}
}
}
Code:
=== 2011-06-30 22:58:18,117 [0-36] INFO RequestContext - URL: '/CallCenter.html', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,118 [0-36] INFO Compression - /CallCenter.html: 1302 -> 505 bytes
=== 2011-06-30 22:58:18,129 [0-36] INFO RequestContext - URL: '/CallCenter.css', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,129 [0-36] INFO Compression - /CallCenter.css: 341 -> 225 bytes
=== 2011-06-30 22:58:18,133 [0-37] INFO RequestContext - URL: '/callcenter/sc/DataSourceLoader', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,133 [0-35] INFO RequestContext - URL: '/callcenter/sc/DataSourceLoader', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,133 [0-26] INFO RequestContext - URL: '/callcenter/sc/DataSourceLoader', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,138 [0-33] INFO RequestContext - URL: '/callcenter/sc/DataSourceLoader', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,148 [0-36] INFO RequestContext - URL: '/callcenter/callcenter.nocache.js', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,149 [0-36] INFO Compression - /callcenter/callcenter.nocache.js: 8409 -> 2749 bytes
=== 2011-06-30 22:58:18,157 [0-36] INFO RequestContext - URL: '/callcenter/sc/modules/ISC_Core.js', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,220 [0-36] INFO Compression - /callcenter/sc/modules/ISC_Core.js: 687348 -> 178147 bytes
=== 2011-06-30 22:58:18,412 [0-36] INFO RequestContext - URL: '/callcenter/sc/modules/ISC_Foundation.js', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,430 [0-36] INFO Compression - /callcenter/sc/modules/ISC_Foundation.js: 222082 -> 52811 bytes
=== 2011-06-30 22:58:18,432 [0-35] INFO RequestContext - URL: '/callcenter/sc/modules/ISC_Forms.js', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,432 [0-26] INFO RequestContext - URL: '/callcenter/sc/modules/ISC_Grids.js', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,432 [0-32] INFO RequestContext - URL: '/callcenter/sc/modules/ISC_RichTextEditor.js', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,434 [0-37] INFO RequestContext - URL: '/callcenter/sc/modules/ISC_Containers.js', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,436 [0-32] INFO Compression - /callcenter/sc/modules/ISC_RichTextEditor.js: 40251 -> 11207 bytes
=== 2011-06-30 22:58:18,443 [0-37] INFO Compression - /callcenter/sc/modules/ISC_Containers.js: 116844 -> 28255 bytes
=== 2011-06-30 22:58:18,451 [0-33] INFO RequestContext - URL: '/callcenter/sc/modules/ISC_Calendar.js', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,459 [0-33] INFO Compression - /callcenter/sc/modules/ISC_Calendar.js: 103425 -> 24884 bytes
=== 2011-06-30 22:58:18,462 [0-36] INFO RequestContext - URL: '/callcenter/sc/modules/ISC_RealtimeMessaging.js', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,463 [0-36] INFO Compression - /callcenter/sc/modules/ISC_RealtimeMessaging.js: 9049 -> 2776 bytes
=== 2011-06-30 22:58:18,464 [0-33] INFO RequestContext - URL: '/callcenter/sc/modules/ISC_DataBinding.js', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,472 [0-32] INFO RequestContext - URL: '/callcenter/sc/skins/Enterprise/load_skin.js', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,473 [0-32] INFO Download - done streaming: /home/kakha/workspaceEclipse/CallCenter/war/callcenter/sc/skins/Enterprise/load_skin.js
=== 2011-06-30 22:58:18,475 [0-32] INFO Compression - /callcenter/sc/skins/Enterprise/load_skin.js: 29924 -> 6382 bytes
=== 2011-06-30 22:58:18,487 [0-37] INFO RequestContext - URL: '/callcenter/sc/initsc.js', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,487 [0-37] INFO Compression - /callcenter/sc/initsc.js: 47 -> 72 bytes
=== 2011-06-30 22:58:18,495 [0-37] INFO RequestContext - URL: '/callcenter/sc/skins/EnterpriseBlue/load_skin.js', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:18,496 [0-37] INFO Download - done streaming: /home/kakha/workspaceEclipse/CallCenter/war/callcenter/sc/skins/EnterpriseBlue/load_skin.js
=== 2011-06-30 22:58:18,497 [0-35] INFO Compression - /callcenter/sc/modules/ISC_Forms.js: 587147 -> 143388 bytes
=== 2011-06-30 22:58:18,497 [0-37] INFO Compression - /callcenter/sc/skins/EnterpriseBlue/load_skin.js: 29961 -> 6373 bytes
=== 2011-06-30 22:58:18,567 [0-26] INFO Compression - /callcenter/sc/modules/ISC_Grids.js: 718368 -> 180911 bytes
=== 2011-06-30 22:58:18,584 [0-33] INFO Compression - /callcenter/sc/modules/ISC_DataBinding.js: 513027 -> 127563 bytes
=== 2011-06-30 22:58:19,075 [0-26] INFO RequestContext - URL: '/callcenter/sc/skins/Enterprise/skin_styles.css', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:19,076 [0-26] INFO Download - done streaming: /home/kakha/workspaceEclipse/CallCenter/war/callcenter/sc/skins/Enterprise/skin_styles.css
=== 2011-06-30 22:58:19,078 [0-26] INFO Compression - /callcenter/sc/skins/Enterprise/skin_styles.css: 61169 -> 8018 bytes
=== 2011-06-30 22:58:19,123 [0-26] INFO RequestContext - URL: '/callcenter/sc/skins/EnterpriseBlue/skin_styles.css', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:19,124 [0-26] INFO Download - done streaming: /home/kakha/workspaceEclipse/CallCenter/war/callcenter/sc/skins/EnterpriseBlue/skin_styles.css
=== 2011-06-30 22:58:19,126 [0-26] INFO Compression - /callcenter/sc/skins/EnterpriseBlue/skin_styles.css: 61039 -> 8009 bytes
=== 2011-06-30 22:58:19,156 [0-26] INFO RequestContext - URL: '/callcenter/gwt/standard/standard.css', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:19,158 [0-26] INFO Compression - /callcenter/gwt/standard/standard.css: 26953 -> 3866 bytes
=== 2011-06-30 22:58:19,159 [0-33] INFO RequestContext - URL: '/callcenter/custom-control-styles.css', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:19,159 [0-33] INFO Compression - /callcenter/custom-control-styles.css: 1325 -> 661 bytes
=== 2011-06-30 22:58:21,713 [0-33] INFO RequestContext - URL: '/callcenter/sc/skins/EnterpriseBlue/images/pickers/comboBoxPicker.png', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:21,714 [0-33] INFO Download - done streaming: /home/kakha/workspaceEclipse/CallCenter/war/callcenter/sc/skins/EnterpriseBlue/images/pickers/comboBoxPicker.png
=== 2011-06-30 22:58:21,763 [0-35] INFO RequestContext - URL: '/callcenter/sc/IDACall', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:21,765 [0-35] DEBUG XML - Parsed XML from (in memory stream): 1ms
=== 2011-06-30 22:58:21,767 [0-35] DEBUG RPCManager - Processing 1 requests.
=== 2011-06-30 22:58:21,767 [0-35] DEBUG RPCManager - Request #1 (DSRequest) payload: {
criteria:{
},
operationConfig:{
dataSource:"FirstNameDS",
operationType:"fetch",
textMatchStyle:"startsWith"
},
componentId:"isc_PickListMenu_0",
appID:"builtinApplication",
operation:"searchFromDBCustomForCombos",
oldValues:null
}
=== 2011-06-30 22:58:21,767 [0-35] INFO IDACall - Performing 1 operation(s)
=== 2011-06-30 22:58:21,767 [0-35] DEBUG AppBase - [builtinApplication.searchFromDBCustomForCombos] No userTypes defined, allowing anyone access to all operations for this application
=== 2011-06-30 22:58:21,767 [0-35] DEBUG AppBase - [builtinApplication.searchFromDBCustomForCombos] No public zero-argument method named '_searchFromDBCustomForCombos' found, performing generic datasource operation
=== 2011-06-30 22:58:21,767 [0-35] INFO SQLDataSource - [builtinApplication.searchFromDBCustomForCombos] Performing fetch operation with
criteria: {} values: {}
=== 2011-06-30 22:58:21,767 [0-35] INFO SQLWhereClause - [builtinApplication.searchFromDBCustomForCombos] empty condition
=== 2011-06-30 22:58:21,768 [0-35] INFO SQLDataSource - [builtinApplication.searchFromDBCustomForCombos] derived query: SELECT
t.firstname_Id,
t.firstname
FROM firstnames t WHERE
t.deleted = 0
#if($criteria.firstname) AND t.firstname like ($criteria.firstname)||'%' #end
=== 2011-06-30 22:58:21,770 [0-33] INFO RequestContext - URL: '/callcenter/sc/IDACall', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:21,772 [0-33] DEBUG XML - Parsed XML from (in memory stream): 2ms
=== 2011-06-30 22:58:21,773 [0-33] DEBUG RPCManager - Processing 1 requests.
=== 2011-06-30 22:58:21,774 [0-33] DEBUG RPCManager - Request #1 (DSRequest) payload: {
criteria:{
},
operationConfig:{
dataSource:"FirstNameDS",
operationType:"fetch"
},
appID:"builtinApplication",
operation:"searchFromDBCustomForCombos",
oldValues:{
}
}
=== 2011-06-30 22:58:21,774 [0-33] INFO IDACall - Performing 1 operation(s)
=== 2011-06-30 22:58:21,774 [0-33] DEBUG AppBase - [builtinApplication.searchFromDBCustomForCombos] No userTypes defined, allowing anyone access to all operations for this application
=== 2011-06-30 22:58:21,774 [0-33] DEBUG AppBase - [builtinApplication.searchFromDBCustomForCombos] No public zero-argument method named '_searchFromDBCustomForCombos' found, performing generic datasource operation
=== 2011-06-30 22:58:21,774 [0-33] INFO SQLDataSource - [builtinApplication.searchFromDBCustomForCombos] Performing fetch operation with
criteria: {} values: {}
=== 2011-06-30 22:58:21,774 [0-33] INFO SQLWhereClause - [builtinApplication.searchFromDBCustomForCombos] empty condition
=== 2011-06-30 22:58:21,774 [0-33] INFO SQLDataSource - [builtinApplication.searchFromDBCustomForCombos] derived query: SELECT
t.firstname_Id,
t.firstname
FROM firstnames t WHERE
t.deleted = 0
#if($criteria.firstname) AND t.firstname like ($criteria.firstname)||'%' #end
=== 2011-06-30 22:58:21,776 [0-26] INFO RequestContext - URL: '/callcenter/sc/skins/EnterpriseBlue/images/blank.gif', User-Agent: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101130 Ubuntu/9.10 (karmic) Firefox/3.5.8': Moz (Gecko) with Accept-Encoding header
=== 2011-06-30 22:58:21,777 [0-26] INFO Download - done streaming: /home/kakha/workspaceEclipse/CallCenter/war/callcenter/sc/skins/EnterpriseBlue/images/blank.gif
=== 2011-06-30 22:58:21,818 [0-35] DEBUG PoolableSQLConnectionFactory - [builtinApplication.searchFromDBCustomForCombos] Returning pooled Connection
=== 2011-06-30 22:58:21,822 [0-33] DEBUG PoolableSQLConnectionFactory - [builtinApplication.searchFromDBCustomForCombos] Returning pooled Connection
=== 2011-06-30 22:58:21,823 [0-33] INFO SQLDriver - [builtinApplication.searchFromDBCustomForCombos] Executing SQL query on 'Oracle': SELECT
t.firstname_Id,
t.firstname
FROM firstnames t WHERE
t.deleted = 0
=== 2011-06-30 22:58:21,825 [0-35] INFO SQLDriver - [builtinApplication.searchFromDBCustomForCombos] Executing SQL query on 'Oracle': SELECT
t.firstname_Id,
t.firstname
FROM firstnames t WHERE
t.deleted = 0
=== 2011-06-30 22:58:22,108 [0-35] INFO DSResponse - [builtinApplication.searchFromDBCustomForCombos] DSResponse: List with 7479 items
=== 2011-06-30 22:58:22,114 [0-35] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
=== 2011-06-30 22:58:22,115 [0-35] DEBUG RPCManager - non-DMI response, dropExtraFields: false
=== 2011-06-30 22:58:22,132 [0-33] INFO DSResponse - [builtinApplication.searchFromDBCustomForCombos] DSResponse: List with 7479 items
=== 2011-06-30 22:58:22,148 [0-33] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
=== 2011-06-30 22:58:22,149 [0-33] DEBUG RPCManager - non-DMI response, dropExtraFields: false
=== 2011-06-30 22:58:22,267 [0-35] INFO Compression - /callcenter/sc/IDACall: 386264 -> 53113 bytes
=== 2011-06-30 22:58:22,280 [0-33] INFO Compression - /callcenter/sc/IDACall: 386264 -> 53113 bytes
Did I miss something ?
Is there any example about ComboboxItem and OptionDatasource ?
Also sometimes I see 9114(firstname_Id) not the description. If i click cursor into combobox and then leave the text is appeard.
For clear explanation I'll attach images here.
Any Ideal will be appreciated.
Regards,
Paata Lominadze.
Comment