how to make an XPage a "mashup" - Step 3
Category xpages
In Step 2, we created a custom control for displaying the Yahoo Weather API data as a sidebar widget... now we just need to add it to the sidebar. Spoiler: this bit's going to be a bit anticlimactic.
Step 3: Include the custom control inside an existing custom control
Open the "layout_LeftSidebar" custom control, switch to the Source tab, and add the following before the closing div tag:
You're done. See? I told you it'd be anticlimactic. But your XPage application is now officially a mashup. Which makes you officially trendy... congratulations.
One closing note: you may have noticed in Step 1 that the URL we're parsing includes the phrase "forecastrss"... that's right: this API returns data in RSS format. Ergo, we parsed RSS in order to display this data. So... a couple tweaks here and there, and this same approach could be used to make a sidebar widget from any RSS feed... and there's a fair few of those floating around these days.
In Step 2, we created a custom control for displaying the Yahoo Weather API data as a sidebar widget... now we just need to add it to the sidebar. Spoiler: this bit's going to be a bit anticlimactic.
Step 3: Include the custom control inside an existing custom control
Open the "layout_LeftSidebar" custom control, switch to the Source tab, and add the following before the closing div tag:
<xc:sb_WeatherConditions></xc:sb_WeatherConditions>
You're done. See? I told you it'd be anticlimactic. But your XPage application is now officially a mashup. Which makes you officially trendy... congratulations.
One closing note: you may have noticed in Step 1 that the URL we're parsing includes the phrase "forecastrss"... that's right: this API returns data in RSS format. Ergo, we parsed RSS in order to display this data. So... a couple tweaks here and there, and this same approach could be used to make a sidebar widget from any RSS feed... and there's a fair few of those floating around these days.
Comments
Posted by null At 01:00:46 PM On 03/25/2009 | - Website - |
Posted by Tim Tripcony At 03:33:36 PM On 03/25/2009 | - Website - |