05-03-2010 08:17 AM
05-13-2010 04:55 PM
05-14-2010 03:28 AM
05-14-2010 04:09 AM
05-14-2010 05:34 AM
05-14-2010 08:26 AM
aces-config-custom.xml
<managed-bean>
<description>The bean that holds folder browse state.</description>
<managed-bean-name>BrowseBean</managed-bean-name>
<managed-bean-class>package.CustomBrowseBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>…..
public class CustomBrowseBean extends BrowseBean {
getWindowsView() {
//for each node that is returned add this.
cont.get(i).addPropertyResolver("selected", resolover );
}
}
public NodePropertyResolver resolover = new NodePropertyResolver() {
/**
*
*/
private static final long serialVersionUID = 903502146868126457L;
@Override
public Object get(Node node) {
resolove the falue, return true or false;
}
};
05-17-2010 06:27 AM
05-17-2010 06:42 AM
public List<Node> getNodes()
{
List<Node> list= super.getNodes();
for(int i=0;i<list.size();i++)
{
list.get(i).addpropres..("selected",resolover );
}
}
public NodePropertyResolver resolover = new NodePropertyResolver() {
/**
*
*/
private static final long serialVersionUID = 903502146868126457L;
@Override
public Object get(Node node) {
CHECK YOUR MODEL TO SEE IF NODE IS SELECTED OR NOT.
}
};
05-17-2010 07:25 AM
package es.sic.beans;
import java.util.List;
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
import org.alfresco.service.namespace.QName;
import org.alfresco.web.bean.BrowseBean;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.NodePropertyResolver;
public class CustomBrowseBean extends BrowseBean{
/**
*
*/
private static final long serialVersionUID = 1L;
public static QName PROPERTY_SELECCIONADO = QName.createQName("extension.dm", "propSelected");
@Override
public List<Node> getContent() {
List<Node> list= super.getNodes();
for(int i=0;i<list.size();i++)
{
list.get(i).addPropertyResolver("selected",resolver);
}
return list;
}
public NodePropertyResolver resolver = new NodePropertyResolver() {
/**
*
*/
private static final long serialVersionUID = 903502146868126457L;
@Override
public Object get(Node node) {
boolean selected = DefaultTypeConverter.INSTANCE.booleanValue(getNodeService().getProperty(node.getNodeRef(), PROPERTY_SELECTED));
if(selected){
return true;
}else{
return false;
}
}
};
}
javax.faces.FacesException: javax.faces.el.EvaluationException: Cannot get value for expression '#{r.selected}'
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:95)
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(Thread.java:619)
Caused by: org.apache.jasper.JasperException: javax.faces.el.EvaluationException: Cannot get value for expression '#{r.selected}'
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
… 19 more
Caused by: javax.faces.el.EvaluationException: Cannot get value for expression '#{r.selected}'
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:405)
at javax.faces.component.UIOutput.getValue(UIOutput.java:80)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getObjectValue(RendererUtils.java:186)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getBooleanValue(RendererUtils.java:152)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlCheckboxRendererBase.encodeEnd(HtmlCheckboxRendererBase.java:62)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
at org.alfresco.web.ui.common.Utils.encodeRecursive(Utils.java:174)
at org.alfresco.web.ui.common.Utils.encodeRecursive(Utils.java:169)
at org.alfresco.web.ui.common.renderer.data.RichListRenderer$DetailsViewRenderer.renderListRow(RichListRenderer.java:292)
at org.alfresco.web.ui.common.renderer.data.RichListRenderer.encodeChildren(RichListRenderer.java:118)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:527)
at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:483)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:364)
at org.apache.jsp.jsp.browse.browse_jsp._jspx_meth_a_005frichList_005f1(browse_jsp.java:4734)
at org.apache.jsp.jsp.browse.browse_jsp._jspService(browse_jsp.java:1127)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
… 29 more
Caused by: javax.faces.el.EvaluationException: Exception getting value of property selected of base of type : org.alfresco.web.bean.repository.MapNode
at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:99)
at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:535)
at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:386)
… 46 more
Caused by: java.lang.NullPointerException
at org.alfresco.service.cmr.repository.datatype.TypeConverter.booleanValue(TypeConverter.java:188)
at es.sic.beans.CustomBrowseBean$1.get(CustomBrowseBean.java:40)
at org.alfresco.web.bean.repository.QNameNodeMap.get(QNameNodeMap.java:117)
at org.alfresco.web.bean.repository.MapNode.get(MapNode.java:157)
at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:81)
… 49 more
05-17-2010 07:39 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.