Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi All,
I need to make Template attribute mandatory which is present on Create Change notice Wizard ? How I can do that.
PFA.
A Data Utility would be my guess. You would have to find the details on that UI element (jcaDebug) and they find the Data Utility it uses. You can either superclass it and tick off required to write your own. I do not think this is as easy as the Type Manager attribute definition.
The template definition is more hardcoded.
And yes DataUtility can help in this issue.
I think more simple way is just set a default preselected template.
PetrH
Hi @HelesicPetr @avillanueva ,
What can be the selector for this template attribute(for data utility). Because it is not IBA attribute.
Thanks
HI @BA_10670508
The selector is changeObjectTemplatePicker
definition in ...Windchill\codebase\com\ptc\core\components\components.dataUtilities.properties
wt.services/svc/default/com.ptc.core.components.descriptor.DataUtility/changeObjectTemplatePicker/java.lang.Object/0=com.ptc.windchill.enterprise.change2.dataUtilities.ChangeTemplatePickerDataUtility/duplicate
class to extend is com.ptc.windchill.enterprise.change2.dataUtilities.ChangeTemplatePickerDataUtility
I tried it this way but I haven't written a setRequired yet.
package cz.aveng.Test;
import com.ptc.core.components.descriptor.ModelContext;
import com.ptc.windchill.enterprise.change2.dataUtilities.ChangeTemplatePickerDataUtility;
import wt.util.WTException;
public class ECNTemplateRequired extends ChangeTemplatePickerDataUtility
{
@Override
public Object getDataValue(String var1, Object var2, ModelContext var3) throws WTException
{
Object component = super.getDataValue(var1, var2, var3);
return component;
}
}
PetrH.