Ice:dataTable binding

Hi
I have got problem with dataTable. If I add binding attribute (binding="#{moodContainer.htmlDataTable}") to my view the table isn't displayed.
import com.icesoft.faces.component.ext.HtmlDataTable;
public class MoodContainer {
private HtmlDataTable htmlDataTable;
private int myRowIndex;     
private List<MoodVO> moodContainer = new ArrayList<MoodVO>();
     moodContainer.add(new MoodVO(1,"01.04.2009", Grade.TWO, Weather.SUNNY, true, true, false, true, true, "1234"));
     moodContainer.add(new MoodVO(1,"01.04.2009", Grade.TWO, Weather.SUNNY, true, true, false, true, true, "1234"));
     moodContainer.add(new MoodVO(1,"01.04.2009", Grade.TWO,
     public List<MoodVO> getMoodContainer() {
          return moodContainer;
         public int getMyRowIndex() {
         return htmlDataTable.getRowIndex();
         public void setMyRowIndex(int myRowIndex) {
         this.myRowIndex = myRowIndex;
     public HtmlDataTable getHtmlDataTable() {
          return htmlDataTable;
     public void setHtmlDataTable(HtmlDataTable htmlDataTable) {
          this.htmlDataTable = htmlDataTable;
     }I also tried to use UIData instead of HtmlDataTable but it doesn't work for me.
Do you know what I am doing wrong?
Thanks in advance
Mariusz
P.S. I am using facelets and ICEfaces 1.8.0
Edited by: syllepsa on Jun 24, 2009 11:49 PM
Edited by: syllepsa on Jun 24, 2009 11:50 PM

Hi syllepsa,
Your coding part not display array list data assigning to htmlDataTable . Only creating moodContainer array list.
kush

Similar Messages

  • Row ice:datatable

    Saludos a la comunidad. Tengo el siguiente problema. En una pagina .jspx, tengo un ice:form con determinadas dimensiones. Con un ice:datatable muestro los valores de un archivo y se visualizan por ejemplo 20 lineas (rows), pero necesito modificar la altura de las lineas para que en el mismo form se visualicen mas lineas. Esto significa que las lineas serán más angostas pero modificando el font se puede representar bien. Esto lo puedo hacer con un h:datatable pero pierdo las habilidades del ice:datatable.
    ¿Existe alguna forma de poder modificar la altura?, he recorrido varias paginas y no encuentro cómo hacerlo.
    Desde ya muchas gracias.
    Larry

    Hi syllepsa,
    Your coding part not display array list data assigning to htmlDataTable . Only creating moodContainer array list.
    kush

  • DataTable binding doesn't work dependably

    hi all,
    i'm observing a strange behaviour on my JSF page. i use a dynamic datatable for displaying data. unfortunately the getter of the table isn't called (after the method call / rerender of the page) so the table stays emtpy. the bean providing the collection+design of the datatable works as expected as other pages also reffer to it and show the table correctly...
    Any hints welcome.

    Are you talking about the binding attribute or the value attribute of the table? Which getter isn't called? Some code would help, as noted above.

  • Component binding inside h:dataTable fails

    Hi,
    I'd like to create a component binding for each commandLink to a distinct child bean inside an h:dataTable like so:
    <h:dataTable value="#{parent.children}" var="child">
        <h:column>
            <h:commandLink binding="#{child.command1}" value="do it to it for #{child}" action="#{child.action}"/>
        </h:column>
    </h:dataTable>But whenever I try to render this page I get an exception stating that "child is null" and binding cannot be performed. If I remove 'binding="#{child.command1}"', however, everything works fine. I guess this is happening because 'var="child"' in h:dataTable gets evaluated after bindings are created. How can I get around that - I really need to be able to refer distinctly refer to UIComponents in each row.
    Confused...
    thanks
    -nikita

    I created a seperate class to handle the requests ActivationRequestBuilder and put the code in there .
    if you want to refer to each row in the backing bean .
    create a variable of type HtmlDataTable .
    private HtmlDataTable tenantDataTable;
    set up accessor and mutator methods for this variable.
    In your jsp in the DataTable
    <h:dataTable binding="#{activationRequestBuilder.tenantDataTable}"
    <h:commandLink title="Delete Tenant section"
    immediate="true" action="#{activationRequestBuilder.deleteTenantLocationSection}">
    public String deleteTenantLocationSection(){
    (TenantLocationRecordBean) this.getTenantDataTable().getRowData();
    This is just snippets of code but you should get the idea of what I have done here .I had multiple sections in a page so each row was a TenantLocationRecordBean .

  • ValueBindingImpl.setValue error on binding for dataTable

    HI,
    I am getting the following error when trying to do a datatable binding.
    I am using WSAD 5.1.2 , JSF 1.0 .
    In the jsp page:
    <h:dataTable id="entitlementsId" value="#{header.entitlementsDummy}" binding="#{header.entitlementsLinksData}" var="entitlement"
                                        border="0" cellspacing="0" cellpadding="0" />In my managed bean code,I am trying to add a dynamic no of columns to the datatable:
    public void setEntitlementsLinksData(HtmlDataTable table) {
              if (table == null) {
                   table = new HtmlDataTable();
                   table.setRendererType(null);
              //TODO: when to clear and when to add
              List tableComponents = table.getChildren();
              tableComponents.clear();
              entitlements = getEntitlements();//Arraylist with String returned
              String var = table.getVar();
              //TODO: check this ??
              table.setValue(entitlements);
              table.setRows(1);
              HtmlOutputText textComponent = null;
              HtmlOutputLink linkComponent = null;
              UIColumn col;
              UIOutput out;
              for (int j = 0; j < 1; j++) {
                   String entitlement = (String) entitlements.get(j);
                   linkComponent = new HtmlOutputLink();
                   linkComponent.setId(var + "link" + j);
                   linkComponent.setValue(entitlement);
                   linkComponent.setStyleClass("navlink");
                   /* create the text label */
                   textComponent = new HtmlOutputText();
                   textComponent.setId(var + "text" + j);
                   textComponent.setValue(entitlement);
                   /* add the label to the link component*/
                   linkComponent.getChildren().add(textComponent);
                   col = new UIColumn();
                   col.setId(var + "col" + j);
                   /*   add the link component to the column */
                   col.getChildren().add(linkComponent);
                   /*   add the column to the table */
                   tableComponents.add(col);
         }Error :
    javax.faces.el.EvaluationException: java.lang.UnsupportedOperationException
         at com.sun.faces.el.ValueBindingImpl.setValue(ValueBindingImpl.java:240)
         at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:491)
         at javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:1013)
         at javax.faces.webapp.UIComponentTag.createChild(UIComponentTag.java:1040)
         at javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:730)
         at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:423)
         at com.sun.faces.taglib.html_basic.DataTableTag.doStartTag(DataTableTag.java:467)
         at org.apache.jsp._EnterApplicationHeader._jspService(_EnterApplicationHeader.java:229)
         at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    Caused by: java.lang.UnsupportedOperationException
         at java.util.AbstractMap.put(AbstractMap.java:235)
         at com.sun.faces.el.PropertyResolverImpl.setValue(PropertyResolverImpl.java:158)
         at com.ibm.faces.databind.SelectItemsPropResolver.setValue(SelectItemsPropResolver.java:63)
         at com.ibm.faces.application.SuperPropertyResolver.setValue(SuperPropertyResolver.java:101)
         at com.sun.faces.el.impl.ArraySuffix.setValue(ArraySuffix.java:192)
         at com.sun.faces.el.impl.ComplexValue.setValue(ComplexValue.java:171)
         at com.sun.faces.el.ValueBindingImpl.setValue(ValueBindingImpl.java:212)Thanks,
    Vijay

    A couple of things that might cause the PropertyResolver to break:
    1. Does your 'header' bean and instanceof Map? If so, the PropertyResolver spec says if the bean is a map, take the property (entitlementsLinksData) and 'put' it into the Map for a set, the same thing goes for a 'get' with beans of type Map.
    2. If that's not the case, you can try grabbing a recent snapshot of JSF-RI from https://javaserverfaces.dev.java.net/ which has a complete rewrite of expression handling that fixed a few bugs.

  • Datatable data binding seems useless

    I have the following inside of form tags
    <h:commandButton value="submit" action="#{mybean.examinedata}"/>
    <h:dataTable binding="#{mybean.data}" id="table1" value="#{mybean.loaddata}" var="payment">
    <h:column>
         <h:outputText value="#{payment.title}"/>
    </h:column>
    </h:dataTable>
    When the submit button is clicked and the action method mybean.examinedata is run how to I access the data stored in the data binding mybean.data ?

    I now can access all rows by setting
    mybean.setRowIndex(0); to the row I wish to access. The next problem I do not understand is how to access the column data.
    where mybean.getrowdata() returns the row of data
    where mybean.getrowdata().toString() returns
    " {title=mytitle, transactionid=80820-92426} "
    I have tried to cast the row data to a class
    rowdata mydata = (rowdata) mybean.getrowdata();
    where rowdata is
    public class rowdata {
    private String title;
    private String transactionid;
    public rowdata(String title,String transactionid){
    this.title=title;
    this.transactionid=transactionid;
    also I have getter and setter for both title & transactionid
    I get
    javax.faces.el.EvaluationException: java.lang.ClassCastException
    Thanks ...

  • Jsf datatable inside datatable component rendering problem.

    I am creating an online survey application using JSF with IceFaces component library. The survey can have any number of questions. Each question can be any one of the types checkbox, radio button, etc with multiple options.
    For this, I am using a datatable to dynamically add a question to the survey. Inside that datatable, I am using another datatable to add option to the survey.
    Now the problem is, if I keep on click on add question button, in the outer data table, question is being added without any issue. Once I click on inner data table to add a option to any of the added questions, I am able to add. But after that, if I click again on add question button, it is not working.
    This is my xhtml code:
    <ice:dataTable id="icePnlQuestionAdd" var="questAdd" value="#{createSurveyManagedBean.surveyQuestionList}">
    <ice:column>
    <table border="0" cellspacing="0" cellpadding="0">
    <tr>
    <th><ice:outputText value="Question English" style="white-space: nowrap;" /></th>                                        
    <td colspan="15">                              
    <ice:inputText id="QuestionEn" style="width:485px;" value="#{questAdd.questionEn}" />
    </td>
    </tr>
    <tr>
    <ice:dataTable id="icePnlOptionAdd" var="optionAdd" value="#{questAdd.surveyQuestionOptionList}">                               <ice:column>
    <th><ice:outputText value="Option " /></th>
    <td><ice:inputText id="OptionEn" value="#{optionAdd.optionEn}" /></td>
    </ice:column>
    </ice:dataTable>
    </tr>
    </table>
    </ice:column>
    </ice:dataTable>
    This is the add question method:
    public String addQuestion() {
    SurveyDTO addSurveyQuestionDTO = new SurveyDTO();          
    questionNum = surveyQuestionList.size();          
    addSurveyQuestionDTO.setQuestionNum(questionNum);
    surveyQuestionList.add(addSurveyQuestionDTO);
    return "createSurvey";
    This is the add option method:
    public String addOption() {
    FacesContext context = FacesContext.getCurrentInstance();          
    if (context.getExternalContext().getRequestParameterMap().get("questionNum") != null) {
    String questionNum = (String) context.getExternalContext().getRequestParameterMap().get("questionNum");
    int selectedQuestionNum = Integer.valueOf(questionNum);                    
    SurveyQuestionOptionDTO surveyQuestionOptionDTO = new SurveyQuestionOptionDTO();
    surveyQuestionList.get(selectedQuestionNum).getSurveyQuestionOptionList().add(surveyQuestionOptionDTO);
    return "createSurvey";
    }

    Bind the h:datatable in the jsp to UIDataTable component in your java code. Then when the action method is invoked, use DataTable.getWrappedObject() to get the model. Cast the model to whatever your type is (List, Array...) and then iterate through the model to process individual rows.

  • Problem with selectOneMenu in Datatable

    Hi
    I have the following datatable that binds correctly to a set of Game objects.
    I need to have a dropdown with the numbers 1 to 10 as items which is bound to each dataItem's newRating field.
    However there is some problem with the dropdown that i can't figure out. The datatable stops rendering when it hits the first dropdown.
    At the moment,
    The new rating field in the Game class is of type SelectItem with the appropriate get and set methods.
    Could anyone please point out what I'm doing wrong
    Thanks.
    Here is the relevant part in Home.jsp:
                                              <h:dataTable binding="#{Home.newGamesTable}" id="newGamesTable" value="#{Home.newGames}" var="dataItem">
                                                                <h:column>
                                                                    <f:facet name="header">
                                                                        <h:outputText value=""/>
                                                                    </f:facet>
                                                                    <h:panelGroup layout="block" styleClass="new_game_main">
                                                                        <h:outputText styleClass="new_game_title" value="#{dataItem.title}"/>
                                                                        <h:outputText escape="false" styleClass="new_game_label" value="Date added: "/>
                                                                        <h:outputText styleClass="new_game_data" value="#{dataItem.dateString}"/>
                                                                        <h:outputText escape="false" styleClass="new_game_label" value="Average Rating:"/>
                                                                        <h:outputText styleClass="new_game_data" value="#{dataItem.rating}"/>
                                                                        <h:outputText styleClass="new_game_label" value="Uploaded by:"/>
                                                                        <h:outputText styleClass="new_game_data" value="#{dataItem.userName}"/>
                                                                        <h:commandLink styleClass="new_game_label" value="Play Now!"/>
                                                                        <h:selectOneMenu styleClass="new_game_rating" value="#{dataItem.newRating}">
                                                                            <f:selectItems value="#{ratingItems}" />
                                                                        </h:selectOneMenu>
                                                                        <h:commandLink action="#{Home.rateNewGame}" styleClass="message_link" value="Rate"/>
                                                                    </h:panelGroup>
                                                                </h:column>
                                                            </h:dataTable>and Home.java
    private List<SelectItem> ratingItems = null;
         public List<SelectItem> getRatingItems()
             if (ratingItems == null)
                 ratingItems = new ArrayList<SelectItem>();
                 for (int i = 1; i <= 10; i++)
                     SelectItem item = new SelectItem();
                     item.setValue(Integer.valueOf(i));                        
                     ratingItems.add(item);
             return ratingItems;
         public void setRatingItems(List<SelectItem> items)
             ratingItems = items;        
        private List<Game> newGames = null;
        private boolean hasNewGames;
        public List<Game> getNewGames()
            if (newGames ==null)
                newGames = DataFactory.getNewGames();           
            hasNewGames = !newGames.isEmpty();
            return newGames;
        }

    What do you mean by stops rendering? Can you paste the relevant portion of the output (from view source in the browser).

  • DataTable Exception: Invalid operation for the current cursor position

    I have a JSF application that lists rows from a view in a SQL Server database. I have set up a commandLinks in an extra columns.
    The data is displayed properly, but when I select one of the commandLinks I get the "Invalid operation for the current cursor position" exception.
    Here's the source
    Domain.jsp
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
            <html lang="en-US" xml:lang="en-US">
                <head>
                    <meta content="no-cache" http-equiv="Cache-Control"/>
                    <meta content="no-cache" http-equiv="Pragma"/>
                    <title>Page1 Title</title>
                    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
                </head>
                <body style="-rave-layout: grid">
                    <h:form binding="#{Domains.form1}" id="form1">
                        <h:dataTable binding="#{Domains.dataTable1}" headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd"
                            value="#{Domains.dataTable1Model}" var="currentRow">
                            <h:column binding="#{Domains.column9}" id="column9">
                                <h:selectBooleanCheckbox binding="#{Domains.checkbox2}" id="checkbox2"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{Domains.outputText9}" id="outputText9" value="Select"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{Domains.column10}" id="column10">
                                <f:facet name="header">
                                    <h:outputText binding="#{Domains.outputText4}" id="outputText4" value="Name"/>
                                </f:facet>
                                <h:commandLink action="#{Domains.groupList}" binding="#{Domains.linkAction1}" id="linkAction1">
                                    <h:graphicImage binding="#{Domains.image1}" id="image1" url="resources/images/domain16.gif" value="resources/images/domain16.gif"/>
                                    <h:outputText binding="#{Domains.linkAction1Text}" id="linkAction1Text" value="#{currentRow['name']}"/>
                                </h:commandLink>
                            </h:column>
                            <h:column binding="#{Domains.column3}" id="column3">
                                <h:outputText binding="#{Domains.outputText5}" id="outputText5" value="#{currentRow['description']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{Domains.outputText6}" id="outputText6" value="Description"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{Domains.column4}" id="column4">
                                <h:selectBooleanCheckbox binding="#{Domains.checkbox1}" id="checkbox1" value="#{Domains.domainviewRowSet.currentRow['enabled']}==1"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{Domains.outputText8}" id="outputText8" value="Enabled"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{Domains.column7}" id="column7">
                                <h:outputText binding="#{Domains.outputText13}" id="outputText13" value="#{currentRow['userCount']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{Domains.outputText14}" id="outputText14" value="Users"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{Domains.column8}" id="column8">
                                <h:outputText binding="#{Domains.outputText15}" id="outputText15" value="#{currentRow['groupCount']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{Domains.outputText16}" id="outputText16" value="Groups"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{Domains.column5}" id="column5">
                                <f:facet name="header">
                                    <h:outputText binding="#{Domains.outputText17}" id="outputText17" value="Actions"/>
                                </f:facet>
                                <h:commandLink action="#{Domains.editDomain}" binding="#{Domains.linkAction2}" id="linkAction2">
                                    <h:graphicImage binding="#{Domains.image2}" id="image2" title="Edit" value="resources/images/edit.gif"/>
                                </h:commandLink>
                                <h:commandLink binding="#{Domains.linkAction3}" id="linkAction3">
                                    <h:graphicImage binding="#{Domains.image3}" id="image3" title="View" url="resources/images/view.gif" value="resources/images/view.gif"/>
                                </h:commandLink>
                                <h:commandLink binding="#{Domains.linkAction4}" id="linkAction4">
                                    <h:graphicImage binding="#{Domains.image4}" id="image4" title="Delete" value="resources/images/delete.gif"/>
                                </h:commandLink>
                            </h:column>
                        </h:dataTable>
                    </h:form>
                </body>
            </html>
        </f:view>
    </jsp:root>
    Domains.java
    * Page1.java
    * Created on October 28, 2004, 12:45 PM
    * Copyright Gordon.Bell
    package usergroupmgt;
    import javax.faces.*;
    import com.sun.jsfcl.app.*;
    import javax.faces.component.html.*;
    import com.sun.jsfcl.data.*;
    import javax.faces.component.*;
    import com.sun.sql.rowset.*;
    import javax.faces.convert.*;
    public class Domains extends AbstractPageBean {
        // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
        private int __placeholder;
        private HtmlForm form1 = new HtmlForm();
        public HtmlForm getForm1() {
            return form1;
        public void setForm1(HtmlForm hf) {
            this.form1 = hf;
        private HtmlDataTable dataTable1 = new HtmlDataTable();
        public HtmlDataTable getDataTable1() {
            return dataTable1;
        public void setDataTable1(HtmlDataTable hdt) {
            this.dataTable1 = hdt;
        private JdbcRowSetXImpl domainviewRowSet = new JdbcRowSetXImpl();
        public JdbcRowSetXImpl getDomainviewRowSet() {
            return domainviewRowSet;
        public void setDomainviewRowSet(JdbcRowSetXImpl jrsxi) {
            this.domainviewRowSet = jrsxi;
        private HtmlOutputText outputText4 = new HtmlOutputText();
        public HtmlOutputText getOutputText4() {
            return outputText4;
        public void setOutputText4(HtmlOutputText hot) {
            this.outputText4 = hot;
        private UIColumn column3 = new UIColumn();
        public UIColumn getColumn3() {
            return column3;
        public void setColumn3(UIColumn uic) {
            this.column3 = uic;
        private HtmlOutputText outputText5 = new HtmlOutputText();
        public HtmlOutputText getOutputText5() {
            return outputText5;
        public void setOutputText5(HtmlOutputText hot) {
            this.outputText5 = hot;
        private HtmlOutputText outputText6 = new HtmlOutputText();
        public HtmlOutputText getOutputText6() {
            return outputText6;
        public void setOutputText6(HtmlOutputText hot) {
            this.outputText6 = hot;
        private UIColumn column4 = new UIColumn();
        public UIColumn getColumn4() {
            return column4;
        public void setColumn4(UIColumn uic) {
            this.column4 = uic;
        private HtmlOutputText outputText8 = new HtmlOutputText();
        public HtmlOutputText getOutputText8() {
            return outputText8;
        public void setOutputText8(HtmlOutputText hot) {
            this.outputText8 = hot;
        private UIColumn column7 = new UIColumn();
        public UIColumn getColumn7() {
            return column7;
        public void setColumn7(UIColumn uic) {
            this.column7 = uic;
        private HtmlOutputText outputText13 = new HtmlOutputText();
        public HtmlOutputText getOutputText13() {
            return outputText13;
        public void setOutputText13(HtmlOutputText hot) {
            this.outputText13 = hot;
        private HtmlOutputText outputText14 = new HtmlOutputText();
        public HtmlOutputText getOutputText14() {
            return outputText14;
        public void setOutputText14(HtmlOutputText hot) {
            this.outputText14 = hot;
        private UIColumn column8 = new UIColumn();
        public UIColumn getColumn8() {
            return column8;
        public void setColumn8(UIColumn uic) {
            this.column8 = uic;
        private HtmlOutputText outputText15 = new HtmlOutputText();
        public HtmlOutputText getOutputText15() {
            return outputText15;
        public void setOutputText15(HtmlOutputText hot) {
            this.outputText15 = hot;
        private HtmlOutputText outputText16 = new HtmlOutputText();
        public HtmlOutputText getOutputText16() {
            return outputText16;
        public void setOutputText16(HtmlOutputText hot) {
            this.outputText16 = hot;
        private HtmlSelectBooleanCheckbox checkbox1 = new HtmlSelectBooleanCheckbox();
        public HtmlSelectBooleanCheckbox getCheckbox1() {
            return checkbox1;
        public void setCheckbox1(HtmlSelectBooleanCheckbox hsbc) {
            this.checkbox1 = hsbc;
        private UIColumn column5 = new UIColumn();
        public UIColumn getColumn5() {
            return column5;
        public void setColumn5(UIColumn uic) {
            this.column5 = uic;
        private UIColumn column9 = new UIColumn();
        public UIColumn getColumn9() {
            return column9;
        public void setColumn9(UIColumn uic) {
            this.column9 = uic;
        private HtmlSelectBooleanCheckbox checkbox2 = new HtmlSelectBooleanCheckbox();
        public HtmlSelectBooleanCheckbox getCheckbox2() {
            return checkbox2;
        public void setCheckbox2(HtmlSelectBooleanCheckbox hsbc) {
            this.checkbox2 = hsbc;
        private HtmlOutputText outputText9 = new HtmlOutputText();
        public HtmlOutputText getOutputText9() {
            return outputText9;
        public void setOutputText9(HtmlOutputText hot) {
            this.outputText9 = hot;
        private UIColumn column10 = new UIColumn();
        public UIColumn getColumn10() {
            return column10;
        public void setColumn10(UIColumn uic) {
            this.column10 = uic;
        private RowSetDataModel dataTable1Model = new RowSetDataModel();
        public RowSetDataModel getDataTable1Model() {
            return dataTable1Model;
        public void setDataTable1Model(RowSetDataModel rsdm) {
            this.dataTable1Model = rsdm;
        private BooleanConverter booleanConverter1 = new BooleanConverter();
        public BooleanConverter getBooleanConverter1() {
            return booleanConverter1;
        public void setBooleanConverter1(BooleanConverter bc) {
            this.booleanConverter1 = bc;
        private HtmlCommandLink linkAction1 = new HtmlCommandLink();
        public HtmlCommandLink getLinkAction1() {
            return linkAction1;
        public void setLinkAction1(HtmlCommandLink hcl) {
            this.linkAction1 = hcl;
        private HtmlOutputText linkAction1Text = new HtmlOutputText();
        public HtmlOutputText getLinkAction1Text() {
            return linkAction1Text;
        public void setLinkAction1Text(HtmlOutputText hot) {
            this.linkAction1Text = hot;
        private HtmlGraphicImage image1 = new HtmlGraphicImage();
        public HtmlGraphicImage getImage1() {
            return image1;
        public void setImage1(HtmlGraphicImage hgi) {
            this.image1 = hgi;
        private HtmlCommandLink linkAction2 = new HtmlCommandLink();
        public HtmlCommandLink getLinkAction2() {
            return linkAction2;
        public void setLinkAction2(HtmlCommandLink hcl) {
            this.linkAction2 = hcl;
        private HtmlGraphicImage image2 = new HtmlGraphicImage();
        public HtmlGraphicImage getImage2() {
            return image2;
        public void setImage2(HtmlGraphicImage hgi) {
            this.image2 = hgi;
        private HtmlCommandLink linkAction3 = new HtmlCommandLink();
        public HtmlCommandLink getLinkAction3() {
            return linkAction3;
        public void setLinkAction3(HtmlCommandLink hcl) {
            this.linkAction3 = hcl;
        private HtmlGraphicImage image3 = new HtmlGraphicImage();
        public HtmlGraphicImage getImage3() {
            return image3;
        public void setImage3(HtmlGraphicImage hgi) {
            this.image3 = hgi;
        private HtmlCommandLink linkAction4 = new HtmlCommandLink();
        public HtmlCommandLink getLinkAction4() {
            return linkAction4;
        public void setLinkAction4(HtmlCommandLink hcl) {
            this.linkAction4 = hcl;
        private HtmlGraphicImage image4 = new HtmlGraphicImage();
        private HtmlOutputText outputText17 = new HtmlOutputText();
        public HtmlOutputText getOutputText17() {
            return outputText17;
        public void setOutputText17(HtmlOutputText hot) {
            this.outputText17 = hot;
        public HtmlGraphicImage getImage4() {
            return image4;
        public void setImage4(HtmlGraphicImage hgi) {
            this.image4 = hgi;
        // </editor-fold>
        public Domains() {
            // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
            try {
                domainviewRowSet.setDataSourceName("java:comp/env/jdbc/HBird");
                domainviewRowSet.setCommand("SELECT ALL dbo.DomainView.id, dbo.DomainView.name, dbo.DomainView.description, dbo.DomainView.enabled, dbo.DomainView.created, dbo.DomainView.modified, dbo.DomainView.userCount, dbo.DomainView.groupCount  FROM dbo.DomainView");
                dataTable1Model.setDataCacheKey("com.sun.datacache.Domains.domainviewRowSet");
                dataTable1Model.setRowSet(domainviewRowSet);
                dataTable1Model.setSchemaName("");
                dataTable1Model.setTableName("");
            } catch (Exception e) {
                log("Page1 Initialization Failure", e);
                throw e instanceof javax.faces.FacesException ? (FacesException) e : new FacesException(e);
            // </editor-fold>
            // Additional user provided initialization code
    //        try {
    //            domainviewRowSet.execute();
    //            domainviewRowSet.next();
    //        } catch (Exception ex) {
    //            throw new FacesException(ex);
        protected usergroupmgt.ApplicationBean1 getApplicationBean1() {
            return (usergroupmgt.ApplicationBean1)getBean("ApplicationBean1");
        protected usergroupmgt.SessionBean1 getSessionBean1() {
            return (usergroupmgt.SessionBean1)getBean("SessionBean1");
         * Bean cleanup.
        protected void afterRenderResponse() {
            domainviewRowSet.close();
        public String groupList() {
            // User event code here...
            return "groupList";
        public String editDomain() {
            // User event code here...
            return "editDomain";
    }and the exception stack:
    Stack trace:
    com.sun.jsfcl.data.ResultSetPropertyResolver$RowData.getData(Unknown Source)
    com.sun.jsfcl.data.ResultSetPropertyResolver.getValue(Unknown Source)
    com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
    com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
    com.sun.faces.el.MixedELValueBinding.getValue(MixedELValueBinding.java:80)
    javax.faces.component.UIOutput.getValue(UIOutput.java:147)
    javax.faces.component.UIInput.validate(UIInput.java:639)
    javax.faces.component.UIInput.executeValidate(UIInput.java:838)
    javax.faces.component.UIInput.processValidators(UIInput.java:412)
    javax.faces.component.UIData.iterate(UIData.java:969)
    javax.faces.component.UIData.processValidators(UIData.java:781)
    javax.faces.component.UIForm.processValidators(UIForm.java:170)
    javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:904)
    javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:342)
    com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:78)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:324)
    org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
    java.security.AccessController.doPrivileged(AccessController.java:-2)
    javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
    org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:236)
    org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
    org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:145)
    java.security.AccessController.doPrivileged(AccessController.java:-2)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:141)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:214)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:168)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:133)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:539)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
    com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
    com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:254)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
    com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:114)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:109)
    com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:107)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:522)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:936)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:165)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:683)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:604)
    org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:542)
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:647)
    java.lang.Thread.run(Thread.java:534)Any help is appreciated.

    Hi,
    Looks like some inconsistency in the jsp source:
    in the 2nd link the url property is set. I don't think
    you need to set this.
    I couldn't tell what action you want to occur when you
    click. If you want some action to occur such as
    navigating to another page then you can use Page Navigation. Then you would need an action handler
    for the LinkAction component.
    <h:commandLink action="#{Domains.editDomain}" binding="#{Domains.linkAction2}" id="linkAction2">
    <h:graphicImage binding="#{Domains.image2}" id="image2" title="Edit" value="resources/images/edit.gif"/>
    </h:commandLink>
    <h:commandLink binding="#{Domains.linkAction3}" id="linkAction3">
    <h:graphicImage binding="#{Domains.image3}" id="image3" title="View" url="resources/images/view.gif" value="resources/images/view.gif"/>
    </h:commandLink>
    <h:commandLink binding="#{Domains.linkAction4}" id="linkAction4">
    <h:graphicImage binding="#{Domains.image4}" id="image4" title="Delete" value="resources/images/delete.gif"/>
    </h:commandLink>
    John
    JSC QA

  • How to add a blank row into a datatable

    i hava adatatable which contains the datas from database.i need to add a new data so that i need a blank row which contain the same number of columns in the existing datatable.
    Pls Help..

    sorry i am a beginner in jsf..
    In the crud Example i saw a code in MyCrudBean.java.i wrote the code like that but the same stage only one row is coming i cant add n items .
    * Department.java
    * Created on Nov 22, 2007, 4:43:12 PM
    package datatable;
    import Item.DeptDatabase;
    import com.sun.rave.web.ui.appbase.AbstractPageBean;
    import com.sun.webui.jsf.component.Body;
    import com.sun.webui.jsf.component.Form;
    import com.sun.webui.jsf.component.Head;
    import com.sun.webui.jsf.component.Html;
    import com.sun.webui.jsf.component.Link;
    import com.sun.webui.jsf.component.Page;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.FacesException;
    import javax.faces.component.html.HtmlDataTable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    public class Department extends AbstractPageBean {
    Connection con = null;
    PreparedStatement StmtRateSel = null;
    ResultSet rs = null;
    private List<DeptDatabase> list = new ArrayList();
    private int addCount = 1;
    private HtmlDataTable myDataTable;
    private static final int DEFAULT_TABLE_ROWS = 10;
    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
    * <p>Automatically managed component initialization. <strong>WARNING:</strong>
    * This method is automatically generated, so any user-specified code inserted
    * here is subject to being replaced.</p>
    private void _init() throws Exception {
    private Page page1 = new Page();
    public Page getPage1() {
    return page1;
    public void setPage1(Page p) {
    this.page1 = p;
    private Html html1 = new Html();
    public Html getHtml1() {
    return html1;
    public void setHtml1(Html h) {
    this.html1 = h;
    private Head head1 = new Head();
    public Head getHead1() {
    return head1;
    public void setHead1(Head h) {
    this.head1 = h;
    private Link link1 = new Link();
    public Link getLink1() {
    return link1;
    public void setLink1(Link l) {
    this.link1 = l;
    private Body body1 = new Body();
    public Body getBody1() {
    return body1;
    public void setBody1(Body b) {
    this.body1 = b;
    private Form form1 = new Form();
    public Form getForm1() {
    return form1;
    public void setForm1(Form f) {
    this.form1 = f;
    // </editor-fold>
    * <p>Construct a new Page bean instance.</p>
    public Department() {
    public void deptsave() throws SQLException{
    connection();
    StmtRateSel      = con.prepareStatement("execute prcPnsDepartmentIns");
    rs = StmtRateSel.executeQuery();
    con.close();
    @Override
    public void init() {
    // Perform initializations inherited from our superclass
    super.init();
    // Perform application initialization that must complete
    // before managed components are initialized
    // TODO - add your own initialiation code here
    // <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
    // Initialize automatically managed components
    // Note - this logic should NOT be modified
    try {
    _init();
    } catch (Exception e) {
    log("Department Initialization Failure", e);
    throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
    // </editor-fold>
    // Perform application initialization that must complete
    // after managed components are initialized
    // TODO - add your own initialization code here
    * <p>Callback method that is called after the component tree has been
    * restored, but before any event processing takes place. This method
    * will <strong>only</strong> be called on a postback request that
    * is processing a form submit. Customize this method to allocate
    * resources that will be required in your event handlers.</p>
    @Override
    public void preprocess() {
    * <p>Callback method that is called just before rendering takes place.
    * This method will <strong>only</strong> be called for the page that
    * will actually be rendered (and not, for example, on a page that
    * handled a postback and then navigated to a different page). Customize
    * this method to allocate resources that will be required for rendering
    * this page.</p>
    @Override
    public void prerender() {
    * <p>Callback method that is called after rendering is completed for
    * this request, if <code>init()</code> was called (regardless of whether
    * or not this was the page that was actually rendered). Customize this
    * method to release resources acquired in the <code>init()</code>,
    * <code>preprocess()</code>, or <code>prerender()</code> methods (or
    * acquired during execution of an event handler).</p>
    @Override
    public void destroy() {
    * <p>Return a reference to the scoped data bean.</p>
    * @return reference to the scoped data bean
    protected SessionBean1 getSessionBean1() {
    return (SessionBean1) getBean("SessionBean1");
    * <p>Return a reference to the scoped data bean.</p>
    * @return reference to the scoped data bean
    protected RequestBean1 getRequestBean1() {
    return (RequestBean1) getBean("RequestBean1");
    * <p>Return a reference to the scoped data bean.</p>
    * @return reference to the scoped data bean
    protected ApplicationBean1 getApplicationBean1() {
    return (ApplicationBean1) getBean("ApplicationBean1");
    private void connection() {
    try{
    Context ctx = new InitialContext();
    System.out.println("context"+ctx);
    if(ctx == null )
    throw new Exception("Boom - No Context");
    DataSource ds = (DataSource)ctx.lookup("BiteRiteJNDI");
    if (ds != null) {
    con = ds.getConnection();
    System.out.println("connnn"+con);
    catch(Exception e)
    {System.out.println(e);}
    public void addDataItem() {
    while (addCount-- > 0) {
    DeptDatabase myNewDataItem = new DeptDatabase();
    //myNewDataItem.setEditMode(true);
    list.add(myNewDataItem);
    //log(myDataList);
    // Reset counter and go to last page.
    addCount = 1;
    // log(myDataList);
    // Reset counter and go to last page.
    //addCount = DEFAULT_ADD_COUNT;
    pageLast();
    System.out.println("in add itm");
    // list.add(new DeptDatabase());
    public List getListtt(){
    return list;
    public HtmlDataTable getMyDataTable() {
    if (myDataTable == null) {
    myDataTable = new HtmlDataTable();
    myDataTable.setRows(DEFAULT_TABLE_ROWS);
    return myDataTable;
    private static void log(Object object) {
    System.out.println("bejoy"+new Exception().getStackTrace()[1].getMethodName() + ": " + object);
    public void pageLast() {
    System.out.println("in Page last");
    int count = myDataTable.getRowCount();
    System.out.println("count"+count);
    int rows = myDataTable.getRows();
    System.out.println("rows"+rows);
    if (rows != 0) { // Prevent ArithmeticException: / by zero.
    System.out.println("not equals zero");
    myDataTable.setFirst(count - ((count % rows != 0) ? count % rows : rows));
    log(new Integer(myDataTable.getFirst()));
    public void setListtt(List<DeptDatabase> list) {
    this.list = list;
    * CRUD table: set datatable.
    * @param myDataTable The datatable.
    public void setMyDataTable(HtmlDataTable myDataTable) {
    this.myDataTable = myDataTable;
    jsp
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
    Document : Department
    Created on : Nov 22, 2007, 4:43:11 PM
    Author : Administrator
    -->
    <jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
    <webuijsf:page binding="#{Department.page1}" id="page1">
    <webuijsf:html binding="#{Department.html1}" id="html1">
    <webuijsf:head binding="#{Department.head1}" id="head1">
    <webuijsf:link binding="#{Department.link1}" id="link1" url="/resources/stylesheet.css"/>
    </webuijsf:head>
    <webuijsf:body binding="#{Department.body1}" id="body1" style="-rave-layout: grid">
    <webuijsf:form binding="#{Department.form1}" id="form1">
    <h:dataTable binding="#{Department.myDataTable}" id="myDataTable" value="#{Department.listtt}" var="dataItem">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Departments"/>
    </f:facet>
    <h:inputText value="#{dataItem.department}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="StockItem"/>
    </f:facet>
    <h:inputText value="#{dataItem.stockItem}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="StockUnit"/>
    </f:facet>
    <h:inputText value="#{dataItem.stockUnit}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="MaxStock"/>
    </f:facet>
    <h:inputText value="#{dataItem.maxStock}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="MinStock"/>
    </f:facet>
    <h:inputText value="#{dataItem.minStock}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="ReorderLevel"/>
    </f:facet>
    <h:inputText value="#{dataItem.reorderlevel}"/>
    </h:column>
    </h:dataTable>
    <h:commandButton action="#{Department.addDataItem}" value="Add"/>
    </webuijsf:form>
    </webuijsf:body>
    </webuijsf:html>
    </webuijsf:page>
    </f:view>
    </jsp:root>
    i dont know wats the problem??
    pls send a sample code to add n items

  • Comboboxes are not set  on the 1st time a row is clicked in the dataTable

    I have somewhat the following setup:
    I have a DataTable that is filled with a listof objects, a actionListener is handeled when a row is clicked.
    Under the Table there are two ComboBoxes (lets call them Category and Item) that get their values from lists of Objects. The values of the list that backs the Item combo depend on the selected value of the Category combo.
    Lets assume the values look like this:
    CategoryA
    ---ItemA1
    ---ItemA2
    CategoryB
    ---ItemB1
    ---ItemB2
    Together with some textboxes, they should represent the values of the clicked row in the Table.
    Now the problem:
    When the comboboxes have a different value than the row that is be&iuml;ng selected the values of the comboboxes and textboxes are not set correctly until the 3rd time the row is clicked.
    It also doesn't go into the onClickMehod in the backing bean before the 3rd click. This is checked by a logger.
    an example:
    before clicking, the category combo is set to "CategoryB", the Item combo is set to "ItemB1" and the textboxes are empty. The row that is going to be clicked has as its category "CategoryA" and as its Item "ItemA1"
    1st click:
    the form still shows the values like they were before clicking, the log doesn't show that the method is triggered
    2nd click:
    the Item combo is set to "ItemA1", the category is still set to "CategoryB", the textBoxes are still empty. The log still doesn't show that the method is triggered
    3rd click:
    the Category combo is set to "CategoryA", the Item combo is set to "ItemA1", the textboxes also have their correct values.
    the code is as followed:
    JSP:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head></head>
    <body>
    <f:view>
    <h:form binding="#{backingBean.pageLoad}">
    <h:dataTable binding="#{backingBean.dataTable}" columnClasses="COL1, COL1, COL2, COL2, COL3" value="#{backingBean.myObjects}" var="myObject" width="100%" headerClass="HEADING" rowClasses="ROW1, ROW2" rows="10">
    <h:column>
    <f:facet name="header">
    <h:commandLink actionListener="#{backingBean.sortDataList}" styleClass="rowHeader">
    <f:attribute name="sortField" value="getItemCategory" />
    <h:outputText value="Category"/>
    </h:commandLink>
    </f:facet>
    <h:commandLink shape="rect" styleClass="rowtext" value="#{myObject.item.itemCategory.description}" actionListener="#{backingBean.rowSelect}" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:commandLink actionListener="#{backingBean.sortDataList}" styleClass="rowHeader">
    <f:attribute name="sortField" value="getItem" />
    <h:outputText value="Item"/>
    </h:commandLink>
    </f:facet>
    <h:commandLink shape="rect" styleClass="rowtext" value="#{myObject.item.name}" actionListener="#{backingBean.rowSelect}" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:commandLink actionListener="#{backingBean.sortDataList}" styleClass="rowHeader">
    <f:attribute name="sortField" value="getDescription" />
    <h:outputText value="Certification"/>
    </h:commandLink>
    </f:facet>
    <h:commandLink shape="rect" styleClass="rowtext" value="#{myObject.description}" actionListener="#{myObject.description}"/>
    </h:column>
    <f:facet name="footer">
    <h:panelGroup style="text-align:right">
    <h:commandButton value="first" action="#{backingBean.pageFirst}" disabled="#{backingBean.dataTable.first == 0}" />
    <h:commandButton value="prev" action="#{backingBean.pagePrevious}" disabled="#{backingBean.dataTable.first == 0}" />
    <h:commandButton value="next" action="#{backingBean.pageNext}" disabled="#{backingBean.dataTable.first + backingBean.dataTable.rows >= backingBean.dataTable.rowCount}" />
    <h:commandButton value="last" action="#{backingBean.pageLast}" disabled="#{backingBean.dataTable.first + backingBean.dataTable.rows >= backingBean.dataTable.rowCount}" />
    <h:commandButton value="Append New" action="#{backingBean.ClearFields}" />
    </h:panelGroup>
    </f:facet>
    </h:dataTable>
    <h:inputHidden value="#{backingBean.sortField}"/>
    <h:inputHidden value="#{backingBean.sortAscending}"/>
    <h:inputHidden value="#{backingBean.myObjectId}"/>
    <br />
    <br />
    <table style="border-collapse: collapse; width:100%" cellpadding="3" border="1">
    <tr>
    <td style="text-align:left; width:20%; background-image:url('images/lbar.gif'); font-family:Arial; font-size:smaller; font-weight:bold" colspan="3">Detail</td>
    </tr>
    <tr>
    <td style="text-align:right; width:20%; background-color:#CCCCCC; font-family:Arial; font-size:smaller; font-weight:bold">Category </td>
    <td style="width:80%; background-color:#CCCCCC;font-weight:bold">
    <h:selectOneMenu value="#{backingBean.selectedCategory}" onchange="submit();" valueChangeListener="#{backingBean.CategoryChange}">
    <f:selectItems value="#{backingBean.selectedCategories}"/>
    </h:selectOneMenu>
    </td>
    </tr>
    <tr>
    <td style="text-align:right; width:20%; background-color:#CCCCCC; font-family:Arial; font-size:smaller; font-weight:bold">Item id </td>
    <td style="width:80%; background-color:#CCCCCC;font-weight:bold">
    <h:selectOneMenu value="#{backingBean.selectedItem}">
    <f:selectItems value="#{backingBean.selectedItems}"/>
    </h:selectOneMenu>
    </td>
    </tr>
    <tr>
    <td style="text-align:right; width:20%; background-color:#CCCCCC; font-family:Arial; font-size:smaller; font-weight:bold">Item Description </td>
    <td style="width:80%; background-color:#CCCCCC;font-weight:bold"> <h:inputTextarea value="#{backingBean.description}" cols="60" rows="5"/></td>
    </tr>
    </table>
    </h:form>
    </f:view>
    </body>
    </html>the backing bean:
    public class BackingBean{
    -- Declaration of properties --
    public void rowSelect(ActionEvent event) {
    // Get selected MyData item to be edited.
    logger.debug("Select row");
    FacesContext context = FacesContext.getCurrentInstance();
    try
    if ((sortField != null) && (myObjects != null)) {
    Collections.sort(myObjects, new DTOComparator(sortField, sortAscending));
    dataTable.saveState(context);
    catch(Exception e){
    logger.error(e.getLocalizedMessage(), e);
    context.addMessage("ERROR", new FacesMessage(e.toString()));}
    logger.debug("Setting fields");
    myObject = (MyObject) dataTable.getRowData();
    description = myObject.getDescription();
    itemCategory = myObject.getItem().getItemCategory();
    item = myObject.getItem();
    docDisabled = !certified;
    selectedCategory = itemCategory.getId();
    myObjectId = myObject.getId();
    logger.debug("Fields set");
    public void sortDataList(ActionEvent event) {
    String sortFieldAttribute = getAttribute(event, "sortField");
    // Get and set sort field and sort order.
    if (sortField != null && sortField.equals(sortFieldAttribute)) {
    sortAscending = !sortAscending;
    } else {
    sortField = sortFieldAttribute;
    sortAscending = true;
    // Sort results.
    if (sortField != null) {
    Collections.sort(myObjects, new DTOComparator(sortField, sortAscending));
    public void CategoryChange(ValueChangeEvent vce){
    try {
    logger.debug("SelectedIndexChange: Category: {}",vce.getNewValue().toString());
    selectedCategory = Integer.parseInt(vce.getNewValue().toString());
    logger.debug("SelectedIndexChange: Category");
    itemCategory = itemCategoryService.retrieveItemCategoryById(selectedCategory);
    logger.debug("Showing Category: {}", itemCategory.getDescription());
    } catch (Exception e) {
    logger.error("Error occured: {}",e.toString());
    FacesContext context = FacesContext.getCurrentInstance();
    context.addMessage("ERROR", new FacesMessage(e.toString()));
    public List<SelectItem> getSelectedItems() {
    selectedItems = new ArrayList<SelectItem>();
    try
    logger.debug("selectedCategory: {}",selectedCategory);
    if (itemCategory!=null)
    logger.debug("Category Object: {}",itemCategory.getId());
    items.clear();
    items.addAll(itemCategoryService.retrieveItemCategoryById(selectedCategory).getItems());
    logger.debug("items recieved: {}",items.size());
    for (int count = 0; count < items.size(); count++) {
    selectedItems.add(new SelectItem(items.get(count).getSeq(),items.get(count).getName()));
    catch (Exception e){
    logger.error("Error occured: {}",e.toString());
    FacesContext context = FacesContext.getCurrentInstance();
    context.addMessage("ERROR", new FacesMessage(e.toString()));
    return selectedItems;
    public List<SelectItem> getSelectedCategories() {
    selectedCategories = new ArrayList<SelectItem>();
    try{
    for (int count = 0; count < itemCategories.size(); count++) {
    if (itemCategories.get(count).getItems().size() != 0)
    selectedCategories.add(new SelectItem(itemCategories.get(count).getId(),itemCategories.get(count).getDescription()));
    if (selectedCategory == 0)
    selectedCategory = itemCategories.get(0).getId();
    catch (Exception e){
    logger.error("Error occured: {}",e.toString());
    FacesContext context = FacesContext.getCurrentInstance();
    context.addMessage("ERROR", new FacesMessage(e.toString()));
    return selectedCategories;
    -- other getters and setters --
    }I've already tried to use the action attribute instead of the actionlistener attribute, also tried to add immediate="true" to all fields and columns.
    Did try to add onclick="submit();" to the rows.
    What can be done to fix it??
    ps: the enviroment is JSF + Spring + Hibernate

    The <h:messages/> tag is where the validation exception is shown, but no validation is used on the form, no other exeptions are sown.
    the List<Categories> is filled at a setPageLoad method which is bound to the form by <h:form binding="#{backingBean.pageLoad}">.
    The List<SelectedItem> of the categories box is filled in its getter and filled with the values of the List<Categories>
    And both the List<SelectedItem> of the items box and the List<Item> are filled in the getter of the List<SelectedItem> of the items box
    so instead of that i should rewrite it to something like this:
    public BackingBean() {
        selectedCategories = new List<SelectedItem>();
        selectedItems = new List<SelectedItem>();
        categories = CategoryService.retrieveCategories(); //gets all categories
        items = ItemService.retrieveItemsByCategory(selectedCategory); //gets the items
        for (int count = 0; count < categories.size(); count++) {
            selectedCategories.add(new SelectItem(categories.get(count).getId(),categories.get(count).getDescription()));
        if (selectedCategory == 0){
            selectedCategory = categories.get(0).getId();
        for (int count = 0; count < items.size(); count++) {
            selectedItems.add(new SelectItem(items.get(count).getId(),items.get(count).getDescription()));
        if (selectedItem == 0){
            selectedItem = items.get(0).getId();
    public void CategoryChange(ValueChangeEvent vce){
            try {
                if (vce.getPhaseId() != PhaseId.INVOKE_APPLICATION) {
                    vce.setPhaseId(PhaseId.INVOKE_APPLICATION);
                    vce.queue();
                } else {
                    FacesContext.getCurrentInstance().renderResponse();
                    selectedCategory = Integer.parseInt(vce.getNewValue().toString());
                    category = CategoryService.retrieveCategoryById(selectedCategory); // gets the category Object
            } catch (Exception e) {
                logger.error("Error occured: {}",e.toString());
                FacesContext context = FacesContext.getCurrentInstance();
                context.addMessage("ERROR", new FacesMessage(e.toString()));
    public List<SelectItem> getSelectedCategories() {
        return selectedCategories;
    public void setSelectedCategories(List<SelectItem> selectedCategories) {
        this.selectedCategories = selectedCategories;
    public List<SelectItem> getSelectedItems() {
        return selectedCategories;
    public void setSelectedItems(List<SelectItem> selectedItems) {
        this.selectedItems = selectedItems;
    }The bean is request scoped.

  • Error due to drop down menu in the dataTable

    I have a data table which has a drop down menu in one of the table columns. When the drop down menu is disabled, every action in the page works (click on it, and it does what it does). When the drop down menu is enabled, every action (with one exception) in the page does not work (click on it, it refreshes the page, but the action is not fired). I cannot debug the thing because the action is not fired at all.
    The exception is that for buttons that is marked as immediate, it works. I created an inline message, and wire that to the dropdown menu. I do not see any error. Looking into the log file, I do not see anything.
    I was suspecting maybe conversion error. The data value for the drop down menu is integer (I try both setting the convert to integer and nothing). Even there's error in conversion, there should be error message showing up (in the inline message box).
    So, again, how do I diagnos this, and to find out what is going on?
    Thank you very much.
    Vh.

    Thank you for your attention.
    The bug link is:
    https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=51
    I thought I could add attachment afterward, but I couldn't. Please add these for me:
    //////////////////////////////////////////////////// Page3.jsp //////////////////////////////////////////////////////////////////
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
            <html lang="en-US" xml:lang="en-US">
                <head>
                    <meta content="no-cache" http-equiv="Cache-Control"/>
                    <meta content="no-cache" http-equiv="Pragma"/>
                    <title>Page3 Title</title>
                    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
                </head>
                <body style="-rave-layout: grid">
                    <h:form binding="#{Page3.form1}" id="form1">
                        <h:dataTable binding="#{Page3.dataTable1}" headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd"
                            style="height: 111px; left: 60px; top: 120px; position: absolute" value="#{Page3.dataTable1Model}" var="currentRow" width="360">
                            <h:column binding="#{Page3.column1}" id="column1">
                                <h:outputText binding="#{Page3.outputText1}" id="outputText1" value="#{currentRow.c1}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{Page3.outputText2}" id="outputText2" value="column1"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{Page3.column2}" id="column2">
                                <h:outputText binding="#{Page3.outputText3}" id="outputText3" value="#{currentRow.c2}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{Page3.outputText4}" id="outputText4" value="column2"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{Page3.column3}" id="column3">
                                <f:facet name="header">
                                    <h:outputText binding="#{Page3.outputText6}" id="outputText6" value="column3"/>
                                </f:facet>
                                <h:selectOneMenu binding="#{Page3.dropdown1}" converter="#{Page3.integerConverter1}" id="dropdown1" value="#{currentRow.c3}">
                                    <f:selectItems binding="#{Page3.dropdown1SelectItems}" id="dropdown1SelectItems" value="#{Page3.dropdown1DefaultItems}" />
                                </h:selectOneMenu>
                            </h:column>
                        </h:dataTable>
                        <h:outputText binding="#{Page3.outputMesg}" id="outputMesg" style="height: 32px; left: 240px; top: 50px; position: absolute; width: 180px"/>
                        <h:outputText binding="#{Page3.outputText8}" id="outputText8" style="height: 30px; left: 60px; top: 50px; position: absolute; width: 162px" value="Message:"/>
                        <h:commandButton action="#{Page3.button1_action}" binding="#{Page3.button1}" id="button1"
                            style="height: 25px; left: 300px; top: 260px; position: absolute; width: 109px" value="Say Hello"/>
                        <h:message binding="#{Page3.inlineMessage1}" errorClass="errorMessage" fatalClass="fatalMessage" for="dropdown1" id="inlineMessage1"
                            infoClass="infoMessage" showDetail="false" showSummary="true"
                            style="height: 102px; left: 60px; top: 300px; position: absolute; width: 360px" warnClass="warnMessage"/>
                        <h:outputText binding="#{Page3.outputText5}" id="outputText5" style="height: 30px; left: 60px; top: 260px; position: absolute; width: 120px" value="Error Message:"/>
                    </h:form>
                </body>
            </html>
        </f:view>
    </jsp:root>//////////////////////////////////////////////////// Page3.java //////////////////////////////////////////////////////////////////
    * Page3.java
    * Created on August 10, 2004, 10:35 AM
    * Copyright hovh
    package webapplication1;
    import javax.faces.*;
    import com.sun.jsfcl.app.*;
    import javax.faces.component.html.*;
    import com.sun.jsfcl.data.*;
    import java.util.*;
    import javax.faces.component.*;
    import javax.faces.convert.*;
    public class Page3 extends AbstractPageBean {
        // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
        private int __placeholder;
        private HtmlForm form1 = new HtmlForm();
        public HtmlForm getForm1() {
            return form1;
        public void setForm1(HtmlForm hf) {
            this.form1 = hf;
        private HtmlDataTable dataTable1 = new HtmlDataTable();
        public HtmlDataTable getDataTable1() {
            return dataTable1;
        public void setDataTable1(HtmlDataTable hdt) {
            this.dataTable1 = hdt;
        private DefaultTableDataModel dataTable1Model = new DefaultTableDataModel();
        public DefaultTableDataModel getDataTable1Model() {
            return dataTable1Model;
        public void setDataTable1Model(DefaultTableDataModel dtdm) {
            this.dataTable1Model = dtdm;
        private UIColumn column1 = new UIColumn();
        public UIColumn getColumn1() {
            return column1;
        public void setColumn1(UIColumn uic) {
            this.column1 = uic;
        private HtmlOutputText outputText1 = new HtmlOutputText();
        public HtmlOutputText getOutputText1() {
            return outputText1;
        public void setOutputText1(HtmlOutputText hot) {
            this.outputText1 = hot;
        private HtmlOutputText outputText2 = new HtmlOutputText();
        public HtmlOutputText getOutputText2() {
            return outputText2;
        public void setOutputText2(HtmlOutputText hot) {
            this.outputText2 = hot;
        private UIColumn column2 = new UIColumn();
        public UIColumn getColumn2() {
            return column2;
        public void setColumn2(UIColumn uic) {
            this.column2 = uic;
        private HtmlOutputText outputText3 = new HtmlOutputText();
        public HtmlOutputText getOutputText3() {
            return outputText3;
        public void setOutputText3(HtmlOutputText hot) {
            this.outputText3 = hot;
        private HtmlOutputText outputText4 = new HtmlOutputText();
        public HtmlOutputText getOutputText4() {
            return outputText4;
        public void setOutputText4(HtmlOutputText hot) {
            this.outputText4 = hot;
        private UIColumn column3 = new UIColumn();
        public UIColumn getColumn3() {
            return column3;
        public void setColumn3(UIColumn uic) {
            this.column3 = uic;
        private HtmlOutputText outputText6 = new HtmlOutputText();
        public HtmlOutputText getOutputText6() {
            return outputText6;
        public void setOutputText6(HtmlOutputText hot) {
            this.outputText6 = hot;
        private HtmlOutputText outputMesg = new HtmlOutputText();
        public HtmlOutputText getOutputMesg() {
            return outputMesg;
        public void setOutputMesg(HtmlOutputText hot) {
            this.outputMesg = hot;
        private HtmlOutputText outputText8 = new HtmlOutputText();
        public HtmlOutputText getOutputText8() {
            return outputText8;
        public void setOutputText8(HtmlOutputText hot) {
            this.outputText8 = hot;
        private HtmlCommandButton button1 = new HtmlCommandButton();
         * Holds value of property tableData.
        private ArrayList tableData;
        public HtmlCommandButton getButton1() {
            return button1;
        public void setButton1(HtmlCommandButton hcb) {
            this.button1 = hcb;
        private HtmlSelectOneMenu dropdown1 = new HtmlSelectOneMenu();
        public HtmlSelectOneMenu getDropdown1() {
            return dropdown1;
        public void setDropdown1(HtmlSelectOneMenu hsom) {
            this.dropdown1 = hsom;
        private DefaultSelectItemsArray dropdown1DefaultItems = new DefaultSelectItemsArray();
        public DefaultSelectItemsArray getDropdown1DefaultItems() {
            return dropdown1DefaultItems;
        public void setDropdown1DefaultItems(DefaultSelectItemsArray dsia) {
            this.dropdown1DefaultItems = dsia;
        private UISelectItems dropdown1SelectItems = new UISelectItems();
        public UISelectItems getDropdown1SelectItems() {
            return dropdown1SelectItems;
        public void setDropdown1SelectItems(UISelectItems uisi) {
            this.dropdown1SelectItems = uisi;
        private IntegerConverter integerConverter1 = new IntegerConverter();
        public IntegerConverter getIntegerConverter1() {
            return integerConverter1;
        public void setIntegerConverter1(IntegerConverter ic) {
            this.integerConverter1 = ic;
        private HtmlMessage inlineMessage1 = new HtmlMessage();
        public HtmlMessage getInlineMessage1() {
            return inlineMessage1;
        public void setInlineMessage1(HtmlMessage hm) {
            this.inlineMessage1 = hm;
        private HtmlOutputText outputText5 = new HtmlOutputText();
        public HtmlOutputText getOutputText5() {
            return outputText5;
        public void setOutputText5(HtmlOutputText hot) {
            this.outputText5 = hot;
        // </editor-fold>
        public Page3() {
            // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
            try {
                dropdown1DefaultItems.setItems(new String[] {"1", "2", "3"});
            } catch (Exception e) {
                log("Page3 Initialization Failure", e);
                throw e instanceof javax.faces.FacesException ? (FacesException) e : new FacesException(e);
            // </editor-fold>
            // Additional user provided initialization code
            tableData = new ArrayList();
            tableData.add(new webapplication1.TableEntry("c1_1", "c2_1", 1));
            tableData.add(new webapplication1.TableEntry("c1_2", "c2_2", 2));
            tableData.add(new webapplication1.TableEntry("c1_3", "c2_3", 3));
            this.dataTable1Model.setWrappedData(tableData);
        protected webapplication1.ApplicationBean1 getApplicationBean1() {
            return (webapplication1.ApplicationBean1)getBean("ApplicationBean1");
        protected webapplication1.SessionBean1 getSessionBean1() {
            return (webapplication1.SessionBean1)getBean("SessionBean1");
         * Bean cleanup.
        protected void afterRenderResponse() {
         * Getter for property tableData.
         * @return Value of property tableData.
        public ArrayList getTableData() {
            return this.tableData;
         * Setter for property tableData.
         * @param tableData New value of property tableData.
        public void setTableData(ArrayList tableData) {
            this.tableData = tableData;
        public String button1_action() {
            // User event code here...
            this.outputMesg.setValue("Hello world!");
            return null;
    }//////////////////////////////////////////////////// TableEntry.java //////////////////////////////////////////////////////////////////
    * TableEntry.java
    * Created on September 3, 2004, 2:38 PM
    package webapplication1;
    * @author  hovh
    public class TableEntry  {
        String c1;
        String c2;
        int c3;
        String c3Str;
        public TableEntry(String c1, String c2, int c3){
            this.c1 = c1;
            this.c2 = c2;
            this.c3 = c3;
        public String getC1() {
            return c1;
        public void setC1(String c1) {
            this.c1 = c1;
        public int getC3() {
            return c3;
        public void setC3(int c3) {
            this.c3 = c3;
        public String getC2() {
            return c2;
        public void setC2(String c2) {
            this.c2 = c2;
        public java.lang.String getC3Str() {
         return "" + c3;
        public void setC3Str(java.lang.String c3Str) {
         this.c3Str = c3Str;
         try{
             c3 = Integer.parseInt(c3Str);
         }catch(Exception e){

  • IceFaces 1.8 dataTable-sort example gives error

    Hi All:
    I need help, please!! Any help or hint is greatly appreciated it!!
    In the tutorial from IceFaces 1.8
    Data Table Component Tutorials
    I am using weblogic 10.3.2, IceFaces 1.8 and Jsf 1.2.
    I am using the jars that comes with the IceFaces 1.8 download.
    index.jsp:
    <html>
    <head>
    <title>ICEfaces Component Showcase</title>
    </head>
    <body>
    <jsp:forward page="sortableTable.iface" />
    </body>
    </html>
    sortableTable.jspx:
    <f:view xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ice="http://www.icesoft.com/icefaces/component">
    <ice:outputDeclaration doctypeRoot="HTML"
    doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN"
    doctypeSystem="http://www.w3.org/TR/html4/loose.dtd"/>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=iso-8859-1"></meta>
    <title>DataTable Component Tutorial</title>
    <link href="./xmlhttp/css/xp/xp.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
    <h2>Sortable dataTable Component</h2>
    <p>In this example commandSortHeader components have been added to the
    table headers. Clicking on the headers will sort the table data.</p>
    <ice:form>
    <!--
    This is a very basic table comprising four columns. Each
    row represents an inventory item. Each column represents a
    inventory item property. commandSortHeader components have been
    added ot the table headers.
    The sortAscending and sortColumn attributes are set when a command
    sortColumnName header is activated. The sortColumn and sortAscending
    data can then be sortColumnName by a sortColumnName algorithm if a
    change is detected.
    -->
    <ice:dataTable
    id="dataSortData"
    sortColumn="#{inventoryList.sortColumnName}"
    sortAscending="#{inventoryList.ascending}"
    value="#{inventoryList.carInventory}"
    var="item">
    <!-- Stock number -->
    <ice:column>
    <f:facet name="header">
    <ice:commandSortHeader
    columnName="#{inventoryList.stockColumnName}"
    arrow="true" >
    <ice:outputText value="#{inventoryList.stockColumnName}"/>
    </ice:commandSortHeader>
    </f:facet>
    <ice:outputText value="#{item.stock}"/>
    </ice:column>
    <!-- Model number -->
    <ice:column>
    <f:facet name="header">
    <ice:commandSortHeader
    columnName="#{inventoryList.modelColumnName}"
    arrow="true" >
    <ice:outputText value="#{inventoryList.modelColumnName}"/>
    </ice:commandSortHeader>
    </f:facet>
    <ice:outputText value="#{item.model}"/>
    </ice:column>
    <!-- Description -->
    <ice:column>
    <f:facet name="header">
    <ice:commandSortHeader
    columnName="#{inventoryList.descriptionColumnName} "
    arrow="true" >
    <ice:outputText value="#{inventoryList.descriptionColumnName}"/>
    </ice:commandSortHeader>
    </f:facet>
    <ice:outputText value="#{item.description}"/>
    </ice:column>
    <!-- Odometer reading -->
    <ice:column>
    <f:facet name="header">
    <ice:commandSortHeader
    columnName="#{inventoryList.odometerColumnName}"
    arrow="true" >
    <ice:outputText value="#{inventoryList.odometerColumnName}"/>
    </ice:commandSortHeader>
    </f:facet>
    <ice:outputText value="#{item.odometer}"/>
    </ice:column>
    <!-- Price number -->
    <ice:column>
    <f:facet name="header">
    <ice:commandSortHeader
    columnName="#{inventoryList.priceColumnName}"
    arrow="true" >
    <ice:outputText value="#{inventoryList.priceColumnName}"/>
    </ice:commandSortHeader>
    </f:facet>
    <ice:outputText value="#{item.price}"/>
    </ice:column>
    </ice:dataTable>
    </ice:form>
    </body>
    </html>
    </f:view>
    Error 500--Internal Server Error
    java.lang.Exception: javax.faces.FacesException: Can't parse stream for /index.jsp The prefix "jsp" for element "jsp:forward" is not bound.
    at com.icesoft.faces.context.View.servePage(View.java :152)
    at com.icesoft.faces.webapp.http.core.MultiViewServer .service(MultiViewServer.java:67)
    at com.icesoft.faces.webapp.http.common.ServerProxy.s ervice(ServerProxy.java:11)
    at com.icesoft.faces.webapp.http.servlet.MainSessionB oundServlet$4.service(MainSessionBoundServlet.java :149)
    at com.icesoft.faces.webapp.http.common.standard.Path DispatcherServer.service(PathDispatcherServer.java :24)
    at com.icesoft.faces.webapp.http.servlet.BasicAdaptin gServlet.service(BasicAdaptingServlet.java:16)
    at com.icesoft.faces.webapp.http.servlet.PathDispatch er.service(PathDispatcher.java:23)
    at com.icesoft.faces.webapp.http.servlet.SessionDispa tcher.service(SessionDispatcher.java:53)
    at com.icesoft.faces.webapp.http.servlet.PathDispatch er.service(PathDispatcher.java:23)
    at com.icesoft.faces.webapp.http.servlet.MainServlet. service(MainServlet.java:131)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:820)
    at weblogic.servlet.internal.StubSecurityHelper$Servl etServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invok eServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute( ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(Tail Filter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFi lter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :3592)
    at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.sec uredExecute(WebAppServletContext.java:2202)
    at weblogic.servlet.internal.WebAppServletContext.exe cute(WebAppServletContext.java:2108)
    at weblogic.servlet.internal.ServletRequestImpl.run(S ervletRequestImpl.java:1432)
    at weblogic.work.ExecuteThread.execute(ExecuteThread. java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java :173)
    Caused by: javax.faces.FacesException: Can't parse stream for /index.jsp The prefix "jsp" for element "jsp:forward" is not bound.
    at com.icesoft.faces.application.D2DViewHandler.rende rResponse(D2DViewHandler.java:445)
    at com.icesoft.faces.application.D2DViewHandler.rende rView(D2DViewHandler.java:159)
    at com.sun.faces.lifecycle.RenderResponsePhase.execut e(RenderResponsePhase.java:110)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:1 00)
    at com.sun.faces.lifecycle.LifecycleImpl.render(Lifec ycleImpl.java:139)
    at com.icesoft.faces.webapp.http.core.JsfLifecycleExe cutor.apply(JsfLifecycleExecutor.java:19)
    at com.icesoft.faces.context.View$2$1.respond(View.ja va:48)
    at com.icesoft.faces.webapp.http.servlet.ServletReque stResponse.respondWith(ServletRequestResponse.java :201)
    at com.icesoft.faces.context.View$2.serve(View.java:7 7)
    at com.icesoft.faces.context.View.servePage(View.java :149)
    ... 25 more
    Caused by: org.xml.sax.SAXParseException: The prefix "jsp" for element "jsp:forward" is not bound.
    at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.parse(AbstractSAXParser.java:1231)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserI mpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogic XMLReader.java:133)
    at weblogic.xml.jaxp.RegistryXMLReader.parse(Registry XMLReader.java:173)
    at org.apache.commons.digester.Digester.parse(Digeste r.java:1785)
    at com.icesoft.faces.webapp.parser.Parser.parse(Parse r.java:130)
    at com.icesoft.faces.application.D2DViewHandler.rende rResponse(D2DViewHandler.java:439)
    ... 34 more

    Hi All:
    I need help, please!! Any help or hint is greatly appreciated it!!
    In the tutorial from IceFaces 1.8
    Data Table Component Tutorials
    I am using weblogic 10.3.2, IceFaces 1.8 and Jsf 1.2.
    I am using the jars that comes with the IceFaces 1.8 download.
    index.jsp:
    <html>
    <head>
    <title>ICEfaces Component Showcase</title>
    </head>
    <body>
    <jsp:forward page="sortableTable.iface" />
    </body>
    </html>
    sortableTable.jspx:
    <f:view xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ice="http://www.icesoft.com/icefaces/component">
    <ice:outputDeclaration doctypeRoot="HTML"
    doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN"
    doctypeSystem="http://www.w3.org/TR/html4/loose.dtd"/>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=iso-8859-1"></meta>
    <title>DataTable Component Tutorial</title>
    <link href="./xmlhttp/css/xp/xp.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
    <h2>Sortable dataTable Component</h2>
    <p>In this example commandSortHeader components have been added to the
    table headers. Clicking on the headers will sort the table data.</p>
    <ice:form>
    <!--
    This is a very basic table comprising four columns. Each
    row represents an inventory item. Each column represents a
    inventory item property. commandSortHeader components have been
    added ot the table headers.
    The sortAscending and sortColumn attributes are set when a command
    sortColumnName header is activated. The sortColumn and sortAscending
    data can then be sortColumnName by a sortColumnName algorithm if a
    change is detected.
    -->
    <ice:dataTable
    id="dataSortData"
    sortColumn="#{inventoryList.sortColumnName}"
    sortAscending="#{inventoryList.ascending}"
    value="#{inventoryList.carInventory}"
    var="item">
    <!-- Stock number -->
    <ice:column>
    <f:facet name="header">
    <ice:commandSortHeader
    columnName="#{inventoryList.stockColumnName}"
    arrow="true" >
    <ice:outputText value="#{inventoryList.stockColumnName}"/>
    </ice:commandSortHeader>
    </f:facet>
    <ice:outputText value="#{item.stock}"/>
    </ice:column>
    <!-- Model number -->
    <ice:column>
    <f:facet name="header">
    <ice:commandSortHeader
    columnName="#{inventoryList.modelColumnName}"
    arrow="true" >
    <ice:outputText value="#{inventoryList.modelColumnName}"/>
    </ice:commandSortHeader>
    </f:facet>
    <ice:outputText value="#{item.model}"/>
    </ice:column>
    <!-- Description -->
    <ice:column>
    <f:facet name="header">
    <ice:commandSortHeader
    columnName="#{inventoryList.descriptionColumnName} "
    arrow="true" >
    <ice:outputText value="#{inventoryList.descriptionColumnName}"/>
    </ice:commandSortHeader>
    </f:facet>
    <ice:outputText value="#{item.description}"/>
    </ice:column>
    <!-- Odometer reading -->
    <ice:column>
    <f:facet name="header">
    <ice:commandSortHeader
    columnName="#{inventoryList.odometerColumnName}"
    arrow="true" >
    <ice:outputText value="#{inventoryList.odometerColumnName}"/>
    </ice:commandSortHeader>
    </f:facet>
    <ice:outputText value="#{item.odometer}"/>
    </ice:column>
    <!-- Price number -->
    <ice:column>
    <f:facet name="header">
    <ice:commandSortHeader
    columnName="#{inventoryList.priceColumnName}"
    arrow="true" >
    <ice:outputText value="#{inventoryList.priceColumnName}"/>
    </ice:commandSortHeader>
    </f:facet>
    <ice:outputText value="#{item.price}"/>
    </ice:column>
    </ice:dataTable>
    </ice:form>
    </body>
    </html>
    </f:view>
    Error 500--Internal Server Error
    java.lang.Exception: javax.faces.FacesException: Can't parse stream for /index.jsp The prefix "jsp" for element "jsp:forward" is not bound.
    at com.icesoft.faces.context.View.servePage(View.java :152)
    at com.icesoft.faces.webapp.http.core.MultiViewServer .service(MultiViewServer.java:67)
    at com.icesoft.faces.webapp.http.common.ServerProxy.s ervice(ServerProxy.java:11)
    at com.icesoft.faces.webapp.http.servlet.MainSessionB oundServlet$4.service(MainSessionBoundServlet.java :149)
    at com.icesoft.faces.webapp.http.common.standard.Path DispatcherServer.service(PathDispatcherServer.java :24)
    at com.icesoft.faces.webapp.http.servlet.BasicAdaptin gServlet.service(BasicAdaptingServlet.java:16)
    at com.icesoft.faces.webapp.http.servlet.PathDispatch er.service(PathDispatcher.java:23)
    at com.icesoft.faces.webapp.http.servlet.SessionDispa tcher.service(SessionDispatcher.java:53)
    at com.icesoft.faces.webapp.http.servlet.PathDispatch er.service(PathDispatcher.java:23)
    at com.icesoft.faces.webapp.http.servlet.MainServlet. service(MainServlet.java:131)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:820)
    at weblogic.servlet.internal.StubSecurityHelper$Servl etServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invok eServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute( ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(Tail Filter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFi lter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :3592)
    at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.sec uredExecute(WebAppServletContext.java:2202)
    at weblogic.servlet.internal.WebAppServletContext.exe cute(WebAppServletContext.java:2108)
    at weblogic.servlet.internal.ServletRequestImpl.run(S ervletRequestImpl.java:1432)
    at weblogic.work.ExecuteThread.execute(ExecuteThread. java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java :173)
    Caused by: javax.faces.FacesException: Can't parse stream for /index.jsp The prefix "jsp" for element "jsp:forward" is not bound.
    at com.icesoft.faces.application.D2DViewHandler.rende rResponse(D2DViewHandler.java:445)
    at com.icesoft.faces.application.D2DViewHandler.rende rView(D2DViewHandler.java:159)
    at com.sun.faces.lifecycle.RenderResponsePhase.execut e(RenderResponsePhase.java:110)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:1 00)
    at com.sun.faces.lifecycle.LifecycleImpl.render(Lifec ycleImpl.java:139)
    at com.icesoft.faces.webapp.http.core.JsfLifecycleExe cutor.apply(JsfLifecycleExecutor.java:19)
    at com.icesoft.faces.context.View$2$1.respond(View.ja va:48)
    at com.icesoft.faces.webapp.http.servlet.ServletReque stResponse.respondWith(ServletRequestResponse.java :201)
    at com.icesoft.faces.context.View$2.serve(View.java:7 7)
    at com.icesoft.faces.context.View.servePage(View.java :149)
    ... 25 more
    Caused by: org.xml.sax.SAXParseException: The prefix "jsp" for element "jsp:forward" is not bound.
    at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.parse(AbstractSAXParser.java:1231)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserI mpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogic XMLReader.java:133)
    at weblogic.xml.jaxp.RegistryXMLReader.parse(Registry XMLReader.java:173)
    at org.apache.commons.digester.Digester.parse(Digeste r.java:1785)
    at com.icesoft.faces.webapp.parser.Parser.parse(Parse r.java:130)
    at com.icesoft.faces.application.D2DViewHandler.rende rResponse(D2DViewHandler.java:439)
    ... 34 more

  • PanelGrid component binding problem

    I have a panelGrid that is bound to an object in my backing bean. When the page loads the panelGrid is empty. When the user clicks on a button it is suppose to populate the panelGrid. But the panelGrid doesn't render after clicking the button. Here is my code:
    jsp
    <div style="margin-left:30px;">
                 <div>
                     <ice:outputText value="Click 'Run Diagnostics' to begin tests." />
                 </div>
                 <div style="margin-left:20px;padding-bottom:40px;">
                     <ice:commandButton value="Run Diagnostics"
                                         action="#{SystemDiagnostics.runDiagnostics_clicked}"/>
                     <ice:outputText value="#{SystemDiagnostics.resultsText}"/>
                 </div>
                 <div>
                     <ice:outputText style="font-decoration:underline;"
                                     value="Diagnostics" />
                 </div>
                 <div style="margin-left:20px;">
                     <ice:panelGrid binding="#{SystemDiagnostics.diagnosticsPanelGrid}" >
                          <!--Dynamic values go here -->
                     </ice:panelGrid>
                 </div>
             </div> bean
    public void runDiagnostics_clicked() {
             PdlgCommandCollectionResult result = Pdlg.instanceOf().runDiagnostics();
                 if (result.isSuccessful()) {
                     HtmlPanelGrid grid = new HtmlPanelGrid();
                     grid.setColumns(2);
                     HtmlOutputText output = new HtmlOutputText();
                     output.setValue("Boot Disk");
                     grid.getChildren().add(output);
                     output = new HtmlOutputText();
                     output.setValue("Success");
                     grid.getChildren().add(output);
                     setDiagnosticsPanelGrid(grid);
         public HtmlPanelGrid getDiagnosticsPanelGrid() {
             return m_diagnosticsPanelGrid;
         public void setDiagnosticsPanelGrid(HtmlPanelGrid value) {
             m_diagnosticsPanelGrid = value;
         }Does anyone know why this is not rendering?
    Thanks,
    David

    Well, I discovered how to resolve this.
    The component that you bind to can not be recreated in the backing bean. Only the components within the bound component can be recreated. So what i did was added a panelGroup and binded that to my backing bean and then was able to recreate the panelGrid that was a child of the panelGroup.

  • Link Action in datatable header not working!!!

    hi all
    i want to sort the datatable rows when link in the header of a column in datatable is clicked. I am using Sun Creator but it doesnot provide functinality to directly add link action in header. So i changed the jsp page to add the following code
    <h:dataTable binding="#{SearchResults.dataTable1}" headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd" style="left: 24px; top: 24px; position: absolute" value="#{SearchPage.searchResultsDataModel}" var="currentRow">
    <h:column binding="#{SearchResults.column1}" id="column1">
    <f:facet name="header">
    <h:commandLink action="#SearchResults.linkActionApplicantIDHeader_action}"
    binding="#{SearchResults.linkActionApplicantIDHeader}" id="linkActionApplicantIDHeader">
    <h:outputText binding="#{SearchResults.linkActionApplicantIDHeaderText}" id="linkActionApplicantIDHeaderText" value="Applicant ID"/>
    </h:commandLink>
    </f:facet>
    </h:column>................... other columns of table(bold is what i added )
    if i check through the IDE application outline window that which action handler is associated with my header link action, it takes me to proper method. but while running it doesnot go to the proper method and hence doennot fire the event.
    what should i do??
    plz help
    thanks

    hi all
    i want to sort the datatable rows when link in the
    header of a column in datatable is clicked. I am
    using Sun Creator but it doesnot provide functinality
    to directly add link action in header. So i changed
    the jsp page to add the following code
    <h:dataTable binding="#{SearchResults.dataTable1}"
    " headerClass="list-header" id="dataTable1"
    rowClasses="list-row-even,list-row-odd" style="left:
    24px; top: 24px; position: absolute"
    value="#{SearchPage.searchResultsDataModel}"
    var="currentRow">
    <h:column binding="#{SearchResults.column1}"
    id="column1">
    <f:facet name="header">
    <h:commandLink
    action="#SearchResults.linkActionApplicantIDHeader_act
    ion}"
    binding="#{SearchResults.linkActionApplicantIDHeader}
    " id="linkActionApplicantIDHeader">
    <h:outputText
    binding="#{SearchResults.linkActionApplicantIDHeaderTe
    xt}" id="linkActionApplicantIDHeaderText"
    value="Applicant ID"/>
    </h:commandLink>
    </f:facet>
    </h:column>................... other columns of table(bold is
    what i added )
    if i check through the IDE application outline window
    that which action handler is associated with my
    header link action, it takes me to proper method. but
    while running it doesnot go to the proper method and
    hence doennot fire the event.
    what should i do??
    plz help
    thanksI had a similar problem w/ links in a datatable that didn't work. I had to do two things:
    1. Initialize the SearchPage.searchResultsDataModel property in the constructor of the bean (this is because I use request scope).
    2. Remove the rendered property from the surround h:panelGroup tag that I have around my table. I haven't been able to get the rendered property to work with the datatable links.
    Hope this helps!

Maybe you are looking for

  • Error in generating  form-16

    Dear all, I have a problem while genetaing form-16 . when  I entered all required fields in selection screen and trying to genarate form16 ,it is showing this error. "Requested TemSe object  does not exist" can anybody reslove this issue as early as

  • Automatically populating the form using a function

    I'd like to create a form for clubs to register their members. In this form I want it to include the payment they will owe to Provincial, National and International levels. Is there a way to create the form so that the person filling it out can selec

  • I have just redeemed an iTunes card, but my balance does not change

    I have just redeemed an iTunes card, but my balance does not change to $15.00, but instead changes to $00.01 cant figure it out, did i waste money????

  • Elements 9 project file to Premiere Pro CS5.5 on Mac

    Can I import a project file from an Elements 9 project into CS5.5 - both MAC. I can't seem to get it to work and couldn't find any information on it.

  • Version controlling tool

    Brian, We are going to use Oracle 9i database & 9i AS & JDeveloper 10g as tool for our web development. We have been using SourceSafe as version controlling tool successfully, but could not decide what we should adopt for the integration. I do know t