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
Version: Windchill 13.0
Use Case: Unable to grey out an attribute using API
Description:
Wrote a Validator for the Color classification attribute to make the value Read only.
However, I want to make the Color Classification Attribute similar to Name Extension attribute.
I did &jcaDebug on the attribute. DefaultDataUtility is showing. Checked for create page wizard jsp page. Also checked for GUIComponent.
Any suggestion on this?
Solved! Go to Solution.
Read Only i.e Unassignable can be controlled using the Visibility feature in Type and Attribute Management.
If you want the attribute to be grayed out, it can be implemented through a data utility.
Use the following API to make the attribute non-editable
AttributeInputComponent attributeInputComponent =
((AttributeInputCompositeComponent) object).getValueInputComponent();
attributeInputComponent.setEditable(false);
Hi @KanchanaDutta,
Is there any specific reason for making the attribute read-only using a validator, when this can be achieved through configuration itself?
Do you want the attribute to be greyed out rather than unassignable?
Through Configuration, I checked it under Cascading rules. Was not able to do.
Yes, I want it greyed out rather than Unassignable
Read Only i.e Unassignable can be controlled using the Visibility feature in Type and Attribute Management.
If you want the attribute to be grayed out, it can be implemented through a data utility.
Use the following API to make the attribute non-editable
AttributeInputComponent attributeInputComponent =
((AttributeInputCompositeComponent) object).getValueInputComponent();
attributeInputComponent.setEditable(false);
Thanks! Let me give a try.
