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

Table with Text box in windchill

SOLVED
Highlighted
Newbie

Table with Text box in windchill

Hello,

Is there any way we can create the Textbox in the component builder and a search button

Please help if any body know this

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Table with Text box in windchill

Hi Ankit,

As mentioned earlier, the second link should be helpful.

Also, you may want to try following to get started. It's not a complete example though.

1. Create a jsp with a simple form, you can also do this by creating attribute panel

<input type="text" size="25px" id="EnterNumber" name="EnterNumber" value="">

<input type="text" size="25px" id="EnterName" name="EnterName" value="">

  <input type="button"  id="SubmitButtonID" name="SubmitButtonID" value="Search" onClick="submitFunction();">

<div id="mvcTable">

  <mvc:tableContainer compId="<<YOUR COMPONENT ID>>" height="600" />

  </div>

2. Include the JS

function submitFunction() {

  var number = document.getElementById('EnterNumber').value;

  var name = document.getElementById('EnterName').value;

  var params = {

  number : number,

  name : name

  };

  //reload the table builder

  PTC.jca.table.Utils.reload('<<YOUR COMPONENT ID>>',params,true);

}

3. In your builder you should be able to get the parameters as shown below

public Object buildComponentData(ComponentConfig  config, ComponentParams params) throws Exception {

  String PartNumber= (String) params.getParameter("number");

  String PartName = (String) params.getParameter("name");

Regards,

Bhushan

4 REPLIES 4

Re: Table with Text box in windchill

Are you creating a Wizard? Can you check following links on your server to see if that helps.

http://<<HOSTNAME>>/Windchill/app/#netmarkets/jsp/componentCatalog/wizardComponent.jsp

http://<<HOSTNAME>>/Windchill/app/#ptc1/comp/carambola.testClients.search

Regards,

Bhushan

Re: Table with Text box in windchill

Hello Bhushan,

No I am not creating a Wizard I like the functionality like search where I can input some values and as per that I will get the result

Thanks

Ankit

Re: Table with Text box in windchill

Hi Ankit,

As mentioned earlier, the second link should be helpful.

Also, you may want to try following to get started. It's not a complete example though.

1. Create a jsp with a simple form, you can also do this by creating attribute panel

<input type="text" size="25px" id="EnterNumber" name="EnterNumber" value="">

<input type="text" size="25px" id="EnterName" name="EnterName" value="">

  <input type="button"  id="SubmitButtonID" name="SubmitButtonID" value="Search" onClick="submitFunction();">

<div id="mvcTable">

  <mvc:tableContainer compId="<<YOUR COMPONENT ID>>" height="600" />

  </div>

2. Include the JS

function submitFunction() {

  var number = document.getElementById('EnterNumber').value;

  var name = document.getElementById('EnterName').value;

  var params = {

  number : number,

  name : name

  };

  //reload the table builder

  PTC.jca.table.Utils.reload('<<YOUR COMPONENT ID>>',params,true);

}

3. In your builder you should be able to get the parameters as shown below

public Object buildComponentData(ComponentConfig  config, ComponentParams params) throws Exception {

  String PartNumber= (String) params.getParameter("number");

  String PartName = (String) params.getParameter("name");

Regards,

Bhushan

Re: Table with Text box in windchill

Thank you so much Bhushan for your help