Hello Zied,

i hope the exception is fixed.

Look at https://issues.apache.org/jira/browse/TOBAGO-511.

Can you test next nightly build, please.

Regards

Bernd

Zied Hamdi wrote:
Hello Bernd,

I woke up thinking: it isn't possible!! I started my computer and this test
: :-)

In fact, I know that facelet's c:if is Tag (compile time tag), and that
<ui:out> is a Component (render time tag), and I already have (render
time)Components that work with the ui:include/ui:param which are (compile
time) Tags.

So I verified my example by trying to show the value of #{ajaxScope} in a
tc:out. And it shows!!! even if embedded inside a c:if tag (as was the case
with the tc:attribute). Then I added again the grey backgrounded code of the
attribute, and I received the NullPointerException, so I think it's a bug,
or there is a third phase type behind the compile and render phasis. (by
render I mean runtime)


<tc:panel

      xmlns="http://www.w3.org/1999/xhtml";

      xmlns:f="http://java.sun.com/jsf/core";

      xmlns:h="http://java.sun.com/jsf/html";

      xmlns:t="http://myfaces.apache.org/tomahawk";

      xmlns:tc="http://myfaces.apache.org/tobago/component";

      xmlns:tx="http://myfaces.apache.org/tobago/extension";

      xmlns:c="http://java.sun.com/jstl/core";>

      <f:facet name="layout">

            <tc:gridLayout rows="fixed;*" />

      </f:facet>



      <c:if test="#{not empty ajaxScope}">

            <tc:out value="scope:   #{ajaxScope}"></tc:out>

      </c:if>



      <tc:tree

            id="categoriesTree"

            value="#{contractCtrl.categoriesRoot}"

            state="#{contractCtrl.treeState}"

            showIcons="true"

            mutable="false"

            nameReference="userObject.embedded.name">

            <f:actionListener type="
fr.into.services.controller.CategoryEditionListener" />

            <f:facet name="treeNodeCommand">

                  <tc:command actionListener="#{contractCtrl.selectCategory
}">

                        <c:if test="#{not empty ajaxScope}">

                             <tc:attribute

                                   name="renderedPartially"

                                   value="#{ajaxScope}" />

                        </c:if>

                  </tc:command>

            </f:facet>

      </tc:tree>



</tc:panel>


Here's the exception. If you confirm it's a bug, let me know so i add an
issue:


23:27:29,359 ERROR [STDERR] 4 oct. 2007 23:27:29
com.sun.facelets.FaceletViewHandler *handleRenderException*

GRAVE: Error Rendering View[/contract/contract.xhtml]

*java.lang.NullPointerException*

      at
org.apache.myfaces.tobago.renderkit.html.CommandRendererHelper.initOnclick(*
CommandRendererHelper.java:100*)

      at org.apache.myfaces.tobago.renderkit.html.CommandRendererHelper
.<init>(*CommandRendererHelper.java:61*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TreeOldRenderer.getTreeNodeCommandVar
(*TreeOldRenderer.java:292*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TreeOldRenderer.createJavascript
(*TreeOldRenderer.java:251*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TreeOldRenderer.encodeEnd
(*TreeOldRenderer.java:202*)

      at javax.faces.component.UIComponentBase.encodeEnd(*
UIComponentBase.java:836*)

      at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(*
RenderUtil.java:84*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.encodeChildrenOfComponent
(*GridLayoutRenderer.java:379*)

      at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(*
UILayout.java:71*)

      at
org.apache.myfaces.tobago.component.UIGridLayout.encodeChildrenOfComponent(*
UIGridLayout.java:276*)

      at org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(*
UIPanelBase.java:43*)

      at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(*
RenderUtil.java:77*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.DefaultLayoutRenderer.encodeChildrenOfComponent
(*DefaultLayoutRenderer.java:47*)

      at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(*
UILayout.java:71*)

      at org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(*
UIPanelBase.java:43*)

      at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(*
RenderUtil.java:77*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.DefaultLayoutRenderer.encodeChildrenOfComponent
(*DefaultLayoutRenderer.java:47*)

      at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(*
UILayout.java:71*)

      at org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(*
UIPanelBase.java:43*)

      at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(*
RenderUtil.java:77*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.encodeChildrenOfComponent
(*GridLayoutRenderer.java:379*)

      at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(*
UILayout.java:71*)

      at
org.apache.myfaces.tobago.component.UIGridLayout.encodeChildrenOfComponent(*
UIGridLayout.java:276*)

      at org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(*
UIPanelBase.java:43*)

      at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(*
RenderUtil.java:77*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.encodeChildrenOfComponent
(*GridLayoutRenderer.java:379*)

      at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(*
UILayout.java:71*)

      at
org.apache.myfaces.tobago.component.UIGridLayout.encodeChildrenOfComponent(*
UIGridLayout.java:276*)

      at org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(*
UIPanelBase.java:43*)

      at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(*
RenderUtil.java:77*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.DefaultLayoutRenderer.encodeChildrenOfComponent
(*DefaultLayoutRenderer.java:47*)

      at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(*
UILayout.java:71*)

      at org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(*
UIPanelBase.java:43*)

      at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(*
RenderUtil.java:77*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.encodeChildrenOfComponent
(*GridLayoutRenderer.java:379*)

      at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(*
UILayout.java:71*)

      at
org.apache.myfaces.tobago.component.UIGridLayout.encodeChildrenOfComponent(*
UIGridLayout.java:276*)

      at org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(*
UIPanelBase.java:43*)

      at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(*
RenderUtil.java:77*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.DefaultLayoutRenderer.encodeChildrenOfComponent
(*DefaultLayoutRenderer.java:47*)

      at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(*
UILayout.java:71*)

      at org.apache.myfaces.tobago.renderkit.RenderUtil.encodeChildren(*
RenderUtil.java:56*)

      at
org.apache.myfaces.tobago.renderkit.html.speyside.standard.tag.TabGroupRenderer.encodeContent
(*TabGroupRenderer.java:74*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TabGroupRenderer.renderTabGroupView
(*TabGroupRenderer.java:342*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TabGroupRenderer.encodeEnd
(*TabGroupRenderer.java:155*)

      at javax.faces.component.UIComponentBase.encodeEnd(*
UIComponentBase.java:836*)

      at org.apache.myfaces.tobago.component.UITabGroup.encodeEnd(*
UITabGroup.java:106*)

      at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(*
RenderUtil.java:84*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.DefaultLayoutRenderer.encodeChildrenOfComponent
(*DefaultLayoutRenderer.java:47*)

      at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(*
UILayout.java:71*)

      at org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(*
UIPanelBase.java:43*)

      at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(*
RenderUtil.java:77*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.encodeChildrenOfComponent
(*GridLayoutRenderer.java:379*)

      at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(*
UILayout.java:71*)

      at
org.apache.myfaces.tobago.component.UIGridLayout.encodeChildrenOfComponent(*
UIGridLayout.java:276*)

      at org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(*
UIPanelBase.java:43*)

      at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(*
RenderUtil.java:77*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.DefaultLayoutRenderer.encodeChildrenOfComponent
(*DefaultLayoutRenderer.java:47*)

      at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(*
UILayout.java:71*)

      at org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(*
UIPanelBase.java:43*)

      at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(*
RenderUtil.java:77*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.encodeChildrenOfComponent
(*GridLayoutRenderer.java:379*)

      at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(*
UILayout.java:71*)

      at
org.apache.myfaces.tobago.component.UIGridLayout.encodeChildrenOfComponent(*
UIGridLayout.java:276*)

      at org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(*
UIPanelBase.java:43*)

      at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(*
RenderUtil.java:77*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.DefaultLayoutRenderer.encodeChildrenOfComponent
(*DefaultLayoutRenderer.java:47*)

      at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(*
UILayout.java:71*)

      at org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(*
UIPanelBase.java:43*)

      at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(*
RenderUtil.java:77*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.encodeChildrenOfComponent
(*GridLayoutRenderer.java:379*)

      at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(*
UILayout.java:71*)

      at
org.apache.myfaces.tobago.component.UIGridLayout.encodeChildrenOfComponent(*
UIGridLayout.java:276*)

      at org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(*
UIPanelBase.java:43*)

      at org.apache.myfaces.tobago.renderkit.RenderUtil.encode(*
RenderUtil.java:77*)

      at
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.DefaultLayoutRenderer.encodeChildrenOfComponent
(*DefaultLayoutRenderer.java:47*)

      at
org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(*
UILayout.java:71*)

      at org.apache.myfa

23:27:29,359 ERROR [STDERR]
ces.tobago.renderkit.html.scarborough.standard.tag.PageRenderer.encodeEnd(*
PageRenderer.java:130*)

      at javax.faces.component.UIComponentBase.encodeEnd(*
UIComponentBase.java:836*)

      at javax.faces.component.UIComponent.encodeAll(*UIComponent.java:896*)

      at javax.faces.component.UIComponent.encodeAll(*UIComponent.java:892*)

      at com.sun.facelets.FaceletViewHandler.renderView(*
FaceletViewHandler.java:571*)

      at org.apache.myfaces.tobago.lifecycle.RenderResponseExecutor.execute(
*RenderResponseExecutor.java:56*)

      at org.apache.myfaces.tobago.lifecycle.TobagoLifecycle.render(*
TobagoLifecycle.java:141*)

      at javax.faces.webapp.FacesServlet.service(*FacesServlet.java:245*)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(*
ApplicationFilterChain.java:290*)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(*
ApplicationFilterChain.java:206*)

      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(*
ExtensionsFilter.java:147*)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(*
ApplicationFilterChain.java:235*)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(*
ApplicationFilterChain.java:206*)

      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(*
ReplyHeaderFilter.java:96*)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(*
ApplicationFilterChain.java:235*)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(*
ApplicationFilterChain.java:206*)

      at org.apache.catalina.core.StandardWrapperValve.invoke(*
StandardWrapperValve.java:230*)

      at org.apache.catalina.core.StandardContextValve.invoke(*
StandardContextValve.java:175*)

      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(*
SecurityAssociationValve.java:179*)

      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(*
AuthenticatorBase.java:433*)

      at org.jboss.web.tomcat.security.JaccContextValve.invoke(*
JaccContextValve.java:84*)

      at org.apache.catalina.core.StandardHostValve.invoke(*
StandardHostValve.java:128*)

      at org.apache.catalina.valves.ErrorReportValve.invoke(*
ErrorReportValve.java:104*)

      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(*
CachedConnectionValve.java:157*)

      at org.apache.catalina.core.StandardEngineValve.invoke(*
StandardEngineValve.java:109*)

      at org.apache.catalina.connector.CoyoteAdapter.service(*
CoyoteAdapter.java:241*)

      at org.apache.coyote.http11.Http11Processor.process(*
Http11Processor.java:844*)

      at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(*
Http11Protocol.java:580*)

      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(*JIoEndpoint.java
:447*)

      at java.lang.Thread.run(*Thread.java:619*)

Regards,
Zied


2007/10/4, Zied Hamdi <[EMAIL PROTECTED]>:
Hello Bernd how are you?

Was I right when I said to Volker you're on holidays? If yes I hope it was
memorable.

I can't figure out what you meant by two commands, did you mean applying
the rendered attribute on the command instead of c:if and have two commands,
my c:if is only a workaround the NullPointerException I have mentioned
in the last mail?
to be more explicit : this is my case. The c:if can be removed, it is
there only in the case the attribute ajaxScope is not specified.

< tc:tree

      xmlns=" http://www.w3.org/1999/xhtml";

      xmlns:f=" http://java.sun.com/jsf/core";

      xmlns:h=" http://java.sun.com/jsf/html";

      xmlns:t=" http://myfaces.apache.org/tomahawk";

      xmlns:tc=" http://myfaces.apache.org/tobago/component";

      xmlns:tx=" http://myfaces.apache.org/tobago/extension";

      xmlns:c=" http://java.sun.com/jstl/core";

      id= "categoriesTree"

      value ="#{contractCtrl.categoriesRoot}"

      state ="#{contractCtrl.treeState}"

      showIcons ="true"

      mutable ="true"

      nameReference ="userObject.embedded.name<http://userobject.embedded.name/>
" >

      < f:actionListener type ="
fr.into.services.controller.CategoryEditionListener" />

      < f:facet name ="treeNodeCommand" >

            < tc:command actionListener ="#{contractCtrl.selectCategory}">

                  < c:if test ="#{not empty ajaxScope}" >

                        < tc:attribute

                             name ="renderedPartially"

                             value ="#{ajaxScope}" />



                  </ c:if>

            </ tc:command>

      </ f:facet>



</ tc:tree>




2007/10/4, Bernd Bohmann <[EMAIL PROTECTED]>:
Hello Zied,

maybe two Commands with the rendered attribute would be a better choice.

Regards

Bernd



Zied Hamdi wrote:
Hi,

I have a little problem with runtime vs build-time tags:

I have a component page categories.xhtml containing the snippet:

                  <c:if test="#{not empty ajaxScope}">

                        <tc:attribute

                             name="renderedPartially"

                             value="#{ajaxScope}" />

                  </c:if>




included by a page as follows:

                             <ui:include
src="/contract/categories.xhtml">
                                   <ui:param

                                         name="ajaxScope"

                                         value=":page:mainInfoTabPanel"
/>
                             </ui:include>



The c:if evaluates correctly at build time and adds the attribute to
its
parent. But it seems tc:attribute evaluates at runtime: it finds null.
Having two varibales one runtime and one build time with the same
value is a
little barbar.

Anyone knows how to resolve this? Any idea is welcome.

Regards,
Zied



--
Zied Hamdi
zatreex.sourceforge.net




Reply via email to