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