Thread: Comment section open in new window

This question is answered. Helpful answers available: 3. Correct answers available: 1.


Permlink Replies: 9 - Pages: 1 - Last Post: Dec 23, 2008 8:16 AM Last Post By: user-Rachel
user-Rachel

Posts: 71
Registered: 10/30/08
Comment section open in new window
Posted: Dec 10, 2008 10:39 AM
 
Click to report abuse...   Click to reply to this thread Reply
Hi All,

I have a manual form with only one field editable say 'Salary'. Whenever user updates something, the record goes (Only inserts) in the other table with new salary and doesn't update the main table. Inserts because I need to keep the history. There are also some roles. According to the role, they have the privileges to do something. For example: Editor can edit the salary and Approver has the rite to approve or disapprove. Form shows both the columns 'Old Salary' and 'New Salary'

Now I want a note/Comment section over the form for each row. I don't want to show a field but only icon. If a user click on the icon, only then the new note window should open and if or she adds a note, it should insert a value in the second table.

Thanks.
Dan McGhan

Posts: 2,249
Registered: 03/01/06
Re: Comment section open in new window
Posted: Dec 10, 2008 12:17 PM   in response to: user-Rachel in response to: user-Rachel
Helpful
Click to report abuse...   Click to reply to this thread Reply
Rachel,

What you're trying to do will take some coding. What do you mean when you say...

I have a manual form

Are you using a custom process to perform the DML or the Automatic Row Processing? Are you using the apex_item package to generate the texbox for salary? If it's custom, then you're well on your way for the processing part. The rest will take some JavaScript.

Regards,
Dan

http://danielmcghan.us
http://sourceforge.net/projects/tapigen
user-Rachel

Posts: 71
Registered: 10/30/08
Re: Comment section open in new window
Posted: Dec 10, 2008 12:34 PM   in response to: Dan McGhan in response to: Dan McGhan
 
Click to report abuse...   Click to reply to this thread Reply
Dan,

Yes I am using apex_item package to generate the report (sql report).

Thanks.
Dan McGhan

Posts: 2,249
Registered: 03/01/06
Re: Comment section open in new window
Posted: Dec 10, 2008 12:42 PM   in response to: user-Rachel in response to: user-Rachel
 
Click to report abuse...   Click to reply to this thread Reply
Rachel,

Then you know how to add a textarea and process what's put in it as you like correct?

Are you really just asking how to hide/show it?

Regards,
Dan

http://danielmcghan.us
http://sourceforge.net/projects/tapigen
user-Rachel

Posts: 71
Registered: 10/30/08
Re: Comment section open in new window
Posted: Dec 11, 2008 6:34 AM   in response to: Dan McGhan in response to: Dan McGhan
 
Click to report abuse...   Click to reply to this thread Reply
Hi Dan,

Sorry! If I was not clear. Actually I want to show a Note/Comment field over the report (APEX_ITEM) for users if they want to put some comments. This is a SQl report with one field editable.

I need to show a image for the comment field so if they click over the image because we don't have much space, the text box should pop up in different window and a user can insert a comment.

The report is based on 2 tables. All the values are coming from table A. Their is a field called requirement on the report that is editable (from table A), other fields are non-editable. whenever a user change a requirement the row goes into table B. Table B keeps all the history. The comment field is also coming from table B.

Is it possible if I create a small field on the report for comment along with a icon, and if a user clicks on the icon the, the box should pop up and a user can insert something, and if he close the box, the value should stay in the field but when he hits save then only it should go in the table.

I just started APEX few days back.

Thank you so much for your help.
Dan McGhan

Posts: 2,249
Registered: 03/01/06
Re: Comment section open in new window
Posted: Dec 11, 2008 7:05 AM   in response to: user-Rachel in response to: user-Rachel
 
Click to report abuse...   Click to reply to this thread Reply
Rachel,

I think it would be best to divide what you're trying to do into two stages: 1 client side and 2 server side. The client side stage involves figuring out how you can allow the user to work with the comments. The server side is how you can then transfer what was done to the DB. For now we'll talk only about the first stage and later about the second.

You should be able to use a hidden item to temporarily store the comments on the client side. To populate the hidden item you'll need to figure out a JavaScript solution to display a popup (html_PopUp) and then to take the value from the popup and move it back to the parent window ($v_PopupReturn). Look in the JavaScript API for information on these functions.

What you're trying to do is not easy if you're not familiar with JavaScript already. If you post a mock up on apex.oracle.com and provide login credentials, I can try to help you along. If I can find some time I'll try to blog about it... I need to get a new post out anyway.

Regards,
Dan

http://danielmcghan.us
http://sourceforge.net/projects/tapigen
user-Rachel

Posts: 71
Registered: 10/30/08
Re: Comment section open in new window
Posted: Dec 11, 2008 10:05 AM   in response to: Dan McGhan in response to: Dan McGhan
 
Click to report abuse...   Click to reply to this thread Reply
Hi Dan,

Thank you. I will try to do it and post a mock up on apex.oracle.com and let you know the login credentials.

Thanks.
Dan McGhan

Posts: 2,249
Registered: 03/01/06
Re: Comment section open in new window
Posted: Dec 12, 2008 6:34 AM   in response to: user-Rachel in response to: user-Rachel
 
Click to report abuse...   Click to reply to this thread Reply
Rachel,

I will be blogging about this over the weekend.

Regards,
Dan

http://danielmcghan.us
http://sourceforge.net/projects/tapigen
Dan McGhan

Posts: 2,249
Registered: 03/01/06
Re: Comment section open in new window
Posted: Dec 15, 2008 7:30 PM   in response to: Dan McGhan in response to: Dan McGhan
Helpful
Click to report abuse...   Click to reply to this thread Reply
Rachel,

Sorry it's a little late, but here's how I would do this.
http://www.danielmcghan.us/2008/12/popup-in-report.html

Let me know if you have more questions.

Regards,
Dan

http://danielmcghan.us
http://sourceforge.net/projects/tapigen
user-Rachel

Posts: 71
Registered: 10/30/08
Re: Comment section open in new window
Posted: Dec 23, 2008 8:16 AM   in response to: Dan McGhan in response to: Dan McGhan
 
Click to report abuse...   Click to reply to this thread Reply
Dan,

Thanks a lot. Sorry! for replying you little late.

Thanks.
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums