Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hi All,
I'm upgrading from Windchill 9 to 11.1 and I have a JCA / DataUtility customizion I want to convert using OOTB DataUtility ID inside Type and Attribute Manager, but it doesn't work.
The customization consists in some soft attribute (eg: DocumentCategory_ETS) of a soft type (intra.elica.upgradesvil.ETS subtype of ReferenceDocument subtype of WTDocument) to be rendered as ComboBox.
I followed all instructions and tips from Windchill help center and support cases.
Following my code and configurations:
1) site.xconf
<Property name="wt.services/svc/default/com.ptc.core.components.descriptor.DataUtility/ETSDataUtility/java.lang.Object/0"
overridable="true"
targetFile="codebase/service.properties"
value="ext.elica.doc.datautility.ETSDataUtility/duplicate"/>
2) propagated value inside components.dataUtilities.properties
wt.services/svc/default/com.ptc.core.components.descriptor.DataUtility/ETSDataUtility/java.lang.Object/0=ext.elica.doc.datautility.ETSDataUtility/duplicate
3) java class portion
package ext.elica.doc.datautility;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import wt.iba.value.IBAHolder;
import wt.method.RemoteAccess;
import wt.util.WTException;
import wt.util.WTRuntimeException;
import com.ptc.core.components.descriptor.ModelContext;
import com.ptc.core.components.factory.AbstractDataUtility;
import com.ptc.core.components.factory.dataUtilities.DefaultDataUtility;
import com.ptc.core.components.rendering.guicomponents.ComboBox;
import com.ptc.core.meta.common.AttributeIdentifier;
import com.ptc.core.meta.type.common.impl.DefaultTypeInstance;
import ext.elica.utils.ElicaUtils;
public class ETSDataUtility extends AbstractDataUtility implements RemoteAccess{
...
public Object getDataValue(String componentName, Object obj, ModelContext modelcontext) throws WTException {
ComboBox comboBox = new ComboBox();
comboBox.setRequired(true);
...
return comboBox;
}
}
4) image of type and attribute manager
5) image of create doc wizard
6) image of Available attributes
Additional notes:
a) I have put a breakpoint to debug my datautility class, but it doesn't break
b) i used Available Attributes report (Client customization - Tools), but I cant see my custom attributes (there are currently 30 objects, same as OOTB WTDocument)
c) i created all IBAs and linked only to my soft type
d) I have specified the dataUtility ID in 3 layouts: Default, Create, Edit
Thanks and let me know if further info needs
Giuseppe,
Can you please share the full customization?
Can you try to set the internal values of your comboBox?
comboBox.setInternalValues(<your arraylist>);
If doesn't work, can you try adding the column name as well?
comboBox.setColumnName(AttributeDataUtilityHelper.getColumnName(component_id, persObj, mc));
Thanks aaciano for your suggestions, but they don't work.
Further, debug the class through Eclipse, the getDataValue() of my class is never called, so I believe the problem is more about registering the class.
Any other clues?
The only thing I can think about is that you are adding the Data Utility ID not in the "Create" layout.
Can you please confirm?
I'm attaching images that shows where I set the Data Utility ID.
To me it seems correct.
What I'm missing?
Hello,
I would advice to check the correct propagation of the definition in the site.xconf if the configuration is really propagated correctly to the target file.
wthome\codebase\service.properties
also check the correct name of selector ETSDataUtility (case sensitive)
there should be the line with your datautility configuration.
something like this:
wt.services/svc/default/com.ptc.core.components.descriptor.DataUtility/ETSDataUtility/java.lang.Object/1=ext.elica.doc.datautility.ETSDataUtility/duplicate
Also I would set order to 1 instead of 0 .
Best Regards
PetrH