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

We are happy to announce the new Windchill Customization board! Learn more.

windchill customization help

sathimuthu
4-Participant

windchill customization help

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?

10 REPLIES 10

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) .doubt1.PNGdoubt2.PNG

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 😕

olivier fresse

Thanks.

Well, let's try to summerize then, with an example, a table named ext.custom.jca.DisplayPictures :

  1. You need to include your component in yout JSP page :

    <jsp:include page="${mvc:getComponentURL('carambola.mvc.table')}"/>


  2. You need to create the DisplayPictures component

    Important points here :
    1. You need to have a table id, use table.setId where table is the table config object
    2. mvc/custom.xml, but it's ok
    3. The most important : Your code must be seen from tomcat ! It means that you have to package it in a jar which is under $WT_HOME/codebase/WEB-INF/lib

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.

sathimuthu
4-Participant
(To:Tmetcalf)

Thanks Toby.

Top Tags