Jsf-naming:namingContainer leads to ClassCastException
Hi,
I am having a problem creating a JSF-Portlet (JSF 1.2) in a WebLogic Portal 10.3.2
I am trying to create a portal JSF-Portlet using the jsf-1.2_09 libraries (WebLogic default). The Portlet works great until I try to integrate the <jsf-naming:namingContainer tag into my jsp.
I am using the Oracle Tutorial "Developing JSF Portlets with WebLogic Portal"
The JSP is really simple
*<code>*
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="jsf-naming" uri="http://bea.com/faces/adapter/tags-naming"%>
<f:view>
<jsf-naming:namingContainer id="loginJSFPortlet" >
<h:outputText value="Login Test"/>
<h:form>
<h:commandButton id="loginButton" value="Anmelden" action="login"/>
</h:form>
</jsf-naming:namingContainer>
</f:view>
*</code>*
When calling the portal desktop the following exception is thrown
*<exception>*
<23.06.2010 16:25 Uhr MESZ> <Error> <ServletContext-/eKimWebTest> <BEA-000000> <Exception thrown in doFacesRequest:render
javax.faces.FacesException: java.lang.ClassCastException: com.bea.portlet.container.RenderRequestImpl
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:128)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at org.apache.myfaces.portlet.faces.bridge.BridgeImpl.doFacesRender(BridgeImpl.java:906)
at org.apache.myfaces.portlet.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:769)
at javax.portlet.faces.GenericFacesPortlet.doBridgeDispatch(GenericFacesPortlet.java:645)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassCastException: com.bea.portlet.container.RenderRequestImpl
at com.bea.portlet.adapter.faces.ScopedIdSupport.getScopeKey(ScopedIdSupport.java:74)
at com.bea.portlet.adapter.faces.taglib.naming.internal.NamingContainerTagImpl.doStartTag(NamingContainerTagImpl.java:200)
at com.bea.portlet.adapter.faces.taglib.naming.NamingContainerTag.doStartTag(NamingContainerTag.java:101)
at jsp_servlet.__login._jsp__tag1(__login.java:165)
at jsp_servlet.__login._jsp__tag0(__login.java:127)
Truncated. see log file for complete stacktrace
>
*</exception>*
When I don't use the namingContainer tag everything works fine.
Any Idea what's going wrong here?
Thkx in advance
Edmund
Edited by: egeesken on 23.06.2010 07:38
Hello Edmund,
The "jsf-naming" tag library you are importing is from the WLP "native" JSF 1.1 portlet bridge, which uses an entirely different way to render JSF as portlets than the new JSR329 JSF 1.2 to Java Portlet 2.0 bridge that you are using (the "GenericFacesPortlet"). Unfortunately, the jsf-naming tags are not compatible with the JSR329 bridge.
I'm not a JSF expert, so unfortunately I can't suggest an equivalent way of doing what you want to do, but I am sure it is possible. Hopefully someone else on here with JSF expertise can help you out.
Kevin
Similar Messages
-
JSF portlet: namingContainer - duplicate id error
Hi Experts,
I am developing a JSF portlets having only a click button. When I click the button, it throws duplicate id exception. If I don't use namingContainer tag, it runs well. Here is the JSP code and exception:
JSP:
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://bea.com/faces/adapter/tags-naming" prefix="netuix"%>
<f:view>
<netuix:namingContainer id="simpleJsfContainer">
<h:outputText value="Simplest JSF Portlet" />
<h:form>
<h:commandButton id="postbackButton" value="Click here" />
</h:form>
</netuix:namingContainer>
</f:view>
Exception
opening /simplejsf/simpleJsf.faces.
The source of this error is:
java.lang.IllegalStateException: Client-id : simpleJsf_1 is duplicated in the faces tree. Component : simpleJsf_1, path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /simplejsf/simpleJsf.jsp][Class: com.bea.portlet.adapter.faces.component.naming.NamingContainerComponent,Id: simpleJsf_1]}
at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java:350)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java:365)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView(JspStateManagerImpl.java:305)
at org.apache.myfaces.taglib.core.ViewTag.doAfterBody(ViewTag.java:122)
at jsp_servlet._simplejsf.__simplejsf._jsp__tag0(__simplejsf.java:133)
at jsp_servlet._simplejsf.__simplejsf._jspService(__simplejsf.java:91)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.apache.beehive.netui.pageflow.PageFlowPageFilter.continueChainNoWrapper(PageFlowPageFilter.java:455)
at org.apache.beehive.netui.pageflow.PageFlowPageFilter.runPage(PageFlowPageFilter.java:432)
at org.apache.beehive.netui.pageflow.PageFlowPageFilter.doFilter(PageFlowPageFilter.java:284)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:503)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:432)
at com.bea.portlet.adapter.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:110)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
at com.bea.portlet.adapter.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:77)
at org.apache.beehive.netui.pageflow.faces.internal.PageFlowViewHandler.renderView(PageFlowViewHandler.java:203)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
at com.bea.portlet.adapter.faces.FacesContentStubImpl.render(FacesContentStubImpl.java:354)
at com.bea.netuix.servlets.controls.content.FacesContent.beginRender(FacesContent.java:420)
at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:485)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326)
at com.bea.netuix.nf.UIControl.render(UIControl.java:582)
at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:486)
at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:146)
at com.bea.netuix.servlets.jsp.taglib.skeleton.Child.doTag(Child.java:63)
at jsp_servlet._framework._skeletons._bighorn.__flowlayout._jspService(__flowlayout.java:175)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:505)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:432)
at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:130)
at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72)
at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65)
at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326)
at com.bea.netuix.nf.UIControl.render(UIControl.java:582)
at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:486)
at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:146)
at com.bea.netuix.servlets.jsp.taglib.skeleton.Child.doTag(Child.java:63)
at jsp_servlet._framework._skeletons._bighorn.__gridlayout._jspService(__gridlayout.java:219)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:505)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:432)
at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:130)
at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72)
at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65)
at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:208)
at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:162)
at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388)
at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258)
at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:199)
at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251) at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:686) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at com.bea.portal.tools.servlet.http.HttpContextFilter.doFilter(HttpContextFilter.java:60) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:336) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3502) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(Unknown Source) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2186) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2092) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Could you please tell me what's the problem?
Thanks
Tridib
Edited by: Tridib on 12-Feb-2010 08:48Alright. I found it! I changed JSF implementation from MyFaces to Sun Reference implementation 1.1 and it worked! For details about how to set sun implementation as JSF implementation in portal project refer to section 2.2 in [White Paper|http://blogs.oracle.com/tridib_samanta/weblogic-portal-jsf-whitepaper.pdf] .
Edited by: Tridib on 16-Feb-2010 06:32 -
DMSRM RepositorMan-Add new Property to resource leads to ClassCastException
Hi Guys,
I am stuck a bit and need some help , so here is my scenario:
For each resource in the DMSRM repository (/dmsrm/*) I read the values in the multi valued property called characteristics. I parse the value contained in it and want to create the several properties:
So the value would be something like this:
Property1 -> Value1, Property2 -> Value2, Property3 -> Value3
And I split it and want to make three properties with 3 values in it.
Here is the code that writes the property
IUser user = WPUMFactory.getServiceUserFactory().getServiceUser(serviceuser);
IResourceContext context = new ResourceContext(user);
IResourceFactory factory = ResourceFactory.getInstance();
IResource resource = factory.getResource(rid, context);
IPropertyName propName = (IPropertyName) new PropertyName("http://sapportals.com/xmlns/cm/dmsrm_cl", prop);
if (resource != null) {
IProperty property = resource.getProperty(propName);
IMutableProperty mutableProperty = null;
if (property != null) {
mutableProperty = property.getMutable();
} else {
mutableProperty = (new Property(propName, "")).getMutable();
mutableProperty.setStringValue(value);
IProperty newProperty = (IProperty) mutableProperty;
resource.setProperty(newProperty);
I get java.lang.ClassCastException on the resource.setProperty line with the
Following error message in the log:
at java.lang.Thread.run(Thread.java:534)
at com.sapportals.wcm.service.scheduler.crt.PoolWorker.run(PoolWorker.java:108)
at com.sapportals.wcm.service.scheduler.SchedulerEntry.run(SchedulerEntry.java:174)
at com.ekrones.SetDMSPropertiesKM.SetDMSProper.run(SetDMSProper.java:58)
at com.ekrones.SetDMSPropertiesKM.SetDMSProper.travFilesInCollection2(SetDMSProper.java:225)
at com.ekrones.SetDMSPropertiesKM.SetDMSProper.travFilesInCollection2(SetDMSProper.java:225)
at com.ekrones.SetDMSPropertiesKM.SetDMSProper.travFilesInCollection2(SetDMSProper.java:246)
at com.sapportals.wcm.repository.ResourceImpl.setProperties(ResourceImpl.java:488)
at com.sapportals.wcm.repository.ResourceImpl2.internalSetProperties(ResourceImpl2.java:204)
at com.sapportals.wcm.repository.GeneralImpl2.internalSetProperties(GeneralImpl2.java:420)
at com.sap.pct.plm.dmsrmconnectorforkm.DMSRMMutablePropertyManager.updateProperties(DMSRMMutablePropertyManager.java:294)
at com.sap.pct.plm.dmsrmconnectorforkm.DMSRMR3FunctionCalls.changeDocumentProperties(DMSRMR3FunctionCalls.java:4309)
Any help will be appreciated
Thanks,
Rehan
Edited by: Yousaf Rehan on Jun 19, 2009 5:40 PMHi Guys,
<br>
I am stuck a bit and need some help , so here is my scenario:<br>
For each resource in the DMSRM repository (/dmsrm/*) I read the values in the multi valued property called<br> characteristics. I parse the value contained in it and want to create the several properties:<br>
So the value would be something like this:<br>
Property1 -> Value1, Property2 -> Value2, Property3 -> Value3<br>
And I split it and want to make three properties with 3 values in it.<br>
<br><br>
Here is the code that writes the property<br>
<br>
IUser user = WPUMFactory.getServiceUserFactory().getServiceUser(serviceuser);<br>
IResourceContext context = new ResourceContext(user); <br>
IResourceFactory factory = ResourceFactory.getInstance();<br>
IResource resource = factory.getResource(rid, context);<br>
IPropertyName propName = (IPropertyName) new <br>
PropertyName("http://sapportals.com/xmlns/cm/dmsrm_cl", prop);<br>
if (resource != null) {<br>
IProperty property = resource.getProperty(propName);<br>
IMutableProperty mutableProperty = null;<br>
if (property != null) {<br>
mutableProperty = property.getMutable();<br>
} else {<br>
mutableProperty = (new Property(propName, "")).getMutable();<br>
mutableProperty.setStringValue(value);<br>
IProperty newProperty = (IProperty) mutableProperty;<br>
resource.setProperty(newProperty);<br>
<br>
<br>
I get java.lang.ClassCastException on the resource.setProperty line with the
Following error message in the log:
<br>
<br>
at java.lang.Thread.run(Thread.java:534)<br>
at com.sapportals.wcm.service.scheduler.crt.PoolWorker.run(PoolWorker.java:108)<br>
at com.sapportals.wcm.service.scheduler.SchedulerEntry.run(SchedulerEntry.java:174)<br>
at com.ekrones.SetDMSPropertiesKM.SetDMSProper.run(SetDMSProper.java:58)<br>
at com.ekrones.SetDMSPropertiesKM.SetDMSProper.travFilesInCollection2(SetDMSProper.java:225)<br>
at com.ekrones.SetDMSPropertiesKM.SetDMSProper.travFilesInCollection2(SetDMSProper.java:225)<br>
at com.ekrones.SetDMSPropertiesKM.SetDMSProper.travFilesInCollection2(SetDMSProper.java:246)<br>
at com.sapportals.wcm.repository.ResourceImpl.setProperties(ResourceImpl.java:488)<br>
at com.sapportals.wcm.repository.ResourceImpl2.internalSetProperties(ResourceImpl2.java:204)<br>
at com.sapportals.wcm.repository.GeneralImpl2.internalSetProperties(GeneralImpl2.java:420)<br>
at com.sap.pct.plm.dmsrmconnectorforkm.DMSRMMutablePropertyManager.updateProperties(DMSRMMutablePropertyManager.java:294)
at com.sap.pct.plm.dmsrmconnectorforkm.DMSRMR3FunctionCalls.changeDocumentProperties(DMSRMR3FunctionCalls.java:4309)<br>
<br>
<br>
Any help will be appreciated<br>
Thanks,<br>
Rehan<br>
Edited by: Yousaf Rehan on Jun 19, 2009 5:43 PM -
Problem with JSF AJAX portlets
I am seeing the following issues with JSF portlets
1) When you AJAX enable the portlet, they will not work. There are some javascript errors on the component we are using. They work fine if we don't AJAX enable them
2) I had 2 portlets. 1 JSF and 1 pageflow portlet. If I click on a link in pageflow portlet and after the page gets refreshed, nothing will work in JSF potlet. Again javacript errors
If we had only 1 portlet on the page, JSF portlet works fine
Do you think the prototype javacript library used in the portal causing any issues?I tried with <naming:namingContainer> immediatly after the f:view tag , but still getting same errors
I am psoting the generated html and javascript error
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>New Portal Desktop</title><meta name="bea-portal-meta-skeleton" content="/framework/skeletons/default"><meta name="bea-portal-meta-skin" content="/framework/skins/default"><meta name="bea-portal-meta-skin-images" content="/framework/skins/default/images"><link rel="stylesheet" type="text/css" href="/sampleWeb/framework/skins/default/css/body.css"><link type="text/css" href="/sampleWeb/framework/skins/default/css/button.css" rel="stylesheet"><link href="/sampleWeb/framework/skins/default/alert/css/window-alert.css" rel="stylesheet" type="text/css"><link href="/sampleWeb/framework/skins/default/css/window.css" rel="stylesheet" type="text/css"><link type="text/css" rel="stylesheet" href="/sampleWeb/framework/skins/default/plain/css/window-plain.css"><link type="text/css" rel="stylesheet" href="/sampleWeb/framework/skins/default/css/portlet.css"><link type="text/css" rel="stylesheet" href="/sampleWeb/framework/skins/default/css/book.css"><link type="text/css" rel="stylesheet" href="/sampleWeb/framework/skins/default/css/layout.css"><link href="/sampleWeb/framework/skins/default/css/form.css" rel="stylesheet" type="text/css"><script src="/sampleWeb/framework/skins/shared/js/console.js" type="text/javascript"></script><script src="/sampleWeb/framework/skins/shared/js/cookies.js" type="text/javascript"></script><script src="/sampleWeb/framework/skins/shared/js/state.js" type="text/javascript"></script><script src="/sampleWeb/framework/skins/default/js/util.js" type="text/javascript"></script><script type="text/javascript" src="/sampleWeb/framework/skins/default/js/skin.js"></script><script src="/sampleWeb/framework/skins/default/js/menu.js" type="text/javascript"></script><script src="/sampleWeb/framework/skins/default/js/delete.js" type="text/javascript"></script><script src="/sampleWeb/framework/skins/default/js/float.js" type="text/javascript"></script><script type="text/javascript" src="/sampleWeb/framework/skins/default/js/menufx.js"></script>
</head>
<body
class="bea-portal-body"
onload="initSkin();"
><div class="bea-portal-body-content">
<div
class="bea-portal-body-header"
>
</div>
<div
class="bea-portal-book-primary"
>
<div class="bea-portal-ie-table-buffer-div">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="bea-portal-book-primary-menu-single-container" align="left" nowrap="nowrap">
<ul
class="bea-portal-book-primary-menu-single"
><li class="bea-portal-book-primary-menu-single-item">Page 1</li><li class="bea-portal-book-primary-menu-single-item">New Book</li><li class="bea-portal-book-primary-menu-single-item-active"><span>New Book</span></li></ul>
</td>
</tr>
</table>
</div>
<div
class="bea-portal-book-primary-content"
>
<div
class="bea-portal-book-invisible"
>
<div class="bea-portal-ie-table-buffer-div">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="bea-portal-book-menu-single-container" align="left" nowrap="nowrap">
<ul
class="bea-portal-book-menu-single"
><li class="bea-portal-book-menu-single-item-active"><span>New Page</span></li></ul>
</td>
</tr>
</table>
</div>
<div
class="bea-portal-book-content"
>
<div
class="bea-portal-book-page"
>
<table
class="bea-portal-layout-grid"
cellspacing="0"
>
<tr>
<td class="bea-portal-layout-placeholder-container"
width="30%"
>
<div
class="bea-portal-layout-placeholder"
>
<div
class="bea-portal-window"
width="100%"
>
<div
class="bea-portal-window-titlebar"
>
<div class="bea-portal-ie-table-buffer-div">
<table class="bea-portal-window-titlebar-container" cellspacing="0">
<tr>
<td class="bea-portal-window-titlebar-title" nowrap="nowrap">Untitled</td>
<td class="bea-portal-window-titlebar-buttons" nowrap="nowrap">
</td>
</tr>
</table>
</div>
</div>
<div
class="bea-portal-window-content"
>
<html>
<head>
</head>
<body>
<p>Beehive NetUI-JavaServer Faces Page - /sampleWeb/sample1/index.faces</p>
<form id="portletInstance_6:_id1" method="post" action="http://localhost:7001/sampleWeb/sample.portal?_nfpb=true&_windowLabel=portletInstance_6&_nffvid=%2FsampleWeb%2Fsample1%2Findex.faces&_pageLabel=defaultDesktopLabel_page_2" enctype="application/x-www-form-urlencoded">
<a href="# onclick="document.forms['portletInstance_6:_id1'['portletInstance_6:_id1:_idcl'].value='portletInstance_6:_id1:_id2'; document.forms['portletInstance_6:_id1'].submit(); return false;">sample</a>
<input type="hidden" name="portletInstance_6:_id1" value="portletInstance_6:_id1" /></form>
</body>
</html>
</div>
</div>
</div>
</td>
<td class="bea-portal-layout-placeholder-container"
width="70%"
>
<div
class="bea-portal-layout-placeholder"
>
<div
class="bea-portal-window"
width="100%"
>
<div
class="bea-portal-window-titlebar"
>
<div class="bea-portal-ie-table-buffer-div">
<table class="bea-portal-window-titlebar-container" cellspacing="0">
<tr>
<td class="bea-portal-window-titlebar-title" nowrap="nowrap">Untitled</td>
<td class="bea-portal-window-titlebar-buttons" nowrap="nowrap">
</td>
</tr>
</table>
</div>
</div>
<div
class="bea-portal-window-content"
>
<html>
<head>
</head>
<body>
<p>Beehive NetUI-JavaServer Faces Page - /sampleWeb/sample1/index.faces</p>
<form id="portletInstance_5:_id1" method="post" action="http://localhost:7001/sampleWeb/sample.portal?_nfpb=true&_windowLabel=portletInstance_5&_nffvid=%2FsampleWeb%2Fsample1%2Findex.faces&_pageLabel=defaultDesktopLabel_page_2" enctype="application/x-www-form-urlencoded">
<a href="#" onclick="document.forms['portletInstance_5:_id1']['portletInstance_5:_id1:_idcl'].value='portletInstance_5:_id1:_id2'; document.forms['portletInstance_5:_id1'].submit(); return false;">sample</a>
<input type="hidden" name="portletInstance_5:_id1" value="portletInstance_5:_id1" /><input type="hidden" name="portletInstance_5:_id1:_idcl" /></form>
</body>
</html>
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div
class="bea-portal-body-footer"
>
</div>
</div></body>
</html>
Javascript error
Line: 292
Char: 1
Error: 'portletinstance_6_id1:_idcl' is null or not an object
Code: 0
URL: http://localhost:7001/sampleWeb/sample.portal?_nfpb=true&_windowLabel=
portletInstance_5&_nffvid=%2FsampleWeb%2Fsample1%2Findex.faces&_pageLabel=
defaultDesktopLabel_page_2 -
I have a page with a dropdown JSF element in it. I have tried doing this two ways. The first way in a JSF Web Application, the second in a portlet.
I have a valuechangelistener on the dropdown and I call submit() in onChange. The goal is to process some stuff and add it to another dropdown on the page when it is refreshed. In the JSF Web Application the dropdown is submitted and the value is still selected upon refresh and everything looks good. (The new stuff is there)
However, when the page refreshes in the portlet it goes back to its default value and I don't get my changes. I see the the query to get the new stuff is being run put the page goes back to its defaults. It seems like the page is getting refreshed twice in the portlet situation and everything I want is getting cleared out. I see that the intialize of the JSF Page java class is getting called there twice in the logs for the portlet situation but onece for the JSF Web Applicaion.Hello Edmund,
The "jsf-naming" tag library you are importing is from the WLP "native" JSF 1.1 portlet bridge, which uses an entirely different way to render JSF as portlets than the new JSR329 JSF 1.2 to Java Portlet 2.0 bridge that you are using (the "GenericFacesPortlet"). Unfortunately, the jsf-naming tags are not compatible with the JSR329 bridge.
I'm not a JSF expert, so unfortunately I can't suggest an equivalent way of doing what you want to do, but I am sure it is possible. Hopefully someone else on here with JSF expertise can help you out.
Kevin -
Hi,
is there any good book about JSF which covers also JSF 1.2?
Or are the differences between 1.1 and 1.2 so important that I should buy 1.2-compliant book?
Thank youTry this book: http://www.amazon.com/JavaServer-Faces-Complete-Reference-Burns/dp/product-description/0072262400
It covers 1.2 and AJAX. One of the authors is the current JSF co-spec lead. -
Unable to access nested managed bean property in JSF 1.2.9
In an old version of JSF, namely 1.2-b20-FCS from April/21/2006, I could access nested properties of a managed bean. So I had a managed bean OuterBean, and in JSF I could write
<h:inputText value="#{outerBean.innerBean1.propertyA"/>
The Java class OuterBean has a member function
InnerBean OuterBean.getInnerBean1();
That is, there is a function getInnerBean1() taking no arguments, and it returns something which in my example above is the class InnerBean.
Class InnerBean has a member function getPropertyA().
But in the latest JSF from July/17/2008, this nested stuff is not working.
Simple access like #{outerBean.propertyA} works, but nested access like #{outerBean.innerBean.propertyA} does not.
The exception is something like
org.apache.jasper.el.JspELException: /whatever/mypage.jsp(71,15) '#{outerBean.innerBean.username}' Error reading 'innerBean' on type
mypackage.OuterBean at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:107) at javax.faces.component.UIOutput.getValue(UIOutput.java:184) at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:946) at javax.faces.render.Renderer.encodeChildren(Renderer.java:148) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942) at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271) at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:202) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266) atThanks.Sorry, it looks fine to me. In my original post, I had the call stack in code and for some reasons the newlines were removed. So let me try again in text, but putting two newlines. Hope it works this time:
org.apache.jasper.el.JspELException: /whateverr/mypage.jsp(71,15) '#{outerBean.innerBean.property}' Error reading 'innerBean' on type mypackage.OuterBean at
org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:107) at javax.faces.component.UIOutput.getValue(UIOutput.java:184) at
com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201) at
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284) at
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154) at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861) at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:946) at
javax.faces.render.Renderer.encodeChildren(Renderer.java:148) at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837) at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:936) at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:942) at
com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271) at
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:202) at
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) at
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:266) at
Edited by: sn72 on Sep 21, 2008 10:21 AM
Edited by: sn72 on Sep 21, 2008 10:22 AM -
Hi,
Just thought I would share my biggest gripe with JSF, namely the selectOneMenu component and all the UI components that use the SelectItem object.
Why is it not possible for this component to work more like the datatable component?
In other words :
1) the selectitems value should point to a Vector of ordinary standard data objects.
2) the value, label and description should be configured via property bindings. If no value is given the selectonemenu component should autogenerate the value.
3) Add methods getNewSelectedObject() getOldSelectedObject() in the ValueChangedEvent class that return the selected object in the component.
I know it is possible to write a converter to address this problem, but to me this looks like an unnecessary hurdle to use this component.
Let's take a hypothetical example where a developer first uses a datatable component, and then decides to switch to a combobox component. Think about all the code that needs to be changed just to accomodate this seemingly simple switch.
Other then that, I like JSF =PHi
I use the built in sync function in the phone to sync directly between the phone and my Ovi account (calendar, notes, contacts).
In general it works fine, but I have problems with syncing Notes.
If I add a new note to the phone or in the web browser, the note will be synced fine (I have activated sync both ways).
If I add more info at the very end of the note everything is still fine.
BUT if I for some reason modify the note somewhere else (beginning, middle, ...), the sync function doesn't behave the way I would prefer - regardless of if I do the modification on the phone or the web.
The result is that the info in the note is almost duplicated!
I would prefer that the most recently modified note completely replaces the other one. Or possibly an alternative in the sync setting if you rather would like the system to try to combine the versions in the phone and on the web server.
Hope I've managed to explain what I mean... and also that you can solve this issue.
The basic principle of ovi sync is great!
Regards,
/Per -
[Swiss JSF Users] JSF Special-Interest-Group Switzerland
JSF is proving more and more competitive each day. A increasing number of
companies are developing applications based on JSF.
Often the same questions/problems/hints are valid for almost all users of
JSF. Internationally some active communities have been established. Last
year a first encounter of JSF-entusiasts created the idea of "JSFDays Europe",
a conference that allows to get in touch with the main players int he
JSF-universe and to meet also informally. This first encounter took place
in Munich, was organized on very short notice during the Oktoberfest. An
intense session with the JSF expert group lead Ed Burns allowed the users
to voice their wishes for JSF 2.0 and regognize the "approachability" of
the JSF-people at Sun. Within Switzerland so far the contacts between the
users are rather sporadic and more on a one-to-one basis.
Hopefully some contacts have been added during the Jazoon-conference. We
would like to go one step further and establish the networking between
Swiss-JSF users. An active community can help in solving problems or even
create components that are usefull for some or all members. And in
Switzerland we encounter some problems (like i18n, as most of our
applications need to be available in multiple languages) that other
international users do not encounter or encounter later or to a lesser extent.
The JSF-specification is driven by requirements that are brought to the
Expert Group discussing the specifications. So far much input has come
from framework-architects, appserver-providers and tool-creators. It's
about time the actual users let hear their voices as well. Although the
expert group members can be contacted and have proven to be very
responsive, requirements coming from an official user-group have more
importance.
Establishing a "JSF user group" as a independant community or a
"special interest group" under the umbrella of the
"JUGS (Java User Group Switzerland)" could be the outcome of this meeting.
The underline the importance of "interaction" and communication for the
community, we propose short presentations with much space for discussion.
Date: Thursday, 2007-06-28 (right after the end of Jazoon 07)
Place: Zurich, close to the location of Jazoon 07 (but not yet defined)
Agenda:
- 16:30 - 17:30: HTTP-GET interface into JSF-applications
Presenter: Ed Burns
Abstract: First ideas on the upcoming GET-interface into
JSF-applications. ...
30 minutes presentation, 30 minutes discussion on
these ideas and their implications on the applications
- 17:30 - 18:30 (resp. open end): JSF, Quo Vadis?
Presenter: Ed Burns, Alexander Jesse
Abstract:
- Where is JSF heading? The Expert Group is forming and discussing
the next version of the JSF-spec right now.
What are the ideas driving the EG?
- Where is JSF heading in Switzerland? Can we say a User Group is
forming right now? What could be the plans of this group? Should
it participate in the "JSFDays Europe" initiative?
In order to plan the upcoming first meeting (room,...) we would appreciate
feedback from all interested people. Also from those that cannot come to
the first meeting, but would welcome the foundation of the
JSF Special-Interest-Group Switzerland. -
Hello,
When the new stable release version is sheduled to be released?I can't give out the exact date, but certainly before the end of the calendar year.
Ed (JSF co-spec-lead) -
I'm trying to exchange messages between two applications running on Oracle 9iAS (9.0.3) and I'm getting a ClassCastException.
Basically, I'm sending Command instances over the wire, which are to be executed on the other end. The concrete Command class is in a jar, which is in both web applications' WEB-INF/lib. I checked that both apps contain the same version of the jar. I have a simple JSP in both apps to publish a message containing a command. For testing purposes, both apps run in the same JVM (OC4J).
Both apps have a TopicSubscriber instance connected to the same Topic. When I publish an instance of ObjectMessage with the Command instance as the payload, both apps receive the message, but upon getting the payload (message.getObject()) the app that did not send the message fails with a ClassCastException.
Here's an example:
App A publishes an ObjectMessage with an instance of com.foo.FooCommand on the Topic
App A receives the message and successfully gets the FooCommand from the received message
App B receives the message and fails with a ClassCastException when getting the FooCommand from the message.
The ClassCastException looks like this:
java.lang.ClassCastException: com.foo.FooCommand
Publisher:
Message m = topicSession.createObjectMessage(new FooCommand());
Subscriber:
ObjectMessage om = (ObjectMessage) message;
Command c = (Command) om.getObject();
The second line in the subscriber code fails. Command is the interface that has to be implemented by all commands, it extends Serializable.
I already tried adding a serialVersionUID to the command class, but it didn't help. Is there any other way into making the ClassLoader believe that both instances are the same?
Any ideas?
TIA,
NilsNils, the ClassCastException is expected if you put your class in both applications' WEB-INF/lib. The class is loaded by App A's web module classloader and, separately, loaded by App B's web module classloader. You have two instances of Class that have the same underlying bits of class format but loaded by two different classloaders, which is the classic situation that leads to ClassCastException.
The guideline of the solution: let a common parent classloader of those two classloaders load the class. What you need to do is to make your jar visible to all applications or loaded by a parent application of your App A and App B. The way to do it is mentioned in my message
Re: Quick question on parent-child relationship in OC4J 10.1.3
The simplest of all is to put your jar in
<ORACLE_HOME>/j2ee/home/applib.
Hope this help you. -
Bug with h:messages and client state saving?
I have an application that uses <h:messages ...> to display validation/conversion errors on the page. I find that when I use "client" for my javax.faces.STATE_SAVING_METHOD, the messages completely destroy the display of the web page - HTML seems to be randomly cut off. Using the "server" state saving method solves the problem. Has anyone else seen this behavior? I can duplicate it easily.
Thanks,
DonCan you provide us with the jsp page you are using? I do not immediately
see the probem you are encountering.
Thanks,
--roger (jsf co-spec lead) -
Dear all,
sometimes I get this exception,
Aug 16, 2009 4:11:02 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
javax.faces.application.ViewExpiredException: viewId:/web/jsp/notification/notificationList.jsf - View /web/jsp/notification/notificationList.jsf could not be restored.
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:185)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:103)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:286)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)and I have to open a new IE window again,
Enviroemt :
JSF 1.2
Apache 6
Eclipse 7.0
By the way, I noticed that this start happening after I replaced JSF1.1 with JSF 1.2
any helpThe client session has just been timed out. This will happen when you invoke a POST request on a page for which the session has been timed out. JSF namely stores the view in session. The timeout is configureable as <session-timeout> in web.xml and handleable with a Filter class and/or an <error-page> in web.xml.
-
CommandButton's rendered attribute doesn't work inside dataTable
Hi,
I don't know if anyone could help me...
I need to access a list of "alarms" in my jsp file (which is rendered by "alarmHandler.sortedGenericDataModel"). For each "alarm" of the list, I test the "alarm.alarmStatus" and I want to create the desired button depending on the it. I'm trying to use the "rendered" attribute to manage the fact the button will be created or not. Note that when I use the "disabled" attribute, everything works fine, but I don't want to use the disabling option, I prefer to don't show the button at all.
I have a NullPointerException when I run this code (the stack trace of this exception is show at the buttom of this message):
<h:dataTable value="#{alarmHandler.sortedGenericDataModel}" var="alarm"
rows="#{alarmHandler.noOfRows}"
first="#{alarmHandler.firstRowIndex}"
styleClass="tablebg" rowClasses="oddRow, evenRow"
columnClasses="left, left, left, right, left" width="100%">
<h:column>
<f:facet name="header">
<h:outputText value="#{labels['alarm.label.action']}" />
</f:facet>
<h:commandButton value="#{labels['alarm.label.toActivate']}"
rendered="#{alarm.alarmStatus != '3'}"
action="#{alarmHandler.activate}" immediate="true" />
<h:commandButton value="#{labels['alarm.label.toAcknowledge']}"
disabled="#{alarm.alarmStatus != '1'}"
action="#{alarmHandler.acknowledge}" immediate="true" />
<h:commandButton value="#{labels['alarm.label.toClose']}"
disabled="#{alarm.alarmStatus != '2'}"
action="#{alarmHandler.close}" immediate="true" />
</h:column>
</h:dataTable>
*** Here is the stack trace of the error:
2004-08-30 11:33:13,902 13307343 ERROR [org.jboss.web.localhost.Engine] (http-0.0.0.0-8643-Processor5:) ApplicationDispatcher[abox] Servlet.service() for servlet jsp threw exception
javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:307)
at javax.faces.webapp.UIComponentTag.isSuppressed(UIComponentTag.java:838)
at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:470)
at com.sun.faces.taglib.html_basic.CommandButtonTag.doStartTag(CommandButtonTag.java:469)
at org.apache.jsp.JSP.alarm.viewAlarmsTemplate_jsp._jspx_meth_h_commandButton_0(viewAlarmsTemplate_jsp.java:588)
at org.apache.jsp.JSP.alarm.viewAlarmsTemplate_jsp._jspx_meth_h_column_1(viewAlarmsTemplate_jsp.java:505)
at org.apache.jsp.JSP.alarm.viewAlarmsTemplate_jsp._jspx_meth_h_dataTable_1(viewAlarmsTemplate_jsp.java:445)
at org.apache.jsp.JSP.alarm.viewAlarmsTemplate_jsp._jspx_meth_h_form_0(viewAlarmsTemplate_jsp.java:202)
at org.apache.jsp.JSP.alarm.viewAlarmsTemplate_jsp._jspService(viewAlarmsTemplate_jsp.java:125)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:581)
at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
at org.apache.jsp.JSP.generic.template_jsp._jspx_meth_tiles_insert_3(template_jsp.java:382)
at org.apache.jsp.JSP.generic.template_jsp._jspx_meth_f_subview_3(template_jsp.java:346)
at org.apache.jsp.JSP.generic.template_jsp._jspx_meth_f_view_0(template_jsp.java:146)
at org.apache.jsp.JSP.generic.template_jsp._jspService(template_jsp.java:80)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:581)
at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
at org.apache.jsp.JSP.alarm.viewAlarmsLayout_jsp._jspx_meth_tiles_insert_0(viewAlarmsLayout_jsp.java:100)
at org.apache.jsp.JSP.alarm.viewAlarmsLayout_jsp._jspService(viewAlarmsLayout_jsp.java:74)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at org.apache.struts.faces.application.FacesTilesRequestProcessor.doForward(FacesTilesRequestProcessor.java:144)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320)
at org.apache.struts.faces.application.FacesTilesRequestProcessor.processForwardConfig(FacesTilesRequestProcessor.java:260)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at com.thevco.abox.web.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:166)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:72)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:275)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
at org.apache.struts.faces.application.PropertyResolverImpl.getValue(PropertyResolverImpl.java:146)
at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
at com.sun.faces.el.impl.BinaryOperatorExpression.evaluate(BinaryOperatorExpression.java:165)
at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)mleblanc77:
Thanks for your interest.
I've modified one of our internal demos to try to reproduce your problem
and cannot do so. Here is the operative JSP:
<!-- ... -->
<h:dataTable binding="#{UIDataBean.data}"
value="#{list}"
var="customer">
<h:column>
<h:commandButton id="press"
action="#{UIDataBean.press}"
rendered="#{customer.accountId != '123456'}"
immediate="true"
value="#{UIDataBean.pressLabel}"
type="SUBMIT"/>
</h:column>
</h:dataTable>
<!-- ... -->
Here's the customer bean
public class CustomerBean implements Serializable {
public CustomerBean() {
this(null, null, null, 0.0);
public CustomerBean(String accountId, String name,
String symbol, double totalSales) {
System.out.println("Created CustomerBean");
this.accountId = accountId;
this.name = name;
this.symbol = symbol;
this.totalSales = totalSales;
private String accountId = null;
public String getAccountId() {
return (this.accountId);
This seems to work fine. Can you try the latest weekly build from
https://javaserverfaces.dev.java.net/servlets/ProjectDocumentList
Thanks,
Ed (JSF Co-spec lead) -
The best way to connect with Nutanix, follow these social channels
Nutanix Named a Leader in the 2015 Gartner Magic Quadrant for Integrated SystemsReady to compare top hyperconverged infrastructure vendors? See why Gartner named Nutanix a leader in this newly released report for 2015.Download the report and learn:Expert perspectives on the hyperconverged infrastructure landscapeIn-depth reviews of leading vendorsCritical analysis of growing trends and key differentiatorsDownload the report here - http://go.nutanix.com/2015-gartner-magic-quadrant-integrated-systems.htmlThanks#Nutanix #Webscale #Gartner #CIO #CTO #sysadmin
This topic first appeared in the Spiceworks CommunityWhy not just use your wireless router for both Macs? Just make sure you set the encryption to WPA or WPA2. Not WEP. And use a strong password. Nothing that can be found in the dictionary. Both letters and numbers. This site https://www.grc.com/passwords.htm has a very good password generator that I use.
If you're just using the wireless access for internet use then the speed of wireless will be about the same as wired ethernet since your cable modem's speed doesn't approach the speed of your wireless router.
lenn
Maybe you are looking for
-
There is no storage of bookmarks in mountain lion
Hello, i Need Somerset help, because I cannot store any bookmarks in Safari. My OS is Mountain Lion. I do no private surfing and I am a newbie in Mac. Thanks for any help
-
Backing up PC MEdia Library before windows reinstall - h
Hi, I have about 70g of music, which took a silly long time to put in the music library. Basically to do it involved my puter stopping responding for about 30 mins whilst the database was built. Now, reinstalling windows is quite a common thing for m
-
Ipod can't play the song normally /sound problem.
my new ipod have some problem with playing songs.( few minutes to sometime few hours ).the song will play like broken cd.but after i restart the ipod it will back to normal again.and again after sometime the song play abnormally..i restore the softwa
-
Need to grab the data from Web Page and send it to SAP using PI
Hello Experts, I need to grab the exchanges rates from the below link. http://www.cbr.ru/scripts/XML_daily.asp?date_req=09-06-2011. This link returns an XML . I need to get the data from this XML page and post it to SAP ECC using PI. My requirement i
-
Browsing JMS messages using selector
Requirement I want to browse for messages, using a selector. SENDER I'm sending messages in my Queue, with a property PARAMETER_ID set in it as. message.setStringProperty("PARAMETER_ID",param_id); Assume there are 4 messages sent in my Queue. 1. Text