If in myFaces/Tomahwak

2007-09-05 Thread daniel ccss
Hi all,

I have one question, how can I do an IF in a JSP wit myFaces/Tomahawk? In
struts I used logic:equal or logic:notEqual, which is the tag in
myFaces/Tomahawk to do that, I don´t want to use this: % if(...)... {% %
else(...)... {%

thanks!!!


Re: If in myFaces/Tomahwak

2007-09-05 Thread Mike Kienenberger
Generally, you do this with the rendered attribute of the component.

If you want to group a bunch of components, use a panelGroup rendered.


On 9/5/07, daniel ccss [EMAIL PROTECTED] wrote:
 Hi all,

 I have one question, how can I do an IF in a JSP wit myFaces/Tomahawk? In
 struts I used logic:equal or logic:notEqual, which is the tag in
 myFaces/Tomahawk to do that, I don´t want to use this: % if(...)... {% %
 else(...)... {%

 thanks!!!



Re: If in myFaces/Tomahwak

2007-09-05 Thread daniel ccss
Can you give some example code, another way?

On 9/5/07, Mike Kienenberger [EMAIL PROTECTED] wrote:

 Generally, you do this with the rendered attribute of the component.

 If you want to group a bunch of components, use a panelGroup rendered.


 On 9/5/07, daniel ccss [EMAIL PROTECTED] wrote:
  Hi all,
 
  I have one question, how can I do an IF in a JSP wit myFaces/Tomahawk?
 In
  struts I used logic:equal or logic:notEqual, which is the tag in
  myFaces/Tomahawk to do that, I don´t want to use this: % if(...)... {%
 %
  else(...)... {%
 
  thanks!!!
 



Re: If in myFaces/Tomahwak

2007-09-05 Thread Mike Kienenberger
panelGroup rendered=#{bean.shouldRenderThese}
componentToRenderWhenTrue/
componentToRenderWhenTrue/
componentToRenderWhenTrue/
componentToRenderWhenTrue/
componentToRenderWhenTrue/
/panelGroup

panelGroup rendered=#{not bean.shouldRenderThese}
componentToRenderWhenFalse/
componentToRenderWhenFalse/
componentToRenderWhenFalse/
/panelGroup

On 9/5/07, daniel ccss [EMAIL PROTECTED] wrote:
 Can you give some example code, another way?


 On 9/5/07, Mike Kienenberger [EMAIL PROTECTED] wrote:
  Generally, you do this with the rendered attribute of the component.
 
  If you want to group a bunch of components, use a panelGroup rendered.
 
 
  On 9/5/07, daniel ccss [EMAIL PROTECTED] wrote:
   Hi all,
  
   I have one question, how can I do an IF in a JSP wit myFaces/Tomahawk?
 In
   struts I used logic:equal or logic:notEqual, which is the tag in
   myFaces/Tomahawk to do that, I don´t want to use this: % if(...)... {%
 %
   else(...)... {%
  
   thanks!!!
  
 




Re: If in myFaces/Tomahwak

2007-09-05 Thread daniel ccss
Thanks!!... But, there are no if components like the logic:equal o
logic:notPresent?? in struts

On 9/5/07, Mike Kienenberger [EMAIL PROTECTED] wrote:

 panelGroup rendered=#{bean.shouldRenderThese}
 componentToRenderWhenTrue/
 componentToRenderWhenTrue/
 componentToRenderWhenTrue/
 componentToRenderWhenTrue/
 componentToRenderWhenTrue/
 /panelGroup

 panelGroup rendered=#{not bean.shouldRenderThese}
 componentToRenderWhenFalse/
 componentToRenderWhenFalse/
 componentToRenderWhenFalse/
 /panelGroup

 On 9/5/07, daniel ccss [EMAIL PROTECTED] wrote:
  Can you give some example code, another way?
 
 
  On 9/5/07, Mike Kienenberger [EMAIL PROTECTED] wrote:
   Generally, you do this with the rendered attribute of the component.
  
   If you want to group a bunch of components, use a panelGroup
 rendered.
  
  
   On 9/5/07, daniel ccss [EMAIL PROTECTED] wrote:
Hi all,
   
I have one question, how can I do an IF in a JSP wit
 myFaces/Tomahawk?
  In
struts I used logic:equal or logic:notEqual, which is the tag in
myFaces/Tomahawk to do that, I don´t want to use this: % if(...)...
 {%
  %
else(...)... {%
   
thanks!!!
   
  
 
 



Re: If in myFaces/Tomahwak

2007-09-05 Thread simon
No, there is no separate tag like logic:equal. You need to use the
rendered attribute as Mike described.

Note that the rendered attribute is a normal EL expression, which can be
quite complex. An EL expression can test things for equality etc. See a
JSF manual or the specification for what is possible in an EL
expression.

On Wed, 2007-09-05 at 11:23 -0600, daniel ccss wrote:
 Thanks!!... But, there are no if components like the logic:equal o
 logic:notPresent?? in struts
 
 On 9/5/07, Mike Kienenberger [EMAIL PROTECTED] wrote:
 panelGroup rendered=#{bean.shouldRenderThese }
 componentToRenderWhenTrue/
 componentToRenderWhenTrue/
 componentToRenderWhenTrue/
 componentToRenderWhenTrue/
 componentToRenderWhenTrue/ 
 /panelGroup
 
 panelGroup rendered=#{not bean.shouldRenderThese}
 componentToRenderWhenFalse/
 componentToRenderWhenFalse/
 componentToRenderWhenFalse/ 
 /panelGroup
 
 On 9/5/07, daniel ccss [EMAIL PROTECTED] wrote:
  Can you give some example code, another way?
 
 
  On 9/5/07, Mike Kienenberger  [EMAIL PROTECTED] wrote:
   Generally, you do this with the rendered attribute of the
 component.
  
   If you want to group a bunch of components, use a
 panelGroup rendered. 
  
  
   On 9/5/07, daniel ccss [EMAIL PROTECTED] wrote:
Hi all,
   
I have one question, how can I do an IF in a JSP wit
 myFaces/Tomahawk? 
  In
struts I used logic:equal or logic:notEqual, which is
 the tag in
myFaces/Tomahawk to do that, I don´t want to use this: 
 % if(...)... {%
  %
else(...)... {% 
   
thanks!!!
   
  
 
 
 



Re: java.lang.NullPointerException during render phase when using ADF and MyFaces Tomahwak components together

2006-12-24 Thread Matt Tyson

I'm seeing this issue using ADF 10.1.3.  I have the default renderer set to
adf's renderer, and when I try to render a t:commandlink inside a facet, I
see the following trace:

java.lang.NullPointerException
at
oracle.adfinternal.view.faces.uinode.FacesRenderingContext.setRenderingProperty(FacesRenderingContext.java:157)
at
oracle.adfinternal.view.faces.ui.RenderedNodeRenderingContext.setProperty(RenderedNodeRenderingContext.java:162)
at
oracle.adfinternal.view.faces.ui.ServletRenderingContext._setContextProperty(ServletRenderingContext.java:309)
at
oracle.adfinternal.view.faces.ui.ServletRenderingContext.setServletRequest(ServletRenderingContext.java:140)
at
oracle.adfinternal.view.faces.ui.ServletRenderingContext.setServletRequest(ServletRenderingContext.java:163)
at
oracle.adfinternal.view.faces.ui.ServletRenderingContext.init(ServletRenderingContext.java:113)
at
oracle.adfinternal.view.faces.ui.ServletRenderingContext.init(ServletRenderingContext.java:96)
at
oracle.adfinternal.view.faces.uinode.FacesRenderingContext.init(FacesRenderingContext.java:106)
at
oracle.adfinternal.view.faces.uinode.FacesRenderingContext.createRenderingContext(FacesRenderingContext.java:79)
at
oracle.adfinternal.view.faces.uinode.UINodeRendererBase.getRenderingContext(UINodeRendererBase.java:89)
at
oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingContext(FacesRenderingContext.java:66)
at
oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingContext(FacesRenderingContext.java:52)
at
oracle.adfinternal.view.faces.renderkit.htmlBasic.UINodeRenderer.getRenderingContext(UINodeRenderer.java:79)
at
oracle.adfinternal.view.faces.renderkit.htmlBasic.UINodeRenderer.encodeEnd(UINodeRenderer.java:56)
at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
at
org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:382)
at
org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChildren(RendererUtils.java:363)
at
org.apache.myfaces.shared_impl.renderkit.html.HtmlGroupRendererBase.encodeEnd(HtmlGroupRendererBase.java:75)
at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)

Looks like the adf renderer needs a faces context that isn't there.
-- 
View this message in context: 
http://www.nabble.com/java.lang.NullPointerException-during-render-phase-when-using-ADF-and-MyFaces-Tomahwak-components-together-tf1315507.html#a8043311
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: Datascroller problem Myfaces/Tomahwak verion compatibility

2006-04-27 Thread Mike Kienenberger
On 4/26/06, Ajit Tripathi [EMAIL PROTECTED] wrote:
 I tried with updating the myfaces .jar to 1.1.2 and using the snapshot
 builds of tomahawk 1.1.2 as well as 1.1.3 . In either cases I keep
 getting a

 java.lang.NoSuchMethodError:
 org.apache.myfaces.renderkit.html.util.DummyFormUtils.findNestingForm(Ljavax/faces/component/UIComponent;Ljavax/faces/context/FacesContext;)Lorg/apache/myfaces/shared_tomahawk/renderkit/html/util/FormInfo;
 Can anyone help me as to
 #  which nightly builds of tomahawk works well myfaces 1.1.2 (until
 the release of tomahawk1.1.2)?

This error appears to be caused by mixing Tomahawk 1.1.2 with MyFaces
1.1.1.   Are you sure you've removed all of the older Myfaces 1.1.1
jars from your path?   myfaces-all, myfaces-api, myfaces-impl,
myfaces-commons, myfaces-shared?

 #  How should I resolve the / by zero error in case of the myfaces1.1.1

This is always caused by a missing rows attribute in the past.   In
fact the error message generated has been improved since 1.1.1 to
specifically say that it's a missing rows attribute..   If it's not
caused by a missing rows attribute, take a look at the stack trace and
see what's causing it.


Re: Datascroller problem Myfaces/Tomahwak verion compatibility

2006-04-27 Thread Mike Kienenberger
On 4/27/06, Ajit.T [EMAIL PROTECTED] wrote:
 This is stack Trace , which points towards the Tomahawk1.1.1 bug in
 HtmlDataScroller i guess

 ApplicationDispatcher[/Project1] Servlet.service() for servlet jsp threw
 exception
 java.lang.ArithmeticException: / by zero
 at
 org.apache.myfaces.custom.datascroller.HtmlDataScroller.getPageIndex(HtmlDataScroller.java:222)
 Moreover FYI, my datatable has the rows attirbute too, reading from a model.
 rows=#{nsearchBean.dataModel.rows}

It's good that you have it defined.  But is it evaluating to zero? :)
The error is that the value of rows is zero.  Normally that's
because you didn't define rows, but it could also mean it really is
zero :)


 # If I update my core packages(myfaces) to 1.1.2 Should I use Tomhawk 1.1.2
 or 1.1.3 ?

All versions after the release of MyFaces Core 1.1.2 are
interchangable.  You can use whichever ones you like.   I'd suggest
either using a release, or always using the latest available snapshot
(since more bugs will be fixed).


 # Should the tomahawk-1.1.2/3-SNAPSHOT.jar be renamed to tomahwak.jar in
 WEB-INF/lib?

Doesn't matter.  It can be named however you like.

Note that upgrading won't be of much help if you're still setting rows to zero.


Re: Datascroller problem Myfaces/Tomahwak verion compatibility

2006-04-27 Thread Ajit.T

Have ensured by printing the value of the el expression of rows attribute
using h:outputText  and I get it as 10 which I set it programmatically. 

What should I drill down now?
--
View this message in context: 
http://www.nabble.com/Datascroller-problem-Myfaces-Tomahwak-verion-compatibility-t1513744.html#a4124843
Sent from the MyFaces - Users forum at Nabble.com.



Re: Datascroller problem Myfaces/Tomahwak verion compatibility

2006-04-27 Thread Mike Kienenberger
On 4/27/06, Ajit.T [EMAIL PROTECTED] wrote:
 Have ensured by printing the value of the el expression of rows attribute
 using h:outputText  and I get it as 10 which I set it programmatically.

 What should I drill down now?

Here's a guess

#{nsearchBean.dataModel.rows} is in a request-scoped bean.

So while it's set to 10 the first request, it's uninitialized (0)
after you submit your request on the next page.

An easy way to test this is to temporarily make nsearchBean session-scoped.

The best way to fix it is to use the t:saveState component to preserve
your request-scoped data between requests.   Typically you'd saveState
your backing model data, and not the model itself.


Re: Datascroller problem Myfaces/Tomahwak verion compatibility

2006-04-27 Thread Ajit.T

your guess did hit the nailhead Mike. saveState did save my state ;-)
Thanks !
Ajit
--
View this message in context: 
http://www.nabble.com/Datascroller-problem-Myfaces-Tomahwak-verion-compatibility-t1513744.html#a4127989
Sent from the MyFaces - Users forum at Nabble.com.



Datascroller problem Myfaces/Tomahwak verion compatibility

2006-04-26 Thread Ajit Tripathi
Hi,
   I am using myfaces1.1.1  tomahawk libs 1.1.1 for my project.
Using Datascroller component gives me a / by zero error. Had also
ensured that my dataTable had the 'rows' attribute in it.
I tried with updating the myfaces .jar to 1.1.2 and using the snapshot
builds of tomahawk 1.1.2 as well as 1.1.3 . In either cases I keep
getting a

java.lang.NoSuchMethodError:
org.apache.myfaces.renderkit.html.util.DummyFormUtils.findNestingForm(Ljavax/faces/component/UIComponent;Ljavax/faces/context/FacesContext;)Lorg/apache/myfaces/shared_tomahawk/renderkit/html/util/FormInfo;
Can anyone help me as to
#  which nightly builds of tomahawk works well myfaces 1.1.2 (until
the release of tomahawk1.1.2)?
#  How should I resolve the / by zero error in case of the myfaces1.1.1

Thanks,
Ajit Tripathi


Re: java.lang.NullPointerException during render phase when using ADF and MyFaces Tomahwak components together

2006-03-24 Thread Adam Winer

Murray Brandon wrote:

Partially solved:

The problem is if you define adf core render kit as the default default
render kit, some of the tomahawk/myfaces/facelets components have no
rendering context (not sure which component, cos the exception helpfully
does not tell me), hence the null pointer.


Exactly where was this NullPointerException?  We automatically incorporate
all the BASIC_HTML renderkit renderers, which is where the tomahawk
and myfaces renderers go.  What I can imagine is that our override of
h:form rendering is perhaps causing problems...  (We override h:form
to get client-side validation and partial-page rendering working.)


application
default-render-kit-id
oracle.adf.core
/default-render-kit-id
/application

However, if I don't define oracle.adf.core as the default render kit, I
get real ADF components in the component tree but they don't render:

eg. component is:
oracle.adf.view.faces.component.core.input.CoreChooseDate,
renderer=oracle.adf.Date toString=CoreChooseDate[UINodeFacesBean,
id=idp1]

The error is:

Mar 23, 2006 11:36:12 PM
oracle.adf.view.faces.component.UIXComponentBase _getRendererImpl
WARNING: Could not find renderer for
CoreChooseDate[UINodeFacesBean, id=idp1], rendererType = oracle.adf.Date


Yes, exactly.  We need our renderers. :)


I commented out the facelets view handler in faces-config.xml and added
the following to web.xml
(I can't seem to see the url http://tinyurl.com/dac6y for the example
web.xml)

context-param  
 
param-nameoracle.adf.view.faces.ALTERNATE_VIEW_HANDLER/param-name

param-valuecom.sun.facelets.FaceletViewHandler/param-value
/context-param

Can I define the ADF render kit just for the ADF components I want to
use?


Nope.  We need the whole thing (there's some services
registered at the render kit level, for one).


I presume the alternative is to define a render kit for the MyFaces
components I want to use?


I don't think that's the issue here, because we do aggregate
in BASIC_HTML.


Also, if I have the ADF jars in my WEB-INF/lib folder in the tree, I
get:

java.lang.IllegalStateException: Duplicate id : _id0. Child could not be
added.

The ADF jars are below:
adf-faces-api-ea20-SNAPSHOT.jar
adf-faces-api-ea20-SNAPSHOT-mock.jar
adf-faces-build-ea20-SNAPSHOT.jar
adf-faces-impl-ea20-SNAPSHOT.jar

Not exactly sure what the mock and build ones are for, but I left them
in the .war anyway.


Not needed for runtime - mock is just for testing, build
is for building.

The exception listed below seems like an entirely Facelets
issue (doesn't seem ADF or MyFaces related.)  *seems*, but
maybe isn't.

-- Adam



=== phase RENDER_RESPONSE(6)===
Mar 24, 2006 2:14:34 AM com.sun.facelets.FaceletViewHandler renderView
FINE: Rendering View: /main.xhtml
Mar 24, 2006 2:14:34 AM com.sun.facelets.FaceletViewHandler
getRenderedViewId
FINE: ActionId - ViewId: /main.xhtml - /main.xhtml
Mar 24, 2006 2:14:34 AM com.sun.facelets.FaceletViewHandler buildView
FINE: Building View: /main.xhtml
Mar 24, 2006 2:14:34 AM com.sun.facelets.tag.jsf.ComponentHandler apply
FINE: /main.xhtml @12,23 a:scopeTracker Component[/main.xhtml#0]
Found, marking children for cleanup
Mar 24, 2006 2:14:34 AM com.sun.facelets.tag.jsf.ComponentHandler apply
FINE: /main.xhtml @23,47 ui:debug Component[/main.xhtml#1] Created:
com.sun.facelets.tag.ui.UIDebug
Mar 24, 2006 2:14:34 AM com.sun.facelets.FaceletViewHandler
handleRenderException
SEVERE: Error Rendering View[/main.xhtml]
java.lang.IllegalStateException: Duplicate id : _id0. Child could not be
added.
at
javax.faces.component._ComponentChildrenList.checkAddAllowed(_ComponentC
hildrenList.java:95)
at
javax.faces.component._ComponentChildrenList.add(_ComponentChildrenList.
java:76)
at
com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:17
5)
at
com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandl
er.java:47)
at
com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:4
9)
at
com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandl
er.java:47)
at
com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
at
com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:40
8)
at
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:4
42)
at
oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(Vie
wHandlerImpl.java:159)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:367
)
at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
at

AW: java.lang.NullPointerException during render phase when using ADF and MyFaces Tomahwak components together

2006-03-23 Thread Marcel Soulier
Hi Adam,

sorry that it took me 2 days to reply but I was working on a different project.

Using JSP and MyFaces is kind of a historical thing. I started with JSP and 
Struts, added Tiles, replaced Struts with MyFaces and now added ADF.
Facelets is something I haven't tried yet.

About the ClassCastException I had:

Right now I can't reproduce it anymore. Might be something else I changed in my 
application.

But anyway, if the signature of the method protected final void 
setProperties(UIComponent component) allows a UIComponent, I would expect that 
any casting to UIXComponent would make sure if this is possible first.

M.Soulier


-Ursprüngliche Nachricht-
Von: Adam Winer [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 21. März 2006 19:03
An: MyFaces Discussion
Betreff: Re: java.lang.NullPointerException during render phase when using ADF 
and MyFaces Tomahwak components together

I confess, I haven't tried Tiles with ADF, largely because Facelets templating
is so vastly superior to Tiles (esp. Tiles w/JSF, which is not a good
combination.)

I'm curious about this class-cast exception you're seeing:  why do
you have a UIXComponentTag that isn't using a UIXComponent?
What tag was this?

-- Adam



On 3/21/06, Marcel Soulier [EMAIL PROTECTED] wrote:
 Hi,

 so far I have only used MyFaces and currently I am trying to use the 
 ADF-Faces Components with it.

 The impression I had about using Tiles with ADF and MyFaces was that I should 
 use the Tiles Servlet because ADF uses its own ViewHandler which would 
 collide with the MyFaces JspTilesViewHandler I used before.

 When I was reading Adam's way of setting an alternate ViewHandler in a 
 context-param I had the idea of using the MyFaces JspTilesViewHandlerImpl in 
 a similar way for my JSP-based application.

 It works quite well though I encountered a ClassCastException in the 
 UIXComponentTag class where a UIXComponent is needed in the setProperties 
 Method. So I put an if(component instanceof UIXComponent) inside this 
 Method and it worked.

 Now the reason for this posting is this:

 Am I going in the right direction here? Are there any side-effects with using 
 the MyFaces ViewHandler inside an ADF context?

 Or maybe there is a different way of getting the advantages of the 
 MyFacesViewHandler (e.g. direct usage of tiles-definitions in navigation 
 rules)?

 Maybe anyone here has already used the combination of JSPs, MyFaces, Tiles, 
 ADF and can give some advice.

 M.Soulier

 -Ursprüngliche Nachricht-
 Von: Adam Winer [mailto:[EMAIL PROTECTED]
 Gesendet: Dienstag, 21. März 2006 06:50
 An: MyFaces Discussion
 Betreff: Re: java.lang.NullPointerException during render phase when using 
 ADF and MyFaces Tomahwak components together

 Murray,

 You need to install the FaceletViewHandler using:

  context-param
  param-nameoracle.adf.view.faces.ALTERNATE_VIEW_HANDLER/param-name
param-valuecom.sun.facelets.FaceletViewHandler/param-value
   /context-param

 in WEB-INF/web.xml, not in faces-config.xml.

 Also, not that it's related to this issue, you need to install the ADF Faces
 Filter.  Check out the config posted in the other thread for all the details.

 -- Adam



 On 3/20/06, Murray Brandon [EMAIL PROTECTED] wrote:
  Apologies if this topic has been done to death in the group as I've just
  joined.
  I'm sure it's something to do with my configuration of web.xml or
  faces-config.xml, but what?
  Either the AdfRenderingContext isn't attached to the thread or
  getProperties() is returning null.
  I'm using the dump of ADF attached to the myfaces site (ie.
  adf-faces-impl-ea20-SNAPSHOT).
  I don't think it is trying to render any of the ADF tags (same null
  pointer if I comment out the ADF tags),
  this is on render of tomahawk/myfaces tags.
 
  Any help appreciated!
 
  Regards, Murray
  
  ===
 
  SEVERE: Error Rendering View[/main.xhtml]
  java.lang.NullPointerException
  at
  oracle.adfinternal.view.faces.uinode.FacesRenderingContext.setRenderingP
  roperty(FacesRenderingContext.java:157)
  at
  oracle.adfinternal.view.faces.ui.RenderedNodeRenderingContext.setPropert
  y(RenderedNodeRenderingContext.java:162)
  at
  oracle.adfinternal.view.faces.ui.RootRenderingContext.init(RootRendering
  Context.java:81)
  at
  oracle.adfinternal.view.faces.uinode.FacesRenderingContext.init(FacesR
  enderingContext.java:106)
  at
  oracle.adfinternal.view.faces.uinode.FacesRenderingContext.createRenderi
  ngContext(FacesRenderingContext.java:79)
  at
  oracle.adfinternal.view.faces.uinode.UINodeRendererBase.getRenderingCont
  ext(UINodeRendererBase.java:89)
  at
  oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingC
  ontext(FacesRenderingContext.java:66)
  at
  oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingC
  ontext(FacesRenderingContext.java:52

RE: java.lang.NullPointerException during render phase when using ADF and MyFaces Tomahwak components together

2006-03-23 Thread Murray Brandon
Partially solved:

The problem is if you define adf core render kit as the default default
render kit, some of the tomahawk/myfaces/facelets components have no
rendering context (not sure which component, cos the exception helpfully
does not tell me), hence the null pointer.

application
default-render-kit-id
oracle.adf.core
/default-render-kit-id
/application

However, if I don't define oracle.adf.core as the default render kit, I
get real ADF components in the component tree but they don't render:

eg. component is:
oracle.adf.view.faces.component.core.input.CoreChooseDate,
renderer=oracle.adf.Date toString=CoreChooseDate[UINodeFacesBean,
id=idp1]

The error is:

Mar 23, 2006 11:36:12 PM
oracle.adf.view.faces.component.UIXComponentBase _getRendererImpl
WARNING: Could not find renderer for
CoreChooseDate[UINodeFacesBean, id=idp1], rendererType = oracle.adf.Date

I commented out the facelets view handler in faces-config.xml and added
the following to web.xml
(I can't seem to see the url http://tinyurl.com/dac6y for the example
web.xml)

context-param  
 
param-nameoracle.adf.view.faces.ALTERNATE_VIEW_HANDLER/param-name
param-valuecom.sun.facelets.FaceletViewHandler/param-value
/context-param

Can I define the ADF render kit just for the ADF components I want to
use?
I presume the alternative is to define a render kit for the MyFaces
components I want to use?

I tried adding some code below to faces-config.xml but it made no
difference to the render.

  render-kit
render-kit-idoracle.adf.core/render-kit-id
renderer
  component-familyoracle.adf.Output/component-family
  renderer-typeoracle.adf.Formatted/renderer-type
 
renderer-classoracle.adfinternal.view.faces.renderkit.core.xhtml.Outpu
tFormattedRenderer/renderer-class
/renderer
renderer
  component-familyoracle.adf.Choose/component-family
  renderer-typeoracle.adf.Date/renderer-type
 
renderer-classoracle.adfinternal.view.faces.renderkit.core.xhtml.Choos
eDateRenderer/renderer-class
/renderer
renderer
  component-familyoracle.adf.Input/component-family
  renderer-typeoracle.adf.Text/renderer-type
 
renderer-classoracle.adfinternal.view.faces.renderkit.core.xhtml.Input
TextRenderer/renderer-class
/renderer
renderer
  component-familyoracle.adf.SelectInput/component-family
  renderer-typeoracle.adf.Date/renderer-type
 
renderer-classoracle.adfinternal.view.faces.renderkit.core.xhtml.Selec
tInputDateRenderer/renderer-class
/renderer
renderer
  component-familyoracle.adf.Object/component-family
  renderer-typeoracle.adf.Separator/renderer-type
 
renderer-classoracle.adfinternal.view.faces.uinode.UINodeRendererBase
/renderer-class
/renderer
renderer
  component-familyoracle.adf.Command/component-family
  renderer-typeoracle.adf.Link/renderer-type
 
renderer-classoracle.adfinternal.view.faces.renderkit.core.xhtml.Comma
ndLinkRenderer/renderer-class
/renderer
renderer
  component-familyoracle.adf.Panel/component-family
  renderer-typeoracle.adf.Group/renderer-type
 
renderer-classoracle.adfinternal.view.faces.renderkit.core.xhtml.Panel
GroupRenderer/renderer-class
/renderer
  /render-kit

Also, if I have the ADF jars in my WEB-INF/lib folder in the tree, I
get:

java.lang.IllegalStateException: Duplicate id : _id0. Child could not be
added.

The ADF jars are below:
adf-faces-api-ea20-SNAPSHOT.jar
adf-faces-api-ea20-SNAPSHOT-mock.jar
adf-faces-build-ea20-SNAPSHOT.jar
adf-faces-impl-ea20-SNAPSHOT.jar

Not exactly sure what the mock and build ones are for, but I left them
in the .war anyway.

=== phase RENDER_RESPONSE(6)===
Mar 24, 2006 2:14:34 AM com.sun.facelets.FaceletViewHandler renderView
FINE: Rendering View: /main.xhtml
Mar 24, 2006 2:14:34 AM com.sun.facelets.FaceletViewHandler
getRenderedViewId
FINE: ActionId - ViewId: /main.xhtml - /main.xhtml
Mar 24, 2006 2:14:34 AM com.sun.facelets.FaceletViewHandler buildView
FINE: Building View: /main.xhtml
Mar 24, 2006 2:14:34 AM com.sun.facelets.tag.jsf.ComponentHandler apply
FINE: /main.xhtml @12,23 a:scopeTracker Component[/main.xhtml#0]
Found, marking children for cleanup
Mar 24, 2006 2:14:34 AM com.sun.facelets.tag.jsf.ComponentHandler apply
FINE: /main.xhtml @23,47 ui:debug Component[/main.xhtml#1] Created:
com.sun.facelets.tag.ui.UIDebug
Mar 24, 2006 2:14:34 AM com.sun.facelets.FaceletViewHandler
handleRenderException
SEVERE: Error Rendering View[/main.xhtml]
java.lang.IllegalStateException: Duplicate id : _id0. Child could not be
added.
at
javax.faces.component._ComponentChildrenList.checkAddAllowed(_ComponentC
hildrenList.java:95)
at
javax.faces.component._ComponentChildrenList.add(_ComponentChildrenList.
java:76)
at
com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:17
5)
at
com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandl

AW: java.lang.NullPointerException during render phase when using ADF and MyFaces Tomahwak components together

2006-03-21 Thread Marcel Soulier
Hi,

so far I have only used MyFaces and currently I am trying to use the ADF-Faces 
Components with it.

The impression I had about using Tiles with ADF and MyFaces was that I should 
use the Tiles Servlet because ADF uses its own ViewHandler which would collide 
with the MyFaces JspTilesViewHandler I used before.

When I was reading Adam's way of setting an alternate ViewHandler in a 
context-param I had the idea of using the MyFaces JspTilesViewHandlerImpl in a 
similar way for my JSP-based application.

It works quite well though I encountered a ClassCastException in the 
UIXComponentTag class where a UIXComponent is needed in the setProperties 
Method. So I put an if(component instanceof UIXComponent) inside this Method 
and it worked.

Now the reason for this posting is this:
 
Am I going in the right direction here? Are there any side-effects with using 
the MyFaces ViewHandler inside an ADF context?

Or maybe there is a different way of getting the advantages of the 
MyFacesViewHandler (e.g. direct usage of tiles-definitions in navigation rules)?

Maybe anyone here has already used the combination of JSPs, MyFaces, Tiles, ADF 
and can give some advice.

M.Soulier

-Ursprüngliche Nachricht-
Von: Adam Winer [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 21. März 2006 06:50
An: MyFaces Discussion
Betreff: Re: java.lang.NullPointerException during render phase when using ADF 
and MyFaces Tomahwak components together

Murray,

You need to install the FaceletViewHandler using:

 context-param
 param-nameoracle.adf.view.faces.ALTERNATE_VIEW_HANDLER/param-name
   param-valuecom.sun.facelets.FaceletViewHandler/param-value
  /context-param

in WEB-INF/web.xml, not in faces-config.xml.

Also, not that it's related to this issue, you need to install the ADF Faces
Filter.  Check out the config posted in the other thread for all the details.

-- Adam



On 3/20/06, Murray Brandon [EMAIL PROTECTED] wrote:
 Apologies if this topic has been done to death in the group as I've just
 joined.
 I'm sure it's something to do with my configuration of web.xml or
 faces-config.xml, but what?
 Either the AdfRenderingContext isn't attached to the thread or
 getProperties() is returning null.
 I'm using the dump of ADF attached to the myfaces site (ie.
 adf-faces-impl-ea20-SNAPSHOT).
 I don't think it is trying to render any of the ADF tags (same null
 pointer if I comment out the ADF tags),
 this is on render of tomahawk/myfaces tags.

 Any help appreciated!

 Regards, Murray
 
 ===

 SEVERE: Error Rendering View[/main.xhtml]
 java.lang.NullPointerException
 at
 oracle.adfinternal.view.faces.uinode.FacesRenderingContext.setRenderingP
 roperty(FacesRenderingContext.java:157)
 at
 oracle.adfinternal.view.faces.ui.RenderedNodeRenderingContext.setPropert
 y(RenderedNodeRenderingContext.java:162)
 at
 oracle.adfinternal.view.faces.ui.RootRenderingContext.init(RootRendering
 Context.java:81)
 at
 oracle.adfinternal.view.faces.uinode.FacesRenderingContext.init(FacesR
 enderingContext.java:106)
 at
 oracle.adfinternal.view.faces.uinode.FacesRenderingContext.createRenderi
 ngContext(FacesRenderingContext.java:79)
 at
 oracle.adfinternal.view.faces.uinode.UINodeRendererBase.getRenderingCont
 ext(UINodeRendererBase.java:89)
 at
 oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingC
 ontext(FacesRenderingContext.java:66)
 at
 oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingC
 ontext(FacesRenderingContext.java:52)
 at
 oracle.adfinternal.view.faces.renderkit.htmlBasic.UINodeRenderer.getRend
 eringContext(UINodeRenderer.java:79)
 at
 oracle.adfinternal.view.faces.renderkit.htmlBasic.UINodeRenderer.encodeB
 egin(UINodeRenderer.java:38)
 at
 javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:5
 12)
 at
 com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.j
 ava:555)
 at
 com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.j
 ava:562)
 at
 com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.j
 ava:562)
 at
 com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:4
 57)
 at
 org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:367
 )
 at
 javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
 tionFilterChain.java:252)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
 erChain.java:173)
 at
 org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFil
 ter.java:130)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
 tionFilterChain.java:202

Re: java.lang.NullPointerException during render phase when using ADF and MyFaces Tomahwak components together

2006-03-21 Thread Adam Winer
I confess, I haven't tried Tiles with ADF, largely because Facelets templating
is so vastly superior to Tiles (esp. Tiles w/JSF, which is not a good
combination.)

I'm curious about this class-cast exception you're seeing:  why do
you have a UIXComponentTag that isn't using a UIXComponent?
What tag was this?

-- Adam



On 3/21/06, Marcel Soulier [EMAIL PROTECTED] wrote:
 Hi,

 so far I have only used MyFaces and currently I am trying to use the 
 ADF-Faces Components with it.

 The impression I had about using Tiles with ADF and MyFaces was that I should 
 use the Tiles Servlet because ADF uses its own ViewHandler which would 
 collide with the MyFaces JspTilesViewHandler I used before.

 When I was reading Adam's way of setting an alternate ViewHandler in a 
 context-param I had the idea of using the MyFaces JspTilesViewHandlerImpl in 
 a similar way for my JSP-based application.

 It works quite well though I encountered a ClassCastException in the 
 UIXComponentTag class where a UIXComponent is needed in the setProperties 
 Method. So I put an if(component instanceof UIXComponent) inside this 
 Method and it worked.

 Now the reason for this posting is this:

 Am I going in the right direction here? Are there any side-effects with using 
 the MyFaces ViewHandler inside an ADF context?

 Or maybe there is a different way of getting the advantages of the 
 MyFacesViewHandler (e.g. direct usage of tiles-definitions in navigation 
 rules)?

 Maybe anyone here has already used the combination of JSPs, MyFaces, Tiles, 
 ADF and can give some advice.

 M.Soulier

 -Ursprüngliche Nachricht-
 Von: Adam Winer [mailto:[EMAIL PROTECTED]
 Gesendet: Dienstag, 21. März 2006 06:50
 An: MyFaces Discussion
 Betreff: Re: java.lang.NullPointerException during render phase when using 
 ADF and MyFaces Tomahwak components together

 Murray,

 You need to install the FaceletViewHandler using:

  context-param
  param-nameoracle.adf.view.faces.ALTERNATE_VIEW_HANDLER/param-name
param-valuecom.sun.facelets.FaceletViewHandler/param-value
   /context-param

 in WEB-INF/web.xml, not in faces-config.xml.

 Also, not that it's related to this issue, you need to install the ADF Faces
 Filter.  Check out the config posted in the other thread for all the details.

 -- Adam



 On 3/20/06, Murray Brandon [EMAIL PROTECTED] wrote:
  Apologies if this topic has been done to death in the group as I've just
  joined.
  I'm sure it's something to do with my configuration of web.xml or
  faces-config.xml, but what?
  Either the AdfRenderingContext isn't attached to the thread or
  getProperties() is returning null.
  I'm using the dump of ADF attached to the myfaces site (ie.
  adf-faces-impl-ea20-SNAPSHOT).
  I don't think it is trying to render any of the ADF tags (same null
  pointer if I comment out the ADF tags),
  this is on render of tomahawk/myfaces tags.
 
  Any help appreciated!
 
  Regards, Murray
  
  ===
 
  SEVERE: Error Rendering View[/main.xhtml]
  java.lang.NullPointerException
  at
  oracle.adfinternal.view.faces.uinode.FacesRenderingContext.setRenderingP
  roperty(FacesRenderingContext.java:157)
  at
  oracle.adfinternal.view.faces.ui.RenderedNodeRenderingContext.setPropert
  y(RenderedNodeRenderingContext.java:162)
  at
  oracle.adfinternal.view.faces.ui.RootRenderingContext.init(RootRendering
  Context.java:81)
  at
  oracle.adfinternal.view.faces.uinode.FacesRenderingContext.init(FacesR
  enderingContext.java:106)
  at
  oracle.adfinternal.view.faces.uinode.FacesRenderingContext.createRenderi
  ngContext(FacesRenderingContext.java:79)
  at
  oracle.adfinternal.view.faces.uinode.UINodeRendererBase.getRenderingCont
  ext(UINodeRendererBase.java:89)
  at
  oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingC
  ontext(FacesRenderingContext.java:66)
  at
  oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingC
  ontext(FacesRenderingContext.java:52)
  at
  oracle.adfinternal.view.faces.renderkit.htmlBasic.UINodeRenderer.getRend
  eringContext(UINodeRenderer.java:79)
  at
  oracle.adfinternal.view.faces.renderkit.htmlBasic.UINodeRenderer.encodeB
  egin(UINodeRenderer.java:38)
  at
  javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:5
  12)
  at
  com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.j
  ava:555)
  at
  com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.j
  ava:562)
  at
  com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.j
  ava:562)
  at
  com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:4
  57)
  at
  org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:367
  )
  at
  javax.faces.webapp.FacesServlet.service(FacesServlet.java:138

java.lang.NullPointerException during render phase when using ADF and MyFaces Tomahwak components together

2006-03-20 Thread Murray Brandon
Apologies if this topic has been done to death in the group as I've just
joined.
I'm sure it's something to do with my configuration of web.xml or
faces-config.xml, but what?
Either the AdfRenderingContext isn't attached to the thread or
getProperties() is returning null.
I'm using the dump of ADF attached to the myfaces site (ie.
adf-faces-impl-ea20-SNAPSHOT).
I don't think it is trying to render any of the ADF tags (same null
pointer if I comment out the ADF tags),
this is on render of tomahawk/myfaces tags.

Any help appreciated!

Regards, Murray

===

SEVERE: Error Rendering View[/main.xhtml]
java.lang.NullPointerException
at
oracle.adfinternal.view.faces.uinode.FacesRenderingContext.setRenderingP
roperty(FacesRenderingContext.java:157)
at
oracle.adfinternal.view.faces.ui.RenderedNodeRenderingContext.setPropert
y(RenderedNodeRenderingContext.java:162)
at
oracle.adfinternal.view.faces.ui.RootRenderingContext.init(RootRendering
Context.java:81)
at
oracle.adfinternal.view.faces.uinode.FacesRenderingContext.init(FacesR
enderingContext.java:106)
at
oracle.adfinternal.view.faces.uinode.FacesRenderingContext.createRenderi
ngContext(FacesRenderingContext.java:79)
at
oracle.adfinternal.view.faces.uinode.UINodeRendererBase.getRenderingCont
ext(UINodeRendererBase.java:89)
at
oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingC
ontext(FacesRenderingContext.java:66)
at
oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingC
ontext(FacesRenderingContext.java:52)
at
oracle.adfinternal.view.faces.renderkit.htmlBasic.UINodeRenderer.getRend
eringContext(UINodeRenderer.java:79)
at
oracle.adfinternal.view.faces.renderkit.htmlBasic.UINodeRenderer.encodeB
egin(UINodeRenderer.java:38)
at
javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:5
12)
at
com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.j
ava:555)
at
com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.j
ava:562)
at
com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.j
ava:562)
at
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:4
57)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:367
)
at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
at
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFil
ter.java:130)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:432)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86
9)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:667)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)
at java.lang.Thread.run(Thread.java:595)


From FacesRenderingContext.java:

  protected void setRenderingProperty(Object key, Object value)
  {
_adfRenderingContext.getProperties().put(key, value);
  }


web.xml

?xml version='1.0' encoding='UTF-8'?

!DOCTYPE web-app PUBLIC
  -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;


web-app
:
:
context-param
param-namefacelets.LIBRARIES/param-name
 
param-value/WEB-INF/facelet/aui.taglib.xml;/WEB-INF/facelet/tomahawk.t
aglib.xml;/WEB-INF/facelet/af.taglib.xml/param-value
/context-param

context-param
param-namejavax.faces.STATE_SAVING_METHOD/param-name
param-valueclient/param-value
/context-param

context-param

Anyone got a working ADF + MyFaces Tomahwak setup?

2006-03-20 Thread Murray Brandon
If so, can you please shoot me a copy of your web.xml and
faces-config.xml files?
Thanks!



Re: Anyone got a working ADF + MyFaces Tomahwak setup?

2006-03-20 Thread Rogers Reilly

Murray Brandon wrote:


If so, can you please shoot me a copy of your web.xml and
faces-config.xml files?
Thanks!



 


note- I'm using Facelets, Spring, Shale as well.

faces-config.xml (relevant parts)

faces-config 
   application
   default-render-kit-id
 oracle.adf.core
   /default-render-kit-id
/application
/faces-config



web.xml (includes some stuff you don't need)


?xml version=1.0 encoding=UTF-8?
web-app xmlns=http://java.sun.com/xml/ns/j2ee; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; version=2.4 
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee   
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

 display-namedisplay/display-name

 context-param
   param-namejavax.faces.STATE_SAVING_METHOD/param-name
   param-valueclient/param-value
 /context-param
 context-param
 param-namejavax.faces.DEFAULT_SUFFIX/param-name
 param-value.xhtml/param-value
 /context-param

 context-param
 param-nameoracle.adf.view.faces.ALTERNATE_VIEW_HANDLER/param-name
   param-valuecom.sun.facelets.FaceletViewHandler/param-value
  /context-param
  context-param
   param-namefacelets.DEVELOPMENT/param-name
   param-valuetrue/param-value
  /context-param
  context-param
   param-namefacelets.BUFFER_SIZE/param-name
   param-value8192/param-value
  /context-param
 context-param
   param-namefacelets.LIBRARIES/param-name
  
param-value/WEB-INF/facelet/taglib/jb-custom.taglib.xml;/WEB-INF/facelet/taglib/sandbox.taglib.xml;/WEB-INF/facelet/taglib/shale-core.taglib.xml/param-value

  /context-param
 
  !--  for custom JSON Shale remoting --

  context-param
 param-name
   org.apache.shale.remoting.OTHER_RESOURCES
 /param-name
param-value
   /json/*:org.jb.plat.util.JSF.JSONMethodBindingProcessor
 /param-value
   /context-param
 
 
 filter

 filter-nameshale/filter-name
 filter-class
   org.apache.shale.faces.ShaleApplicationFilter
 /filter-class
   /filter
   filter-mapping
 filter-nameshale/filter-name
 url-pattern*.xhtml/url-pattern
   /filter-mapping
 context-param
 param-namecontextConfigLocation/param-name
 
param-value/WEB-INF/spring/applicationContext.xml,/WEB-INF/hibernate/applicationContext-hibernate.xml,/WEB-INF/spring/baseball.xml/param-value

 /context-param
 listener
 
listener-classorg.springframework.web.context.ContextLoaderListener/listener-class

 /listener
 filter
 filter-namesessionFilter/filter-name
 
filter-classorg.jb.plat.util.OpenSessionInViewFilter_autoflush/filter-class

 init-param
   param-namesessionFactoryBeanName/param-name
   param-valuesessionFactory/param-value
   /init-param
 /filter
  
 filter-mapping

 filter-namesessionFilter/filter-name
 url-pattern/*/url-pattern
 /filter-mapping


 listener
   
listener-classorg.apache.myfaces.webapp.StartupServletContextListener/listener-class

 /listener
 servlet
   servlet-nameFaces Servlet/servlet-name
   servlet-classjavax.faces.webapp.FacesServlet/servlet-class
   load-on-startup1/load-on-startup
 /servlet
 servlet-mapping
   servlet-nameFaces Servlet/servlet-name
   url-pattern*.xhtml/url-pattern
 /servlet-mapping

 filter
   filter-nameadfFaces/filter-name
   filter-classoracle.adf.view.faces.webapp.AdfFacesFilter/filter-class
 /filter

 filter-mapping
   filter-nameadfFaces/filter-name
   servlet-nameFaces Servlet/servlet-name
 /filter-mapping



 servlet
 servlet-nameresources/servlet-name
 
servlet-classoracle.adf.view.faces.webapp.ResourceServlet/servlet-class

  /servlet

  servlet-mapping
   servlet-nameresources/servlet-name
   url-pattern/adf/*/url-pattern
   /servlet-mapping

filter
   filter-nameMyFacesExtensionsFilter/filter-name
   
filter-classorg.apache.myfaces.component.html.util.ExtensionsFilter/filter-class

   init-param
 param-namemaxFileSize/param-name
 param-value20m/param-value
   /init-param
   /filter
 filter-mapping
   filter-nameMyFacesExtensionsFilter/filter-name
   url-pattern/faces/*/url-pattern
 /filter-mapping
 filter-mapping
   filter-nameMyFacesExtensionsFilter/filter-name
   url-pattern*.jsf/url-pattern
 /filter-mapping

 filter-mapping

   filter-nameMyFacesExtensionsFilter/filter-name
   url-pattern*.xhtml/url-pattern
   /filter-mapping

 listener
 listener-class
   org.apache.commons.chain.web.ChainListener
 /listener-class
   /listener
/web-app



Re: java.lang.NullPointerException during render phase when using ADF and MyFaces Tomahwak components together

2006-03-20 Thread Adam Winer
Murray,

You need to install the FaceletViewHandler using:

 context-param
 param-nameoracle.adf.view.faces.ALTERNATE_VIEW_HANDLER/param-name
   param-valuecom.sun.facelets.FaceletViewHandler/param-value
  /context-param

in WEB-INF/web.xml, not in faces-config.xml.

Also, not that it's related to this issue, you need to install the ADF Faces
Filter.  Check out the config posted in the other thread for all the details.

-- Adam



On 3/20/06, Murray Brandon [EMAIL PROTECTED] wrote:
 Apologies if this topic has been done to death in the group as I've just
 joined.
 I'm sure it's something to do with my configuration of web.xml or
 faces-config.xml, but what?
 Either the AdfRenderingContext isn't attached to the thread or
 getProperties() is returning null.
 I'm using the dump of ADF attached to the myfaces site (ie.
 adf-faces-impl-ea20-SNAPSHOT).
 I don't think it is trying to render any of the ADF tags (same null
 pointer if I comment out the ADF tags),
 this is on render of tomahawk/myfaces tags.

 Any help appreciated!

 Regards, Murray
 
 ===

 SEVERE: Error Rendering View[/main.xhtml]
 java.lang.NullPointerException
 at
 oracle.adfinternal.view.faces.uinode.FacesRenderingContext.setRenderingP
 roperty(FacesRenderingContext.java:157)
 at
 oracle.adfinternal.view.faces.ui.RenderedNodeRenderingContext.setPropert
 y(RenderedNodeRenderingContext.java:162)
 at
 oracle.adfinternal.view.faces.ui.RootRenderingContext.init(RootRendering
 Context.java:81)
 at
 oracle.adfinternal.view.faces.uinode.FacesRenderingContext.init(FacesR
 enderingContext.java:106)
 at
 oracle.adfinternal.view.faces.uinode.FacesRenderingContext.createRenderi
 ngContext(FacesRenderingContext.java:79)
 at
 oracle.adfinternal.view.faces.uinode.UINodeRendererBase.getRenderingCont
 ext(UINodeRendererBase.java:89)
 at
 oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingC
 ontext(FacesRenderingContext.java:66)
 at
 oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingC
 ontext(FacesRenderingContext.java:52)
 at
 oracle.adfinternal.view.faces.renderkit.htmlBasic.UINodeRenderer.getRend
 eringContext(UINodeRenderer.java:79)
 at
 oracle.adfinternal.view.faces.renderkit.htmlBasic.UINodeRenderer.encodeB
 egin(UINodeRenderer.java:38)
 at
 javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:5
 12)
 at
 com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.j
 ava:555)
 at
 com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.j
 ava:562)
 at
 com.sun.facelets.FaceletViewHandler.encodeRecursive(FaceletViewHandler.j
 ava:562)
 at
 com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:4
 57)
 at
 org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:367
 )
 at
 javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
 tionFilterChain.java:252)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
 erChain.java:173)
 at
 org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFil
 ter.java:130)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
 tionFilterChain.java:202)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
 erChain.java:173)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
 e.java:213)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
 e.java:178)
 at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
 Base.java:432)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
 :126)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
 :105)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
 java:107)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
 48)
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86
 9)
 at
 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
 essConnection(Http11BaseProtocol.java:667)
 at
 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
 .java:527)
 at
 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
 erWorkerThread.java:80)
 at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
 .java:684)
 at java.lang.Thread.run(Thread.java:595)


 From FacesRenderingContext.java:

   protected void setRenderingProperty(Object key, Object value)
   {