myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "RĂ©gis Legrand" <legrand.re...@gmail.com>
Subject [beans not used by trinidad]
Date Sun, 14 Dec 2008 12:54:50 GMT
Hello everybody, and sorry for my bad English.

I am actually using trinidad and facelets, and I am a little bit
disappointed by my problem.

In fact, my managed beans are not used by trinidad, and the following
example should give you a few informations:


1) The code of my facelet (I use twice the reference implementation tags and
the trinidad ones)

____________________________________________
<?xml version='1.0' encoding='UTF-8' ?>

<jsp:root
    xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:tr="http://myfaces.apache.org/trinidad"
    xmlns:trh="http://myfaces.apache.org/trinidad/html"
>
<jsp:directive.page contentType="text/html;charset=utf-8" />
<f:view>
<tr:document>
          <h:panelGrid columns="1">
              <tr:outputText value="TR:1:" rendered="true"/>
              <tr:outputText value="TR:2:" rendered="false"/>
              <tr:outputText value="TR:3 #{testBean.name}" />

              <tr:outputText
                  value="TR:4 OK"
                  rendered="#{testBean.connected}"
              />

              <h:outputText value="H:1:" rendered="true"/>
              <h:outputText value="H:2:" rendered="false"/>
              <h:outputText value="H:3 #{testBean.name}" />

              <h:outputText
                  value="H:4 OK"
                  rendered="#{testBean.connected}"
              />
          </h:panelGrid>
</tr:document>
</f:view>
</jsp:root>
________________________________________________

2) The result:
TR:1:
TR:4 OK H:1: H:3 badboy________________________________________________

So, as you can see, no problem with th RI tags:
H1 is displayed, not H2, H3 is displayed with the string returned by the
bean, and H4 is not displayed because getConnected returns false.
But logically, it should be exactly the same thing with TR:1,2,3,4.

You can also see that there is no problem with the interpretation of the
static Expression Language:
 TR2 is not rendered because false is used statically.
But when a managed bean is used, nothing happens, and the beans methods
aren't called (the logs show me that the methods getName and getConnected
are never called when I use trinidad).

Ok, I hope my english is understandable, and that you will can help me ;) ,
because it's a very strange problem for me.

Thanks in advance.

Mime
View raw message