AnsweredAssumed Answered

[solved]Properties in NamedValue Null!

Question asked by morpheus on Aug 9, 2008
Latest reply on Aug 10, 2008 by morpheus
I´m  getting NamedValue Objects like the Query2 example does, but the properties are null !!!
when i´m browsing through them with the webclient the title, name and decription is set !!!!

so behind which Constants.PROP….. is this information hidden ?

is there may be an conflict in the naming convention with the Constants class and the Properties of the web client ??

 
   ResultSetRow[] resultSetRow = queryResult.getResultSet().getRows();
      this.tmp = new Reference[resultSetRow.length];
      if(resultSetRow != null){
         // Iterate content items
         for (int i = 0; i < resultSetRow.length; i++) {
            ResultSetRow row = resultSetRow[i];
            if(row != null){
               // Get the properties of actual content item
               ContentItem contentResult = new ContentItem();
               for(NamedValue namedValue : row.getColumns()){
                  // IF FOLDER
                  if (namedValue.getName().endsWith(Constants.TYPE_FOLDER) == true) {
                     
                     contentResult.setType(true);
                     if (namedValue.getName().endsWith(Constants.PROP_TITLE) == true)
                             contentResult.setTitle(namedValue.getValue());
                          else if (namedValue.getName().endsWith(Constants.PROP_NAME) == true)
                             contentResult.setName(namedValue.getValue());
                          else if (namedValue.getName().endsWith(Constants.PROP_DESCRIPTION) == true)
                             contentResult.setDescription(namedValue.getValue());
                     }
                  // IF CONTENT
                  if (namedValue.getName().endsWith(Constants.TYPE_CONTENT) == true) {
                     
                     contentResult.setType(false);
                     if (namedValue.getName().endsWith(Constants.PROP_NAME) == true) {
                        contentResult.setName(namedValue.getValue());
                     }else if (namedValue.getName().endsWith(Constants.PROP_TITLE) == true) {
                        contentResult.setTitle(namedValue.getValue());
                     }   
                  }
               }
               this.tmp[i]= new Reference(store, row.getNode().getId(), null);
               contentResults.add(contentResult);
            }
         }         
      }

Outcomes