01-18-2007 06:18 AM
01-18-2007 10:50 AM
<h:selectOneMenu value="#{DialogManager.bean.aspect}">
<f:selectItems value="#{DialogManager.bean.myCustomAspects}" />
</h:selectOneMenu>
01-18-2007 02:01 PM
package org.alfresco.sample;
import javax.faces.context.FacesContext;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
import org.alfresco.web.bean.dialog.BaseDialogBean;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.bean.actions.BaseActionWizard;
import java.util.List;
/**
* Bean implementation for the "Add Aspect Dialog"
*
* @author gavinc
*/
public class AddAspectDialog extends BaseDialogBean
{
protected String aspect;
protected List myCustomAspects;
@Override
protected String finishImpl(FacesContext context, String outcome) throws Exception
{
// get the space the action will apply to
//NodeRef nodeRef = this.browseBean.getActionSpace().getNodeRef();
NodeRef nodeRef = this.browseBean.getDocument().getNodeRef();
// resolve the fully qualified aspect name
QName aspectToAdd = Repository.resolveToQName(this.aspect);
// add the aspect to the space
this.nodeService.addAspect(nodeRef, aspectToAdd, null);
// return the default outcome
return outcome;
}
@Override
public boolean getFinishButtonDisabled()
{
return false;
}
public String getAspect()
{
return aspect;
}
public void setAspect(String aspect)
{
this.aspect = aspect;
}
public List myCustomAspects()
{
BaseActionWizard x = null;
System.out.println(x.getAspects());
this.myCustomAspects = x.getAspects();
return x.getAspects();
}
}
<h:outputText value="Opciones: " />
<h:selectOneMenu value="#{DialogManager.bean.aspect}">
<f:selectItems value="#{DialogManager.bean.myCustomAspects}" />
</h:selectOneMenu>
javax.faces.FacesException: Bean: org.alfresco.sample.AddAspectDialog, property: myCustomAspects
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
at org.alfresco.web.app.servlet.AlfrescoFacesServlet.service(AlfrescoFacesServlet.java:49)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:73)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
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:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.jasper.JasperException: Bean: org.alfresco.sample.AddAspectDialog, property: myCustomAspects
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at org.apache.jsp.jsp.dialog.container_jsp._jspService(org.apache.jsp.jsp.dialog.container_jsp:497)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
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:301)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
… 21 more
01-20-2007 06:46 AM
01-20-2007 01:45 PM
do you have the same error when you rename your method with getMyCustomAspects() instead of myCustomAspects()?Yes, the error is the same.
01-22-2007 04:08 AM
BaseActionWizard x = null;
System.out.println(x.getAspects());
this.myCustomAspects = x.getAspects();
return x.getAspects();
01-22-2007 06:13 AM
public List myCustomAspects()
{
BaseActionWizard x = new BaseActionWizard();
System.out.println(x.getAspects());
this.myCustomAspects = x.getAspects();
return x.getAspects();
}
01-24-2007 11:43 AM
01-25-2007 06:06 AM
Hi,Hi gavinc,
Yes, i was jsut highlighting where the error was coming from. You don't/shouldn't instantiate a wizard object in here.
For your test just copy the code from RunActionWizard.getTestableAspects() into your method. Once you have an idea how it works replace that code with your own.
javax.faces.FacesException: Bean: org.alfresco.sample.AddAspectDialog, property: getMyCustomAspects
caused by:
org.apache.jasper.JasperException: Bean: org.alfresco.sample.AddAspectDialog, property: getMyCustomAspects
caused by:
javax.faces.el.PropertyNotFoundException: Bean: org.alfresco.sample.AddAspectDialog, property: getMyCustomAspects
And if I call the method DialogManager.bean.getMyCustomAspects() appears this error:javax.faces.FacesException: Invalid expression: '${DialogManager.bean.getMyCustomAspects()}'
caused by:
org.apache.jasper.JasperException: Invalid expression: '${DialogManager.bean.getMyCustomAspects()}'
caused by:
javax.faces.el.ReferenceSyntaxException: Invalid expression: '${DialogManager.bean.getMyCustomAspects()}'
caused by:
org.apache.commons.el.parser.ParseException: Encountered "(" at line 1, column 40.
Was expecting one of:
"}" …
"." …
">" …
"gt" …
"<" …
"lt" …
"==" …
"eq" …
"<=" …
"le" …
">=" …
"ge" …
"!=" …
"ne" …
"[" …
"+" …
"-" …
"*" …
"/" …
"div" …
"%" …
"mod" …
"and" …
"&&" …
"or" …
"||" …
"?" …
01-29-2007 04:34 AM
#{DialogManager.bean.myCustomAspects}
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.