eXo Platform 3.0

- Prev
- Next

## Chapter 8. Google Gadget Operations

Google Gadget file is the XML-file with special MIME type "application/x-google-gadget". With eXo IDE you can create such file, edit with Code or WYSIWYG Editor, preview in Preview Tab of eXo IDE, deploy/undeploy it on the server through shindig-library, add deployed gadget to some page in portal.

## Create Google Gadget

There are three ways to create Google Gadget within the eXo IDE:

1. Click on "New->Google Gadget" Toolbar button or use "File->New->Google Gadget" top menu command.

2. Open existed gadget from local system by selecting "File->Open Local File" from top menu.

3. Upload existed gadget directly to JCR by selecting "File->Upload" from top menu.

In 2nd and 3rd case, don't forget to select MIME type "application/x-google-gadget".

Picture 25. Google Gadget Operations

## Deploy/Undeploy gadget in portal

To deploy some Google Gadget to portal, do as follows:

1. Save file before deploying.

2. Open file in the Content Panel.

3. Click on "Deploy Gadget to Portal" button of Toolbar or select "Run->Deploy Gadget to Portal" from top menu.

After that the deploy request will be sent to the server, and if there are no errors - the message like the following will be displayed in the Output Tab:

    [INFO]/rest/private/ide/gadget/deploy?gadgetURL=http%3A%2F%2F192.168.0.130%3A8080%2Frest%2Fprivate%2
    Fjcr%2Frepository%2Fdev-monit%2FTest+Gadget+File.xml&privateContext=%2Frest%2Fprivate&publicContext=
    %2Frest deployed successfully.

It means that gadget was deployed to the portal with title set in the gadget's '<ModulePrefs title="Hello World" />', e.g.:

Picture 26. Deploy Gadget

Otherwise, error message will be displayed in the Output Tab.

Calling the "Undeploy" operation is similar to the "Deploy" - you have to:

1. Find deployed earlier service in the Workspace and open this one in the Content Panel.

2. Click on "Undeploy Gadget from Portal" button of Toolbar or call "Run->Undeploy" top menu command, and verify if there is no error message in the Output Tab.

If everything is fine, then you will get message like that:

    [INFO]/rest/private/ide/gadget/undeploy?gadgetURL=http%3A%2F%2F192.168.0.130%3A8080%2Frest%2Fprivate
    %2Fjcr%2Frepository%2Fdev-monit%2FTest+Gadget+File.xml&privateContext=%2Frest%2Fprivate&publicContext=
    %2Frest undeployed successfully.

## Preview gadget

To preview gadget you may open saved earlier gadget file and click on "Show Preview" button on Toolbar or select "Run->Show Preview" top menu command. Then gadget will be opened in the Gadget Container of Preview Tab, as it is figured at the picture "Google Gadget Operations" above.

- Prev
- Up
- Home
- Next