You can create usual gadget using this
http://code.google.com/p/gwt-google-apis/wiki/GadgetsGettingStarted
But the Gmail contextual gadgets has several differences from usual
gadgets.
The main is spec XML file. It should begin like this:
<Module>
<ModulePrefs title="Hello World">
<Require feature="google.contentmatch">
<Param name="extractors">
google.com:MessageIDExtractor
</Param>
</Require>
</ModulePrefs>
<!-- Define the content type and display location. The settings
"html" and
"card" are required for all Gmail contextual gadgets. -->
<Content type="html" view="card">
...
The usual gadget can start like this:
<Module>
<ModulePrefs title="Hello World" />
<Content type="html">
In order to get desired context gadget specification I added some code
to usual gadget class:
...
@ModulePrefs(title = "GmCGadget", author = "akolchin", author_email =
"[email protected]")
@InjectModulePrefs (files = "inject.xml")
@ContentType(views = "card")
@UseLongManifestName(false)
@AllowHtmlQuirksMode(false)
public class GmCGadget extends Gadget<GmCGadget.Preferences> {
The line @InjectModulePrefs (files = "inject.xml") works fine and adds
desired elements to ModulePrefs node from inject.xml file.
But the @ContentType(views = "card") didn't' produce any effect. (I
wished to add 'view="card"' in the <Conten>)
Could anybody help me? Maybe I have to add some other declarations to
get desired effect?
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.