Wednesday Aug 15, 2007

Technical Note: Managing Ajax Container

Student: Master, what is Ajax?

Zen Master: Ajax was a Greek hero, but if you tell that to any Java programmer you might become the subject of ridicule. But do not get offended. Ajax today means Asynchronous JavaScript and XML and it is a hero among Web development applications.

Student:  Then, Master, what is Ajax Table Container?

ZM: Answers to your questions are everywhere, but I recommend you read this Technical Note on Managing the AjaxTableContainerProvider.

Friday Jul 06, 2007

Screencast: Syndication of Portlets and iGoogle Gadgets

Here's a new screencast that demonstrates the syndication of Google gadgets from iGoogle to the Sun Portal Server, and also syndication of portlets/channels from the Sun Portal Server to iGoogle. The gadgets are syndicated with the help of the open source Google gadgets wrapper portlet from PALAB. The content from Sun Portal Server is syndicated to iGoogle using a Javascript/AJAX script as discussed in a previous post

Friday Jun 29, 2007

New Look, Same Great Content

You've probably noticed we gave this blog a fresh, new look today.  The motivation was to inspire our great content writers, as well as our readers, to touch it.

We'd love to hear what you think.  Please feel free to comment on what improvements you'd like to see. As always, we're open to them.

Tuesday Jun 26, 2007

Tips: Adding static content to your Portlet & Changing Portlet Title

 
Including static content in your Portlet

I wonder if I'm the only one who didn't know how to include and reference static content from a portlet. Recently when writing a portlet I was clueless on what to do when I wanted to include images and a CSS file in my portlet. I figure there might be someone out there who doesn't remember this stuff as well; or may be not. But I'll go ahead and post the technique here anyway.

To include static content in your portlet, just put your files (e.g., images, Javascript files, CSS files) under the portlet web-application root. To reference them in your portlet use the renderRequest.getContextPath() method. For example, you can include a CSS file like this

<link rel="stylesheet" type="text/css" href="<%=renderResponse.encodeURL(renderRequest.getContextPath() + "/style.css")%>"/>

renderRequest.getContextPath() returns the web-application path of the Portlet. So for a portlet MyPortlet deployed on your localhost, the method will return http://localhost:80/MyPortlet. Note: Remember to include the following declarations in your page before using the renderResponse object.

<%@ page import="javax.portlet.\*"%>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
<portlet:defineObjects/>


Changing Title of a Portlet

This is quite easy. Just do the following: renderResponse.setTitle("Portlet Title");

Friday Jun 15, 2007

Elluminate, Weather, and Photo Show AJAX Portlets Available

Weather Portlet

Check out these cool portlets available now in the Portlet Repository!

  • The Elluminate Portlet allows users of Elluminate Live! server 7.0 to create, join, delete, and schedule meetings. A user simply needs to provide their login name, password, and Elluminate Server location and then they are up and running and able to communicate with an Elluminate Live Manager.   Here's more on Portals and Live Collaboration.
  •   The Weather Portlet uses the Yahoo weather service for a weather report based on a zipcode.  The zipcode is a portlet preference set by the user. This portlet also uses the Scriptaculous javascript library  for cool rendering effects..

You'll find the binary, source code, and documentation for all of these portlets and several others at the Portlet Repository Downloads page.

Didn't find the portlet you were looking for or you'd like to contribute a portlet, then drop us a line and let us know.

Tuesday Sep 05, 2006

Best Practices for AJAX and JSR 168 Portlets

The new technical article "Best Practices for AJAX and JSR 168 Portlets" has just been published at developer.sun.com.  Check out this article for the latest ideas on how to best implement AJAX with JSR 168 portlets, and how to use JavaScript libraries like Dojo to add dynamic content to your portlets.


<script type="text/javascript" src="http://www.google-analytics.com/urchin.js"> </script> <script type="text/javascript"> _uacct = "UA-898027-2"; urchinTracker();</script>
About

atul

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today