Greetings:

Here is what we do to get the first workable batch out of the door while waiting for the impletentation of Tiles with its current features (Tiles independent of jsf implementation and Struts-Shale). You can see the work by looking at the page source from http://www.dbgroups.com, http://dbgroups.com, http://myportal.myb2cb2b.com, http://www.myb2cb2b.com, http://myb2cb2b.com

1) I put down several urls to show a good feature of jsf that portal is an aggregation of content sources. Each url is a department (division, company) touch point; underneath is a common portal presentation. The welcome page of the touch point is presented.

2) The custom tabbedPane renderer presents the portal tabs and different fragments of the selected tabbedPane, which is divided into different fragments as you can see. Each fragment is a table using <h:panelGrid). In each fragment, tiles is inserted using <f:subview>. The page tile, page metaDescriptions and metaKeyworks are directly inserted using tiles attributes. You can see these attributes, required for search engine, are different from page to page.

3) Each tiles fragment is again wrapped with a table using <h:panelGrid> and use <f:verbatim> as required. For static fragment of the displayed portion, you can use <f:verbatim> to wrap over existing pure html part. This means you can scrap a portion of html fragment over the Internet and make it a part of your page. You can by pass the jsf phases and going directly to the requested page.

4) For the portal portlet/service applications (in the left and right portal columns), under Struts-Tiles, you usually have a dynamic list of these applications and just iterate through the list to insert the tiles fragments in the list. This will work if tiles fragments of these applications are just html. We found that your jsf command buttons and command links will not work under this normal tiles insertion process. To make it work, we must limit the maximum number of items in the list and use jsp logic to display the definition with unique subview id for each tiles insertion. The definition is not inserted if it does not exist.

5) This limitation under (4) can be ironed out hopefully under Struts-Shale. Two desirable features why we love tiles under struts-tiles are (a) it can be nested to whatever level required. We found it work properly with Jsf under ONLY the first level of insertion with <f:subview> unique id for each tile insertion; (b) i18n where the whole page under different locale is inserted. This currently does not work according to our quick implementation.

6) Despite some limitation, we are able to dynamically change all related fragments (displayed company logo, big picture, small picture, company menu and copyright). This is by itself very powerful to demonstrate Jsf+tiles can be an elegant presentation layer of the whole global corporation, under neath of which are different companies, divisions, etc. A requested information will bring the whole site of the information owner up.

Hope this may help.

BaTien
DBGROUPS




Dave Sag wrote:

we faced a similar issue and have been considering writing custom renderers that render components with htm that better suits our site design. not actually gotten around to doing that yet though.

dave

On 04/02/2005, at 4:20 PM, Norm Deane wrote:

I'm coming from a Struts/Tiles background and really like the Tiles approach to page layout. My first endevour with JSF involves converting an existing Struts/Tiles web application to JSF. I've got the Tiles integration with MyFaces setup but as I was converting the tiles (header, footer, body, leftnav, etc) I ran into the JSF requirement that all template text and custom JSP tags in included pages must be nested in a <f:verbatim> tag. This led to some really nasty looking pages. For example, I found myself doing this on a couple occasions...

<f:verbatim><div id="header"></f:verbatim>
<h:outputText styleClass="headerText" value="This is my header"/>
<f:verbatim></div></f:verbatim>

Is there another way? How are other people breaking their JSPs down into "modular" chunks so that they can be reused? I guess one answer is to avoid template text and custom tags all together and just use JSF components exclusively. Unfortunately in this case that is not a realistic option.

Thanks,

Norm Deane
http://jroller.com/page/deanen








Reply via email to