Tuesday, September 28, 2010

Gadgets - Lesson 2

In the last lesson we introduced ModulePrefs as one of the main elements in a gadget. We also said it carries the gadget's characteristics such as its title, author, description etc.

The sample gadget source below shows how these attributes should appear within ModulePrefs.

<?xml version="1.0" encoding="UTF-8"?>
<Module>
 <ModulePrefs title="This is lession2" height="250" scaling="false" author="yumani">
  <locale lang="en" country="us"/>
  <locale lang="ja" country="jp"/>
 </ModulePrefs>
 
 <Content type="html">
  <![CDATA
   Hello, World!
   ]]
 </Content>
</Module>

ModulePrefs is also a container for features, metadata and processing rules. <locale> is one such elements. This is used to incorporate the internationalization feature to the gadget. It is a nested element within <ModulePrefs>. You can see how it is used in the above code segment.

No comments:

Post a Comment

Featured

Selenium - Page Object Model and Action Methods

  How we change this code to PageObjectModel and action classes. 1 2 3 driver . findElement ( By . id ( "userEmail" )). sendKeys (...

Popular Posts