Posts

Showing posts from December, 2008

Using "Prompt LOV" to replace "Popup Key LOV"

Another post about jQuery in APEX! :) I am really happy to see the interest the APEX Community has for jQuery. After reading Dan McGhan's blog post concerning jQuery Impromptu , I decided to try this jQuery extension. For my demo, I decided to replace a "Popup Key LOV (Displays description, returns key value)" with a "Prompt LOV". I was able to reuse code from previous demos to accelerate the development. Here is a working example of the Prompt LOV & Calendar demo . How does it works? 1) I assume you check and understand these demos: A) Popup in Report B) AJAX request Page Report C) jQuery Datepicker Now... we can continue to the next step. :) 2) Replace the existing Popup LOV with a Prompt. The prompt will display a report from another page(in this case, it's the page 42). The report is requested using AJAX. This is the JavaScript code you need: $().ready(function() { //Replace existing POPUP-LOV $("#P41_DEPTNO_fieldset a") .attr(&

how to build a Google Gadget with data fetched from an APEX Application Process

Last week, I release a Google Gadget to publish the weekly release of Insum's Web 2.0 Demos . I'll explain how I did it. Google Gadget... what's that?! It's an XML file defining every aspect of your gadget(module) . The words "gadget" and "module" can both be used to describe a Google Gadget. The gadget definition contains 3 sections: 1)Module Preferences The general information of my gadget is defined in this section. Here is the list of attributes for which I set values. title title_url description author author_email author_location author_affiliation author_link author_photo author_quote height width I put a default value for the height. Users can update this value using the gadget's settings (build using the "users preferences"). It's also possible to auto-adjust the gadget height. 2)Users Preferences The settings of my gadget are defined in this section. Here's the list of settings available to the users. itemCount fHeigh

Google Visualization API : Organizational Chart

Image
It's possible display the relationship of your company employees using the Google Visualization: Organizational Chart . How it works: I use jQuery AJAX to call an application process called GET_EMPLOYEES_RELATIONSHIP . The response is in JSON. I use jQuery to handle the JSON object. You need to store your chart data inside a "google.visualization.DataTable()" object. I use the same data table to feed the Table Chart and the Org. Chart. I created 2 examples. 1) Single Tree View Your can see a working example of the employees relationship Organizational Chart demo (1). This is how I define a data table cell: for (i = 0; i < emp_count; i++) { l_data_table.setCell(i, 0, data[i].emp_ename); l_data_table.setCell(i, 1, data[i].mgr_ename); } 2) Multiple Trees View Your can see a working example of the employees relationship Organizational Chart demo (2). This is how I define a data table cell: for (i = 0; i < emp_count; i++) { l_data_table.setCell(i, 0, data[i].emp

Google Gadget - "Insum's Web 2.0 Demos - Weekly Release"

I decided to try the Google Gadget API after reading Bradley's post . I end up creating a notification gadget to publish "Insum's Web 2.0 Demos - Weekly Release" . It's now possible to stay up-to-date if you add this gadget to your blog, website, and/or iGoogle page. I'll write an article about the creation of such gadget. Enjoy!