I have an aspect that is being attached in a TBO using a callback and I can't seem to figure out how to get values for some of the aspect attributes to default for every instance of the aspect.
These methods have not worked:
- Composer, setting up default attribute values for the attribute in the aspect type (data dictionary).
- Overriding init() in the aspect implementation and setting them there (if they have not already been set).
I don't want to set these values in the callback since it isn't always used and I'd like for these attributes to be set on every instance. I have not tried setting them in the doSave method yet but I probably will, though I'm not sure that would be the optimal place for it even if it does work.
---
Also, I've noticed that my setters aren't being called in the callback, I'm not sure if this is because I'm passing around an IDfPersistentObject and and using obj.setString, obj.setInt, etc. Instead of calling the actual set method for the aspect attribute but I need a single point for interacting with the setting of these attributes that always works. I'm attempting to set a repeating attribute at a certain index whenever a single valued equivelent is set for example:
private static final int RELEASE_DATE = 2; public void setReleaseDate(IDfTime theDate) throws DfException { setTime("dates_aspect.release_date", theDate); this.setDcDate(theDate, RELEASE_DATE);} public void setDcDate(IDfTime theDate, int idx) throws DfException { this.setRepeatingTime("dates_aspect.dc_date", idx, theDate);}
Any reason why this will not work?
Message was edited by: code was not displaying properly