Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hello All,
I want to use a text box and a button in a single row in Attributes table. How can I achieve this in a JCA attributes table. ? Is it possible through data utilities ?
If anyone has done anything similar or anyone has created a GuiComponent Data utility, can you please explain the procedure to do so. Any help will be appreciated.
Thanks,
Praseeth M
Hello Praseeth/Murugesh,
I am trying to implement similar functionality for two attributes one is combobox and another is a text area.
I want to see plus button of UI for both attributes together. Can you please share exactly how you implemented MultiValuedInputComponent by passing arraylist of component
Thanks & Regards,
Manisha
It is better to ask a new question then react to the 14 years old thread 😄
example
public Object getDataValue(String columnName, Object rowObject, ModelContext modelContext) throws WTException
{
ArrayList<AttributeGuiComponent> urlLinks = new ArrayList();
UrlDisplayComponent urlDisplay = new UrlDisplayComponent(columnID, null, null, null);
urlLinks.add(urlDisplay);
Label labelComponent = new Label(((ConfigPropertiesItem) rowObject).getFileName());
urlLinks.add(labelComponent );
return new MultiValuedDisplayComponent(urlLinks);
}
PetrH
Thank you for the example. I want to add a combo box here in with textbox. TextBox display component is working fine.
However is there any API for combobox for adding to MultiValuedDisplayComponent?
Hi @MP_10433217
What do you want? Don't you know how to create a ComboBox object?
You just add the combobox object to the ArrayList and this array contains all components that are shown in one column.
example of multiple components
Filename, DetailpageButton, Actions menu, URL , DisplayText
PetrH
ComboBox giving error that it cannot be cast to AttributeGUIComponent. As we are trying to add it to the ArrayList of AttributeGUIComponent.
In the example above all objects are of type AttributeGUIComponents, so able to add it to ArrayList of it.
Hi @MP_10433217
Try to use following ArrayList type:
GUIComponentArray urlLinks = new GUIComponentArray();
PetrH
Tried doing that. Below is the snapshot of the code.
Hi @MP_10433217
If you use GuiComponentArray why do you try to create new Multivalue component?
What about just try to return the GUIComponentArray instead of using the new Multivalue method?
here is an class example where you can find how to use the GUIComponentArray
com.ptc.windchill.enterprise.attachments.dataUtilities.PrimaryAttachmentPropertiesDataUtility
PetrH
I need MultiValuedInputComponent because I want to provide input like shown below. Want Plus sign and minus for both the components at the same time.