Skip to main content
1-Visitor
July 17, 2019
Question

Non persistent data in MVC tree

  • July 17, 2019
  • 1 reply
  • 2618 views

Hi,

I am currently trying to add a non-persistent column to a tree in Windchill. The column does not represent an attribute, but a value calculated in the buildComponentData method.

As I haven't figured out how to only add one non-persistent column, I currently build a component filled with non-persistent data instead. This works great when the component is a table, but when trying to do so with a tree, I get a "Unable to find NmObject for element: ..." error. This seems to me as if the tree component cannot display non-persistent data.

Does someone know if a tree component can display non-persistent data and if so, what are the differences between a table with non-persistent data and a tree with non-persistent data?


Thank you,
Vincent

1 reply

viren1-VisitorAuthor
1-Visitor
July 17, 2019

For everyone interested, I managed to solve my problem by adding a getOid() method to my wrapper class as explained in the NmObject Utilities portion of the documentation.  This method returns a NmSimpleOid object which solved my problem.

10-Marble
November 4, 2020

hello viren,

 

i'm trying to get something similiar done, but still struggling to make the TreeHandler render non Persistable data rows.

 

would you be able to provide some additional info how you solved that?

 

thanks in advance!

17-Peridot
November 4, 2020