ICEfaces-EE
  1. ICEfaces-EE
  2. IPCK-97

EditableTable does not support nested object within row level data model

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 1.8.2.GA_P01
    • Fix Version/s: 1.8.2.GA_P02
    • Component/s: Facelet Components
    • Labels:
      None
    • Environment:
      -
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      Create a getter in the bean that will return the desired property:

      If the Person class contains an Employee reference with a departmentName property, in the Person class create this getter for department name:

      public String getDepartmentName(){

          return employee.getDepartmentName();

      }
      Show
      Create a getter in the bean that will return the desired property: If the Person class contains an Employee reference with a departmentName property, in the Person class create this getter for department name: public String getDepartmentName(){     return employee.getDepartmentName(); }

      Description

      The editableTable does not support the row level object containing another object. For example, a Person object has an Address object within it like so:

      public class Person {

      int id;
      String firstName;
      String lastName;
      Address address;
      .......

      public class Address {
      private String street;
      ....

      The editableTable does not allow for the following address.street EL expression:

      <ice-cc:editableTable bean="#{editableTableExampleBean.editTableBean}" id="editableTable" idProperty="id">
      <ice-cc:textColumn title="Street" property="address.street" width="80px" />

        Activity

        Hide
        Tyler Johnson added a comment -

        The icefaces, icefaces-comps, icefaces-facelets and composite-components jar have been removed. Intended for deployment on tomcat 6.

        Show
        Tyler Johnson added a comment - The icefaces, icefaces-comps, icefaces-facelets and composite-components jar have been removed. Intended for deployment on tomcat 6.
        Hide
        Brad Kroeger added a comment -

        The correct syntax to access this property would be #

        {varName.prop1.prop2}

        . Because the composite component is dealing with dynamic properties, we use this syntax in the .xhtml source - #

        {row[property]}

        where property is taken from the component's "property" attribute. It is not possible to use the prop1.prop2 syntax in the square brackets.

        This is a limitation we are faced with due to our inability to know the properties we are dealing with when dynamically creating EL expressions. With the current design, we cannot create an expression to access a nested property. A workaround would be to create a getter in the bean that will return the desired property:

        If the Person class contains an Employee reference with a departmentName property, in the Person class create this getter for department name:

        public String getDepartmentName()

        { return employee.getDepartmentName(); }
        Show
        Brad Kroeger added a comment - The correct syntax to access this property would be # {varName.prop1.prop2} . Because the composite component is dealing with dynamic properties, we use this syntax in the .xhtml source - # {row[property]} where property is taken from the component's "property" attribute. It is not possible to use the prop1.prop2 syntax in the square brackets. This is a limitation we are faced with due to our inability to know the properties we are dealing with when dynamically creating EL expressions. With the current design, we cannot create an expression to access a nested property. A workaround would be to create a getter in the bean that will return the desired property: If the Person class contains an Employee reference with a departmentName property, in the Person class create this getter for department name: public String getDepartmentName() { return employee.getDepartmentName(); }

          People

          • Assignee:
            Brad Kroeger
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: