Re: UIComponentBase.java - context.getViewRoot() returns null

2010-03-25 Thread Matthias Leis
Hi,

I am not that into myfaces and webflow, so I better ask before creating an 
issue. ;)
What exactly should be done by webflow? Should they call 
facesContext.setViewRoot(uiViewRoot) too? Wouldn't that be very... JSF-specific?

Matthias
 Original-Nachricht 
 Datum: Tue, 23 Mar 2010 10:55:10 -0500
 Von: Leonardo Uribe lu4...@gmail.com
 An: MyFaces Discussion users@myfaces.apache.org
 Betreff: Re: UIComponentBase.java - context.getViewRoot() returns null

 Hi
 
 Looking the stack trace provided very carefully, I can see the problem is
 not in myfaces, it is on spring class FlowViewStateManager. Take a look at
 this three lines:
 
 at
 javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:643)
 
 at
 org.springframework.faces.webflow.FlowViewStateManager.restoreComponentState(FlowViewStateManager.java:77)
 
 at
 org.springframework.faces.webflow.FlowViewStateManager.restoreView(FlowViewStateManager.java:159)
 
 
 The code related is this:
 
   public UIViewRoot restoreView(FacesContext context, String viewId,
 String renderKitId) {
   if (!JsfUtils.isFlowRequest()) {
   return delegate.restoreView(context, viewId, 
 renderKitId);
   }
   UIViewRoot viewRoot = restoreTreeStructure(context, viewId,
 renderKitId);
   if (viewRoot != null) {
   restoreComponentState(context, viewRoot, renderKitId);
   }
   return viewRoot;
   }
 
 What's the problem? well, look this code from myfaces JspStateManagerImpl:
 
 if (state != null) {
 Object[] stateArray = (Object[])state;
 TreeStructureManager tsm = new TreeStructureManager();
 uiViewRoot = tsm.restoreTreeStructure(stateArray[0]);
 
 if (uiViewRoot != null) {
 facesContext.setViewRoot (uiViewRoot);
 uiViewRoot.processRestoreState(facesContext,
 stateArray[1]);
 }
 }
 
 It is supposed after restore the tree structure, that
 facesContext.setViewRoot(uiViewRoot) should be called. Inclusive, in
 DefaultFaceletsStateManagementStrategy we do the same too. An issue should
 be created against spring web flow.
 
 regards,
 
 Leonardo Uribe
 
 2010/3/23 Jakob Korherr jakob.korh...@gmail.com
 
  Yeah, great! Thanks ;)
 
  Regards,
  Jakob
 
  2010/3/23 Matthias Leis matthias.l...@gmx.net
 
   Hi,
  
   JIRA link is https://issues.apache.org/jira/browse/MYFACES-2620
  
   I hope I've done it right ;)
  
   Matthias
    Original-Nachricht 
Datum: Tue, 23 Mar 2010 15:59:22 +0100
Von: Jakob Korherr jakob.korh...@gmail.com
An: MyFaces Discussion users@myfaces.apache.org
Betreff: Re: UIComponentBase.java - context.getViewRoot() returns
 null
  
Hi,
   
OK great! I'll take a look at it later ;)
   
Regards,
Jakob
   
2010/3/23 Matthias Leis matthias.l...@gmx.net
   
 Hi,

 I just saw, that I'm not working with the beta 2 but with the
  snapshot.
In
 beta 2 the NPW is thrown at line 1038 (in snapshot at line 1041).
 The line is:

   String renderKitId = context.getViewRoot().getRenderKitId();

 And looking at the variables in debugging mode says, that the
  viewRoot
is
 null. Sorry for the confusion :)

 Of course I don't mind to open a JIRA issue :)

 PS: I know tomahawk isn't even supposed to work with myfaces 2,
 but
  in
 generally it does. This one here is the only compatibility problem
 I
found
 (...for now ;) )

 Matthias
  Original-Nachricht 
  Datum: Tue, 23 Mar 2010 15:44:32 +0100
  Von: Jakob Korherr jakob.korh...@gmail.com
  An: MyFaces Discussion users@myfaces.apache.org
  Betreff: Re: UIComponentBase.java - context.getViewRoot()
 returns
   null

  Hi,
 
  Unfortunately there is no tomahawk port for MyFaces 2.0
 available
   yet,
so
  this might be a compatibility problem.
 
  I traced the Exception down and found out that it happens,
 because
   the
  RenderKitFactory returns null for the RenderKit here, see the
 code
from
  UIComponentBase:
 
  String renderKitId =
  context.getViewRoot().getRenderKitId();
  RenderKitFactory rkf = (RenderKitFactory)
  FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
  RenderKit renderKit = rkf.getRenderKit(context,
  renderKitId);
  Renderer renderer = renderKit.getRenderer(getFamily(),
  rendererType);
 
  In the last line renderKit is null and thus we get a NPE.
 
  Do you mind opening a JIRA issue for this? This would be really
   great.
 
  Thanks!
 
  Regards,
  Jakob
 
  2010/3/23 Matthias Leis matthias.l...@gmx.net
 
   Hi,
  
   I'm using myfaces 2.0 beta 2 and currently I'm using

Re: UIComponentBase.java - context.getViewRoot() returns null

2010-03-25 Thread Leonardo Uribe
Hi

2010/3/25 Matthias Leis matthias.l...@gmx.net

 Hi,

 I am not that into myfaces and webflow, so I better ask before creating an
 issue. ;)
 What exactly should be done by webflow? Should they call
 facesContext.setViewRoot(uiViewRoot) too? Wouldn't that be very...
 JSF-specific?


Yes, because FlowViewStateManager is not just delegating in this case, it is
saving and restoring by itself, so it is necessary in this case. In the
javadoc of StateManager, the methods restoreTreeStructure and
restoreComponentState now are implementation details, so in jsf 1.2 of upper
restoreView method should be used.

regards,

Leonardo Uribe



 Matthias
  Original-Nachricht 
  Datum: Tue, 23 Mar 2010 10:55:10 -0500
  Von: Leonardo Uribe lu4...@gmail.com
  An: MyFaces Discussion users@myfaces.apache.org
  Betreff: Re: UIComponentBase.java - context.getViewRoot() returns null

  Hi
 
  Looking the stack trace provided very carefully, I can see the problem is
  not in myfaces, it is on spring class FlowViewStateManager. Take a look
 at
  this three lines:
 
  at
  javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:643)
 
  at
 
 org.springframework.faces.webflow.FlowViewStateManager.restoreComponentState(FlowViewStateManager.java:77)
 
  at
 
 org.springframework.faces.webflow.FlowViewStateManager.restoreView(FlowViewStateManager.java:159)
 
 
  The code related is this:
 
public UIViewRoot restoreView(FacesContext context, String viewId,
  String renderKitId) {
if (!JsfUtils.isFlowRequest()) {
return delegate.restoreView(context, viewId,
 renderKitId);
}
UIViewRoot viewRoot = restoreTreeStructure(context, viewId,
  renderKitId);
if (viewRoot != null) {
restoreComponentState(context, viewRoot,
 renderKitId);
}
return viewRoot;
}
 
  What's the problem? well, look this code from myfaces
 JspStateManagerImpl:
 
  if (state != null) {
  Object[] stateArray = (Object[])state;
  TreeStructureManager tsm = new TreeStructureManager();
  uiViewRoot = tsm.restoreTreeStructure(stateArray[0]);
 
  if (uiViewRoot != null) {
  facesContext.setViewRoot (uiViewRoot);
  uiViewRoot.processRestoreState(facesContext,
  stateArray[1]);
  }
  }
 
  It is supposed after restore the tree structure, that
  facesContext.setViewRoot(uiViewRoot) should be called. Inclusive, in
  DefaultFaceletsStateManagementStrategy we do the same too. An issue
 should
  be created against spring web flow.
 
  regards,
 
  Leonardo Uribe
 
  2010/3/23 Jakob Korherr jakob.korh...@gmail.com
 
   Yeah, great! Thanks ;)
  
   Regards,
   Jakob
  
   2010/3/23 Matthias Leis matthias.l...@gmx.net
  
Hi,
   
JIRA link is https://issues.apache.org/jira/browse/MYFACES-2620
   
I hope I've done it right ;)
   
Matthias
 Original-Nachricht 
 Datum: Tue, 23 Mar 2010 15:59:22 +0100
 Von: Jakob Korherr jakob.korh...@gmail.com
 An: MyFaces Discussion users@myfaces.apache.org
 Betreff: Re: UIComponentBase.java - context.getViewRoot() returns
  null
   
 Hi,

 OK great! I'll take a look at it later ;)

 Regards,
 Jakob

 2010/3/23 Matthias Leis matthias.l...@gmx.net

  Hi,
 
  I just saw, that I'm not working with the beta 2 but with the
   snapshot.
 In
  beta 2 the NPW is thrown at line 1038 (in snapshot at line 1041).
  The line is:
 
String renderKitId = context.getViewRoot().getRenderKitId();
 
  And looking at the variables in debugging mode says, that the
   viewRoot
 is
  null. Sorry for the confusion :)
 
  Of course I don't mind to open a JIRA issue :)
 
  PS: I know tomahawk isn't even supposed to work with myfaces 2,
  but
   in
  generally it does. This one here is the only compatibility
 problem
  I
 found
  (...for now ;) )
 
  Matthias
   Original-Nachricht 
   Datum: Tue, 23 Mar 2010 15:44:32 +0100
   Von: Jakob Korherr jakob.korh...@gmail.com
   An: MyFaces Discussion users@myfaces.apache.org
   Betreff: Re: UIComponentBase.java - context.getViewRoot()
  returns
null
 
   Hi,
  
   Unfortunately there is no tomahawk port for MyFaces 2.0
  available
yet,
 so
   this might be a compatibility problem.
  
   I traced the Exception down and found out that it happens,
  because
the
   RenderKitFactory returns null for the RenderKit here, see the
  code
 from
   UIComponentBase:
  
   String renderKitId =
   context.getViewRoot().getRenderKitId();
   RenderKitFactory rkf = (RenderKitFactory)
   FactoryFinder.getFactory

UIComponentBase.java - context.getViewRoot() returns null

2010-03-23 Thread Matthias Leis
Hi,

I'm using myfaces 2.0 beta 2 and currently I'm using a h:dataTable on my 
pages and everything is fine.
For some reasons (sorting etc.) I want to use the t:dataTable (from Tomahawk 
1.1.9).

Now, when I click on a link inside the table, I get the following exception:
java.lang.NullPointerException
at 
javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:1041)
at 
org.apache.myfaces.component.html.ext.HtmlDataTableHack.getClientId(HtmlDataTableHack.java:111)
at 
org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.getClientId(AbstractHtmlDataTable.java:135)
at 
org.apache.myfaces.component.html.ext.HtmlDataTableHack.setRowIndex(HtmlDataTableHack.java:275)
at 
org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.setRowIndex(AbstractHtmlDataTable.java:276)
at javax.faces.component.UIData.visitTree(UIData.java:1257)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
at 
javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:648)
at 
org.springframework.faces.webflow.FlowViewStateManager.restoreComponentState(FlowViewStateManager.java:77)
at 
org.springframework.faces.webflow.FlowViewStateManager.restoreView(FlowViewStateManager.java:159)
at 
org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106)
at 
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.restoreView(FaceletViewDeclarationLanguage.java:1230)
at 
org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:240)
at 
com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
at 
org.springframework.faces.webflow.FlowViewHandler.restoreFlowView(FlowViewHandler.java:128)
at 
org.springframework.faces.webflow.FlowViewHandler.restoreView(FlowViewHandler.java:75)
at 
org.springframework.faces.webflow.JsfViewFactory.getView(JsfViewFactory.java:93)
at 
org.springframework.webflow.engine.ViewState.resume(ViewState.java:193)
at org.springframework.webflow.engine.Flow.resume(Flow.java:545)
at 
org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:259)
at 
org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:163)
at 
org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
at 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
at 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
at 
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
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:341)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
at 
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at 
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at 
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at 
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at 
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at 
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at 

Re: UIComponentBase.java - context.getViewRoot() returns null

2010-03-23 Thread Jakob Korherr
Hi,

Unfortunately there is no tomahawk port for MyFaces 2.0 available yet, so
this might be a compatibility problem.

I traced the Exception down and found out that it happens, because the
RenderKitFactory returns null for the RenderKit here, see the code from
UIComponentBase:

String renderKitId = context.getViewRoot().getRenderKitId();
RenderKitFactory rkf = (RenderKitFactory)
FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
RenderKit renderKit = rkf.getRenderKit(context, renderKitId);
Renderer renderer = renderKit.getRenderer(getFamily(),
rendererType);

In the last line renderKit is null and thus we get a NPE.

Do you mind opening a JIRA issue for this? This would be really great.

Thanks!

Regards,
Jakob

2010/3/23 Matthias Leis matthias.l...@gmx.net

 Hi,

 I'm using myfaces 2.0 beta 2 and currently I'm using a h:dataTable on my
 pages and everything is fine.
 For some reasons (sorting etc.) I want to use the t:dataTable (from
 Tomahawk 1.1.9).

 Now, when I click on a link inside the table, I get the following
 exception:
 java.lang.NullPointerException
at
 javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:1041)
at
 org.apache.myfaces.component.html.ext.HtmlDataTableHack.getClientId(HtmlDataTableHack.java:111)
at
 org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.getClientId(AbstractHtmlDataTable.java:135)
at
 org.apache.myfaces.component.html.ext.HtmlDataTableHack.setRowIndex(HtmlDataTableHack.java:275)
at
 org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.setRowIndex(AbstractHtmlDataTable.java:276)
at javax.faces.component.UIData.visitTree(UIData.java:1257)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
at
 javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:648)
at
 org.springframework.faces.webflow.FlowViewStateManager.restoreComponentState(FlowViewStateManager.java:77)
at
 org.springframework.faces.webflow.FlowViewStateManager.restoreView(FlowViewStateManager.java:159)
at
 org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106)
at
 org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.restoreView(FaceletViewDeclarationLanguage.java:1230)
at
 org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:240)
at
 com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
at
 org.springframework.faces.webflow.FlowViewHandler.restoreFlowView(FlowViewHandler.java:128)
at
 org.springframework.faces.webflow.FlowViewHandler.restoreView(FlowViewHandler.java:75)
at
 org.springframework.faces.webflow.JsfViewFactory.getView(JsfViewFactory.java:93)
at
 org.springframework.webflow.engine.ViewState.resume(ViewState.java:193)
at org.springframework.webflow.engine.Flow.resume(Flow.java:545)
at
 org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:259)
at
 org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:163)
at
 org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
at
 org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
at
 org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
at
 org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
at
 org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
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:341)
at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
at
 org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at
 org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
at
 

Re: UIComponentBase.java - context.getViewRoot() returns null

2010-03-23 Thread Andreas Schmidt

Hi Mathias,

the tomahawk component is only available for myFaces 1.1 and 1.2 but not for
myFaces 2.0.
Thus I doubt that tomahawk will work with myfaces 2.0. One just has to wait
until a version for Faces 2.0 is available.


Andreas.


Matthias Leis wrote:
 
 Hi,
 
 I'm using myfaces 2.0 beta 2 and currently I'm using a h:dataTable on my
 pages and everything is fine.
 For some reasons (sorting etc.) I want to use the t:dataTable (from
 Tomahawk 1.1.9).
 
 Now, when I click on a link inside the table, I get the following
 exception:
 java.lang.NullPointerException
   at
 javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:1041)
   at
 org.apache.myfaces.component.html.ext.HtmlDataTableHack.getClientId(HtmlDataTableHack.java:111)
   at
 org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.getClientId(AbstractHtmlDataTable.java:135)
   at
 org.apache.myfaces.component.html.ext.HtmlDataTableHack.setRowIndex(HtmlDataTableHack.java:275)
   at
 org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.setRowIndex(AbstractHtmlDataTable.java:276)
   at javax.faces.component.UIData.visitTree(UIData.java:1257)
   at javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
   at javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
   at
 javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:648)
   at
 org.springframework.faces.webflow.FlowViewStateManager.restoreComponentState(FlowViewStateManager.java:77)
   at
 org.springframework.faces.webflow.FlowViewStateManager.restoreView(FlowViewStateManager.java:159)
   at
 org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106)
   at
 org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.restoreView(FaceletViewDeclarationLanguage.java:1230)
   at
 org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:240)
   at
 com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
   at
 org.springframework.faces.webflow.FlowViewHandler.restoreFlowView(FlowViewHandler.java:128)
   at
 org.springframework.faces.webflow.FlowViewHandler.restoreView(FlowViewHandler.java:75)
   at
 org.springframework.faces.webflow.JsfViewFactory.getView(JsfViewFactory.java:93)
   at
 org.springframework.webflow.engine.ViewState.resume(ViewState.java:193)
   at org.springframework.webflow.engine.Flow.resume(Flow.java:545)
   at
 org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:259)
   at
 org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:163)
   at
 org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
   at
 org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
   at
 org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
   at
 org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
   at
 org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   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:341)
   at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
   at
 org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
   at
 org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
   at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
   at
 org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
   at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
   at
 org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
   at
 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
   at
 

Re: UIComponentBase.java - context.getViewRoot() returns null

2010-03-23 Thread Matthias Leis
Hi,

I just saw, that I'm not working with the beta 2 but with the snapshot. In beta 
2 the NPW is thrown at line 1038 (in snapshot at line 1041).
The line is:

   String renderKitId = context.getViewRoot().getRenderKitId();

And looking at the variables in debugging mode says, that the viewRoot is null. 
Sorry for the confusion :)

Of course I don't mind to open a JIRA issue :)

PS: I know tomahawk isn't even supposed to work with myfaces 2, but in 
generally it does. This one here is the only compatibility problem I found 
(...for now ;) )

Matthias
 Original-Nachricht 
 Datum: Tue, 23 Mar 2010 15:44:32 +0100
 Von: Jakob Korherr jakob.korh...@gmail.com
 An: MyFaces Discussion users@myfaces.apache.org
 Betreff: Re: UIComponentBase.java - context.getViewRoot() returns null

 Hi,
 
 Unfortunately there is no tomahawk port for MyFaces 2.0 available yet, so
 this might be a compatibility problem.
 
 I traced the Exception down and found out that it happens, because the
 RenderKitFactory returns null for the RenderKit here, see the code from
 UIComponentBase:
 
 String renderKitId = context.getViewRoot().getRenderKitId();
 RenderKitFactory rkf = (RenderKitFactory)
 FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
 RenderKit renderKit = rkf.getRenderKit(context, renderKitId);
 Renderer renderer = renderKit.getRenderer(getFamily(),
 rendererType);
 
 In the last line renderKit is null and thus we get a NPE.
 
 Do you mind opening a JIRA issue for this? This would be really great.
 
 Thanks!
 
 Regards,
 Jakob
 
 2010/3/23 Matthias Leis matthias.l...@gmx.net
 
  Hi,
 
  I'm using myfaces 2.0 beta 2 and currently I'm using a h:dataTable on
 my
  pages and everything is fine.
  For some reasons (sorting etc.) I want to use the t:dataTable (from
  Tomahawk 1.1.9).
 
  Now, when I click on a link inside the table, I get the following
  exception:
  java.lang.NullPointerException
 at
 
 javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:1041)
 at
 
 org.apache.myfaces.component.html.ext.HtmlDataTableHack.getClientId(HtmlDataTableHack.java:111)
 at
 
 org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.getClientId(AbstractHtmlDataTable.java:135)
 at
 
 org.apache.myfaces.component.html.ext.HtmlDataTableHack.setRowIndex(HtmlDataTableHack.java:275)
 at
 
 org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.setRowIndex(AbstractHtmlDataTable.java:276)
 at javax.faces.component.UIData.visitTree(UIData.java:1257)
 at
 javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
 at
 javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
 at
 
 javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:648)
 at
 
 org.springframework.faces.webflow.FlowViewStateManager.restoreComponentState(FlowViewStateManager.java:77)
 at
 
 org.springframework.faces.webflow.FlowViewStateManager.restoreView(FlowViewStateManager.java:159)
 at
 
 org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106)
 at
 
 org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.restoreView(FaceletViewDeclarationLanguage.java:1230)
 at
 
 org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:240)
 at
 
 com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
 at
 
 org.springframework.faces.webflow.FlowViewHandler.restoreFlowView(FlowViewHandler.java:128)
 at
 
 org.springframework.faces.webflow.FlowViewHandler.restoreView(FlowViewHandler.java:75)
 at
 
 org.springframework.faces.webflow.JsfViewFactory.getView(JsfViewFactory.java:93)
 at
  org.springframework.webflow.engine.ViewState.resume(ViewState.java:193)
 at org.springframework.webflow.engine.Flow.resume(Flow.java:545)
 at
 
 org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:259)
 at
 
 org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:163)
 at
 
 org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
 at
 
 org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
 at
 
 org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
 at
 
 org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
 at
 
 org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290

Re: UIComponentBase.java - context.getViewRoot() returns null

2010-03-23 Thread Jakob Korherr
Hi,

OK great! I'll take a look at it later ;)

Regards,
Jakob

2010/3/23 Matthias Leis matthias.l...@gmx.net

 Hi,

 I just saw, that I'm not working with the beta 2 but with the snapshot. In
 beta 2 the NPW is thrown at line 1038 (in snapshot at line 1041).
 The line is:

   String renderKitId = context.getViewRoot().getRenderKitId();

 And looking at the variables in debugging mode says, that the viewRoot is
 null. Sorry for the confusion :)

 Of course I don't mind to open a JIRA issue :)

 PS: I know tomahawk isn't even supposed to work with myfaces 2, but in
 generally it does. This one here is the only compatibility problem I found
 (...for now ;) )

 Matthias
  Original-Nachricht 
  Datum: Tue, 23 Mar 2010 15:44:32 +0100
  Von: Jakob Korherr jakob.korh...@gmail.com
  An: MyFaces Discussion users@myfaces.apache.org
  Betreff: Re: UIComponentBase.java - context.getViewRoot() returns null

  Hi,
 
  Unfortunately there is no tomahawk port for MyFaces 2.0 available yet, so
  this might be a compatibility problem.
 
  I traced the Exception down and found out that it happens, because the
  RenderKitFactory returns null for the RenderKit here, see the code from
  UIComponentBase:
 
  String renderKitId = context.getViewRoot().getRenderKitId();
  RenderKitFactory rkf = (RenderKitFactory)
  FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
  RenderKit renderKit = rkf.getRenderKit(context, renderKitId);
  Renderer renderer = renderKit.getRenderer(getFamily(),
  rendererType);
 
  In the last line renderKit is null and thus we get a NPE.
 
  Do you mind opening a JIRA issue for this? This would be really great.
 
  Thanks!
 
  Regards,
  Jakob
 
  2010/3/23 Matthias Leis matthias.l...@gmx.net
 
   Hi,
  
   I'm using myfaces 2.0 beta 2 and currently I'm using a h:dataTable on
  my
   pages and everything is fine.
   For some reasons (sorting etc.) I want to use the t:dataTable (from
   Tomahawk 1.1.9).
  
   Now, when I click on a link inside the table, I get the following
   exception:
   java.lang.NullPointerException
  at
  
 
 javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:1041)
  at
  
 
 org.apache.myfaces.component.html.ext.HtmlDataTableHack.getClientId(HtmlDataTableHack.java:111)
  at
  
 
 org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.getClientId(AbstractHtmlDataTable.java:135)
  at
  
 
 org.apache.myfaces.component.html.ext.HtmlDataTableHack.setRowIndex(HtmlDataTableHack.java:275)
  at
  
 
 org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.setRowIndex(AbstractHtmlDataTable.java:276)
  at javax.faces.component.UIData.visitTree(UIData.java:1257)
  at
  javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
  at
  javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
  at
  
  javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:648)
  at
  
 
 org.springframework.faces.webflow.FlowViewStateManager.restoreComponentState(FlowViewStateManager.java:77)
  at
  
 
 org.springframework.faces.webflow.FlowViewStateManager.restoreView(FlowViewStateManager.java:159)
  at
  
 
 org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106)
  at
  
 
 org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.restoreView(FaceletViewDeclarationLanguage.java:1230)
  at
  
 
 org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:240)
  at
  
 
 com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
  at
  
 
 org.springframework.faces.webflow.FlowViewHandler.restoreFlowView(FlowViewHandler.java:128)
  at
  
 
 org.springframework.faces.webflow.FlowViewHandler.restoreView(FlowViewHandler.java:75)
  at
  
 
 org.springframework.faces.webflow.JsfViewFactory.getView(JsfViewFactory.java:93)
  at
   org.springframework.webflow.engine.ViewState.resume(ViewState.java:193)
  at org.springframework.webflow.engine.Flow.resume(Flow.java:545)
  at
  
 
 org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:259)
  at
  
 
 org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:163)
  at
  
 
 org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
  at
  
 
 org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
  at
  
 
 org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
  at
  
 
 org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
  at
  
 
 org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563

Re: UIComponentBase.java - context.getViewRoot() returns null

2010-03-23 Thread Matthias Leis
Hi,

JIRA link is https://issues.apache.org/jira/browse/MYFACES-2620

I hope I've done it right ;)

Matthias
 Original-Nachricht 
 Datum: Tue, 23 Mar 2010 15:59:22 +0100
 Von: Jakob Korherr jakob.korh...@gmail.com
 An: MyFaces Discussion users@myfaces.apache.org
 Betreff: Re: UIComponentBase.java - context.getViewRoot() returns null

 Hi,
 
 OK great! I'll take a look at it later ;)
 
 Regards,
 Jakob
 
 2010/3/23 Matthias Leis matthias.l...@gmx.net
 
  Hi,
 
  I just saw, that I'm not working with the beta 2 but with the snapshot.
 In
  beta 2 the NPW is thrown at line 1038 (in snapshot at line 1041).
  The line is:
 
String renderKitId = context.getViewRoot().getRenderKitId();
 
  And looking at the variables in debugging mode says, that the viewRoot
 is
  null. Sorry for the confusion :)
 
  Of course I don't mind to open a JIRA issue :)
 
  PS: I know tomahawk isn't even supposed to work with myfaces 2, but in
  generally it does. This one here is the only compatibility problem I
 found
  (...for now ;) )
 
  Matthias
   Original-Nachricht 
   Datum: Tue, 23 Mar 2010 15:44:32 +0100
   Von: Jakob Korherr jakob.korh...@gmail.com
   An: MyFaces Discussion users@myfaces.apache.org
   Betreff: Re: UIComponentBase.java - context.getViewRoot() returns null
 
   Hi,
  
   Unfortunately there is no tomahawk port for MyFaces 2.0 available yet,
 so
   this might be a compatibility problem.
  
   I traced the Exception down and found out that it happens, because the
   RenderKitFactory returns null for the RenderKit here, see the code
 from
   UIComponentBase:
  
   String renderKitId = context.getViewRoot().getRenderKitId();
   RenderKitFactory rkf = (RenderKitFactory)
   FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
   RenderKit renderKit = rkf.getRenderKit(context, renderKitId);
   Renderer renderer = renderKit.getRenderer(getFamily(),
   rendererType);
  
   In the last line renderKit is null and thus we get a NPE.
  
   Do you mind opening a JIRA issue for this? This would be really great.
  
   Thanks!
  
   Regards,
   Jakob
  
   2010/3/23 Matthias Leis matthias.l...@gmx.net
  
Hi,
   
I'm using myfaces 2.0 beta 2 and currently I'm using a h:dataTable
 on
   my
pages and everything is fine.
For some reasons (sorting etc.) I want to use the t:dataTable
 (from
Tomahawk 1.1.9).
   
Now, when I click on a link inside the table, I get the following
exception:
java.lang.NullPointerException
   at
   
  
 
 javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:1041)
   at
   
  
 
 org.apache.myfaces.component.html.ext.HtmlDataTableHack.getClientId(HtmlDataTableHack.java:111)
   at
   
  
 
 org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.getClientId(AbstractHtmlDataTable.java:135)
   at
   
  
 
 org.apache.myfaces.component.html.ext.HtmlDataTableHack.setRowIndex(HtmlDataTableHack.java:275)
   at
   
  
 
 org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.setRowIndex(AbstractHtmlDataTable.java:276)
   at javax.faces.component.UIData.visitTree(UIData.java:1257)
   at
   javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
   at
   javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
   at
   
  
 javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:648)
   at
   
  
 
 org.springframework.faces.webflow.FlowViewStateManager.restoreComponentState(FlowViewStateManager.java:77)
   at
   
  
 
 org.springframework.faces.webflow.FlowViewStateManager.restoreView(FlowViewStateManager.java:159)
   at
   
  
 
 org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106)
   at
   
  
 
 org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.restoreView(FaceletViewDeclarationLanguage.java:1230)
   at
   
  
 
 org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:240)
   at
   
  
 
 com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
   at
   
  
 
 org.springframework.faces.webflow.FlowViewHandler.restoreFlowView(FlowViewHandler.java:128)
   at
   
  
 
 org.springframework.faces.webflow.FlowViewHandler.restoreView(FlowViewHandler.java:75)
   at
   
  
 
 org.springframework.faces.webflow.JsfViewFactory.getView(JsfViewFactory.java:93)
   at
   
 org.springframework.webflow.engine.ViewState.resume(ViewState.java:193)
   at
 org.springframework.webflow.engine.Flow.resume(Flow.java:545)
   at
   
  
 
 org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:259)
   at
   
  
 
 org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:163

Re: UIComponentBase.java - context.getViewRoot() returns null

2010-03-23 Thread Jakob Korherr
Yeah, great! Thanks ;)

Regards,
Jakob

2010/3/23 Matthias Leis matthias.l...@gmx.net

 Hi,

 JIRA link is https://issues.apache.org/jira/browse/MYFACES-2620

 I hope I've done it right ;)

 Matthias
  Original-Nachricht 
  Datum: Tue, 23 Mar 2010 15:59:22 +0100
  Von: Jakob Korherr jakob.korh...@gmail.com
  An: MyFaces Discussion users@myfaces.apache.org
  Betreff: Re: UIComponentBase.java - context.getViewRoot() returns null

  Hi,
 
  OK great! I'll take a look at it later ;)
 
  Regards,
  Jakob
 
  2010/3/23 Matthias Leis matthias.l...@gmx.net
 
   Hi,
  
   I just saw, that I'm not working with the beta 2 but with the snapshot.
  In
   beta 2 the NPW is thrown at line 1038 (in snapshot at line 1041).
   The line is:
  
 String renderKitId = context.getViewRoot().getRenderKitId();
  
   And looking at the variables in debugging mode says, that the viewRoot
  is
   null. Sorry for the confusion :)
  
   Of course I don't mind to open a JIRA issue :)
  
   PS: I know tomahawk isn't even supposed to work with myfaces 2, but in
   generally it does. This one here is the only compatibility problem I
  found
   (...for now ;) )
  
   Matthias
    Original-Nachricht 
Datum: Tue, 23 Mar 2010 15:44:32 +0100
Von: Jakob Korherr jakob.korh...@gmail.com
An: MyFaces Discussion users@myfaces.apache.org
Betreff: Re: UIComponentBase.java - context.getViewRoot() returns
 null
  
Hi,
   
Unfortunately there is no tomahawk port for MyFaces 2.0 available
 yet,
  so
this might be a compatibility problem.
   
I traced the Exception down and found out that it happens, because
 the
RenderKitFactory returns null for the RenderKit here, see the code
  from
UIComponentBase:
   
String renderKitId = context.getViewRoot().getRenderKitId();
RenderKitFactory rkf = (RenderKitFactory)
FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
RenderKit renderKit = rkf.getRenderKit(context, renderKitId);
Renderer renderer = renderKit.getRenderer(getFamily(),
rendererType);
   
In the last line renderKit is null and thus we get a NPE.
   
Do you mind opening a JIRA issue for this? This would be really
 great.
   
Thanks!
   
Regards,
Jakob
   
2010/3/23 Matthias Leis matthias.l...@gmx.net
   
 Hi,

 I'm using myfaces 2.0 beta 2 and currently I'm using a
 h:dataTable
  on
my
 pages and everything is fine.
 For some reasons (sorting etc.) I want to use the t:dataTable
  (from
 Tomahawk 1.1.9).

 Now, when I click on a link inside the table, I get the following
 exception:
 java.lang.NullPointerException
at

   
  
 
 javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:1041)
at

   
  
 
 org.apache.myfaces.component.html.ext.HtmlDataTableHack.getClientId(HtmlDataTableHack.java:111)
at

   
  
 
 org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.getClientId(AbstractHtmlDataTable.java:135)
at

   
  
 
 org.apache.myfaces.component.html.ext.HtmlDataTableHack.setRowIndex(HtmlDataTableHack.java:275)
at

   
  
 
 org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.setRowIndex(AbstractHtmlDataTable.java:276)
at javax.faces.component.UIData.visitTree(UIData.java:1257)
at
javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
at
javax.faces.component.UIComponent.visitTree(UIComponent.java:770)
at

   
  javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:648)
at

   
  
 
 org.springframework.faces.webflow.FlowViewStateManager.restoreComponentState(FlowViewStateManager.java:77)
at

   
  
 
 org.springframework.faces.webflow.FlowViewStateManager.restoreView(FlowViewStateManager.java:159)
at

   
  
 
 org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106)
at

   
  
 
 org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.restoreView(FaceletViewDeclarationLanguage.java:1230)
at

   
  
 
 org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:240)
at

   
  
 
 com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
at

   
  
 
 org.springframework.faces.webflow.FlowViewHandler.restoreFlowView(FlowViewHandler.java:128)
at

   
  
 
 org.springframework.faces.webflow.FlowViewHandler.restoreView(FlowViewHandler.java:75)
at

   
  
 
 org.springframework.faces.webflow.JsfViewFactory.getView(JsfViewFactory.java:93)
at

  org.springframework.webflow.engine.ViewState.resume(ViewState.java:193)
at
  org.springframework.webflow.engine.Flow.resume(Flow.java:545

Re: UIComponentBase.java - context.getViewRoot() returns null

2010-03-23 Thread Leonardo Uribe
Hi

Looking the stack trace provided very carefully, I can see the problem is
not in myfaces, it is on spring class FlowViewStateManager. Take a look at
this three lines:

at javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:643)

at
org.springframework.faces.webflow.FlowViewStateManager.restoreComponentState(FlowViewStateManager.java:77)

at
org.springframework.faces.webflow.FlowViewStateManager.restoreView(FlowViewStateManager.java:159)


The code related is this:

public UIViewRoot restoreView(FacesContext context, String viewId,
String renderKitId) {
if (!JsfUtils.isFlowRequest()) {
return delegate.restoreView(context, viewId, 
renderKitId);
}
UIViewRoot viewRoot = restoreTreeStructure(context, viewId, 
renderKitId);
if (viewRoot != null) {
restoreComponentState(context, viewRoot, renderKitId);
}
return viewRoot;
}

What's the problem? well, look this code from myfaces JspStateManagerImpl:

if (state != null) {
Object[] stateArray = (Object[])state;
TreeStructureManager tsm = new TreeStructureManager();
uiViewRoot = tsm.restoreTreeStructure(stateArray[0]);

if (uiViewRoot != null) {
facesContext.setViewRoot (uiViewRoot);
uiViewRoot.processRestoreState(facesContext,
stateArray[1]);
}
}

It is supposed after restore the tree structure, that
facesContext.setViewRoot(uiViewRoot) should be called. Inclusive, in
DefaultFaceletsStateManagementStrategy we do the same too. An issue should
be created against spring web flow.

regards,

Leonardo Uribe

2010/3/23 Jakob Korherr jakob.korh...@gmail.com

 Yeah, great! Thanks ;)

 Regards,
 Jakob

 2010/3/23 Matthias Leis matthias.l...@gmx.net

  Hi,
 
  JIRA link is https://issues.apache.org/jira/browse/MYFACES-2620
 
  I hope I've done it right ;)
 
  Matthias
   Original-Nachricht 
   Datum: Tue, 23 Mar 2010 15:59:22 +0100
   Von: Jakob Korherr jakob.korh...@gmail.com
   An: MyFaces Discussion users@myfaces.apache.org
   Betreff: Re: UIComponentBase.java - context.getViewRoot() returns null
 
   Hi,
  
   OK great! I'll take a look at it later ;)
  
   Regards,
   Jakob
  
   2010/3/23 Matthias Leis matthias.l...@gmx.net
  
Hi,
   
I just saw, that I'm not working with the beta 2 but with the
 snapshot.
   In
beta 2 the NPW is thrown at line 1038 (in snapshot at line 1041).
The line is:
   
  String renderKitId = context.getViewRoot().getRenderKitId();
   
And looking at the variables in debugging mode says, that the
 viewRoot
   is
null. Sorry for the confusion :)
   
Of course I don't mind to open a JIRA issue :)
   
PS: I know tomahawk isn't even supposed to work with myfaces 2, but
 in
generally it does. This one here is the only compatibility problem I
   found
(...for now ;) )
   
Matthias
 Original-Nachricht 
 Datum: Tue, 23 Mar 2010 15:44:32 +0100
 Von: Jakob Korherr jakob.korh...@gmail.com
 An: MyFaces Discussion users@myfaces.apache.org
 Betreff: Re: UIComponentBase.java - context.getViewRoot() returns
  null
   
 Hi,

 Unfortunately there is no tomahawk port for MyFaces 2.0 available
  yet,
   so
 this might be a compatibility problem.

 I traced the Exception down and found out that it happens, because
  the
 RenderKitFactory returns null for the RenderKit here, see the code
   from
 UIComponentBase:

 String renderKitId =
 context.getViewRoot().getRenderKitId();
 RenderKitFactory rkf = (RenderKitFactory)
 FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
 RenderKit renderKit = rkf.getRenderKit(context,
 renderKitId);
 Renderer renderer = renderKit.getRenderer(getFamily(),
 rendererType);

 In the last line renderKit is null and thus we get a NPE.

 Do you mind opening a JIRA issue for this? This would be really
  great.

 Thanks!

 Regards,
 Jakob

 2010/3/23 Matthias Leis matthias.l...@gmx.net

  Hi,
 
  I'm using myfaces 2.0 beta 2 and currently I'm using a
  h:dataTable
   on
 my
  pages and everything is fine.
  For some reasons (sorting etc.) I want to use the t:dataTable
   (from
  Tomahawk 1.1.9).
 
  Now, when I click on a link inside the table, I get the following
  exception:
  java.lang.NullPointerException
 at
 

   
  
 
 javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:1041)
 at
 

   
  
 
 org.apache.myfaces.component.html.ext.HtmlDataTableHack.getClientId(HtmlDataTableHack.java:111