Home » Developer & Programmer » Forms » Update a date field using calendar
Update a date field using calendar [message #203785] Thu, 16 November 2006 05:27 Go to next message
mane
Messages: 7
Registered: May 2006
Junior Member
How to create a calendar in oracle forms by using bean item and PJC for a multiple record block?

After creating the calendar, the problem is during runtime, the calendar returns the date to the next record but not to the current record in a multirecord block.
Kindly clarify and give a solution to update the date in the current row.

How i did,

In the implementation class property of the bean item,
oracle.forms.demos.CalendarWidgetWrapper.

In the When_custom_item_event trigger associated with the bean item,

declare
paramtype number;
newdateval varchar2(80);
newdate date := null;
begin
if (:system.custom_item_event = 'DateChange') then
get_parameter_attr(:system.custom_item_event_parameters,'Datevalue',paramtype,newdateval);
newdate := to_date(newdateval,'DD/MM/YYYY');
:block1.start_date := newdate;
end if;
Re: Update a date field using calendar [message #203889 is a reply to message #203785] Thu, 16 November 2006 19:25 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
What other triggers do you have? From where are you calling this code?

David
Re: Update a date field using calendar [message #204110 is a reply to message #203889] Fri, 17 November 2006 20:59 Go to previous messageGo to next message
mane
Messages: 7
Registered: May 2006
Junior Member
Sir,
Only When_custom_item_event trigger is used,no other trigger is used for this bean item.
I am calling this code within when_custom_item_event trigger of the bean item.
Re: Update a date field using calendar [message #204262 is a reply to message #204110] Sun, 19 November 2006 22:19 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I believe that you are navigating to this item other than via the keyboard or mouse and that there is a pre-record trigger on this block. Is this true?

David
Re: Update a date field using calendar [message #204268 is a reply to message #204262] Sun, 19 November 2006 22:51 Go to previous messageGo to next message
mane
Messages: 7
Registered: May 2006
Junior Member
no sir, I am not using pre-record trigger in that block. I am using
mouse or keyboard navigation. In single record block this calender works properly.
Re: Update a date field using calendar [message #204274 is a reply to message #204268] Sun, 19 November 2006 23:03 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I don't know what triggers you have in your form and you are not telling me but I am confident that somehow the focus has moved on to the NEXT record from the one into which you wish to place the calendar data. Please review ALL your triggers and look for one that could be moving you to the next record. I suggest running your form in debug mode or at least display the block's 'current_record' property in this trigger.

David
Re: Update a date field using calendar [message #204357 is a reply to message #204274] Mon, 20 November 2006 05:21 Go to previous messageGo to next message
mane
Messages: 7
Registered: May 2006
Junior Member
Sir,
I am attaching a sample emp table form containing multiple rows and a bean.
Sample database name : emp
  • Attachment: prg.fmb
    (Size: 72.00KB, Downloaded 418 times)
Re: Update a date field using calendar [message #204447 is a reply to message #204357] Mon, 20 November 2006 16:41 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Instead of "message(:system.cursor_record);" try "message(get_block_property('block1',current_record));" as the cursor and the current record can be different.

Have you searched this forum for 'calendar' and looked at how other people have used it?

David

[Updated on: Mon, 20 November 2006 16:42]

Report message to a moderator

Re: Update a date field using calendar [message #204463 is a reply to message #204447] Mon, 20 November 2006 21:25 Go to previous messageGo to next message
mane
Messages: 7
Registered: May 2006
Junior Member
Sir,
We used the message code you sent still the core of the issue remains. Our problem is when we do mouse click at random in a row in the run form and do mouse click in the calender, it is not updating the current row. This you can also see in the run form we have sent.
Re: Update a date field using calendar [message #204498 is a reply to message #204463] Tue, 21 November 2006 00:43 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Me thinks you assume too much. I do not Oracle Forms available to me on every PC from which I answer questions in this forum.

What results did the message command I suggested?

I repeat
Have you searched this forum for 'calendar' and looked at how other people have used it?

I suggest that you go to the Oracle Forms website and download the sample calendar Form and see how they are handling it.

David
Previous Topic: Hide or show Graphics on canvas
Next Topic: Load:class.oracle.forms.webutil.common.RegisterWebutil not found
Goto Forum:
  


Current Time: Wed Dec 07 14:12:13 CST 2016

Total time taken to generate the page: 0.12339 seconds