FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.



May 2, 2012, 5:59 PM
31 Posts
topic has been resolvedResolved

Error getting property on @DbColumn

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: @DbColumn,views
  • Replies: 5
I am trying to get all the values from a column in a view into a combobox for selection.
 
It is the first column of the view and it is sorted. The column formula is just the field value for 'FiscalYear' from the document.
 
Here is the combobox code:
 
<xp:comboBox id="comboBox1"
                    value="#{viewPartDetail.FiscalYear}">
                    <xp:selectItems>
                        <xp:this.value><![CDATA[#{javascript:var yearlist = @DbColumn("", "(xpPartDetailView)", 1);
return @Explode(yearlist, ",");
}]]></xp:this.value>
                    </xp:selectItems>
                </xp:comboBox>
 
I have tried the @DbColumn a number of different ways based on various posts around - the view is in the current database. But I had used @DbName() instead of "" but there was no difference.
 
I don't have a default value set, because I really don't want a default value. But I did try at least putting in '2012' for a value, but no difference.
 
Here is the error:
Error getting property 'FiscalYear' from bean of type lotus.domino.local.View
 
thanks!!
Kendra
 
May 3, 2012, 4:08 AM
33 Posts
Re: Error getting property on @DbColumn
It looks like the error is complaining about the value attribute and not the @DbColumn part.  Can you check to see if the programmatic name of the column is "FiscalYear"?
May 3, 2012, 1:46 PM
31 Posts
Re: Error getting property on @DbColumn
The programmatic names are right. I also tried wrapping the column in at @Text because in the binding it was showing as Text even though the field is a number. That didn't work either.
 
Here is the stack trace:
 
javax.faces.el.PropertyNotFoundException: Error getting property 'FiscalYear' from bean of type lotus.domino.local.View
    com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:119)
    com.ibm.xsp.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:144)
    com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:182)
    com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:163)
    com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:257)
    com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:150)
    com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:134)
    javax.faces.component.UIOutput.getValue(UIOutput.java:159)
    com.ibm.xsp.component.UISelectOneEx.getValue(UISelectOneEx.java:339)
    com.sun.faces.renderkit.html_basic.MenuRenderer.getCurrentSelectedValues(MenuRenderer.java:566)
    com.sun.faces.renderkit.html_basic.MenuRenderer.renderOption(MenuRenderer.java:463)
    com.sun.faces.renderkit.html_basic.MenuRenderer.renderOptions(MenuRenderer.java:443)
    com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:404)
    com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:357)
    com.ibm.xsp.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:47)
    com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeEnd(ReadOnlyAdapterRenderer.java:180)
    javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:1005)
    com.ibm.xsp.component.UISelectOneEx.encodeEnd(UISelectOneEx.java:331)
    com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:856)
    com.ibm.xsp.util.FacesUtil.renderChildren(FacesUtil.java:871)
    com.ibm.xsp.renderkit.html_extended.HtmlBasicRenderer.encodeChildren(HtmlBasicRenderer.java:206)
    com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeChildren(ReadOnlyAdapterRenderer.java:162)
    javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:979)
    com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:842)
    com.ibm.xsp.util.FacesUtil.renderChildren(FacesUtil.java:871)
    com.ibm.xsp.renderkit.html_extended.HtmlBasicRenderer.encodeChildren(HtmlBasicRenderer.java:206)
    com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeChildren(ReadOnlyAdapterRenderer.java:162)
    javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:979)
    com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:842)
    com.ibm.xsp.util.FacesUtil.renderChildren(FacesUtil.java:871)
    com.ibm.xsp.renderkit.html_extended.HtmlBasicRenderer.encodeChildren(HtmlBasicRenderer.java:206)
    com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeChildren(ReadOnlyAdapterRenderer.java:162)
    javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:979)
    com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:842)
    com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:851)
    com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:851)
    com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:851)
    com.ibm.xsp.component.UIViewRootEx._renderView(UIViewRootEx.java:1317)
    com.ibm.xsp.component.UIViewRootEx.renderView(UIViewRootEx.java:1255)
    com.ibm.xsp.application.ViewHandlerExImpl.doRender(ViewHandlerExImpl.java:641)
    com.ibm.xsp.application.ViewHandlerExImpl._renderView(ViewHandlerExImpl.java:320)
    com.ibm.xsp.application.ViewHandlerExImpl.renderView(ViewHandlerExImpl.java:335)
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:103)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:120)
    com.ibm.xsp.controller.FacesControllerImpl.render(FacesControllerImpl.java:264)
    com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:248)
    com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:200)
    com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
    com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:137)
    com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)
    com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:576)
    com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1267)
    com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:847)
    com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:796)
    com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:565)
    com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1251)
    com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:598)
    com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:421)
    com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:341)
    com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:297)
    com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
 
May 4, 2012, 4:00 AM
33 Posts
Re: Error getting property on @DbColumn
Having had another look at the code, I think the problem is that the binding for the combobox is to a column in the view.  I have managed to get the combobox working by removing the binding (see modified code below).  Obviously you will need to bind it to something else (maybe a scoped variable) if you are to do anything with it.  The binding you choose will depend on what you want to do with the data i.e. is the xpage for data entry, to apply a filter to a view or for navigation.  If you can let me know which, I can guide you a bit further.

<xp:comboBox id="comboBox1">
    <xp:selectItems>
        <xp:this.value>
            <![CDATA[#{javascript:var yearlist = @DbColumn("", "(xpPartDetailView)", 1);
                        return @Explode(yearlist, ",");
            }]]>
        </xp:this.value>
    </xp:selectItems>
</xp:comboBox>
May 4, 2012, 1:42 PM
31 Posts
Re: Error getting property on @DbColumn
Grrrr...that works for me. I thought I had to have a binding even though I only want to use it for a filter. In the binding panel it says "You must link (bind) this control to a data source in order to display or store data."
 
Thank you!!
Jan 7, 2013, 4:38 AM
1 Posts
Re: Error getting property on @DbColumn
thanks for the inspiration :)

FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.