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.

Bug 121419 - Adding calendar in table does not open in designer and no error information
Summary: Adding calendar in table does not open in designer and no error information
Status: RESOLVED INCOMPLETE
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: PC All
: P3 blocker with 6 votes (vote)
Assignee: Winston Prakash
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-07 22:00 UTC by vijay07102007
Modified: 2008-09-03 20:45 UTC (History)
1 user (show)

See Also:
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. (53.39 KB, text/plain)
2007-11-07 22:03 UTC, vijay07102007
Details
Attached Project (23.57 KB, text/plain)
2008-07-28 11:23 UTC, runa
Details
Screenshot (24.47 KB, text/plain)
2008-07-28 11:38 UTC, runa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vijay07102007 2007-11-07 22:00:28 UTC
Hi There,

I created simple table and tried to add calendar in table and for that I pasted calendar component at the form and 
then went to jsp view and moved calendar tag under required column tag. Removed style and then added selecteddate 
property. Then tried to come to design view but it does not open and gives no information about being wrong. At bottom 
at right hand side there is red mark to pint for the error but that gives exception which does not give clue.

For more information, I will attach created files.

I am facing similar many problems in visual web pack of 6.0, other versions, I did not use except Studio Creator's 
latest version.

Thanks,
Vijay
Comment 1 vijay07102007 2007-11-07 22:03:44 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.
Comment 2 Peter Zavadsky 2007-11-08 17:40:36 UTC
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.
Comment 3 Peter Zavadsky 2007-11-08 21:02:09 UTC
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.
Comment 4 Peter Zavadsky 2008-01-24 22:49:59 UTC
No response for some time. Closing this. If there is the case again, please, reopen and provide the log file as well.
Thanks.
Comment 5 runa 2008-07-28 11:18:14 UTC
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

Comment 6 runa 2008-07-28 11:20:43 UTC
Database Details :Oracle 10.1g for windows

 create table test (
 Id Integer not null primary key,
 testdt date not null);
Comment 7 runa 2008-07-28 11:23:52 UTC
Created attachment 65776 [details]
Attached Project
Comment 8 runa 2008-07-28 11:38:33 UTC
Created attachment 65777 [details]
Screenshot
Comment 9 Peter Zavadsky 2008-09-03 20:45:16 UTC
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.