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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Table with Text box in windchill

adev
1-Visitor

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

ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

4 REPLIES 4

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

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

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

Thank you so much Bhushan for your help

Announcements


Top Tags