Chapter 4: Resources  Creating resources

Chapter 4: Resources

Overview

Unwired Accelerator includes a default resource (RID 21), which you see when you log in to Mobile Web Studio, Portal Interface, or a mobile device. Unwired Accelerator allows you to create additional resources with different logos, icons, text, colors, languages, and navigation styles.

Multiple resources allow you to create different looks for different audiences within a portal. For example, you might want to use different languages for different audiences, or to use a different look and navigation style for desktop and mobile device interfaces.

Applications can be deployed into multiple resources, and users are allowed to visit multiple resources in the same portal. A resource is also referred to as a co-brand.

NoteUnwired Accelerator allows you to manage an unlimited number of portals, typical of Web hosting. You can configure each portal with different logos, icons, text, and colors. You can also create more complex portals by customizing portal component functionality such as global navigation buttons and self-registration forms.

Each resource, or co-brand, has a row in the resources table, and that resource has a unique resource_id assigned to it when the resource is created.

The users table has a resource_id foreign key reference that identifies the default resource to which the user belongs if no resource is explicitly specified in the Portal Interface or mobile device URL. Upon login, the user works on objects in that resource.

Because each resource has its own text messages, image files, and JSPs that produce dynamic content for the portal, you can use resources to localize your portal, as illustrated in Figure 4-1, where Unwired Accelerator includes an Administrative resource and a Finance resource, as well as different resources for their English, German, and Japanese users.

Figure 4-1: Multiple resources, one UA installation

You can define resources to inherit attributes from other resources, which allows you to make minor user interface changes without having to reimplement large amounts of content. Inheritance is based on the <Cobrands> nesting structure in the cobrands.xml file, located in SYBASE\tomcat\webapps\onepage\config if you are using Tomcat. If you are using EAServer it is located in SYBASE\EAServer\Repository\WebApplication\onepage\config. Typically, the resource inherits from the messages.xml and styles.xml files in the associated cobrand\* directory. These contain text messages (messages.xml) and fonts, colors, and so forth (styles.xml) that appear on the Portal Interface.

Each portal corresponds directly to a Mobile Web Studio resource. When you add your domain, Mobile Web Studio creates a default resource with a resource ID. The resource ID (RID) is the unique key that Mobile Web Studio assigns to all portal objects associated with that resource.

The default UA resource directory is unwired-accelerator-21, located in SYBASE\tomcat\webapps\onepage\fw\cobrands. Other default resource directories you will see in the cobrands directory include:

There must be a definition for each resource in the cobrand.xml file. In addition, each resource subdirectory has its own set of configuration files that override the properties in the master configuration file.

The onepage default installation gets its configuration from the contents of the onepage subdirectories, for example, the .JSP login page is in onepage\fw\baseApps\fwlogin.

When you create a new resource, you must create or import portal objects before you can access the portal from a Web browser. You can move portal objects between resources by importing and exporting those objects within Mobile Web Studio (see the Unwired Accelerator Developer’s Guide for information about importing, exporting, and deploying portal objects).

You can also use modify the default onepage configuration using information in this chapter. The default onepage installation is located in:

Tomcat:

SYBASE\tomcat\webapps\onepage\fw\cobrands\onepage-1

EAServer:

SYBASE\EAServer\Repository\WebApplication\onepage\fw\cobrands\ onepage-1





Copyright © 2005. Sybase Inc. All rights reserved. Creating resources

View this book as PDF