• Another modification ( getUNID() )

    By Ulrich Krause 1 decade ago

    I have made some more modifications to the code.

    I needed to get the UNID of the underlying document. One way would be to add a column to the view and use the existing code.

    I decided to get the UNID when loading the entries. Made some testing and it does not have any significant performance impact.

    In the init() method of CategoryBean I've added line of code

                while (entry != null) {
                    try {
                        entry.setPreferJavaDates(true);
                        List columnValues = entry.getColumnValues();
                        /* added Ulrich Krause 18-APR-2013 */    
                        columnValues.add(entry.getDocument().getUniversalID());
                        /* */
                        BCCViewEntry e = new BCCViewEntry(columnValues);
                        entries.add(e);

     

    and added a new method in the ViewEntry class

       /**
         * get the documentUNID for a ViewEntry
         * @Ulrich Krause
         * @return UNID
         */
        public String getUNID(){
            String output = null;
            try {
                output = (String) columnValues.get(columnValues.size() - 1);
            } catch (Exception e) {
            }
            return output;
        }

     

     

     

     

    • entry.getUniversalID()

      By Niklas Heidloff 1 decade ago

      Thanks Ulrich, but why not entry.getUniversalID()? That saves the document access.

      • Absolutely. You're right ...

        By Ulrich Krause 1 decade ago