cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Bug in TreeHandlerAdapter

VasiliyRepecki
1-Newbie

Bug in TreeHandlerAdapter

Hi.

I use TreeHandlerAdapter to supply data for tree.

I have full control of data returned by List<Object> getRootNodes() method.

But despite this there are some other class objects in parentList param of Map<Object, List> getNodes(List parentList) method for second level of tree.

How can this be happen?

Tnahks.

1 REPLY 1

Reference from WHC

Implement getOid() on your row data object

This procedure describes the preferred technique for specifying the identifier that should be used for table/tree row selections and actions when the row object is not a Persistable object. This technique is not applicable for specifying a target object that is different from the datum object for determining attribute values.

To use this technique you should modify the row objects to expose an API called getOid(), which should return a unique identifier for the row.

The getOid() method should return one the following data types:

  • String – which will map to a NmSimpleOid if it’s not a valid WTReference
  • ObjectIdentifier
  • NmOid

I also have this problem at Tree view degisn. I think object idendify rule need to be follow.

I spent a lot of time or waste time to excavate below OOTB Class and method.

You should try to overridd hasChildren(Object paramObject) , isExpandNeeded(Object paramObject, int paramInt)

, and monitor what variable type and parameter int these method. This method affect getNodes(List parents) what to do.

Top Tags