|
2 registered users in last 24 hours PM Setting up AJAX support for Department PlannerThis tutorial provides ]po[ Developers with instructions on how to
In following set up we want to add an additional criteria 'Operational Project Priority' to our ]po[ Department Planner. AJAX support allows the re-sorting of the table based on this new criteria.
System Requirements
Step 1: Create a new ']po[ Dynamic Field' for the object type 'PROJECT'Go to http://[YOUR_SERVER]//intranet-dynfield/object-type?object_type=im_project and create a new field 'project_priority_op_id' Step 2: Create a new 'Intranet Dynview Type'Go to http://[YOUR_SERVER]/intranet/admin/categories/index?select_category_type=Intranet+DynView+Type and add a new sub-category 'Ajax' Step 3: Create new 'View' and its respective columsCreate View 'portfolio_department_planner_list_ajax'You can create this view using the Admin interface at http://[YOUR_SERVER]/intranet/admin/views/ or use the following script: insert into im_views (view_id, view_name, visible_for, view_type_id) values ([NEXT_AVAILABLE_VIEW_ID], 'portfolio_department_planner_list_ajax', 'view_users', [SUB_CATEGORY_AJAX]);Note: Replace [NEXT_AVAILABLE_VIEW_ID] and [SUB_CATEGORY_AJAX] with their respective values. Create columns 'portfolio_department_planner_list_ajax'Go to http://[YOUR_SERVER]/intranet/admin/views/, and click on the newly created view to add the following columns a) Priority b) Priority (op) c) Project Name Set attributes accordingly:
Views of type 'AJAX' require additional formatting information: dropdown project_priority_op_id { [im_category_get_key_value_list "Intranet Department Planner Project Priority"] } 1 1
Parameter for AJAX columns are defined as follows:
1. Parameter: Type ('dropdown' || 'link' || 'hidden')Following a sample script: insert into im_view_columns (column_id, view_id, group_id, column_name, column_render_tcl,
extra_select, extra_where, sort_order, visible_for, ajax_configuration) values ([COLUMN_ID],[VIEW_ID],NULL,'Priority',
'[im_category_from_id $project_priority_op_id]','','',5,'', 'dropdown project_priority_op_id { [im_category_get_key_value_list "Intranet Department Planner Project Priority"] } 1 1');
Note: Replace [COLUMN_ID] and [VIEW_ID] with their respective values.
Step 4: Access your ]po[ AJAX Department PlannerYou should be now able to access you new AJAX supported ]po[ Department Planner going tohttp://[YOUR_SERVER]/intranet-portfolio-management/department-planner/index?view_name=portfolio_department_planner_list_ajax |
