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

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

Table with Text box in windchill

adev
1-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
BhushanNehe
14-Alexandrite
(To:adev)

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
BhushanNehe
14-Alexandrite
(To:adev)

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

BhushanNehe
14-Alexandrite
(To:adev)

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

Top Tags