Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
I'm new to windchill customization . Currenly working on windchill 10.1 .I've just learnt to create actions . Now i would like to know about creating a attribute panel configuration. As in creating an action . upon clicking it i want to display certain details . adding groups in panel etc.
can anyone help?
Could you post a screenshot of what you are trying to achieve?
so i created an action and called a jsp inside the action . inside the jsp , i called the builder class . i had a piece of code to create a panel , group and adding the group to the panel. i registered the builder . but still not getting the results . once i got an error stating unable to create or find builder . i want an action say something like report , for a document . on clicking that action i want a new page which displays the attributes of the document either in a panel or as a table format ( for example) .
i might have been wrong in my previous steps.i would like you to tell me the step by step procedure to do panel configuration. Binesh Kumar
Thanks.
Did you register your builder in codebase/config/mvc/custom.xml ?
yeah i did register in the custom.xml
i'd like to know if procedure was anywhere wrong because i dont find anything wrong .
or can you gimme the steps on what i should do n where ? may be was i wrong with the location of the files or the syntax . i dont know 😕
Thanks.
Well, let's try to summerize then, with an example, a table named ext.custom.jca.DisplayPictures :
Hope it helps,
package ext.custom.jca.colisage;
import com.ptc.mvc.components.*;
import wt.util.WTException;
import wt.util.WTMessage;
/**
* $Rev:: $: Version
* $Author:: $: Dernier modificateur
* $Date:: $: Date du dernier commit
* Url de la version la plus recente
* $HeadURL$
**/
@ComponentBuilder("ext.custom.jca.DisplayPictures")
public class DisplayPicturesTableBuilder extends AbstractComponentBuilder implements ComponentDataBuilder {
@Override
public ComponentConfig buildComponentConfig(ComponentParams componentParams) throws WTException {
final ComponentConfigFactory factory = getComponentConfigFactory();
final TableConfig table;
table = factory.newTableConfig();
// You need to set an id !
table.setId("custom.PictureTable");
// Add columns...
table.addComponent(getColumn("name", WTMessage.getLocalizedMessage("ext.custom.Messages", "fileName"), factory));
return table;
}
public Object buildComponentData(ComponentConfig componentConfig, ComponentParams componentParams) throws Exception {
// Needs to return some data...
}
ColumnConfig getColumn(final String id, String label, final ComponentConfigFactory factory) {
final ColumnConfig column = getComponentConfigFactory().newColumnConfig(id, label, true);
//column.setSortable(true)
return column;
}
}
i have a doubt . component url and component builder id , are they different ?? i used the same name when i registered in custom.xml and in builder class component id.
Good point, most of the time, I use differents id, but I don't see any potential issues in using the same.
These are very different beast.
The component id is used on the client side, to identifiy the component in the HTML.
The builder id is the Spring MVC id.
Something to try 🙂
ohh okay then ! thanks 🙂
Moved to the customization community to give your question the best exposure.
Thanks Toby.