This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Adding calendar in table does not open in designer and no error information | ||
---|---|---|---|
Product: | obsolete | Reporter: | vijay07102007 <vijay07102007> |
Component: | visualweb | Assignee: | Winston Prakash <wjprakash> |
Status: | RESOLVED INCOMPLETE | ||
Severity: | blocker | CC: | thompsonwd40 |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Attached is the complete project giving problem. I want to add calndar in the table and make the table single row selectable.
Attached Project Screenshot |
Description
vijay07102007
2007-11-07 22:00:28 UTC
Created attachment 52685 [details]
Attached is the complete project giving problem. I want to add calndar in the table and make the table single row selectable.
The project zip provided seems to be corrupted (or wrong mime type was assigned), could you reattach it. I am going to try to reproduce the steps provided. I did almost the same. Except setting the selectdate property. And it worked fine. Please provide the exception which you got, that is the reason it was not shown in the designer, and was probably coming from somewhere else. No response for some time. Closing this. If there is the case again, please, reopen and provide the log file as well. Thanks. Entering this for external customer from the Sun Developer Expert Assistance program: Reproducible in Netbeans 6.1 1.Drag & drop a table component and 2 buttons(name it Add and Save) on to the visual designer. 2.Dropped a oracle table(TEST) on to the table component. 3.Using Table layout set the Pagination of the table and page size 5. 4.Drag and drop a Calendar component on to the design surface (not on the table component) 5.Edit the JSP page and move the Calendar Tag to the Table Column Corresponding to TESTDT. 6.From the outline Panel remove the extra StaticText component in the TESTDT column. Do not remove it in the JSP 7. Remove the style attribute from the Calendar Tag. Now the TESTDT tablecolumn tag in JSP should look like <ui:tableColumn binding="#{Page1.tableColumn3}" headerText="TESTDT" id="tableColumn3" > <ui:calendar binding="#{Page1.calendar1}" id="calendar1"/> </ui:tableColumn> Bind the Calendar component to the dataprovider private java.util.Date date; public java.util.Date getDate() { return (java.util.Date) getValue("#{currentRow.value['TESTDT']}"); } public void setDate(java.util.Date date) { setValue("#{currentRow.value['TESTDT']}", new java.sql.Date(date.getTime())); } Right click on the [..] button of SelectedDate property of Calendar component. In the binding dialog select "date" from Page1. Double click on add button and add the following code: public String button2_action() { // TODO: Process the action. Return value is a navigation // case name where null will return to the same page. try { RowKey rk = testDataProvider.appendRow(); testDataProvider.setCursorRow(rk); testDataProvider.setValue("ID", rk, getTextField1().getText().toString()); testDataProvider.setValue("TESTDT", rk, getCalendar1().getValue()); } catch (Exception ex) { log("Error Description", ex); error(ex.getMessage()); } return null; } Double click on save button and add the following code: public String button1_action() { // TODO: Process the action. Return value is a navigation // case name where null will return to the same page. testDataProvider.commitChanges(); return null; } Build and run the application. When I click on Save button I get to see the following error : "System Messages * java.lang.IllegalArgumentException: Cannot convert 7/28/08 12:00 AM of type class java.sql.Date to class java.sql.Timestamp" I have added the below property to Sun Application Server: -Doracle.jdbc.V8Compatible=true Database Details :Oracle 10.1g for windows create table test ( Id Integer not null primary key, testdt date not null); Created attachment 65776 [details]
Attached Project
Created attachment 65777 [details]
Screenshot
The exception seems to point to converter issue. Passing to components. Please, also provide the log file (with the exception stack traces - it is at <userdir>/var/log/messages.log). Thanks. |