Sample definition of ad_form


ad_form \
-name task \
-cancel_url $return_url \
-action $action_url \
-actions $actions \
-has_edit 1 \
-mode $form_mode \
-export {next_url user_id return_url} \
-form {
task_id:key
{task_name:text(text) {label "[_ intranet-timesheet2-tasks.Name]"} {html {size 50}} {help_text $full_name_help}}
{task_nr:text(text) {label "[_ intranet-timesheet2-tasks.Short_Name]"} {html {size 30}} {help_text $short_name_help}}
{project_id:text(select) {label "[_ intranet-core.Project]"} {options $parent_project_options} {help_text $project_help}}
{material_id:text(select) {label "[_ intranet-timesheet2-tasks.Material]"} {options $material_options} {help_text $material_help}}
{cost_center_id:text(select),optional {label "[_ intranet-timesheet2-tasks.Cost_Center]"} {options $cost_center_options} {help_text $cost_center_help}}
{task_type_id:text(hidden) {label "[_ intranet-timesheet2-tasks.Type]"} {options $type_options} }
{task_status_id:text(im_category_tree) {label "[_ intranet-timesheet2-tasks.Status]"} {custom {category_type "Intranet Project Status"}}}
{uom_id:text(select) {label "[_ intranet-timesheet2-tasks.UoM]
([_ intranet-timesheet2-tasks.Unit_of_Measure])"} {options $uom_options}}
}

Sample definition of template::form

template::form::create $form_id
template::form::section $form_id ""
template::element::create $form_id project_id -widget "hidden"
template::element::create $form_id supervisor_id -widget "hidden" -optional
template::element::create $form_id workflow_case_id -widget "hidden" -optional
template::element::create $form_id requires_report_p -widget "hidden" -optional -datatype text
template::element::create $form_id workflow_key -widget "hidden" -optional -datatype text
template::element::create $form_id return_url \
-widget "hidden" \
-optional \
-datatype text
template::element::create $form_id project_name \
-datatype text\
-label "[_ intranet-core.Project_Name]" \
-html {size 40} \
-after_html "[im_gif help "Please enter any suitable name for the project. The name must be unique."]"

If you want to get a quick check of network problems on your computer then you can check the status of packets in error. By default, only the numbers of bytes received and sent are displayed in the Local Area Connection Status window but you can have the number of errors displayed as well. With this registry tweak you can display an errors counter below the sent and received numbers.

http://www.windows7library.com/blog/tweaks/display-network-errors-tweak/

Get form:

var oForm = document.getElementById('project-ae');

Browse through elements of a form:

          for (i = oForm.cost_object_category_id.options.length-1; i >= 0; i--) {
                oForm.cost_object_category_id.remove(i);
            }

Check existence of element:

if (document.getElementById("sideBarTab") != null) {
...
}

Get element:

document.getElementById('slave_content').style.visibility='visible';

Get element attribute:

document.getElementById('sidebar').getAttribute('savedHeight')

Inserting elements:

var node_insert_after=document.getElementById("slave");
var node_to_move=document.getElementById("fullwidth-list");
document.getElementById("monitor_frame").insertBefore(node_to_move, node_insert_after.nextSibling);

Get value of a drop down in a form:

var oForm = document.getElementById(‘project-ae’);
var company_id = oForm.elements["company_id"].options[oForm.elements["company_id"].selectedIndex].value;

Tausende von Ingenieuren beschäftigen sich mit dem Problem des Vibrierens im Auto verursacht durch den Verbrennungsmotor.
Ein Elektromotor hat dieses Problem praktisch nicht. – Wie sieht Dein Job in 10 Jahren aus?

Professionelle Intelligenz | Gunter Dueck auf der x mess from managementx on Vimeo.

The Flinch – But what if danger is exactly what you need?

http://www.amazon.com/The-Flinch-ebook/dp/B0062Q7S3S/ref=sr_1_4?s=digital-text&ie=UTF8&qid=1323208767&sr=1-4

Get ancestor:
select tree_ancestor_key('1000000000000000111010101100110000000000000000000000000100001001', 1);

Get level:
select tree_level('1000000000000000111010101100110000000000000000000000000100001001');

Get direct parent:

select
parent.project_id
from
im_projects parent,
im_projects child
where child.project_id = :project_id and
tree_ancestor_key(child.tree_sortkey, tree_level(child.tree_sortkey)-1) = parent.tree_sortkey

Links:
Using tree_sortkey for hierarchical queries in Postgres
OpenACS Doku: Hierarchical data

Prerequisites:

  • Make sure that user who runs nsd has write permissions of folder the PID is written to.
  • Existence of /etc/init.d/aolserver4-projop (see Ubuntu installer script on http://www.project-open.org)

a) Install monit
b) Adjust /etc/monit/monitrc
c) Create /etc/monit/conf.d/aolserver.monitrc

check process aolserver4-projop with pidfile /usr/lib/aolserver4/log/nspid.projop
      start program "/etc/init.d/aolserver4-projop start"
      stop program "/etc/init.d/aolserver4-projop stop"

d) Adjust /etc/default/monit:

startup=1

e) start

sudo /etc/init.d/monit start

Installation von PostgreSQL 8.2 from source:

psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432″?

http://askubuntu.com/questions/50621/cannot-connect-to-postgresql-on-port-5432

I would guess that the server is actually listening on the socket /tmp/.s.PGSQL.5432 rather than the /var/run/postgresql/.s.PGSQL.5432 that your client is attempting to connect to. This is a typical problem when using hand-compiled or third-party PostgreSQL packages on Debian or Ubuntu, because the source default for the Unix-domain socket directory is /tmp but the Debian packaging changes it to /var/run/postgresql.

Configure internet access (Minimal install VM images)

Setting WM Player

Set Network Connection of VM to: Bridged

In some cases you need to set the keyboard:

loadkeys de/es/fr ...

If you copied a VM you need to delete:

/etc/udev/rules.d/70-persistent-net.rules

and reboot:

reboot

Check if

ls /sys/class/net

list now eth0

Settings in VM

/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=192.168.1.1

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO="static"
IPADDR="192.168.1.39"
NETMASK="255.255.255.0"

/etc/resolv.conf
nameserver 192.168.1.1

Open Port 22:
iptables -A INPUT -p tcp --dport 22 -j ACCEPT

add /etc/init/aolserver.conf

# AOLServer

start on started sshd
stop on runlevel [016]

respawn
exec su -c "/usr/local/aolserver451/bin/nsd-postgres  -it /web/projop/etc/config.tcl" projop
initctl reload-configuration
initctl start aolserver

tcl: Continue line using backslash

1) Make sure there’s no backspace after the backslash !
2) No breaks allowed within function call

This won’t work:

                [im_do_row [array get bgcolor] $ctr $curr_owner_id \
                                $owner_name \
                                $days \
                                [array get user_days] \
                                [array get user_absences] \
                                $holydays \
                                $today_date \
                                [array get user_ab_descr] \
                                $workflow_key \
                           ]

OpenACS: Watch packages

  • AOLServer restart sets back watches
  • CVS settings (watch) could lead to additional dirs Base/Baseserv containing a second version of lib files

pgsql

# select project_id from im_projects where parent_id = NULL;
 project_id
------------
(0 rows)

# select project_id from im_projects where parent_id IS NULL;
 project_id
------------
      35116
      35417
(2 rows)