JSF & h:selectItems issue

hello all,
i am rewriting my app (originally written with Struts) in JSF, and i got at a dead end where i have to display in my JSP a selectable list which
is populated using a Collection of JavaBeans.
the option value is, let's say, JavaBean.property1 and the option label is JavaBean.property2.
CAn anyone tell me how to do this with JSF? though i searched the net, i was not able to find out how can i put a collection of JavaBeans into a h:selectItems tag.
the only structure usable is a Map, but i don't want to rewrite all my collections to be Map just to populate a selectable box
anyone can help me out?
do i need to write my own JSF component for that?
thanx and regards
marco

well,you need to use a backing bean to create the collection for selectItems value.But remember, every object in the collection is a SelectItem instance.in your example, your JavaBean class need to have a properties method, and it probably looks like this:
public List getProperties()
      List props=new LinkedList();
      SelectItem item1 =new SelectItem( prop1ID,prop1LabelValue);
      props.add(item1);
      SelectItem item2 =new SelectItem( prop2ID,prop2LabelValue);
      props.add(item2);
      return props;
}and in the jsf page,you may have the following line:
<f:selectItems value="#{JavaBean.properties}"/>
hope it is helpful:)
Robin

Similar Messages

  • JSF Table StyleClass issue for a specific Field inside the Table

    Hi There,
    Am having an issue of dynamically setting the styleClass for a specific field inside a DataTable. Here is how the JSF code is ..
    <h:column>
    <h:panelGrid id="column4" columns="1" cellpadding="0" cellspacing="0">
    <h:inputText id="numberOfApps" value="#{row.submitNumber}" styleClass="#{row.customStyleClass}" maxlength="6" converter="MyNumberConverter" />
    </h:panelGrid>
    </h:column>
    This Table has a specific column which has a input Text Box where user enter's data. This data will be validated in the bean where in after the validation if its exceeding a limit we should throw an error message and also highlight the field with a specific styleClass.
    I am setting the StyleClass dynamically based on the User Input, so that I can display a highlited Error Field on the screen. Strangely enough, styleclass is getting set as expected for the first submit but doesnt show any styles for further submits. Even the existing style is getting removed from the second submit onwards. I am setting this "customStleClass" dynamic parameter as a Bean Property. Am sure these values are properly set coz to make sure I have put an h:output tag inside that table to display the customStyleClass values and they are getting set as expected but I see blank value for the class="" in the source of the Page.
    Any help would be appreciated.
    Thanks
    Edited by: Lalith on Jan 14, 2008 10:23 AM

    One option is you find the data element of that field GUID.
    Now go to SE11 transaction and in data type put that data element and press where used list. In that select tables.
    This will give you a list of tables where that field is used.
    But again if there are lots of them it will be difficult to find.
    The only option in that case is debug the extractor and find out.

  • ADF-JSF: Application Performance Issue

    Hello!
    My question or set of questions will be a bit vague...I am simply not sure where to look for problem(s). So here is what I have. Application implemented with ADF-JSF (JDEV ver:10.1.3.2.0). It basically has 5 pages. Each page containes user input form, commandButton and result table. Functionally, each page is a 'search page' that returns results based on what user specified in the form. Components on each page are bound to VO that is based on EO (DB table). Tables have at least 2.5M records up to 16M. Certain indexes exist (for most common searches) to improve the performance. However, there have been performance issues found and largely they would be grouped into the following:
    1. User is on page A, performs the search, goes to page B (via link) and performs other search, then goes back to A and similar search takes much longer to return results. Seems to me that this moght be related to memory. Maybe results of the previous search are cashed and it takes new search to retreive results longer as the VO cashe needs to be cleared first. Does that make sense?
    2. User is on page A and then goes to B. Leaves browser for 10-20 minutes and tries to go back to A. It takes up to a minute before page reloads with the previously displayed results. I am thinking this has to be related to page lifecycle where AM tries to re-execute bindings ( I do not think it is passivation issue though). What is the best practice to control the lifecycle?
    Any pointer on where to look for the solution is very welcome.
    Rade

    Carl,
    To use Tom Kyte's analogy, you are firing a gun into a room full of people hoping to hit the bad guy. You haven't seemed to have gotten any information about where the performance issues lie. It could be in the DB, network, ADF Business Components, JSF layer, other stuff monopolizing resources, etc, etc. I have ADF BC apps developed in 10.1.3.3 that run quite well.
    So, I would recommend you spend some time investigating where the performance problems lie. Try turning on logging output, check machine utilization - use your investigative techniques to find the bad guy so you can then work on fixing him.
    John

  • Reg. JSF Spring Integration issue.

    Hi All,
    I am using JSF for the front end and using the Spring Core, DAO and AOP for the BO and DAO layers. When i try to inject the Objects using the DI to the JSF, i am getting the following error and the objects are not getting set from the Spring.
    Error Log:*
    javax.servlet.ServletException: Unable to create managed bean dataUploadControllerBean. The following problems were found:
    - Bean or property class #{dataUploadVO} for managed bean dataUploadControllerBean cannot be found.
    - Bean or property class #{dataUploadVO} for managed bean dataUploadControllerBean cannot be found.
    - Bean or property class #{dataUploadVO} for managed bean dataUploadControllerBean cannot be found.
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:325)
    org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:112)
    i have defined the respective entries correctly to integrate the JSF & Spring. But still the JSF&Spreing is not integrated successfully. Please find the configs defined and help to resolve the issue. i am stuck in this for 2 days...
    Web.xml
    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>WEB-INF/applicationContext.xml</param-value>
    </context-param>
    Faces-Config.xml
    <application>
    <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver> <!-- have used this ELResolver to injects objects from Spring-->
    </application>
    <managed-bean>
    <managed-bean-name>dataUploadControllerBean</managed-bean-name>
    <managed-bean-class>com.sgspace.model.dataupload.DataUploadControllerBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>dataUploadBean</property-name>
    <value>#{dataUploadBean}</value> _<!-- Already present in the faces-config.xml-->_ </managed-property>
    <managed-property>
    <property-name>dataUploadVO</property-name>
    <property-class>#{dataUploadVO}</property-class> _<!-- Injected from Spring DI. This is currently not working.-->_
    <value></value>
    </managed-property>
    <managed-property>
    <property-name>dataUploadBO</property-name>
    <property-class>#{dataUploadBO}</property-class>_<!-- Injected from Spring DI. This is currently not working.-->_ <value></value>
    </managed-property>
    </managed-bean>
    applicationContext.xml:_
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:p="http://www.springframework.org/schema/p"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
    <bean id="dataUploadDAO"
    class="com.sgspace.dao.dataupload.DataUploadDAOImpl">
    <property name="dataSource" ref="dataSource"></property>
    </bean>
    <bean id="dataUploadBO"
    class="com.sgspace.bo.dataupload.DataUploadBOImpl">
    <property name="dataUploadDAO" ref="dataUploadDAO"></property>
    </bean>
    <bean id="dataUploadVO" class="com.sgspace.vo.dataupload.DataUploadVO"></bean>
    </beans>
    Warm Regards,
    Praveen S

    The TestBean have a property for DeviceManager along with setter/getter methods as shown below. Sorry for not including in earlier posting
    TestBean.java (Backing Bean)
    private DeviceTypeManager deviceManager;
    public DeviceTypeManager getDeviceManager() {
         return deviceManager;
    public void setDeviceManager(DeviceTypeManager deviceManager) {
         this.deviceManager = deviceManager;
    Here are the two scenarios
    Scenario 1 : without <managed-property> the code works fine
    Scenario 2 : with <managed-property> the code results in following error
    javax.faces.FacesException: Cannot get value for expression '#{test.selectedDevice}'
    Scenario 1 has only JSF whereas Scenario 2 has JSF-Spring integration
    The Scenario 1 works absolutely fine as the expression '#{test.selectedDevice}' gets its value from setter/getter method in the backing bean(TestBean.java) . This is expected behaviour & wondering why it doesn't work similarly in Scenario 2 instead it complains
    Cannot get value for expression '#{test.selectedDevice}'
    I am willing to upload the war file. Any pointers/suggestions in resolving the error will be highly appreciated
    Regards
    Bansi

  • Question on JSF/JSP mixing issue

    Hello all.
    We have an JSP application which we are trying to move to JSP. After some thought we decided that these will need to coexist in some parts of the code. Now I have run into an issue as result of these and I am wondering if anyone can help. In the below example, we are tyrig to gather some table entries from a legacy object and trying to populate another JSF type bean with the same entry. Can this be accomplished using some kind of code like this with a commandLink and a param. The problem is the param is not working for me, it is showing up as null object in backendbean2. Any ideas?
    My code is structured like this :
    <h:form>
    // JSP code here
    <%
    sname = Backend1.getSname();
    %>
    // Some entries from a table are output here. Each entry is a link and
    // clicking on each entry should open up a screen corresponding to sname
    // Note that our backend bean is legacy stuff and cannot be changed to
    // return a datatype compatible with Datatable. hence we are using html table
    <table>
    <tr> Name </tr>
    <td>
    <h:commandLink action="#{backendbean2.processClick}" >
    <f:verbatim> <% out.println(sName); %>
    <f:param name="name" value="#{backendbean2.sName}>
    </h:commandLink>
    </h:form>

    Please read the following article.
    http://www.onjava.com/pub/a/onjava/2004/06/09/jsf.html
    Best practice will be to avoid mixing JSP and JSF

  • BUG - JSF f:selectItem

    JDeveloper Version: 10.1.3.0.4(SU4)
    Build JDEVADF_10.1.3_NT_060125.0900.3673
    Linux (fedora core 5) and Windows 2000.
    Setting the f:selectItem itemLabel or itemValue attribute to '<=' causes page to not compile.
    Values of '<', '>','>=' work fine.
    wysiwyg rendering on the design tab fails with message detail:
    java.lang.NullPointerException
         at oracle.jdevimpl.webapp.model.css.html.HtmlCSSManager.getCSSValuesAssigner(HtmlCSSManager.java:46)
         at oracle.jdevimpl.webapp.view.DisplayManager.generateBoxes(DisplayManager.java:1683)
         at oracle.jdevimpl.webapp.view.DisplayManager.generateView(DisplayManager.java:1674)
         at oracle.jdevimpl.webapp.view.DisplayManager.showContent(DisplayManager.java:1650)
         at oracle.jdevimpl.webapp.view.DisplayManager.showContent(DisplayManager.java:647)
         at oracle.jdevimpl.webapp.editor.XmlGuiEditor.showContent(XmlGuiEditor.java:266)
         at oracle.jdevimpl.webapp.editor.html.HtmlEditor.updateDisplay(HtmlEditor.java:754)
         at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.rebuildViewDocument(AbstractWebAppEditor.java:689)
         at oracle.jdevimpl.webapp.editor.html.HtmlEditor.rebuildViewDocument(HtmlEditor.java:621)
         at oracle.jdevimpl.webapp.editor.jsp.JspEditor.rebuildViewDocument(JspEditor.java:209)
         at oracle.jdevimpl.webapp.editor.AbstractWebAppEditor.editorShown(AbstractWebAppEditor.java:456)
         at oracle.jdevimpl.webapp.editor.html.HtmlEditor.editorShown(HtmlEditor.java:447)
         at oracle.ideimpl.editor.SplitPane.doLayoutBottomTabs(SplitPane.java:617)
         at oracle.ideimpl.editor.SplitPane.doLayout(SplitPane.java:480)
         at java.awt.Container.validateTree(Container.java:1473)
         at java.awt.Container.validateTree(Container.java:1480)
         at java.awt.Container.validateTree(Container.java:1480)
         at java.awt.Container.validateTree(Container.java:1480)
         at java.awt.Container.validateTree(Container.java:1480)
         at java.awt.Container.validateTree(Container.java:1480)
         at java.awt.Container.validateTree(Container.java:1480)
         at java.awt.Container.validateTree(Container.java:1480)
         at java.awt.Container.validateTree(Container.java:1480)
         at java.awt.Container.validateTree(Container.java:1480)
         at java.awt.Container.validate(Container.java:1448)
         at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:113)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    =====================================
    Example JSF page:
    =====================================
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=US-ASCII"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"/>
    <title>test</title>
    </head>
    <body><h:form>
    <h:selectOneMenu>
    <f:selectItem itemLabel="<=" itemValue="<="/>
    </h:selectOneMenu>
    </h:form></body>
    </html>
    </f:view>
    ===================
    thanks.

    Setting the f:selectItem itemLabel or itemValue attribute to '<=' causes page to not >compile. Values of '<', '>','>=' work fine.Probably giving us the exact steps you did would help us.
    1. Did you change the property through PI or from code editor?
    2. Was the code editor and design editor open at the same time (as split windows?)
    3. Did you make the change in code editor and switched to design editor?
    Thanks,
    --srini                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • JSF drop-down issue

    Hi All,
    I have been reading a lot about drop-down boxes in JSF. Most of them have been very useful but have not been able to completely solve my problem here...
    I have a very simple page that displays a dropdown with model-id numbers. There is also a button below the dropdown which when clicked takes the user to another page and says "You selected this model: <model-id number from dropdown>"
    So far so good - all works fine. Now I wanted to add a description so that after clicking on the button I get the modelId as well as the model description - This just does not work - the page does not even come up and shows a lot of errors.
    In order to show the description as well I used the SelectItem constructor that accepts a value and a label. I used the modelId as the label and the model-description as value.
    Here is the jsp page code:
    <h:selectOneMenu id="selectedModel" value="#{modelBean.selectedModel}">
        <f:selectItems value="#{modelBean.models}" />
    </h:selectOneMenu>Here is the java backing bean code:
    This code is supposed to put the modelDescription as well - but does not work....
    public List getModels(){
            logger.debug("getting Models for display");
            this.models = new ArrayList<SelectItem>();
            for(Model model: modelIds){
                models.add(new SelectItem(model.getDescription(),model.getModelId()));
                logger.debug("Model added: " + model.getModelId() +" | " + model.getDescription());
            return models;
        public void setModels(List<SelectItem> modelsList){
            logger.debug("setting Models frm display");
            this.models = modelsList;
        public String getSelectedModel(){
            return this.selectedModel;
        public void setSelectedModel(String selectedModel){
            this.selectedModel = selectedModel;
        }I get these errors:
    On the browser:
    javax.faces.el.EvaluationException: Expression: '#{modelBean.models}'
         at net.sourceforge.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:463)
         at javax.faces.component.UISelectItems.getValue(UISelectItems.java:55)
         at net.sourceforge.myfaces.renderkit.RendererUtils.internalGetSelectItemList(RendererUtils.java:357)
         at net.sourceforge.myfaces.renderkit.RendererUtils.getSelectItemList(RendererUtils.java:300)
         at net.sourceforge.myfaces.renderkit.html.HtmlRendererUtils.internalRenderSelect(HtmlRendererUtils.java:369)
         at net.sourceforge.myfaces.renderkit.html.HtmlRendererUtils.renderMenu(HtmlRendererUtils.java:328)
         at net.sourceforge.myfaces.renderkit.html.HtmlMenuRendererBase.encodeEnd(HtmlMenuRendererBase.java:64)
         at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:329)
         at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:376)
         at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:280)
         at org.apache.jsp.gse.model_jsp._jspx_meth_h_selectOneMenu_0(org.apache.jsp.gse.model_jsp:306)
         at org.apache.jsp.gse.model_jsp._jspx_meth_h_form_0(org.apache.jsp.gse.model_jsp:183)
         at org.apache.jsp.gse.model_jsp._jspx_meth_f_view_0(org.apache.jsp.gse.model_jsp:147)
         at org.apache.jsp.gse.model_jsp._jspService(org.apache.jsp.gse.model_jsp:92)     
    Caused by: javax.faces.el.EvaluationException: Bean: com.sigma.gse.view.ModelPageBean, property: models
         at net.sourceforge.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:458)
         at net.sourceforge.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:113)
         at net.sourceforge.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:541)
         at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
         at net.sourceforge.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:438)
         ... 56 more
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at net.sourceforge.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:454)
         ... 60 more
    Caused by: java.lang.NullPointerException: value
         at javax.faces.model.SelectItem.(SelectItem.java:55)
         at com.sigma.gse.view.ModelPageBean.getModels(ModelPageBean.java:48)
         ... 65 more
    On the Tomcat console:
    ERROR - PropertyResolverImpl.getValue(117) | com.sigma.gse.view.ModelPageBean
    javax.faces.el.EvaluationException: Bean: com.sigma.gse.view.ModelPageBean, property: models
    at net.sourceforge.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:4
    at net.sourceforge.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:113)
    at net.sourceforge.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java
    Code that worked:
        public List getModels(){
            logger.debug("getting Models for display");
            List<SelectItem> models = new ArrayList<SelectItem>();
            for(Model model: modelIds){
                models.add(new SelectItem(model.getModelId()));
            return models;
        public String getSelectedModel(){
            return this.selectedModel;
        public void setSelectedModel(String selectedModel){
            this.selectedModel = selectedModel;
    I need help in figuring out what I am doing wrong? If you see there is very little difference between the code that worked and the above defective code.
    Thanks a TOn in advance,
    Anoop

    Hi,
    I am trying to dynamically populate a combo box at screenload. I aslo checked the codes that you have put up in the forum.
    private List searchPMPCountys;
         private List searchNCMs;
         private String selNCM;
         private String selPMPCounty;
         private List searchUnassignedPatients;
         public List getSearchNCMs() {
              searchNCMs = new ArrayList(1);
              searchNCMs.add(new SelectItem("Lynn"));
              return searchNCMs;
         public void setSearchNCMs(List searchNCMs) {
              this.searchNCMs = searchNCMs;
         public List getSearchPMPCountys() {
              searchPMPCountys = new ArrayList();
              List AllPMPCounty = patientmgr.getAllCounties();
              if (AllPMPCounty != null) {
                   Iterator it = AllPMPCounty.iterator();
                   while (it.hasNext()) {
                        NcmCounty county = (NcmCounty)it.next();
                        searchPMPCountys.add(new SelectItem(county.getCountyName()));
                   //String startTag = ((SelectItem)searchPMPCountys.get(0)).toString();
              return searchPMPCountys;
         public void setSearchPMPCountys(List searchPMPCountys) {
              this.searchPMPCountys = searchPMPCountys;
         public String getSelNCM() {
              return this.selNCM;
         public void setSelNCM(String selNCM) {
              this.selNCM = selNCM;
         public String getSelPMPCounty() {
              return selPMPCounty;
         public void setSelPMPCounty(String selPMPCounty) {
              this.selPMPCounty = selPMPCounty;
    <td>
                                                 <h:selectOneMenu id="listingNCM" value="#{patientTool.selNCM}">
                                                      <f:selectItems value="#{patientTool.searchNCMs}" />
                                                      </h:selectOneMenu>
                                            </td>
                                       </tr>
                                       <tr>
                                            <td>
                                                 PMP County
                                            </td>
                                            <td>
                                                 <h:selectOneMenu id="listingPMPCounty" value="#{patientTool.selPMPCounty}">
                                                      <f:selectItems value = "#{patientTool.searchPMPCountys}" />
                                                      </h:selectOneMenu>
                                            </td>
                                       </tr>
    I am new to web and in paticular to JSF. I was wondering if you any of you can guide me??
    I could pull up the screen only once. But the components were not rendered properly I had to reload the screen and I am getting this error as shown below..
    java.lang.IllegalArgumentException: Value binding of UISelectItems with id searchAsgn:_id11 does not reference an Object of type SelectItem, SelectItem[], Collection or Map but of type : null
         at net.sourceforge.myfaces.renderkit.RendererUtils.internalGetSelectItemList(RendererUtils.java:393)
         at net.sourceforge.myfaces.renderkit.RendererUtils.getSelectItemList(RendererUtils.java:309)
         at net.sourceforge.myfaces.renderkit.html.HtmlRendererUtils.internalRenderSelect(HtmlRendererUtils.java:355)
         at net.sourceforge.myfaces.renderkit.html.HtmlRendererUtils.renderListbox(HtmlRendererUtils.java:321)
         at net.sourceforge.myfaces.renderkit.html.HtmlListboxRendererBase.encodeEnd(HtmlListboxRendererBase.java:69)
         at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:329)
         at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:376)
         at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:280)
         at org.apache.jsp.pages.patientAssignment_jsp._jspx_meth_h_selectManyListbox_0(patientAssignment_jsp.java:1086)
         at org.apache.jsp.pages.patientAssignment_jsp._jspx_meth_h_form_0(patientAssignment_jsp.java:473)
         at org.apache.jsp.pages.patientAssignment_jsp._jspx_meth_f_view_0(patientAssignment_jsp.java:229)
         at org.apache.jsp.pages.patientAssignment_jsp._jspService(patientAssignment_jsp.java:114)
         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:332)
         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 com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at us.in.state.isdh.cdms.ncm.web.MessageFilter.doFilter(MessageFilter.java:41)
         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.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 net.sourceforge.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:404)
         at net.sourceforge.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:241)
         at net.sourceforge.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:287)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:110)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
         at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at us.in.state.isdh.cdms.ncm.web.MessageFilter.doFilter(MessageFilter.java:41)
         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:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         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(Unknown Source)
    There is no server error. I am using Tomcat server..
    Thanks,
    Raji

  • JSF project migration issue in jdeveloper R1

    Dear Experts,
    We are trying to migrate an existing JSF project into JDeveloper 11g R1. We are having some compilation errors which we are trying to resolve.
    The doubt we have is that out project used jsf-api.jar and jsf-impl.jar however when I select JSF library in JDeveloper it uses some glassfish jsf jars. Is that the reason for the issues?
    Please share your valuable inputs.

    Some of the methods that were used from JSF jars used are not available in glassfish jars.
    For e.g. com.sun.faces.util.Util.getValueBinding is not available.
    Need your expert advice should we continue fixing the issues and use the jars available by default or is it better to use the jsf jars. However, in case we upgrade the jsf version we may face certain issues and we are aware of the scenario.
    Thanks in advance.

  • From JHeadstart 1012 UIX to JHeadstart 1013 JSF : bc4j.xcfg issue

    Greetings
    After doing all the procedures announced in the JHeadstart 10.1.3 release notes (the project compiles successively). When running the application this error emerges :
    500 Internal Server Error
    oracle.jbo.ConfigException: JBO-33001: Cannot find the configuration file /myApp/model/common/bc4j.xcfg in the classpath
    at oracle.jbo.client.Configuration.loadFromClassPath(Configuration.java:367)     at oracle.jbo.common.ampool.PoolMgr.createPool(PoolMgr.java:284)     at oracle.jbo.common.ampool.PoolMgr.findPool(PoolMgr.java:539)     at oracle.jbo.common.ampool.ContextPoolManager.findPool(ContextPoolManager.java:165) .... etc... etc...
    The bc4j.xcfg is in place.
    I've also added the bc4j.xcfg path to the list of 'resources' paths in Model (Project Properties > Project Content > Resources).
    When trying to edit the file (Application Module > right click > configurations) all goes well. It actually saves data correctly into it.
    Any suggestion ?
    Thanks
    Best regards,

    Buondi,
    You are running into an embedded oc4j bug which causes oc4j to crash randomly when pages get too big. See this post for a possible work around:
    Issues with table size [JHS 10.1.3]
    Steven Davelaar,
    JHeadstart Team.

  • JSF Display Page Issue

    Hello guys,
    Have you ever faced or know the reason behind this :
    When I run my JSF application (1.2 based) on Tomcat I get this on my login page :
    #{loginBean.name} in the Text field that I supposed to write in the user name !!
    I dont know why !! I think I did what I have to do :
    <h:inputText value="#{loginBean.name}"></h:inputText>
    and I have no errors in the jsp page !!
    As if it doesnt recognize it .. even at the login command it display >>
    #{msg.welcome} #{loginBean.name}
    Please help I am desperate!
    Edited by: user4401337 on Jan 13, 2011 3:55 AM

    check your web.xml file, and then especially the top 'web-app' element. Which servlet specification version is defined there?
    I'm sort of betting it is not 2.5.

  • ADF JSF fragment refresh issue

    I have a .jspx page consisting of two .jsff fragments. Each .jsff fragment contains a table. When I modify a row in table1 some changes also need
    to be reflected in table2 in the other .jsff fragment. Using partialTrigger won't work here since it seems that I cannot include a reference to a .jsff fragment
    from another .jsff fragment, so I tried to solve this via ADF calls in the backing bean of one of the .jsff fragments. I have traversed the ADF tree and identified the
    component in the other .jsff fragment that I want to refresh but a call to AdfUtil.addPartialTarget(...) or to AdfFacesContext.getCurrentContext().addPartialTarget(...)
    does not trigger a refresh. I am wondering what I am missing? I would appreciate any help with this.
    Thank you,
    Bogdan

    Inter-region communication is normally done with Contextual Events. A quick google search gave me this: http://www.oracle.com/technetwork/issue-archive/2011/11-may/o31adf-352561.html
    It's been a few years since I did it, but I have had success using contextual events with regions. I think that you might have to have the container that contains the two regions act as a proxy for the event, but it's kinda foggy.

  • JSF 1.1 Issue in Tomcat 5.5.9

    I have installed my project successfully in Tomcat 6.0 with JDK 1.5.
    But when I use jdk 1.4 and tomcat 5.5.9 (Added compatibility jar files for jdk1.4), I am getting following exception.
    Feb 9, 2009 5:18:26 PM org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Error configuring application listener of class com.sun.faces.config.GlassFishConfigureListener
    java.lang.ClassNotFoundException: com.sun.faces.config.GlassFishConfigureListener
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1332)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3617)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
         at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:894)
         at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:857)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:475)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
         at org.apache.catalina.core.StandardService.start(StandardService.java:450)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
    Feb 9, 2009 5:18:26 PM org.apache.catalina.core.StandardContext listenerStart.
    Please help me to resolve this issue.

    igatesunidm wrote:
    java.lang.ClassNotFoundException: com.sun.faces.config.GlassFishConfigureListenerWhy are you using GlassFishConfigureListener in Tomcat?
    Do you understand at all what you´re doing in web.xml and faces-config.xml?

  • Jsf custom component issue

    I am creating a custom component and extending the renderer like the following. My custon component is similar to h:messages but inaddition to that it has hyperlink(clicking error focuses individual input box). I have extended the renderer as follows, every thing works fine but the problem is the form gets null or looses its all value when error occured, however the component works fine. I dont know why is that hapening.
    Any help would be highly appreciated.
    public class CustomErrorRenderer extends Renderer {
    @Override
    public void encodeEnd(FacesContext context,
    UIComponent component) throws IOException {
    ResponseWriter writer = context.getResponseWriter();
    writer.startElement("div", component);
    writer.writeAttribute("id", component.getClientId(context), "id");
    writer.writeAttribute("style", "color: red", null);
    writer.startElement("ul", null);
    Iterator<String> clientIds = context.getClientIdsWithMessages();
    while (clientIds.hasNext()) {
    String clientId = clientIds.next();
    Iterator<FacesMessage> messages = context.getMessages(clientId);
    if (!messages.hasNext()) { continue; }
    String javaScript = "var field = document.getElementById('"
    +clientId+ "');" +"if(field == null) return false;"+
    "field.focus(); return false;";
    writer.startElement("li", null);
    writer.startElement("a", null);
    writer.writeAttribute("onclick", javaScript, null);
    writer.writeAttribute("href", "#", null);
    while (messages.hasNext()) {
    writer.writeText(messages.next().getSummary(), null);
    writer.endElement("a");
    writer.endElement("li");
    writer.endElement("ul");
    writer.endElement("div");
    }

    The problem is, the form values that are tied to input boxes are null once validation error occurs.
    I think when I am overriding that encodeEnd, this is causing the problem for the form values getting null.
    IF I want to see, what are the submitted values then isn't this the way, I am getting null here also:
              FacesContext context = FacesContext.getCurrentInstance();     
                  UIViewRoot viewRoot= context.getViewRoot();
                 HtmlInputText input = (HtmlInputText)viewRoot.findComponent("formId:InputboxId");
              System.out.println("input  sub value" + input.getSubmittedValue());

  • JSP ${} expressions in JSF tag attributes

    Does anyone know why the expert group decided not to allow ${} style expressions within JSF tag attributes? I understand that a different syntax is needed to implement the 'late binding' #{} expressions used to link input controls to form beans, but not why the JSF tags actually prevent the use of immediately evaluated ${} expressions for accessing variables in the page scope in JSP 2.0.
    I know there has been a lot of discussion about this and other threads mention a security loophole that would be opened up by allowing expressions like #{blah.${someProperty}}, but I'm not sure why this sort of thing would cause a problem. Is there any way to enable this behaviour, such as editing the JSF tag library descriptors to allow runtime expressions (horrible though that sounds)? Or perhaps another JSF implementation that supports both immediately evaluated and late-binding expressions? It seems a rather unnecessary restriction that is going to cause much confusion and mistyping for all...
    Thanks in advance,
    Keith.

    Thanks Adam, I see the problem now. It's a fairly obscure loophole but serious nonetheless. Of course, this problem could also be avoided by not using request parameters within JSF tags as it doesn't affect the majority of legitimate uses for expressions.
    I have to disagree with you about mixing ${} and #{} expressions though. The majority of developers will be used to writing ${} expressions in JSTL and JSP text and so will expect them to do work the same in JSF tags. Judging by the number of posts in this forum about being unable to use page scope variables in JSF tags this issue is already confusing a lot of people.
    As a rule of thumb, "use ${} for expressions that are output to the page and #{} for binding controls to backing beans and invoking methods" (which perform clearly distinct functions) is a lot simpler and easier to learn IMHO than the current one, which is "use ${} for expressions that are output to the page except within a JSF tag, where you use #{} for the same thing and also to update form values and invoke action methods"! (OK, I'm exaggerating a little for effect, but you get the point... :-)
    I agree that mixing both types of expression in the same attribute might be a little confusing, but this is an unlikely edge case that should probably be prevented in value binding or action attributes anyway. It's more of an issue for label values where mistyping one for the other is already very common and, although not especially difficult to debug, is just another pitfall awaiting the unwary JSP developer. I'm not sure that JSP expressions would be much more difficult to debug anyway as the value and method bindings will simply not work, which is pretty obvious as soon as you try and test the thing.
    Is this something that the EG would be prepared to reconsider for the next release of JSF, or perhaps getting the security loophole addressed in the next JSP spec? In the meantime, is there any reason that developers shouldn't enable runtime expressions in the TLD file provided that they're willing to live with the consequences?
    (Sorry to harp on about it, but I've already had several complaints about this after recommending JavaServer Faces for a major development project at ingenta.com.)
    Many thanks,
    Keith.

  • Weblogic Portal 10.3.5 using JSF 1.2 portlets with ADF faces

    We are developing Portal site using Weblogic Portal 10.3.5 with JSF portlet 1.2 and ADF faces (ADF Application runtime 11.1.1.5 ). But the JSF portlets not supporting ADF faces. Please let me know how we use ADF faces in JSF portlet 1.2 in Weblogic Portal.

    Hi Murthy,
    We did a detailed analysis.
    (1) How do we add ADF taskflows, JSF in to weblogic portal desktop/pages? Do we create portlet out of JSF, and display on desktop/page? If this is the case, what about ADf task flows?
    --> Taskflows can be deployed as WSRP2.0 portlets. Note 2 options are there JSF page as portlet or taskflow itself as portlets.
    (2) How do we integrate weblogic user profiles and UUP (unified user profiles) with ADF and JSF?
    --> ADF Security can use Weblogic Server realm as the security provider. Entitlements in WLP will have to be provided based on Weblogic Server roles. In case you are using external LDAP then both can be integrated withe external LDAP
    (3) Can anybody shed some light which this better?
    (a) weblogic portal with JPF (Java page flows), NetUI --Legacy approach
    Pros:
    -Easy Development
    -Well tested integrated
    Cons:
    -Future support
    -Enhancements may not be available
    -Not really portable or standards based
    (b) weblogic portal with ADF, JSF?
    Pros:
    -If your on Oracle stack then great
    -Standards based
    Cons:
    -JSF Portlet bridge issues
    -ADF Faces does not work on IE6!
    Well what we are going for is JSR 286, Trinidad components (Supports IE6), JSF.
    Difficult choice.
    Venkat

Maybe you are looking for

  • Using Bravia TV as second display with Macbook Pro

    After waiting weeks, my Mini DisplayPort-HDMI cord finally arrived, only to find that my TV wouldn't connect to my computer. After a full day of fiddling and lots of (mostly unhelpful) Googling, I managed to get them working. My TV is a Sony Bravia H

  • Not all files copied to burn folders are showing up as alias files.

    I am trying to perform a very trivial function of burning JPEGS on my DVD.  I've done it tons of times with minimal issues. However, recently, I have noticed a consistent issue in the burn folder: When I try to place JPEGS from a master/original fold

  • Silver software asset management competency

    Can someone please confirm that I have understood correctly these things? Company X wants to get Silver software asset management competency, to do that first step is: Your company must employ or contract with two Microsoft Certified Professionals (M

  • If I uninstall iTunes, what would happen to my music?

    I have been having issues with my iPod showing up on iTunes and I was thinking maybe I should completely uninstall it and then install it again. I'm very paranoid and don't want anything to happen to my library if I were to do this though. What would

  • Siebel outbound configuration

    Hi All, Does anyone have an idea about how to configure Siebel to receive calls coming from Outbound dialer. In "CTI Driver for Siebel 7 Reference Guide for Cisco ICM/IPCC Enterprise & Hosted" guide one can find information about how to configure the