Custom bean in EL

hi
i want to acces custom bean in jsp using expression language:
<c:forEach var="emp" items="empList">
        <tr>
          <td>${emp.getName}</td>
        //etc.        
        </tr>
      </c:forEach>where empList is LinkedList<Employee> (stored this way: session.setAttribute("empList", list);)
i always get this error:
javax.el.PropertyNotFoundException: The class 'java.lang.String' does not have the property 'getName'.
thanks for help

BalusC wrote:
Two mistakes:
1) The 'empList' is a String. You apparently need ${empList}.thanks - i am just beginner
2) The ${emp.getName} expects a getGetName() method in the object type behind 'emp'. Unless you actually coded it that way (why then?), you should be using ${emp.name}.thanks for a tip

Similar Messages

  • Populating a table with two columns using a custom bean

    hello,
    Can someone provide me or give me a link to an example of populating a table (with two columns) with a custom bean?
    thank you
    fwu

    1)create a java class
    2)have a list as a class variable
    3) populate the list in the constructor..
    4) map the values in the af:table
    //Employee pojo
    public class Employee {
        public Employee() {
            super();
        private String empName;
        private String empManager;
        private String job;
        public void setEmpName(String empName) {
            this.empName = empName;
        public String getEmpName() {
            return empName;
        public void setEmpManager(String empManager) {
            this.empManager = empManager;
        public String getEmpManager() {
            return empManager;
        public void setJob(String job) {
            this.job = job;
        public String getJob() {
            return job;
    //maanged bean
    public class Bean {
    private List<Employee> employee;
        public Bean() {
            super();
            employee = new ArrayList<Employee>();
          Employee e1 = new Employee();
          e1.setEmpName("xxxxx");
          e1.setEmpManager("xxxxxxxx");
          e1.setJob("xxxxxxx");
          Employee e2 = new Employee();
          e2.setEmpName("yyyyyyy");
          e2.setEmpManager("yyyyyyy");
          e2.setJob("yyyyyyt");
          Employee e3 = new Employee();
          e3.setEmpName("zzzzzz");
          e3.setEmpManager("zzzzzzz");
          e3.setJob("zzzzzzzz");
          employee.add(e1);
          employee.add(e2);
          employee.add(e3);
          employee.add(e4);
        public void setEmployee(List<Employee> employee) {
            this.employee = employee;
        public List<Employee> getEmployee() {
            return employee;
        }in the table map like
    <af:table value="#{Bean.employee}" var="row" rowBandingInterval="0"
                        id="t1">
    <af:column headerText="Employee Name" id="c1">
                  <af:inputText value="#{row.empName}" id="it5"/>
                </af:column>
                <af:column headerText="Employee Manager" id="c2">
                  <af:inputText value="#{row.empManager}" id="it2"/>
                </af:column>
    </af:table>

  • Custom tags or Custom Beans

    In a web application project using model 2 to encapsulate layers of application which one is batter
    jsp tags or javabeans ?
    What do u thing about their advantages and disadvantages. Because i think that both are reuseable and platform independent. Thanks for all comments.

    hmm .. maybe I should describe my problem a little more in detail.
    Let's say I have a servlet CheckServlet, a Custom Tag CheckTag, a java bean CheckBean
    If I place the classes in WEB-INF/classes folder, tomcat cannot find the CheckTag class. Same thing with the javabean.
    The moment I make the CustomTag class a part of Check package and place the class file in the folder WEB-INF/classes/Check, it will work. I have noticed the same behaviour with javabeans.
    I had a look at the _jsp file that is generated. The line CheckBean check = null; is where the exception is thrown. (check, I am assuming, is the bean name in the jsp).
    Thanks again.
    Nimod.

  • Sample Custom Bean with Override Submit button

    Does some one have a sample code with an override logic for button.
    Please do not share the code of the Dev Guide and the OIM assets published.

    I have created a Custom Managed Bean, which is associated with My Information Page.My Bean reads a UDF field which has a comma seprated value of EMails and populates a drop down list on the My Information Page.
    This works fine. Now the next step is to implement the value change listener which catches the change/selection done on the drop down list and overriding of Apply Button to save the selected field on User's profile.
    I am not able to do it,even after spending quite bit of time on this. Has any one done something similar and can share code.I need code for Value change Listener and Override Submit button.
    The code which is published in assests page and Dev Guide is not working.
    My Submit button code is
    public void submitActionValidator(ActionEvent actionEvent) {
    String methodName="submitActionValidator";
    System.out.println("Inside"+methodName+"**********");
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    System.out.println("Inside" methodName"2**********");
    // Get the sepecific list binding
    JUCtrlListBinding listBinding = (JUCtrlListBinding)bindings.get("Custom Dropdown");
    System.out.println(methodName+"MNSCUInside SubmitAction3 **********");
    // Get the value which is currently selected
    Object emailSelected = listBinding.getSelectedValue();
    System.out.println(methodName+"MNSCUInside SubmitAction Avlidator***********************************");
    // emailSelected =
    // (RichSelectOneChoice)actionEvent.getSource();
    System.out.println(methodName+"MNSCUemailSelected***********************************:"+emailSelected);
    if (emailSelected != null) {
    preffemail = emailSelected.toString();
    System.out.println(methodName+"preffemail***********************************"+preffemail);
    FacesContext facesContext = FacesContext.getCurrentInstance();
    FacesUtils.setAttributeBindingValue(EMAIL_ATTRIBUTE,
    preffemail);
    // execute original submit button action listener
    MethodExpression originalActionListener =
    FacesUtils.getMethodExpressionFromEL("#{backingBeanScope.MyInformationUIBean.applyButton}",
    null,
    new Class[] { ActionEvent.class });
    originalActionListener.invoke(FacesUtils.getELContext(),new Object[] {actionEvent});
    System.out.println("Exit methodName **********");
    }

  • Unable to show JSF dropdown with a list containing custom beans

    Hi,
    Please help me with my problem guys.
    In the JSF Portlet application that Iam currently working, I need to show some dropdowns,so I am passing arraylist in my JSP like this:
    <code]
    <f:view>
    <hx:scriptCollector id="scriptCollector1">
    <h:form styleClass="form" id="form1"><P>Place content here.
    <h:selectOneMenu styleClass="selectOneMenu" id="menu1" >
    <f:selectItems value="#{gfogBean.northAmericaList.toArray}"/>
    </h:selectOneMenu>
    </h:form>
    </hx:scriptCollector>
    </f:view>
    gfgoBean is my FacesManagedBean, northAmericaList has objects of type TestBean....
    public class GfogBean {
         private String exchangeEurope;
         private String exchangeAsiaPacific;
         private String exchangeNorthAmerica;
         private List northAmericaList = new ArrayList();
          * @return Returns the northAmericaList.
         public List getNorthAmericaList() {
              northAmericaList.add(new TestBean("north","north"));
              return northAmericaList;
          * @param northAmericaList The northAmericaList to set.
         public void setNorthAmericaList(List northAmericaList) {
              this.northAmericaList = northAmericaList;
          * @return Returns the exchangeAsiaPacific.
         public String getExchangeAsiaPacific() {
              return exchangeAsiaPacific;
          * @param exchangeAsiaPacific The exchangeAsiaPacific to set.
         public void setExchangeAsiaPacific(String exchangeAsiaPacific) {
              this.exchangeAsiaPacific = exchangeAsiaPacific;
          * @return Returns the exchangeEurope.
         public String getExchangeEurope() {
              return exchangeEurope;
          * @param exchangeEurope The exchangeEurope to set.
         public void setExchangeEurope(String exchangeEurope) {
              this.exchangeEurope = exchangeEurope;
          * @return Returns the exchangeNorthAmerica.
         public String getExchangeNorthAmerica() {
              return exchangeNorthAmerica;
          * @param exchangeNorthAmerica The exchangeNorthAmerica to set.
         public void setExchangeNorthAmerica(String exchangeNorthAmerica) {
              this.exchangeNorthAmerica = exchangeNorthAmerica;
    }But I am getting this exception.
    Nested Exception is javax.servlet.jsp.JspException: javax.faces.el.ReferenceSyntaxException: The "." operator was supplied with an index value of type "java.lang.String" to be applied to a List or array, but that value cannot be converted to an integer.
         at com.sun.faces.taglib.html_basic.SelectOneMenuTag.doEndTag(SelectOneMenuTag.java:483)
         at org.apache.jsp._GfogWeb._jspService(_GfogWeb.java:220)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:683)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:781)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1049)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:254)
         at org.apache.pluto.core.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:112)
         at com.ibm.faces.context.PortletExternalContextImpl.dispatch(PortletExternalContextImpl.java:439)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:295)
         at com.ibm.faces.application.PortletViewHandlerImpl.renderView(PortletViewHandlerImpl.java:74)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:217)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at com.ibm.faces.webapp.FacesGenericPortlet.doRender(FacesGenericPortlet.java:358)
         at com.ibm.faces.webapp.FacesGenericPortlet.doView(FacesGenericPortlet.java:389)
         at com.jpmorgan.gfogwebportlet.portlet.GfogInitPortlet.doView(GfogInitPortlet.java:51)
         at com.ibm.faces.webapp.FacesGenericPortlet.doDispatch(FacesGenericPortlet.java:290)
         at javax.portlet.GenericPortlet.render(GenericPortlet.java:163)
         at com.ibm.wps.pe.pc.std.cmpf.impl.PortletFilterChainImpl.render(PortletFilterChainImpl.java:144)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.dispatch(PortletServlet.java:131)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.doGet(PortletServlet.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at com.ibm.wps.pe.pc.std.cache.CacheablePortlet.service(CacheablePortlet.java:256)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1049)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:254)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:204)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:168)
         at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.render(PortletInvokerImpl.java:97)
         at com.ibm.wps.pe.pc.std.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:110)
         at com.ibm.wps.pe.pc.PortletContainerImpl.doRenderPortlet(PortletContainerImpl.java:545)
         at com.ibm.wps.pe.ext.render.AbstractRenderManager.performService(AbstractRenderManager.java:251)
         at com.ibm.wps.pe.pc.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:100)
         at com.ibm.wps.engine.tags.PortletRenderTag.doStartTag(PortletRenderTag.java:155)
         at org.apache.jsp._Control._jspService(Control.jsp  :176)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:683)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:781)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1044)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:254)
         at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
         at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
         at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
         at com.ibm.wps.engine.templates.skins.Default.render(Default.java:74)
         at com.ibm.wps.engine.templates.SkinTemplate.render(SkinTemplate.java:71)
         at com.ibm.wps.composition.elements.Component.render(Component.java:785)
         at com.ibm.wps.composition.elements.Control.render(Control.java:182)
         at com.ibm.wps.composition.Composition.render(Composition.java:2880)
         at com.ibm.wps.model.wrappers.LayoutModelWrapperFactoryImpl$LayoutModelWrapperImpl.render(LayoutModelWrapperFactoryImpl.java:204)
         at com.ibm.wps.model.ModelUtil$WrappedCompositionModel.render(ModelUtil.java:832)
         at org.apache.jsp._UnlayeredContainer_2D_V._jspService(UnlayeredContainer-V.jsp     :11)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:683)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:781)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1044)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:254)
         at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
         at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
         at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
         at com.ibm.wps.engine.templates.skins.Default.render(Default.java:74)
         at com.ibm.wps.engine.templates.SkinTemplate.render(SkinTemplate.java:71)
         at com.ibm.wps.composition.elements.Component.render(Component.java:785)
         at com.ibm.wps.composition.Composition.render(Composition.java:2880)
         at com.ibm.wps.model.wrappers.LayoutModelWrapperFactoryImpl$LayoutModelWrapperImpl.render(LayoutModelWrapperFactoryImpl.java:204)
         at com.ibm.wps.engine.tags2.PageRenderTag.doStartTag(PageRenderTag.java:397)
         at org.apache.jsp._Home._jspService(Home.jsp  :15)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:683)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:781)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1044)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:254)
         at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
         at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
         at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
         at com.ibm.wps.engine.templates.screens.Default.render(Default.java:91)
         at com.ibm.wps.engine.templates.ScreenTemplate.render(ScreenTemplate.java:61)
         at com.ibm.wps.engine.tags2.ScreenRenderTag.doStartTag(ScreenRenderTag.java:89)
         at org.apache.jsp._Default._jspService(Default.jsp  :768)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:683)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:781)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1044)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:254)
         at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:89)
         at com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:50)
         at com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:44)
         at com.ibm.wps.engine.templates.themes.Default.render(Default.java:103)
         at com.ibm.wps.engine.templates.ThemeTemplate.render(ThemeTemplate.java:67)
         at com.ibm.wps.engine.phases.WPRenderPhase.processRendering(WPRenderPhase.java:312)
         at com.ibm.wps.engine.phases.WPRenderPhase.execute(WPRenderPhase.java:135)
         at com.ibm.wps.state.phases.AbstractRenderPhase.next(AbstractRenderPhase.java:106)
         at com.ibm.wps.engine.phases.WPAbstractRenderPhase.next(WPAbstractRenderPhase.java:93)
         at com.ibm.wps.engine.Servlet.callPortal(Servlet.java:713)
         at com.ibm.wps.engine.Servlet.doGet(Servlet.java:562)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
         at com.ibm.wps.state.filter.StateCleanup.doFilter(StateCleanup.java:86)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:216)
         at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1040)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:201)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
         at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116)
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:624)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:458)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)Then I changed the <f:selectItems/> little bit like
    <f:selectItems value="#selectItems.gfogBean.northAmericaList.toArray}"/>Then there was no error ,but the dropdown was null.
    Again I modifed the <f:selectItems/> tag in this way:
    <f:selectItems value="#{selectitems.gfogBean.northAmericaList.testBeanValue.testBeanValue.toArray}"/>then the dropdown appeared but the values were showing up twice.
    Can anybody give me solution to this problem.Even a custom converter or a custom component could solve this problem.. \n
    Because in my application, we are not populating the arraylists with SelectItem type.

    The perInfoAll list should be declared locally in getPerInfoAll(), otherwise it grows every time you call it.
    #{e.id};Remove the semicolon, unless you want to see it on the page, which doesn't seem right. Try <h:outputText value="#{e.id}"/> instead. Only certain types of children are supported inside h:column.

  • Custom bean on Approve in Human Task Form

    Hi,
    I have a complex requirement, The Approver has to validate the employee number manually.Approver will look in some system.
    There is a check box in  Human Task Form  " Validated Employee Number".
    The approver has to check mark this check box before approve. If this check box is not checked, we have to stop them with a pop up " Please verify employee number"
    Please advise.
    Thanks in advance.

    for the approve button, add action listener method and check your reqired fileds if any required filed is not entered you can throw an error as below.
    FacesContext.getCurrentInstance().addMessage(null,
                                                                           new FacesMessage(FacesMessage.SEVERITY_ERROR,
                                                                           "Your Error Message",
                                                                            null));

  • ADF Graph Java custom bean

    Hi -
    I am trying to display a Report table and a graph on a page. The table data is from ReportTableVO with parameters which the user specifies while generating the reports. The graph should reflect the month-wise average of the data table. How do I do this? Do I need a seperate VO for generating the graph? Or is there anyway I can use my Table's VO for the graph data? Any help or pointer is highly appreciated.
    My report looks like this:
    Period.......Project.........Score1............Score2...........Score3.........Average
    Oct-06......project-1.......1.....................2...................3..................2..............
    Oct-06......project-2.......3.....................3...................3..................3..............
    Nov-06......project-3.......5.....................5...................5..................5..............
    Nov-06......project-4.......2.....................4...................3..................3..............
    My Graph should show only two bars with average score for Oct-06 (which in this case is 2.5) and or Nov-06 (which is 4.0)
    Thanks in advance.
    Saran

    I think you will need to use a different VO for your graph, returning just the month and the average. Using SQL to calculate the averages (assuming that's how your existing VO gets its data) is probably the easiest way.
    Doubleclicking the BIGraphDef1.xml file which should have turned up in your application source in JDev should open the visual/property editor. Use the colorMode: COLOR_BY_SERIES attribute to make your averages part of the same series. Otherwise just play around with the attributes, clicking on different parts of the graph to get to their attributes. I spent ages googling trying to work out that colorMode thing without success as I agree documentation is hard to find. It turned out to be much quicker just going through the attributes in the BIGraphDef editor myself.

  • Problem in using custom java beans

    Hi,
    We are using oracle JDeveloper 3.2.2 version for developing our Graphical User interface which
    involves Applets and custom beans.
    We faced the following problems when we tried to add the custom beans to JApplet.
    Problem 1. When I drag and drop the custom beans to JApplet, the gif image used by the bean is
    not displayed even when the gif image has been added in the archive file representing
    JavaBean
    Problem 2. When I modify the source code generated by Jdeveloper and come back to the design tab,
    the custom beans looses its look and feel and gets the look and feel of the standard
    bean from which it has been extended.
         For instance, I have a dropdownlist which has been extended from JCombobox.
         I drag and drop to the JApplet. The look and feel of the dropdownlist is
    maintained.
    Now I modify the source code for the dropdownlist in order to add items to it.
         After doing so, I come back to the design tab where i can see my dropdownlist
    appears with the look and feel of JCombobox.     

    HI,
    IF YOU create custom object the profile should be the same as standard.Also see whether the authorization object is added to the data target or not.
    Hope this helps
    Assign points if useful
    Regards,
    venkat

  • Trying to insert a custom visual bean gives me an error

    I've created a custom bean based on javax.swing.jpanel and it compiles fine. I've added it to the component panel as a visual bean but when I try to place it on a frame it throws me an error, which can be found below. I've definately had this visual bean working on another computer using forte but it may not be the same version of forte or java as on this machine. This machine has forte 3.0 and java 1.3.1. Other custom visual beans work fine. Any help greatly appreciated.
    Mike
    Fri Oct 05 12:37:41 BST 2001: java.lang.NullPointerException: null
    java.lang.NullPointerException
    at org.netbeans.modules.form.RADVisualContainer.initLayoutSupport(RADVisualContainer.java:48)
    at org.netbeans.modules.form.HandleLayer.addVisualBean(HandleLayer.java:436)
    at org.netbeans.modules.form.HandleLayer.access$1800(HandleLayer.java:43)
    at org.netbeans.modules.form.HandleLayer$HandleLayerMouseListener.mousePressed(HandleLayer.java:904)
    at java.awt.Component.processMouseEvent(Component.java:3712)
    at java.awt.Component.processEvent(Component.java:3544)
    at java.awt.Container.processEvent(Container.java:1164)
    at java.awt.Component.dispatchEventImpl(Component.java:2593)
    at java.awt.Container.dispatchEventImpl(Container.java:1213)
    at java.awt.Component.dispatchEvent(Component.java:2497)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2210)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
    at java.awt.Container.dispatchEventImpl(Container.java:1200)
    at java.awt.Window.dispatchEventImpl(Window.java:926)
    at java.awt.Component.dispatchEvent(Component.java:2497)
    [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

    Hi, I have exact the same problem. Have you got any answer for this problem yet? Please forward it to me if you have one. Many thanks.

  • EJB3.0 simple entity bean for customer example...

    Can anyone provide a simple step by step instruction on how to start my application of a customer entity bean. like i could add / delete an entry to mySQL DB, i will use Sun as my appserver. im a newbie to ejb. i want to start with that CUSTOMER bean can anybody help pls ? thx! tata-yang

    hello batzee i already have my appserver running
    and found out that he place my EJBSample under Enterprise Application.
    and with these modules inside:
    -EJBsampleSun-ejb.jar      EJBModule      
    -EJBsampleSun-war.war WebModule
    my appserver has:
    EJBsampleSun      true      ${com.sun.aas.instanceRoot}/applications/j2ee-apps/EJBsampleSun      Redeploy
    inside my application:
    1. ejbsamplesun-ejb/src/conf/persistence.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="EJBsampleSun-ejbPU" transaction-type="JTA">
    <provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
    <jta-data-source>jdbc/mySample_dbo</jta-data-source> //question: i have db in mysql named mySample_dbo with customer as my table did i declare it right?
    <properties>
    </properties>
    </persistence-unit>
    </persistence>
    ================
    2. ejbsamplesun-ejb/src/java/ph/icomm/customer.class
    package myejb.ph;
    import java.io.Serializable;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.*;
    @Entity
    @Table(name="Customer")
    public class Customer implements Serializable {
    private int id;
    private String name;
    private String email;
    private String phone;
    @Id
    @Column(name="ID")
    public int getId() {
    return id;
    public void setId(int pk) {
    id = pk;
    @Column(name="Name")
    public String getName() {
    return name;
    public void setName(String n) {
    name = n;
    @Column(name="Email")
    public String getEmail() {
    return email;
    public void setEmail(String e) {
    email = e;
    @Column(name="Phone")
    public String getPhone() {
    return phone;
    public void setPhone(String p) {
    name = p;
    ================
    3. ejbsamplesun-war/src/java/web/postcustomer.class
    // and here is my servlet
    //simply trying to fetch the data in my customer table with ID = 11
    package web;
    import java.io.*;
    import java.net.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import ph.icomm.Customer;
    import web.PostCustomer;
    public class PostCustomer extends HttpServlet {
    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
    * @param request servlet request
    * @param response servlet response
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html;charset=UTF-8");
    PrintWriter out = response.getWriter();
    /* TODO output your page here*/
    out.println("<html>");
    out.println("<head>");
    out.println("<title>Servlet PostCustomer</title>");
    out.println("</head>");
    out.println("<body>");
    try {
    Customer pCustomer = new Customer();
    pCustomer.setId(new Integer("11"));
    out.println("Customer Name is"+pCustomer.getName());
    out.println("<br>");
    out.println("Customer Id is:"+pCustomer.getId());
    out.println("<br>");
    out.println("Customer Email is:"+pCustomer.getEmail());
    out.println("<br>");
    out.println("Customer Phone is:"+pCustomer.getPhone());
    } catch(Exception e) {
    System.out.println("I am inside Exception");
    out.println("<h1>Servlet PostCustomer at " + request.getContextPath() + "</h1>");
    out.println("</body>");
    out.println("</html>");
    out.close();
    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
    /** Handles the HTTP <code>GET</code> method.
    * @param request servlet request
    * @param response servlet response
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    /** Handles the HTTP <code>POST</code> method.
    * @param request servlet request
    * @param response servlet response
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    /** Returns a short description of the servlet.
    public String getServletInfo() {
    return "Short description";
    // </editor-fold>
    Now, is this complete ejb3.0 already? coz if ill try to RUN this project it give this error:
    Deploying application in domain failed; Deployment Error -- null
    C:\Inetpub\wwwroot\myfolder\_Project\EJBsampleSun\EJBsampleSun-ejb\nbproject\build-impl.xml:312: Deployment error:
    The module has not been deployed.
    See the server log for details.
    BUILD FAILED (total time: 1 second)
    This is quite a long post but have to make sure ill get your kind help and assistance. Thanks!
    tata-yang

  • Custom tags v/s java beans

    Hi all,
    Is there any thumb rule when to use Custom Tag and when to use Java Beans.
    I feel we can get the solution using either of them.
    Am I right?
    Cheers

    Hi all,
    Is there any thumb rule when to use Custom Tag and
    when to use Java Beans.
    I feel we can get the solution using either of them.
    Am I right?
    Usually you can indeed use either. Custom tags will create cleaner JSPs with less (if any) Java code, which makes it a lot easier for non-Java people to maintain them.
    Custom beans are often quicker to create, and therefore better suited as interim solutions or for pages that won't be around for long (maybe that one-time action?).
    Of course custom tags will often also make use of beans :)

  • Using a view-object as a data web bean?

    Hi,
    When writing JSP pages, I'd like to have a web bean that allows basic data manipulation such as:
    - set up a row set - e.g. by specifying a view object and an (optional) where clause;
    - navigate this row set (first, next, etc.);
    - get or set the values of the attributes of the current row;
    - insert, update or delete a row;
    - commit or rollback the modifications;
    - etc.
    This bean should be "silent" - i.e. it would not have to be able to "render" anything - instead, I would use it in <%= bean.method() %> tags, or in <% ...java code... %> sections, in conjunction with other (custom) beans.
    I guess I could use a view object - but:
    1) How would I have to use it in a JSP context?
    2) Or, are there more appropriate objects to do this job?
    3) What methods could I use (i.e. where are they documented)?
    4) What pitfalls should I be aware of (most notably related to housekeeping after bean use)?
    Any information greatly appreciated!
    Thanks in advance,
    Serge

    Hi,
    When writing JSP pages, I'd like to have a web bean that allows basic data manipulation such as:
    - set up a row set - e.g. by specifying a view object and an (optional) where clause;
    - navigate this row set (first, next, etc.);
    - get or set the values of the attributes of the current row;
    - insert, update or delete a row;
    - commit or rollback the modifications;
    - etc.
    This bean should be "silent" - i.e. it would not have to be able to "render" anything - instead, I would use it in <%= bean.method() %> tags, or in <% ...java code... %> sections, in conjunction with other (custom) beans.
    I guess I could use a view object - but:
    1) How would I have to use it in a JSP context?
    2) Or, are there more appropriate objects to do this job?
    3) What methods could I use (i.e. where are they documented)?
    4) What pitfalls should I be aware of (most notably related to housekeeping after bean use)?
    Any information greatly appreciated!
    Thanks in advance,
    Serge

  • JSF - Best Practice For Using Managed Bean

    I want to discuss what is the best practice for managed bean usage, especially using session scope or request scope to build database driven pages
    ---- Session Bean ----
    - In the book Core Java Server Faces, the author mentioned that most of the cases session bean should be used, unless the processing is passed on to other handler. Since JSF can store the state on client side, i think storing everything in session is not a big memory concern. (can some expert confirm this is true?) Session objects are easy to manage and states can be shared across the pages. It can make programming easy.
    In the case of a page binded to a resultset, the bean usually helds a java.util.List object for the result, which is intialized in the constructor by query the database first. However, this approach has a problem: when user navigates to other page and comes back, the data is not refreshed. You can of course solve the problem by issuing query everytime in your getXXX method. But you need to be very careful that you don't bind this XXX property too many times. In the case of querying in getXXX, setXXX is also tricky as you don't have a member to set. You usually don't want to persist the resultset changes in the setXXX as the changes may not be final, in stead, you want to handle in the actionlistener (like a save(actionevent)).
    I would glad to see your thought on this.
    --- Request Bean ---
    request bean is initialized everytime a reuqest is made. It sometimes drove me nuts because JSF seems not to be every consistent in updating model values. Suppose you have a page showing parent-children a list of records from database, and you also allow user to change directly on the children. if I hbind the parent to a bean called #{Parent} and you bind the children to ADF table (value="#{Parent.children}" var="rowValue". If I set Parent as a request scope, the setChildren method is never called when I submit the form. Not sure if this is just for ADF or it is JSF problem. But if you change the bean to session scope, everything works fine.
    I believe JSF doesn't update the bindings for all component attributes. It only update the input component value binding. Some one please verify this is true.
    In many cases, i found request bean is very hard to work with if there are lots of updates. (I have lots of trouble with update the binding value for rendered attributes).
    However, request bean is working fine for read only pages and simple binded forms. It definitely frees up memory quicker than session bean.
    ----- any comments or opinions are welcome!!! ------

    I think it should be either Option 2 or Option 3.
    Option 2 would be necessary if the bean data depends on some request parameters.
    (Example: Getting customer bean for a particular customer id)
    Otherwise Option 3 seems the reasonable approach.
    But, I am also pondering on this issue. The above are just my initial thoughts.

  • Global Variable in entity beans

    Dear Friends,
    For example let us think that we have an entity bean for Customer.
    and we created an instance of that bean for customer A and then for customer B.
    So will the global variables in Customer bean be shared across Customer A and Customer B or will there be seperate instances for both Customers.
    Thanking You,
    Chamal.

    Your concepts seem to be a little messed up.
    For entity bean, remember the following:
    1. each object/instance of entity bean represents a record in a database
    2. when a client looks up an entity bean (typcially by using findByPrimaryKey method on home object), the record from database is searched and its values are stored in Entity Beans variables (this is probably what you mean by Global Variable. But thats an incorrect terminology in Java/J2EE. Class attribute is the correct word)
    3. In step 2, you fetched a record and that record is represented by a java object, which is nothing but entity bean.
    4. Now if you make changes to this java object, these changes will persist in the database. That is the essence of entity bean.
    5. If you use the home object's findByPrimaryKey method and look for the same record, no new object will be created. The 2 remote objects will point to the same entity bean on the server.
    6. If yo use the home object's findByPrimaryKey method and look for another record/customer, a new object will be created on the server. This new entity bean will map to the new record.
    Note taht the attribtues of CustomerA and customerB will never be shared.
    hope that helps

  • JSF best practice for managed bean population

    hi;
    consider a simple session scope managed bean with 1 attribute which is calculated dynamically.
    there seem to be 3 ways of populating that attribute (that i could think of):
    1. have the bean's get<attribute> get the data and populate it
    2. have the constructor of the bean get the data and populate it
    3. have an action get the data, and set it from the action code (maybe use a valueBinding to get the bean if the bean which needs population is not the same bean that holds the action) .
    option 1 seems ok for situations where i need my data to be calculated for every valueRef for that attribute but is an overhead for data that need not be calculated for every valueRef.
    option 2 will ensure that te data is calculated only once per session. but it still looks kinda strange to do it
    with option 3, it seems you should populate the dynamic content of the next page and its intuitive but some places in the page might be common content with dynamic data and this has nothing to do with navigation and the next page to be displayed.
    is there a best practice of how to populate a managed bean data?
    are different cases fit different ways?
    any thoughts are appriciated.

    I think it should be either Option 2 or Option 3.
    Option 2 would be necessary if the bean data depends on some request parameters.
    (Example: Getting customer bean for a particular customer id)
    Otherwise Option 3 seems the reasonable approach.
    But, I am also pondering on this issue. The above are just my initial thoughts.

Maybe you are looking for

  • I have 30,000 photos on my trash and can not empty it as it crashes. How can I delete them?

    I have a MAC OSX Version 10,9,5 with iPhoto 09 It has 4GB memory The storage has 69 GB free out of 999 GB. 578 GB of photos that I am slowly moving to an external hard drive. While moving the photos I have been deleting them from the iPhoto app witho

  • Linux memory usage

    Hey all, I have a 1.6 GHz desktop running w/ 128mb of memory and a Core2Dou laptop w/ 1gb of memory.  Both machines are running Archlinux and Fluxbox.  At boot, both machine are using roughly the same amount of memory, around 26-30 mb but as soon as

  • Screen is locked and black

    My iphone 4 screen is locked and the screen is black.  This happened once before and was fixed through icloud and a Verizon representative.  I do not remember the process taken to fix the phone.  Help, please!!!!!

  • Connecting Panasonic HD TVs to HD Cable box

    I have 2 HD Panasonic TVS. I have tried to connect them to a Verizon 6200 Cable box. This does not have a DVR. When I connect using the HDMI connetion there is no picture or sound. If I connect these TVS to a HD CAble box with multi room DVR they con

  • Aperture 3 asks for my SN (after update) and won't accept my Ap2 to 3 'Update' SN

    I have just downloaded an update to Aperture 3 following a system 'update box' notification. Now, when trying to open Aperture it asks for the SN. When I enter the Aperture 3 SN from the software box it rejects it saying that was an 'update' SN, and