PageBuilder2 theme architecture - Dynamic Content Spot

In the PageBuilder2 theme architecture - theme.html i mentioned that the theme.html makes use of concept of dynamic content spot. The basic concept is that the theme.html want to include .jsp page, since the .html page cannot directly add .jsp page since .jsp pages need servlet context to compile and execute, those .jsps are packaged in the PageBuilder2.war along with Default.jsp.



Ex. the theme.html wants to forward control to asa.jsp for generating active sight analytics(asa) related markup, so you can include that .jsp in the theme.html like this

<a rel="dynamic-content"
href="res:/PageBuilder2/themes/html/PageBuilder2.0/asa.jsp"></a>


But this approach has following problems

  • Reference by name abstracts the dynamic content away from the implementation. This is necessary if the theme needs to run on multiple runtimes, for example WebSphere Portal and IBM® Mashup Center. The portal implementation of the navigation tabs can be a JSP that contains portal specific code. The Mashup Center on the other hand cannot execute portal JSP code, but provides an iWidget instead.

  • Reference by name isolates the theme author from having to know the underlying code information. This is useful if the theme author is an HTML and CSS designer, but not a J2EE or JavaScript developer. The HTML and CSS developer needs to know only the list of named content spots and the simple syntax to add it. This developer can then write code without having to know JSP path names etc.



So in order to provide one more layer of indirection, WPS has WP_DynamicContentSpotMappings resource provider that lets you map a symbolic name to the location of .jsp like this




Now inside your theme.html you can refer to the asa.jsp like this

<a rel="dynamic-content" href="dyn-cs:id:asa@tl:oid:csa2.theme" />


The resolver framework takes care of finding the actual .jsp file from this symbolic name. Also if you start digging into the .jsp files you will notice that they also include other .jsps by using this type of syntax


<r:dataSource uri="dyn-cs:id:configGlobal@tl:oid:csa2.theme" escape="none">
<r:param name="pragma" value="cache"/>
</r:dataSource>
<r:dataSource uri="dyn-cs:id:configDynamic@tl:oid:csa2.theme" escape="none"/>

17 comments:

Daniele Vistalli said...

Great stuff, thank you for your articles.

From the docs it "seems" that you could also define dynamic content spot aliases at theme level in metadata.

This should save time over the resource environment method.

Unfortunately I couldn't figure out the correct way to do it.

I'll go for a PMR and ask IBM.

The reference is in this infocenter page:

http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Working_with_dynamic_content_spots_wp7

the last section is about using metadata.

I tried this but got stuck. Webdav is always trashing away my changes.

Any idea ?

Unknown said...

I like to access WCM API in theme, like I wanted to show WCM navigation component in theme along with normal portlet navigation. It is possible?. pls send me reply on portallead@gmail.com

Sunil Patil said...

Take a look at http://wpcertification.blogspot.com/2010/10/using-custom-dynamic-content-spot-in.html for information on how to use dynamic content spot.

I think you should be able to change the navigation related jsp to include your own content in navigation

Sergio said...

I couldn't access those metadata files using webdav, neither through the /themelist/all URL nor the /fs-type1 URL. The wabdav get redirected all the time and cannot download those files. Does anyone else have the sense that webdav is not working properly with wp7?

Anonymous said...

hi, how do i create a new pagebuilder theme from the mashup theme. i understand that the existing pagebuilder theme is in "C:\IBM\WebSphere7\PortalServer\theme\wp.mashup.cc.theme\installedApps\wp.mashup.cc.theme.ear\PageBuilder2.war"
i do not wish to edit the existing default.jsp file

Unknown said...

It's interesting that many of the bloggers your tips helped to clarify a few things for me as well as giving... very specific nice content.java training in chennai | java training institutes in chennai | java j2ee training institutes in velachery

Moses said...

Really Great and useful piece of information.Thanks for sharing best Java Training in Chennai | Android Training in chennai

sonali said...

Thank you Admin! This blog is very useful!
Robotics Training in Chennai | Embedded Testing Training in Chennai

Vijaya said...

I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details.

Vlsi Training in Chennai | Wcf Training in Chennai.

Krishnakumar said...

Good Artcile!
Robotics Training in Chennai | Android Training in Chennai

Mohamed Umer Farook said...

Hi admin your article is API generation is awesome !!!
advanced java training in chennai | struts training in chennai.

sunshineprofe said...

I wish to indicate because of you only to bail me out of this specific trouble. As a consequence of checking through the net and meeting systems that were not beneficial, I thought my life was finished.
fire and safety course in chennai

gowthunan said...

I really love the theme/design of your website. Do you ever run into any browser compatibility problems?
iosh course in chennai

VRITPROFESSIONALS said...

Nice post. Thanks for sharing! I want people to know just how good this information is in your article. It’s interesting content and Great work.

Thanks & Regards,
VRIT Professionals,
No.1 Leading Web Designing Training Institute In Chennai.

And also those who are looking for
Web Designing courses training institutes in Chennai
HTML courses training institutes in Chennai
CSS courses training institutes in Chennai
Bootstrap courses training institutes in Chennai
Photoshop courses training institutes in Chennai
PHP & Mysql courses training institutes in Chennai
SEO courses training institutes in Chennai
Testing courses training institutes in Chennai

Abhi said...

Thanks for info
Web Design Company in Bangalore
Website development in Bangalore

Karen Jain said...

Nice information. very useful. keep sharing. thank you.
Web Development Services in India | SEO Agency in India | Web Design Company in India

komala said...

Fantabulous content, great guidance
Sales Classes In Chennai
Sales Training In Chennai