Pular para o conteúdo principal

Sample - Dialog for Terms and Conditions - IBM Connections


There are two parts to this, the OSGi package that contains the dialog code, and a customized header.jsp file that checks for the cookies, both attached to this mail.



Installing

1) Install OSGi - Copy the  com.tandc.example_1.0.0.jar file to your <provisionDir>/webresources directory. The <provisionDir> is shown in the WebSphere environment variable CONNECTIONS_PROVISION_PATH . The name of the jar must be kept as is.

2) Install JSP - Copy the header.jsp file to the <customizationDir>/common/nav/templates directory. Remember to also set the other customization settings such as the CONNECTIONS_CUSTOMIZATION_DEBUG variable. The only bit that matters is the <script> section at the bottom, so if you're already using a customized file just copy the <script> section over.

3) Restart the Common application (or the entire server).

4) Clear cookies and log into Connections

After you log in the Terms and Conditions dialog will be displayed. You must tick the acceptance box which will then enable the "I agree" button. Click the "I Agree" button to access the system. This process can be improved later.

How it works

The OSGi file contains most of the code. If you open that file you'll see a resources directory, and in that the TermsConditionsDialog.js file. This contains the class "com.tandc.example.TermsConditionsDialog". The _dialog property is the template to create the actual dialog. The _terms property holds the HTML for the terms shown within the dialog so we can easily customize this later.

The header.jsp file contains a script section at the end that adds in a dojo.addOnLoad function, which is fired when the header is loaded. This detects the "termsconditions" cookie, and if it isn't there an instance of the TermsConditionsDialog is created and shown.

The cookie is given a domain of the server the machine is on and no path so it stays in place if you go between different pages. I've set an expire time of 5 minutes to it so it's not too hard to demonstrate it expiring etc.

Improvements to make

There are a large number of improvements to be made.

1) *** Security of the cookie, and the T&C dialog - it wouldn't be hard to break in.
2) Localize the dialog so we can provide localized versions of the T&C
3) At the moment the "escape" key can be pressed to dismiss the dialog, we need to work around that.

Links


Sample for header.jsp
jarfile

Comentários

Postagens mais visitadas deste blog

Como adicionar uma rota no MAC OSX

Andres-MBP:~ a190468$ sudo route -n add -net 10.28.0.0/16 10.26.32.254 Password: ***** add net 10.28.0.0: gateway 10.26.32.254 Andres-MBP:~ a190468$  Andres-MBP:~ a190468$  Andres-MBP:~ a190468$ ping 10.28.236.125 PING 10.28.236.125 (10.28.236.125): 56 data bytes 64 bytes from 10.28.236.125: icmp_seq=0 ttl=120 time=3.796 ms 64 bytes from 10.28.236.125: icmp_seq=1 ttl=120 time=2.466 ms 64 bytes from 10.28.236.125: icmp_seq=2 ttl=120 time=2.392 ms Classe B com endereços 10.28.x.x com gateway 10.26.32.254.

Instalando IBM Connections 5, CR2 e IBM DOCs no Linux - Guias

Charles Price que é um dos integrantes da equipe L2 de suporte da IBM criou alguns guias de instalação de produtos IBM para o Linux. Aqui estão os guias: Installation guide IBM Connections 5.0 on Linux Installation guide IBM Connections 5.0 CR2 on Linux Installation guide IBM Docs 1.0.7 on IBM Connections 5.0 CR2 on Linux  IBM DOCs e CCM para o linux são dois tópicos mais difíceis de se encontrar material, sendo assim, fica a dica. Aqui a profile do Charles Price

Como alterar o default route no seu MAC

Pois bem, hoje estou em um cliente trabalhando com o meu MAC. Meu Mac esta conectado na rede do cliente, que usa um endereço classe A (10.26.x.x). Estou conectado com o meu 3G no celular. Gostaria de usar como rota padrão a saída de rede do meu 3G, visto que a rede do cliente não tem acesso a internet. Pois bem, para que isto aconteça temos que alterar as rotas de TCP/IP. Alterar a rota default 0.0.0.0 para sair pelo 3G. Com o comando "netstat -rn" você consegue visualizar qual a rede que esta como rota padrão.  MacBook-Pro:~ user$ netstat -rn Routing tables Internet: Destination        Gateway            Flags        Refs      Use   Netif Expire default            192.168.0.254      UGSc           27        0     en1 default            10.26.32.2...