myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zied Hamdi" <>
Subject [jsf][gravel][facelets][tobago] How can we define a comp id namespace?
Date Mon, 17 Dec 2007 11:29:43 GMT

I have a problem with reusability of components: I have many jsf template
pages that I use everywhere throughout my app. The problem is that when
I define explicitely the ids of my UIComps, name collisions occur.

The question is: is there a way to define a sort of "namespace component
holder" so that my components have ids of type *page:namespace1:namespace2
this whould be the id of a component like this:
<tc:page id="*page*">
   <f:namespace id="*namespace1*">
     <f:namespace id="*namespace2*">
      <tc:out id="*realComponentId*"/>

To be more explicit about the problem: Today I'm passing in every include a
parameter (idSuffix) that I append to the id:

<ui:include src="compPage.xhtml">
  <ui:param name="idSuffix" value="clientPage">

<tc:in id="personsTree#{idSuffix}" />

what is even more tedious is when I use another template in the included
template itself. I must pass idSuffix through :
  <ui:param name="idSuffix" value="#{idSuffix}">

So does a namespace feature exist in standard JSF maybe tobago, or
maybe gravel?


View raw message