Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
Version: Windchill 13.0
Use Case: Call DataUtility uder Text box that is rendered by Table builder
Description:
Call DataUtility uder Text box that is rendered by Table builder.
Hi @AA_9841156,
I understand that you want to build the Attribute Panel.
Do you want to call a Data Utility on one of the attribute present within the Attribute Panel group?
You can use the following API
editABC.setDataUtilityId("x");
where x represents the selector value used to register the Data Utility.
Hi @TDT .
Actually I am trying to create Attribute Panel in which two thing only .one is label and second i want Textbox in front of that and i want call datautility there.
I tried already editABC.setDataUtilityId("x") but its not hitting dataUtility
Have you registered the datautility?
Yes I registered
ok, What is the reason you need text box?
In Text box need to show suggested values.
Ok. Is there any specific reason for building it from the Attribute Panel?
Where exactly is this Attribute Panel being invoked from?
once click on action this wizard will open and after lable
want to populate like this means suggested value through data utility .in part Create layout datauitility is working fine
Are the Create and Edit layouts coming from OOTB functionality, or have they been customized using the Attribute Panel?
its OOTB functionality
In that case, you can directly register the Data Utility on the attribute.
There is no need to build a separate Attribute Panel.
Hi @TDT ,
Actually in create Layout datautility is working same behavior want on wizard once action click on.
When you mention the Create layout, I assume it is OOTB, as you already confirmed.
Regarding the wizard that opens when clicking the action, Is that an OOTB wizard, or a custom one built using the JSP and Attribute Panel?
Its custom one built using the JSP and Attribute Panel
You will need to make a few changes to your existing logic.
I have tested the following logic, and it is working as expected.
No need to create TextBox.
@Override
public ComponentConfig buildComponentConfig(ComponentParams componentParams) throws WTException {
ComponentConfigFactory factory = getComponentConfigFactory();
AttributePanelConfig attributePanelConfig = factory.newAttributePanelConfig();
GroupConfig groupConfig1 = factory.newGroupConfig("editABC","Edit ABC", Integer.valueOf(1));
AttributeConfig editABC = factory.newAttributeConfig();
editABC.setId("editABC");
editABC.setLabel("AfterMarket ABC");
editABC.setRequired(true);
groupConfig1.addComponent(editABC);
AttributeConfig comp = factory.newAttributeConfig();
comp.setId("editXYZ");
comp.setLabel("AfterMarket XYZ");
comp.setRequired(true);
comp.setDataUtilityId("suggestionDataUtility");
groupConfig1.addComponent(comp);
attributePanelConfig.addComponent(groupConfig1);
return attributePanelConfig;
}
Could you please share your dataUtility
I did not implement the logic for the suggestions.
I only tested whether the Data Utility is being triggered.
