I was putting together a jsp to display some custom properties. I thought I had used this code before to extract the properties but maybe I'm just dreaming. It has some wtdocs queryresult from a query, then....
if(curQR.size()>0){
while(curQR.hasMoreElements()){
Object nextDocument = curQR.nextElement();
String docName;
String docURL;
if("wt.doc.WTDocument".equalsIgnoreCase(nextDocument.getClass().getName())){
WTDocument curWTDoc = (WTDocument) nextDocument;
StringDefView docAttType = (StringDefView) IBADefinitionHelper.service.getAttributeDefDefaultViewByPath("tmpVal");
curWTDoc = (wt.doc.WTDocument)wt.iba.value.service.IBAValueHelper.service.refreshAttributeContainer(curWTDoc, null, null, null);
DefaultAttributeContainer dacCont = (DefaultAttributeContainer) curWTDoc.getAttributeContainer();
AbstractValueView[] docAttDefView = dacCont.getAttributeValues();
if(docAttDefView!=null){
if(docAttDefView.length>0){
StringValueDefaultView dacStringValue = (StringValueDefaultView) docAttDefView[0];
docName = "For document: " + curWTDoc.getName() + " wheelbase: " + dacStringValue.getValue();
It's attempting everything fine, so maybe it's my variable name ("tmpVal" in this case. That's the name of the variable when viewing the Type/Attribute manager.)? I know my object has that attribute and it is defined, so....? Would it be better to just scrap this and switch over to an embedded webject?
Thanks in advance!
Brian Krieger
Peterbilt Motors