Calendar do not work in a table

View: New views
6 Messages — Rating Filter:   Alert me  

Calendar do not work in a table

by Liviu Delureanu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!
I'm new with Woodstock and web technology and I've tried to get the calendar component placed in the table after followed the
steps:

http://blogs.sun.com/winston/entry/adding_calendar_to_table

1 Create a Project
2 Drag and drop Table Component on to the design surface
3 Drag and drop the JDBC table Data Sources -> Travel -> Trip on to the Table
Component.
4 Optional: Using table layout remove the TRIPID and TRIPTYPEID
5 Using Table layout set the Pagination of the table and page size 5.
6 Drag and drop a Calendar component on to the design surface (not on the table
component)
7 Edit the JSP page and move the Calendar Tag to the Table Column Corresponding
to DEPDATE
8 From the outline Panel remove the extra StaticText component in the DEPDATE
column.
9 Do not remove it in the JSP
10 Remove the style attribute from the Calendar Tag
Now the DEPDATE tablecolumn tag in JSP should look like

<ui:tableColumn binding="#{Page1.tableColumn3}" headerText="DEPDATE"
id="tableColumn3" >
<ui:calendar binding="#{Page1.calendar1}" id="calendar1"/>
</ui:tableColumn>


However, during runtime it always refer to ROW No 1 whenever I select a date
from the calendar component.
The calendar button show only on row 1 and if I choose from that a date all
rows of the table is changed.
Can tell me what I'm doing wrong?
Any Ideea ?
I've used NetBeans 6.1 and 6.0.1 and Woodstock 4.3




Re: Calendar do not work in a table

by Liviu Delureanu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've opened an issue for this problem:
Issue #: 1239


Liviu Delureanu <liviudelureanu@...> wrote:
Hi!
I'm new with Woodstock and web technology and I've tried to get the calendar component placed in the table after followed the
steps:

http://blogs.sun.com/winston/entry/adding_calendar_to_table

1 Create a Project
2 Drag and drop Table Component on to the design surface
3 Drag and drop the JDBC table Data Sources -> Travel -> Trip on to the Table
Component.
4 Optional: Using table layout remove the TRIPID and TRIPTYPEID
5 Using Table layout set the Pagination of the table and page size 5.
6 Drag and drop a Calendar component on to the design surface (not on the table
component)
7 Edit the JSP page and move the Calendar Tag to the Table Column Corresponding
to DEPDATE
8 From the outline Panel remove the extra StaticText component in the DEPDATE
column.

9 Do not remove it in the JSP
10 Remove the style attribute from the Calendar Tag
Now the DEPDATE tablecolumn tag in JSP should look like

<ui:tableColumn binding="#{Page1.tableColumn3}" headerText="DEPDATE"
id="tableColumn3" >
<ui:calendar binding="#{Page1.calendar1}" id="calendar1"/>
</ui:tableColumn>


However, during runtime it always refer to ROW No 1 whenever I select a date
from the calendar component.
The calendar button show only on row 1 and if I choose from that a date all
rows of the table is changed.
Can tell me what I'm doing wrong?
Any Ideea ?
I've used NetBeans 6.1 and 6.0.1 and Woodstock 4.3





Re: Calendar do not work in a table

by Liviu Delureanu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
If you think the Issue #: 1239 is a real bug please vote for this on
Votes for issue 1239:
   Vote for this issue

Liviu Delureanu <liviudelureanu@...> wrote:
I've opened an issue for this problem:
Issue #: 1239


Liviu Delureanu <liviudelureanu@...> wrote:
Hi!
I'm new with Woodstock and web technology and I've tried to get the calendar component placed in the table after followed the
steps:

http://blogs.sun.com/winston/entry/adding_calendar_to_table

1 Create a Project
2 Drag and drop Table Component on to the design surface
3 Drag and drop the JDBC table Data Sources -> Travel -> Trip on to the Table
Component.
4 Optional: Using table layout remove the TRIPID and TRIPTYPEID
5 Using Table layout set the
Pagination of the table and page size 5.
6 Drag and drop a Calendar component on to the design surface (not on the table
component)
7 Edit the JSP page and move the Calendar Tag to the Table Column Corresponding
to DEPDATE
8 From the outline Panel remove the extra StaticText component in the DEPDATE
column.

9 Do not remove it in the JSP
10 Remove the style attribute from the Calendar Tag
Now the DEPDATE tablecolumn tag in JSP should look like

<ui:tableColumn binding="#{Page1.tableColumn3}" headerText="DEPDATE"
id="tableColumn3" >
<ui:calendar binding="#{Page1.calendar1}" id="calendar1"/>
</ui:tableColumn>


However, during runtime it always refer to ROW No 1 whenever I select a date
from the calendar component.
The calendar button show only on row 1 and if I choose from that a date all
rows of the table is changed.
Can tell me what I'm doing wrong?
Any Ideea ?
I've used NetBeans 6.1 and 6.0.1 and Woodstock 4.3






Re: Calendar do not work in a table

by Dan Labrecque :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
This is not a Woodstock bug. The blog example simply does not show how to obtain values. I've added comments to the blog and will close this issue.

Dan

Liviu Delureanu wrote:
If you think the Issue #: 1239 is a real bug please vote for this on
Votes for issue 1239:
   Vote for this issue

Liviu Delureanu liviudelureanu@... wrote:
I've opened an issue for this problem:
Issue #: 1239


Liviu Delureanu liviudelureanu@... wrote:
Hi!
I'm new with Woodstock and web technology and I've tried to get the calendar component placed in the table after followed the
steps:

http://blogs.sun.com/winston/entry/adding_calendar_to_table

1 Create a Project 
2 Drag and drop Table Component on to the design surface 
3 Drag and drop the JDBC table Data Sources -> Travel -> Trip on to the Table 
Component. 
4 Optional: Using table layout remove the TRIPID and TRIPTYPEID 
5 Using Table layout set the
 Pagination of the table and page size 5.
6 Drag and drop a Calendar component on to the design surface (not on the table 
component)
7 Edit the JSP page and
 move the Calendar Tag to the Table Column Corresponding 
to DEPDATE
8 From the outline Panel remove the extra StaticText component in the DEPDATE 
column.
 
9 Do not remove it in the JSP 
10 Remove the style attribute from the Calendar Tag
Now the DEPDATE tablecolumn tag in JSP should look like 
 
<ui:tableColumn binding="#{Page1.tableColumn3}" headerText="DEPDATE" 
id="tableColumn3" >
  <ui:calendar binding="#{Page1.calendar1}" id="calendar1"/>
</ui:tableColumn>


However, during runtime it always refer to ROW No 1 whenever I select a date 
from the calendar component.
The calendar button show only on row 1 and if I choose from that a date all 
rows of the table is changed.
Can tell me what I'm doing wrong?
Any Ideea ?
I've used NetBeans 6.1 and 6.0.1 and Woodstock 4.3







Re: Calendar do not work in a table

by Liviu Delureanu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I've tried to use your suggestion but it do not work. I'll appreciate if you have a full example of a page which :

 

1. have a column in  which all cells are a calendar component

2. the table component is updatable and is binded to a database table.

 

Thanks!



--- On Mon, 6/2/08, Dan Labrecque <Dan.Labrecque@...> wrote:
From: Dan Labrecque <Dan.Labrecque@...>
Subject: Re: Calendar do not work in a table
To: dev@...
Date: Monday, June 2, 2008, 10:20 PM

This is not a Woodstock bug. The blog example simply does not show how to obtain values. I've added comments to the blog and will close this issue.

Dan

Liviu Delureanu wrote:
If you think the Issue #: 1239 is a real bug please vote for this on
Votes for issue 1239:
   Vote for this issue

Liviu Delureanu liviudelureanu@... wrote:
I've opened an issue for this problem:
Issue #: 1239


Liviu Delureanu liviudelureanu@... wrote:
Hi!
I'm new with Woodstock and web technology and I've tried to get the calendar component placed in the table after followed the
steps:

http://blogs.sun.com/winston/entry/adding_calendar_to_table

1 Create a Project 
2 Drag and drop Table Component on to the design surface 
3 Drag and drop the JDBC table Data Sources -> Travel -> Trip on to the Table 
Component. 
4 Optional: Using table layout remove the TRIPID and TRIPTYPEID 
5 Using Table layout set the
 Pagination of the table and page size 5.
6 Drag and drop a Calendar component on to the design surface (not on the table 
component)
7 Edit the JSP page and
 move the Calendar Tag to the Table Column Corresponding 
to DEPDATE
8 From the outline Panel remove the extra StaticText component in the DEPDATE 
column.
 
9 Do not remove it in the JSP 
10 Remove the style attribute from the Calendar Tag
Now the DEPDATE tablecolumn tag in JSP should look like 
 
<ui:tableColumn binding="#{Page1.tableColumn3}" headerText="DEPDATE" 
id="tableColumn3" >
  <ui:calendar binding="#{Page1.calendar1}" id="calendar1"/>
</ui:tableColumn>


However, during runtime it always refer to ROW No 1 whenever I select a date 
from the calendar component.
The calendar button show only on row 1 and if I choose from that a date all 
rows of the table is changed.
Can tell me what I'm doing wrong?
Any Ideea ?
I've used NetBeans 6.1 and 6.0.1 and Woodstock 4.3








Re: Calendar do not work in a table

by Dan Labrecque :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
What did you try, specifically? I provided a couple different approaches. If you're working with a database only, the HashMap approach is not for you.

I don't have a full database example for you, but you must pull values from the DataProvider. (Not certain if you must commit the input values, first?) If you're working with CachedRowSetDataProvider, you should be able to obtain a value for a given RowKey and FieldKey. Assuming the provider uses an int row index, the first row is "0" and my field key is 'DATE', I expect you can write something like this:

    Object obj = provider.getValue(getFieldKey("DATE"), getRowKey("0"))

Note that you can also call the getFieldKeys and getRowKeys methods to get an array you can iterate over. The DataProviders APIs are documented below.

    http://developers.sun.com/docs/jscreator/apis/dataprovider/index.html

That said, if calendar is not working for you, please try another component like checkbox or text field. At least, that will tell you if there is something wrong with your code or the calendar itself.

Dan

PS. There are a couple known issues with calendar which are related to table -- see issues #1265 and #1024.


Liviu Delureanu wrote:

I've tried to use your suggestion but it do not work. I'll appreciate if you have a full example of a page which :

 

1. have a column in  which all cells are a calendar component

2. the table component is updatable and is binded to a database table.

 

Thanks!



--- On Mon, 6/2/08, Dan Labrecque Dan.Labrecque@... wrote:
From: Dan Labrecque Dan.Labrecque@...
Subject: Re: Calendar do not work in a table
To: dev@...
Date: Monday, June 2, 2008, 10:20 PM

This is not a Woodstock bug. The blog example simply does not show how to obtain values. I've added comments to the blog and will close this issue.

Dan

Liviu Delureanu wrote:
If you think the Issue #: 1239 is a real bug please vote for this on
Votes for issue 1239:
   Vote for this issue

Liviu Delureanu liviudelureanu@... wrote:
I've opened an issue for this problem:
Issue #: 1239


Liviu Delureanu liviudelureanu@... wrote:
Hi!
I'm new with Woodstock and web technology and I've tried to get the calendar component placed in the table after followed the
steps:

http://blogs.sun.com/winston/entry/adding_calendar_to_table

1 Create a Project 
2 Drag and drop Table Component on to the design surface 
3 Drag and drop the JDBC table Data Sources -> Travel -> Trip on to the Table 
Component. 
4 Optional: Using table layout remove the TRIPID and TRIPTYPEID 
5 Using Table layout set the
 Pagination of the table and page size 5.
6 Drag and drop a Calendar component on to the design surface (not on the table 
component)
7 Edit the JSP page and
 move the Calendar Tag to the Table Column Corresponding 
to DEPDATE
8 From the outline Panel remove the extra StaticText component in the DEPDATE 
column.
 
9 Do not remove it in the JSP 
10 Remove the style attribute from the Calendar Tag
Now the DEPDATE tablecolumn tag in JSP should look like 
 
<ui:tableColumn binding="#{Page1.tableColumn3}" headerText="DEPDATE" 
id="tableColumn3" >
  <ui:calendar binding="#{Page1.calendar1}" id="calendar1"/>
</ui:tableColumn>


However, during runtime it always refer to ROW No 1 whenever I select a date 
from the calendar component.
The calendar button show only on row 1 and if I choose from that a date all 
rows of the table is changed.
Can tell me what I'm doing wrong?
Any Ideea ?
I've used NetBeans 6.1 and 6.0.1 and Woodstock 4.3








LightInTheBox - Buy quality products at wholesale price