English English Spanish EspañolKorea한국어
Straker»Company»Blog»2005» Using ShadoMX Portal Framework

Using ShadoMX Portal Framework

Structure of the Portal Application

The front-end of the Flex-based ShadoMX portal is based on a custom-built framework that contains a ShadoMX app, Flex-user classes used by the front-end of the portal, configuration for the portal that is stored in a ShadoMX site, and the front-end Flex application that resides within a ShadoMX site.

shadomx/apps/portal

This contains the base gateway cfcs (SOF and NOF) that the actual Flex application uses to communicate with ShadoMX. The portal app contains three subdirectories:

  • admin directory: Contains the Flex-based portal administration application that is used from within Shado Central to assign desktops to user groups.
  • assets directory contains images, flash files or other resources that might be used by the portal application.
  • pods directory contains specifically written gateways, CFC for specific pods (like the MyDocuments or Email pod).

WEB-INF/flex/user_classes/com/straker/shado/portal

This contains the Flex class files used by the front-end of the portal to render the Flex-based portal. This contains three more packages.

a.      dektop: Contains the desktop containers. Each time a new desktop is added through the Shado Central interface, a component file for that container is created in this directory. The desktop component files contain logic to layout different pods on that particular desktop.

b.      pods: These contain the code to run a particular desktop. Each pod exists in its own package.

c.      util: Contains utility components, like the pod component that is used to create draggable, minimizable components, or the help component that is used by all pods to popup help for any component.

{sitename}/app_config/apps/portal

This contains an XML file (portal-config.xml) which the Flex-based portal and the ShadoMX portal administration application use to get information about the portal.

{sitename}/app_templates/_pagelets/portal/

Contains the entry point for the front-end portal. This directory contains an index.mxml file along with a couple of other actionscript and mxml files that initialize the portal, and load up all the desktops and pods for a given site.

 

Using the ShadoMX Portal Administration Application

The Portal button in the toolbar in Shado Central enables a sites administrator to add/edit desktops setup for a site, and assign them to various ShadoMX usergroups. This interface is referred to as the ShadoMX Portal Administration application.

 

Managing desktop and usergroups

The ShadoMX Portal Administration application is used to assign desktops to ShadOMX usergroups. If a ShadoMX user belongs to more than one groups for which desktops have been assigned, the portal will display all the desktops assigned to all the usergroups that a user belongs to, after removing the duplicate desktops.

Adding a New Desktop

Using the Portal Administration Application you can easily create a new desktop. At the moment, the name of the desktop cannot contain spaces. When a new desktop is created, the portal application places an mxml file in WEB-INF/flex/user_classes/com/straker/shado/portal/desktop package. The name of the mxml file is the same as the name of the desktop created.

 

The new desktop file contains a shell application with reference to a couple of dummy pods. This can be changed to point to any pod that might have developed.

 

The desktop controls where the pods appear on that desktop. You can specify your own layout by using VBox, HBox or any other Flex container.

Adding a Pod to a Desktop

Pods are mxml components that can be plugged into a desktop. Since pods are plugged into the portal application (which uses the mx:Application) tag, they need to be standalone components like mx:Canvas, mx:VBox, or mx:HBox.

 

It is section assumes that you already have an application that contains the logic that you want to plug in as a pod. For the purpose of this document, well add a pod called phonelist. It is assumed that the phonelist application contains a file called Index.mxml.

 

Location of the pod: The mxml files for the pods should be placed in the WEB-INF/flex/user_classes/com/straker/shado/portal/pods package. It is recommended that you create a package for the pod within this hierarchy, and place the mxml files for the pod under a package name the identifies the pod. For instance, if you are adding a pod called phonelist, create a directory called phonelist under WEB-INF/flex/user_classes/com/straker/shado/portal/pods package, and add your mxml files in the phonelist directory.

 

Adding namespace for the pod in the desktop: Once youve setup your pod in this hierarchy structure, you need to inform this location of the pod to the desktop on which the pod will appear. This is achieved by adding a namespace for the pod in the mxml file for the desktop. So, for the phonelist example, a name space of xmlns:pod_phonelisting="com.straker.shado.portal.pod.phonelisting.*" can be added the mx:Canvas tag for the desktop.

 

Laying out pod on the desktop:

Once the pod is placed in the correct package hierarchy, and its namespace added, all thats left is to tell the desktop where exactly on the screen should the pod appear. After youve chosen the pods location on the desktop, use the VBox or HBox containers to lay it out. The actual code to insert the pod (using the phonelist example above) would be:

<util:Pod title="Phone List" width="100%" height="100%" ragEnabled="true" closeButton="false" edit="showHelp('pod',phonelist)">

<pod_phonelist:Index />

</util:Pod>

 

Adding help for the pod:

Help for a pod can be added easily by adding a help node to the pod.xml file in WEB-INF/flex/user_classes/com/straker/shado/portal/util/help package. Make sure to wrap the help text in the CDATA tag. The help text can contain HTML tags.

 


Comments

There are no comments for this page as yet.

Add a comment