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

windchill customization help

Highlighted
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?

Tags (1)
10 REPLIES 10
Highlighted

Re: windchill customization help

Could you post a screenshot of what you are trying to achieve?

Highlighted

Re: windchill customization help

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.

Highlighted

Re: windchill customization help

Did you register your builder in codebase/config/mvc/custom.xml ?

Highlighted

Re: windchill customization help

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.

Highlighted

Re: windchill customization help

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;

  }

}

Tags (1)
Highlighted

Re: windchill customization help

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.

Highlighted

Re: windchill customization help

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 🙂

Highlighted

Re: windchill customization help

ohh okay then ! thanks 🙂

Highlighted

Re: windchill customization help

Moved to the customization community to give your question the best exposure.

Highlighted

Re: windchill customization help

Thanks Toby.

Announcements