| Author |
Message |
|
|
Hi
When I populate my combobox, it has a limit of 50 lines. I am populating the combobox using a sqlDataModel.
Is this a bug?
I am using patch 1.7.20
|
 |
|
|
The .war file works. Please could you send me the source code.
I will compare with my existing project to see why mine is not working.
Thanks
|
 |
|
|
Ran the query in Oracle and n Java Derby and it works for all cases.
Is it possible for you to send me a WAR file with your code that works, and I will deploy it on my side and see what it does. If you use Netbeans, and the Java Derby database then I should be able to run it on my side. Or even if you just send me the database structure and data I need to run it, I can always create it.
Thanks
Kuben
|
 |
|
|
Hi
I am not getting the NPE anymore.
I have tried your code on both Oracle and Java Derby databases.
I have also tried running page on IE, Firefox, and Netscape.
I am running Sun Glassfish V2 (Sun Application Server 9.1) on Windows XP.
The behaviour that it is exhibiting is as follows:
On the first page of the DataTable, I can click on the row, and it fetches the detail. On the second page it also returns a value on the first row, although this value is from the first page. All other rows and pages do nothing. If I debug on the client side, nothing happens when I click on a row on the second page.
Any ideas will be appreciated.
Regards
Kuben
|
 |
|
|
Hi
I created a new project in Netbeans, with just your JSP and Java Programs.
I no longer get the NPE, but it still does not work.
I am using an Oracle 10g Database.
Regards
Kuben
|
 |
|
|
Hi Adina
I have tried running your example, and I an having the same problem. Everything works great on the first page of the Master Grid Table. As soon as I use the paging buttons and do to another page, then it does not work. It fails with a java.lang.NullPointerException on the following code:
sqlFieldMap = (SQLDataModel.SQLFieldMap) gridMasterTable.getRowData();
NB: I am using patch version .1720 of the ecruiser jar. Can this have anything to do with it. Although I have also tested it with the original jar and I still have that problem.
|
 |
|
|
Hi
I am trying to do the following:
I have two Grid Tables in my form, each with their own SQLDataModel
and each with a pageSize of 10.
The first Grid Table is a list of customer contracts with the Contract No. being the key. In the first column of this Grid Table, I have a button called
"Fetch Detail". This button gets the Contract No. of the row, and then finds all payments for this contract. This data is shown in a second Grid Table.
My code works fine, but only on the first page of the Grid Table. If I go to any other page, then getRowData() does not return the correct value.
Is this a bug.
My JSP Code for the first and second Grid Tables is as follows:
<e:gridtable ajax="true"
pageSize="10"
id="gridMasterTable"
keyField="contract_no"
binding="#{DataBean.gridMasterTable}"
dataModel="#{DataBean.sqlMasterDataModel}"
title="Contracts per Financial Year">
<e:dataTr>
<e:gridTd id="commandColumn"
sortable="false">
<e:button ajax="true"
id="filterButton"
style="font-size:10px"
value="Fetch Detail"
actionListener="#DataBean.filterContract}"/>
</e:gridTd>
<e:gridTd id="contract_no"
labelText="Contract No."
sortable="false"
value="#{ROW.contract_no}"/>
</e:dataTr>
</e:gridtable>
<e:gridtable ajax="true"
pageSize="10"
id="gridDetailTable"
keyField="contract_no, payment_no"
dataModel="#{DataBean.sqlDetailDataModel}"
title="Payments Per Contract">
<e:dataTr>
<e:gridTd id="contract_no"/>
<e:gridTd id="payment_no"/>
</e:dataTr>
</e:gridtable>
My Java Code to filter the sqlDetailDataModel is as follows:
public SQLDataModel getSqlMasterDataModel() {
if (sqlMasterDataModel == null) {
sqlMasterDataModel = new SQLDataModel();
sqlMasterDataModel.setSqlSelect("SELECT contract_no FROM master_table");
}
return sqlMasterDataModel;
}
public SQLDataModel getSqlDetailDataModel() {
if (sqlDetailDataModel == null) {
setSqlDetailDataModel(new SQLDataModel());
sqlDetailDataModel.setSqlSelect("SELECT contract_no, payment_no FROM detail_table");
}
return sqlDetailDataModel;
}
public void filterContract(ActionEvent e) {
sqlFieldMap = (SQLFieldMap) gridMasterTable.getRowData();
vContractNo = sqlFieldMap.get("contract_no").toString();
sqlDetailDataModel.setSqlSelect("SELECT * FROM detail_table WHERE contract_no = '" + vContractNo + "'");
}
Like I said, the above code works fine, but only on the first page of the Grid Table. As soon as I start paging through the Grid Table, the "Fetch Detail" button starts behaving unpredictably.
Is this a bug, or am I doing something wrong?
Thanks
Kuben
|
 |
|
|
Hi
Still giving same error as before.
It says possible source of error is:
Class Name: java.util.ResourceBundle$Control
File Name: ResourceBundle.java
Method Name: newBundle
Line Number: 2391
Could you send me a test example that you are using, then I can try it on my side to see whether it gives errors or not.
Thanks
Kuben
|
 |
|
|
Hi Adina
Still does not work.
It now gives me the following error:
java.lang.ClassCastException
simplica.util.base64.Base64 cannot be cast to ResourceBundle
I'm using Glassfish V2 (Sun Java Application Server 9.1) to run it. Can that cause any problems?
|
 |
|
|
Hi
There is no errors in console at all.
It creates the correct number of items in the combobox.
For example the table MASTER_YEAR has five records, and when I click on the combobox it has fives lines, but each value is blank. I can't seem to populate the item values.
Is my code correct?
|
 |
|
|
Hi
I would like to be able to populate a Combox with values from a database table. I have tried the following but cannot get the values to appear:
My JSP has:
<e:combobox ajax="true"
editable="true"
labelFieldName="financial_year"
keyFieldName="financial_year"
id="yearCombobox"
labelText="Please select a Year!"
dataModel="#{DataBean.sqlDataModelMasterYear}">
</e:combobox>
My backing bean has the following code:
public SQLDataModel getSqlDataModelMasterYear() {
if (sqlDataModelMasterYear == null) {
sqlDataModelMasterYear = new SQLDataModel();
sqlDataModelMasterYear.setSqlSelect("SELECT financial_year FROM master_year");
}
return sqlDataModelMasterYear;
}
I would also like to find out how to make comboboxes dependant on each other, for example if I select a combobox with months another combobox with the corresponding no. of days must appear.
Thanks
Kuben
|
 |
|
|