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 89180

Summary: Calendar not available as component type in Table Layout dialog box
Product: obsolete Reporter: praful <praful>
Component: visualwebAssignee: Winston Prakash <wjprakash>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: The java source
JSP file
netbeans project source (ignore other attachments)

Description praful 2006-11-13 00:24:40 UTC
The Calendar widget is not available as component type in the Table Layout
dialog box, tab Columns. This would be useful. 

To get around it I set the component type to Text Field and then updated the JSP to

<webuijsf:tableColumn binding="#{Page3.tableColumn10}" headerText="DEPDATE"
id="tableColumn10" sort="TRIP.DEPDATE">
  <webuijsf:calendar binding="#{Page3.calendar2}" id="calendar2"
selectedDate="#{currentRow.value['TRIP.DEPDATE']}"/>
</webuijsf:tableColumn>

I manually created a calendar2 object.

This displayed every thing correctly. However, when I click a pick a new date
from the calendar pick-a-date dialog box, the wrong calendar box is update. It
is always the first calendar box even if I have several rows. 

I can send the source code if it will help.

I downloaded the Visual Web Pack around the 10 Nov.
Comment 1 praful 2006-11-13 00:26:16 UTC
Created attachment 35990 [details]
The java source
Comment 2 praful 2006-11-13 00:27:13 UTC
Created attachment 35991 [details]
JSP file
Comment 3 praful 2006-11-13 00:31:43 UTC
Created attachment 35992 [details]
netbeans project source (ignore other attachments)
Comment 4 Winston Prakash 2006-11-20 23:06:49 UTC
When we created the dialog, we haven't got any requirement for adding the
Calendar component as a component type to the Table Layout Dialog. Now, that
users want it, it makes sense to conisder it as an item in the drop down.

Now the work around is to drop the Calendar component on to the designer
(directly in the Page) and then move the code in the JSP.

Marking the issue as Enhancement
Comment 5 Chris Kutler 2007-12-19 21:45:23 UTC
The workaround only deals with half of this bug. While it is possible to have a read-only calendar in a table, that
makes no sense, might as well just display the date as text.

The part of this bug that the workaround does not address is "when I click a pick a new date from the calendar
pick-a-date dialog box, the wrong calendar box is update. It is always the first calendar box even if I have several rows."

I tried Winston's work around with 6.0 and in my case, the button to pop-up the calendar only appears in the first row
and when I select a date it updates all rows. I also tried http://blogs.sun.com/winston/entry/adding_calendar_to_table
to no avail.

See also: 

http://forum.java.sun.com/thread.jspa?forumID=881&threadID=5100823 (my solutions that I (Jetsons) wrote to this thread
are not working with 6.0)

http://forum.java.sun.com/thread.jspa?forumID=881&threadID=5101402 (again, my solutions no longer work)

http://forum.java.sun.com/thread.jspa?forumID=881&threadID=5105652






Comment 6 liviudelureanu 2008-06-06 08:03:41 UTC
Because the part of this bug that the workaround does not address is "when I click a pick a new date from the calendar
pick-a-date dialog box, the wrong calendar box is update(or all the rows are updated). It is always the first calendar 
box even if I have several rows."

I suggest that it is a "Defect" not only an "Enhancement".