nice!
On 1/18/07, Gary VanMatre <[EMAIL PROTECTED]> wrote:
>Hi,
>
>I am newbie to trinidad that I am using with Jboss.
>
>I have an xhtml page with the following code:
>..........
><f:view>
><f:loadBundle basename="messages" var="msgs" />
><br/>
> <h:form>
> <div class="menuBar">
> <tr:navigationPane hint="bar" >
> <tr:commandNavigationItem immediate="true" text="...."
>action="....." />
> <tr:commandNavigationItem immediate="true" text="...."
>action="....." />
> <tr:commandNavigationItem immediate="true" text="...."
>action="....." />
> </tr:navigationPane>
> </div>
>............
>
>and everything goes well.
>
>Since the page is generated by an application, I have to put some comments as
>placeholders for custom code:
>
><f:loadBundle basename="messages" var="msgs" />
><br/>
> <h:form>
> <div class="menuBar">
> <tr:navigationPane hint="bar" >
> <tr:commandNavigationItem immediate="true" text="...."
>action="....." />
><!-- Start comment -->
><!-- End comment -->
> <tr:commandNavigationItem immediate="true" text="...."
>action="....." />
> <tr:commandNavigationItem immediate="true" text="...." action="....." />
> </tr:navigationPane>
> </div>
>............
>
>If I put the comments I get the following error message (on the jboss console)
>when the page is rendered:
>
>21:55:22,076 ERROR [STDERR] Jan 17, 2007 9:55:22 PM
>org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPaneRenderer
>renderContent
>SEVERE: Warning: illegal component hierarchy detected, expected UIXCommand but
>found another type of component instead.
>java.lang.ClassCastException: com.sun.facelets.tag.ui.ComponentRef
>
>Question are:
>
>1) Can I use comments into commandNavigationItem and if yes how I have to use
>them
>
>2) If I can't use comments is there any tag that can I use as place holder ?
>
It appears that you are using facelets. Well, even if you used shale clay, you would
not see the comments in the rendered mark-up (clay would just remove them if you used JSP
like syntax). Some components are fussy about their children. They insist that their
children are a specific type and that they have know behavior (As a parent I can relate
to the know behavior part :-) . The comment is probably being added as a
"verbatim" type of component.
The RI has components like this. The "javax.faces.HtmlSelectManyMenu" component only likes
children that are "javax.faces.SelectItem" or "javax.faces.SelectItems".
If you were using Clay, you could use the following directives to remove a
block of markup:
<!-- ### clay:remove ### -->
stuff that should be removed
<!-- ### /clay:remove ### -->
>Please, help me !!!
>>Thank you
>
>Fab.
Gary
--
Matthias Wessendorf
http://tinyurl.com/fmywh
further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com