Datatable broken in JSF 1.2_09-b02?

Hi,
I got the following error with datatable:
The method setVar(String) in the type DataTableTag is not applicable for the arguments (JspValueExpression)
Searched the web and found:
[http://devtribalknowledge.blogspot.com/2008/05/datatabletag-broken-in-suns-javaserver.html|http://devtribalknowledge.blogspot.com/2008/05/datatabletag-broken-in-suns-javaserver.html]
Is there any other alternative than downgrading to an earlier JSF version?
I just want to display of list of objects (i.e. a one column table). What is a good substitute to datatable?
Thanks.

cdward wrote:
The solution is to upgrade to Mojorra 1.2_10 released a few days ago which fix the problem.
:)Oh, you've bound the datatable component itself to the bean? There was indeed a related bug which got fixed in 1.2_10.

Similar Messages

  • DataTable in dataTable fix details (JSF 1.1)

    I posted a message yesterday indicating that some of the problems with nested dataTables had not been fixed in the JSF 1.1 release. Since that posting, I have done some more research, and have more specific information regarding the remaining problems and a way to fix them. The remaining problems are:
    1) Values from inputText fields in the inner dataTable are ignored on submit (except for the last row of the table). The problem is that processDecodes is called on the inner table component multiple times (once per row of the outer table), and the "saved = new HashMap();" statement effectively wipes out any values that were decoded from the previous row, so that at the end of the process, the only decoded values that remain are those from the last row. My suggested fix for that problem is:
    a) to create a "boolean isOuterTable()" method on UIData that determines whether or not this table is the outermost table (i.e. go up through the parent chain and see if there are any UIData ancestors).
    b) create a "clearSaved" method on UIData as follows:
    protected void clearSaved() {
        saved = new HashMap();
    }c) create a "clearDescendants" method on UIData that goes visits all of the UIData's descendants (i.e. facets and children, and their facets and children, recursively), and calls clearSaved on any UIData components that are found
    d) in the processDecodes method for UIData, replace:
    saved = new HashMap();with
    if (isOuterTable()) {
        clearSaved();
        clearDescendants();
    }2) When a commandButton in the inner dataTable is clicked, actions are fired for all rows of the outer dataTable. This is one case of a larger problem. The implementation of getClientId in UIComponentBase uses a cached value, if the ID has been computed previously. For components within dataTables, this is a problem because these components are referenced multiple times for different rows of the outer table, and the row number of the outer table is part of the client ID. To fix this, I suggest the following (maybe overkill, but it works):
    a) Create a "clearCachedValues" method on UIData, which visits all of the UIData's descendants, and sets their clientId to null. A hack to do this is:
    descendant.setId(descendant.getId())It would be better to have a method on UIComponent for this. NOTE: I have also found that if I come across a descendant that is a UIData, I also need to set that component's "model" attribute to null, because the calculation of this model refers to that dataTable's value valueBinding, which may be defined in terms of the current row of the outer table.
    b) Add a call to clearCachedValues to the end of the setRowIndex method on UIData.
    There may be other, better ways to fix these problems, but I thought it might be helpful to describe my fixes in detail, so that whoever is responsible for fixing the reference implementation can at least have the benefit of my research.
    I would like to see a bug opened for these problems, and I would like to be able to see the descriptions of known JSF bugs. Before JSF 1.1 came out I was worried that the nested dataTables bug (C026) description (which I was unable to find) might not be complete, and that as a result, the problems with nested dataTables would not be completely fixed in JSF 1.1. As it turned out my worries were not unfounded.

    JD> 2) When a commandButton in the inner dataTable is clicked, actions
    JD> are fired for all rows of the outer dataTable. This is one case of a
    JD> larger problem. The implementation of getClientId in UIComponentBase
    JD> uses a cached value, if the ID has been computed previously. For
    JD> components within dataTables, this is a problem because these
    JD> components are referenced multiple times for different rows of the
    JD> outer table, and the row number of the outer table is part of the
    JD> client ID. To fix this, I suggest the following (maybe overkill, but
    JD> it works):
    I've fixed part 1). I've essentially done as you suggested.
    I can't reproduce part 2). I've posted the webapp where I try to do
    this at
    http://blogs.sun.com/roller/resources/edburns/jsf-nested-datatables.war
    Please put the JSF 1.1 jars in common lib, or WEB-INF/lib in this war
    and then visit
    http://host:port/jsf-nested-datatables/faces/test2.jsp
    Click on the outer buttons, you'll see that the outer listener fires
    once.
    Click on the inner buttons, you'll see that the inner listener once.
    Can you please help me reproduce this?
    Ed

  • Datatable or similar JSF tag

    Hello together!
    I am looking for a table where the user can select the a row.
    Like the JTable or in the datagrid in the .NET framework.
    Can anybody pls tell me how I can do so in JSF.
    Thanks a lot.

    check out myfaces dataTable it has support for selecting rows
    http://myfaces.apache.org/

  • Broken link : JSF intro

    hi
    on
    http://www.oracle.com/technology/tech/java/jsf.html
    is a link to "Tutorial - Getting Started with JSF" at
    http://www.oracle.com/technology/obe/obe1013jdev/jsfJSP/jsfJSP.htm
    that results in a 404 page, but should probabely point to
    http://www.oracle.com/technology/obe/obe1013jdev/jsfintro/jsfintro.htm
    regards
    Jan

    This has been fixed; thanks...
    Cheers, OTN

  • Datatable rendering problem in jsf 1.2!

    Hi,
    I want to display a table populated with some data and My approach is the simplest.....
    I am using a h:datatable in my jsf page.The table has got value binding with backing bean
    list which I am populating inside getter method. I am using jsf 1.2 in tomcat 6.
    <h:dataTable id="table1" value="#{bb_test.myList}"
                   binding="#{bb_test.table1}" var="user">
                   <h:column id="column1">
                        <f:facet name="header">
                             <h:outputText value="User Id" />
                        </f:facet>
                        <h:outputText value="#{user.userId}" />
                   </h:column>
              </h:dataTable>And backing bean method
    public List<MyObject> getMyList(){
              List<MyObject> myObjectList = myService.getMyObjectList(1, 12);
              return myObjectList ;
         }But I am getting following exception
    Caused by: org.apache.jasper.JasperException: Unable to compile class for JSP:
    An error occurred at line: 17 in the jsp file: /pages/test.jsp
    The method setVar(String) in the type DataTableTag is not applicable for the arguments (JspValueExpression)
    14:      <h:form>
    15:           
    16:           <h:commandButton value="-->" action="#{bb_test.showNextPage}" />
    17:           <h:dataTable id="table1" value="#{bb_test.loginList}"
    18:                binding="#{bb_test.table1}" var="user">
    19:                <h:column id="column1">
    20:                
    I spent good amount of time behind googling..but all in vain...
    Please do respond if u have any idea about what is happening here and what could be the possible solution.
    Thanks.
    Ghosh

    Hmm, [one more|http://forums.sun.com/thread.jspa?threadID=5344554]? You're using JSF 1.2_09?
    There's a bugfix related to the 'var' attribute of the datatable in JSF 1.2_10. Upgrade your JSF version.

  • Problems in JSF t:dataTable /t:dataTable

    hi
    i am using <t:dataTable> to create jsf table.In the datatable each column has one <h:commandLink>.i had action methods to each and every column.At the same Jsf page,i am having some textfields using <h:inputText>.
    My problem is when i click the datatable colume link,it goes to the same jsf page,but there is no textfields at the same page.i am not expected to same jsf page.i wants to navigate to some other jsf pages.i had one solution i.e,i used binding method for each and every Link.The problem was solved temporarly.eventhough i am having solution using binding method.it is not applicable for huge data as i have large data.so what should i do to have exact solution .At the same time,i don't need binding methods.
    Advance thanks
    rgds
    OasisDeserts

    Hi.
    J solve the problem partly and here is the problem and solution:
    Problem - JDeveloper 10.1.3 have problem in showing table when code look like this:
    <h:dataTable width="350" value="#{infoBean.popular}" var="popular_">
    <h:column>
    <f:facet name="header">
    <h:panelGroup>
    <h:commandLink action="POPULAR">
    <h:outputText value="Najpopularnije"/>
    </h:commandLink>
    </h:panelGroup>
    </f:facet>
    <h:commandLink>
    <h:outputText value="#{popular_}" converter="ProductTitle"/>
    </h:commandLink>
    </h:column>
    </h:dataTable>
    Solution - When J change code to this 'Design' tab shows the table but not the text in 'outputText'(here #{popular_}):
    <h:outputText value="#{popular_}">
    <f:converter converterId="ProductTitle"/>
    </h:outputText>
    Please try this!

  • Alignment problems in JSF datatable

    Hi,
    In my JSF data-table, i have few alignment problems.
    For Example, I have 4 columns, Emp-Id, First-Name,Last-name and Age.
    What happens is, sometimes, the value in the First-Name cell moves into the Last-Name cell, leadiing to alignment problems. But this is not happening always. Occasionlly this happens.
    I tried with iFrames and also by having fixed width for each cell, then also this problem is persisting.
    Is it something to do with the datatable display in JSF?
    Any suggestions/ideas on how to resolve this problem would be of immense help.
    Thanks

    Hi
    What happens if you delete the text and retype in and change alignment ?
    Does the same issue happens with all sub menu items ?
    Please provide the site url.
    Thanks,
    Sanjit

  • EL expressions not evaluating after JSF 1.1 --- 1.2 upgrade.

    I am having a problem with EL expressions not evaluating in a JSF application that I just upgraded from Apache MyFaces JSF 1.1 to JSF-RI 1.2 and from Tomcat 5.5.25 to 6.0.26. After the upgrade the entire application is working fine except for EL expressions.
    I was wondering if I am missing a JAR file or something.
    Basically, I have prepopulated input text boxes that render the EL expression instead of its evaluated result. Example:
    INPUT [#{sessionBean.result}] instead of INPUT [tedsResult].
    Here are the JAR on my classpath:
    tomcat/lib:
    annotations-api.jar el-api-1.1.jar servlet-api.jar tomcat-i18n-fr.jar
    catalina-ant.jar jasper-el.jar sqljdbc.jar tomcat-i18n-ja.jar
    catalina-ha.jar jasper.jar tomcat-coyote.jar
    catalina.jar jasper-jdt.jar tomcat-dbcp.jar
    catalina-tribes.jar jsp-api.jar tomcat-i18n-es.jar
    and in my WEB-INF/lib:
    activation.jar hibernate-annotations.jar
    antlr-2.7.5H3.jar iText-2.1.3.jar
    asm-attrs.jar jakarta-oro.jar
    asm.jar jaxen-1.1-beta-8.jar
    avalon-framework-4.0.jar jaxrpc.jar
    avalon-framework-cvs-20020806.jar jdom.jar
    axis.jar jpdcFOP.jar
    batik.jar jpdc_web.jar
    cglib-2.1_3.jar jsf-api-1.2_12.jar
    commons-beanutils.jar jsf-impl-1.2_12.jar
    commons-codec.jar jstl.jar
    commons-collections.jar jta.jar
    commons-digester.jar jtds-1.2.jar
    commons-discovery.jar log4j-1.2.13.jar
    commons-el.jar logkit-1.0.jar
    commons-fileupload-1.2.jar mail.jar
    commons-io-1.3.1.jar openmap.jar
    commons-lang-2.3.jar saaj.jar
    commons-logging.jar standard.jar
    commons-logging-optional.jar tomahawk.jar
    cos.jar velocity-1.4.jar
    CVS velocity-tools-generic-1.1.jar
    dom4j-1.6.1.jar
    el-impl-1.1.jar versioncheck.jar
    ehcache-1.1.jar wsdl4j-1.5.1.jar
    ejb3-persistence.jar xalan.jar
    fop.jar xercesImpl.jar
    hibernate3.jar xmlParserAPIs.jar
    Any ideas what might be causing this problem? Thanks in advance for your help.
    Edited by: tsteiner61 on Apr 14, 2010 11:05 AM

    Hello tsteiner61,
    Did you find a solution for your problem? I am asking because I have to solve a somewhat similar problem. Our system admin updated Tomcat from version 6.0.20 to 6.0.26 and now my JSF application won’t evaluate EL expressions either.
    I was using “Mojarra JSF API Implementation 1.2_09-b02-FCS”. Trying “Mojarra JSF API Implementation 2.0.2-FCS” I get the following error:
    java.lang.UnsupportedOperationException
         javax.faces.context.ExternalContext.getResponseOutputWriter(ExternalContext.java:1228)
         com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:182)
         com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)
         org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
         org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:197)
         javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
         org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)
         com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
    I am grateful for helpful advice.

  • I am geeting an error with jsf 1.2 please help

    i have used a datatable tag in JSF which just takes a ResultSet object and prints every row in it in a tabular form. I cheked i am recieving the resultset object with about 8 columns but when the jsf page is invoked it gives me following error.
    HTTP Status 500 -
    type Exception report
    message
    descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: java.sql.SQLException: The column position '2' is out of range. The number of columns for this ResultSet is '1'.
    root cause
    javax.faces.el.EvaluationException: java.sql.SQLException: The column position '2' is out of range. The number of columns for this ResultSet is '1'.
    root cause
    java.sql.SQLException: The column position '2' is out of range. The number of columns for this ResultSet is '1'.
    root cause
    org.apache.derby.client.am.SqlException: The column position '2' is out of range. The number of columns for this ResultSet is '1'.
    note The full stack traces of the exception and its root causes are available in the GlassFish v3 logs.
    GlassFish v3
    Thanks
    Harish Ingle

    If possible please post your JSF code and the corresponding java code where in you are getting your resultset and preparing to display the same in your jsp page.

  • Two datatable in one page

    I have two t:datatable in one jsf page. Both the table are getting displayed but there is no data in the second table. Has anyone faced a similar problem? Any solution to this or am i missing something?

    I have two t:datatable in one jsf page. Both the table are getting displayed but there is no data in the second table. Has anyone faced a similar problem? Any solution to this or am i missing something?

  • Jsf-naming:namingContainer leads to ClassCastException

    Hi,
    I am having a problem creating a JSF-Portlet (JSF 1.2) in a WebLogic Portal 10.3.2
    I am trying to create a portal JSF-Portlet using the jsf-1.2_09 libraries (WebLogic default). The Portlet works great until I try to integrate the <jsf-naming:namingContainer tag into my jsp.
    I am using the Oracle Tutorial "Developing JSF Portlets with WebLogic Portal"
    The JSP is really simple
    *<code>*
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <%@ taglib prefix="jsf-naming" uri="http://bea.com/faces/adapter/tags-naming"%>
    <f:view>
    <jsf-naming:namingContainer id="loginJSFPortlet" >
    <h:outputText value="Login Test"/>
    <h:form>
    <h:commandButton id="loginButton" value="Anmelden" action="login"/>
    </h:form>
    </jsf-naming:namingContainer>
    </f:view>
    *</code>*
    When calling the portal desktop the following exception is thrown
    *<exception>*
    <23.06.2010 16:25 Uhr MESZ> <Error> <ServletContext-/eKimWebTest> <BEA-000000> <Exception thrown in doFacesRequest:render
    javax.faces.FacesException: java.lang.ClassCastException: com.bea.portlet.container.RenderRequestImpl
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:128)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
         at org.apache.myfaces.portlet.faces.bridge.BridgeImpl.doFacesRender(BridgeImpl.java:906)
         at org.apache.myfaces.portlet.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:769)
         at javax.portlet.faces.GenericFacesPortlet.doBridgeDispatch(GenericFacesPortlet.java:645)
         Truncated. see log file for complete stacktrace
    Caused By: java.lang.ClassCastException: com.bea.portlet.container.RenderRequestImpl
         at com.bea.portlet.adapter.faces.ScopedIdSupport.getScopeKey(ScopedIdSupport.java:74)
         at com.bea.portlet.adapter.faces.taglib.naming.internal.NamingContainerTagImpl.doStartTag(NamingContainerTagImpl.java:200)
         at com.bea.portlet.adapter.faces.taglib.naming.NamingContainerTag.doStartTag(NamingContainerTag.java:101)
         at jsp_servlet.__login._jsp__tag1(__login.java:165)
         at jsp_servlet.__login._jsp__tag0(__login.java:127)
         Truncated. see log file for complete stacktrace
    >
    *</exception>*
    When I don't use the namingContainer tag everything works fine.
    Any Idea what's going wrong here?
    Thkx in advance
    Edmund
    Edited by: egeesken on 23.06.2010 07:38

    Hello Edmund,
    The "jsf-naming" tag library you are importing is from the WLP "native" JSF 1.1 portlet bridge, which uses an entirely different way to render JSF as portlets than the new JSR329 JSF 1.2 to Java Portlet 2.0 bridge that you are using (the "GenericFacesPortlet"). Unfortunately, the jsf-naming tags are not compatible with the JSR329 bridge.
    I'm not a JSF expert, so unfortunately I can't suggest an equivalent way of doing what you want to do, but I am sure it is possible. Hopefully someone else on here with JSF expertise can help you out.
    Kevin

  • h:commandLink inside t:dataTable

    Hi ,
    I am using Tomahawk datatable and inside this datatable there is JSF HTML commandlink.
    when clicking the record in a datatable my action method is executing for multiple number of times. If there are four results present in datatable my action method is executing for four times. Is there any way to stop multiple calls and should execute only once.
    In JSP
    <t:dataTable id="searchProcCodeResults"     value="#{SearchRatesDataBean.searchResultList}"
              var="searchDetails" rows="10" >
    <h:column id="procCol">
         <h:commandLink id="edit"     action="#{SearchRateProcedureCodeControllerBean.getRatePCProvSpeDetails}">
              <h:outputText id="valueProc" value="#{searchDetails.procCode}" />
                   <f:param name="procedureCode" value="#{searchDetails.procedureCode}" />
                   <f:param name="providerSpecialtyCode" value="#{searchDetails.providerSpecialtyCode}" />
                   <f:param name="lobcode" value="#{searchDetails.lobCode}" />
         </h:commandLink>
    </h:column>
    </t:dataTable>

    take a HtmlDataTable refrece varible in your backing bean and create setter and getter method corresponding to it ,then bind this data table using the binding attibute in your jsp then you can can get the particular row data on calling getRowData() method on HtmlDataTable object and cast it to your's receiving object.

  • Re: Visualize EJB in JSF / J2EE

    You usually access the database and retrieve data in the data-tier. Map the results to -for examle- List<DTO> where each DTO represents one row of the database table and pass it to the backing beans in the business-tier. Let them pass it -unchanged or wrapped in a DataModel- to a h:dataTable in a JSF page in the web-tier.

    Does this mean, that I have to write database specifiy code? What if I want to be database vendor independant? Cant I access a database not the same way as I access database tables with my entity classes?

  • JSF - Client Information

    How can I get the client's hostname, IP Address, browser information, etc? I'd like to do it in JSF, but if JSP is the only way to go -- that works, too.
    Here's what I have so far for the IP:
    FacesContext.getCurrentInstance().getExternalContext().getRequest().getRemoteAddr()But, of course, it doesn't work. Any help would be greatly appreciated.
    Thanks.

    Using scriplet:
    <%
    java.util.Enumeration names = request.getHeaderNames();
    while (names.hasMoreElements()) {
    String name = (String) names.nextElement();
    out.println("<b>" + name + "</b>=" + request.getHeader(name) + "<br>");
    %>
    Using JSTL
    <c:forEach items="${header}" var="h">
    <b>
    <c:out value="${h.key}"/>
    </b>
    =
    <span style="color:Red;">
    <c:out value="${h.value}"/>
    </span>
    </c:forEach>
    Using JSF(without iteration)
    <h:outputText id="header_i" value="#{header.host}"/>
    <h:outputText id="header_i" value="#{header['userAgent']}"/>
    (Iteration may be done using "dataTable" component of JSF)
    And at some JSF code:
    javax.servlet.http.HttpServletRequest request = ((javax.servlet.http.HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest());
    request.getHeader("referer");
    (or simple iteration)
    Regards,
    Oleksa Stelmakh

  • When will new 1.4.2_09 be available?

    Is there a way to tell / guess when a new update to the JVM will be available? I am particularly interested in 1.4.2_09 which has a GC-related fix I am interested in... On a related note, are "beta" versions of these updates available? I see that the fix I am interested in is in 1.4.2_09(b02) target. Is "b02" available for early download? Chris

    Usually update releases are made each 2-3 months. But they aren't accessible via early access program. You need to wait for some time or mail sun directly.

Maybe you are looking for

  • Adobe pdf printer can't open log file

    I am trying to print an Id cs6 file to a pdf file. During the printing process, the progress indicator indicates it prints a book file to about page 23 (of 293) then I get an error message that says acrobat can't open the xxx.log file. The printing p

  • Safari is constantly quitting

    Hello, Could anyone please help me with my safari. I think i have some sort of virus and don't have any idea how to get rid of it. I tried downloading some anti virus apps such as avira and avast. but they won't run or get installed. Here is  is the

  • How calculate the percentage of area...

    Hi, I have 4 tables: Tab AREA_TI LS_ID          FL     AREA EMS00046     P01     2.995,09 EMS00046     P02     0,78 EMS00046     PTE     1.435,48 EMS00046     S01     1.684,80 EMS00046     S02     1.694,12 EMS00050     P01     1.111,60 EMS00050     P

  • User License type, registration info

    Hi, last year I bought Snow Leopard for my MacBook Pro, and I want to find out which type of license I have for Snow Leopard, because my wife now has a Macbook which is still on 10.5. I can't figure out how to look up my registered products on the Ap

  • Why my child or subpages not showing in preview or when published?

    Why are my child or subpages not showing in preview or when published?