Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
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
Solved! Go to Solution.
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
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