2 Replies Latest reply on Oct 13, 2010 2:42 AM by Tina Ng

    how to check an object is not null in XHTML

    Tina Ng Newbie

      Hi,


      I have an entity OPERATION who contains 2 other entities PREST AND CONSIGNE (can be null)



      public class Operation implements Serializable {
          private long               id;
      
          private Prestation         prestation;
      
          private Consigne           consigne;
      
      }




      I retrieve a list of operation in action and declare it as @DataModel




      @DataModel
       private List<Operation>  operations;



      In xhtml file, I need to show a list of operation who is either PREST or CONSIGNE. Each of them have different properties.




      public class Prest implements
              java.io.Serializable {
      
          private long                   id;
          private int                    numeroGca;
          private Eftco                  eftco;
      }





      public class Consigne implements Serializable {
          private long                   id;
          private String                 code;
      }




      I don't know how to check if OPERATION contains PREST or CONSIGNE in XHTML in order to get their property to show in DataTable.
      Please help me!


      Thanks,
      Tina