jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "毛进" <danv...@163.com>
Subject Multi-value column selector problem
Date Tue, 22 Nov 2011 07:33:02 GMT
Hello, every one :
    I want to fetch the values from a multi-valued column. I used like this :
    xpathQuery.append("//element(*, resource)");
xpathQuery.append("[@type='picture'");
xpathQuery.append(" and jcr:like(@category,'/tpk/mzmjw6115/mjwjdjz6502/m%') ");
xpathQuery.append("]/(@title|@category)");///@category
xpathQuery.append(" order by  @jcr:score descending");

And parse the values:
Value title= row.getValue("title");
System.out.println(title!=null?row.getValue("title").getString():"null");

Value cats = row.getValue("category");
System.out.println(cats!=null?row.getValue("category").getString():"null");


However, i can get the right "title" value. Because it is not multi-valued.
I can not get the correct "category"value, 'cause it is multi-valued.
Why???
And how can i get the multivalued property by using the feature of column selector?
     Thank you all.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message