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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Translate the entire conversation x

On Create Page, not able to grey out an attribute value using API

KanchanaDutta
4-Participant

On Create Page, not able to grey out an attribute value using API

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.  

KanchanaDutta_1-1769617718278.png

However, I want to make the Color Classification Attribute similar to Name Extension attribute.

KanchanaDutta_0-1769617591681.png

I did &jcaDebug on the attribute. DefaultDataUtility is showing. Checked for create page wizard jsp page. Also checked for GUIComponent.

Any suggestion on this?

ACCEPTED SOLUTION

Accepted Solutions

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);

 

View solution in original post

4 REPLIES 4

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?

KanchanaDutta
4-Participant
(To:TDT)

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);

 

KanchanaDutta
4-Participant
(To:TDT)

Thanks! Let me give a try.

Announcements
Top Tags