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

The PTC Community email address has changed to Learn more.

How to create a table using JSP and Info *Engine?


How to create a table using JSP and Info *Engine?

Hello everyone, I'm trying to implement Breed's  example How to put all the data in the table to look like in the tables below?
And how do I make sure that when I click on the "Search" button I stay on the same page and the data is updated?



All the code I wrote in the JSP-file customHomePageAction.jsp ( codebase/netmarkets/jsp/myCompany/customHomePageAction.jsp) 


<%@ page language="java" session="false" %>
<%@ taglib uri="" prefix="ie" %>
<%@ taglib uri="" prefix="c"%>
<%@ page import="com.jbtc.*" %>
<%@ page import="java.util.regex.*" %>
<%@ page import="java.util.Pattern.*" %>
<%@ page import="*" %>
<%@ page import="" %>
<%@ page import="wt.method.RemoteMethodServer" %>
<%@ page import="wt.util.WTException" %>
<%@ page import="wt.epm.EPMDocument" %>
<%@ page import="wt.doc.WTDocument" %>
<%@ page import="wt.fc.ObjectIdentifier" %>
<%@ page import="wt.fc.Persistable" %>
<%@ page import="wt.fc.PersistenceHelper" %>
<%@ page import="wt.lifecycle.LifeCycleHelper" %>
<%@ page import="wt.lifecycle.State" %>
<%@ page import="wt.lifecycle.LifeCycleManaged" %>

<ie:webject name="Get-Properties" type="MGT">
    <ie:param name="ATTRIBUTE" data=""/>
    <ie:param name="GROUP_OUT" data="properties"/>
    <title>Engineering Set State App</title>
    <link rel="stylesheet" type="text/css" href="jsp.css">

    String where = request.getParameter ("where");
    if ( where == null )
        where = "()";
    else if( where != null )
        where= "(name='*" + where + "*')";
    String wherevalue = request.getParameter ("where");

<div class="main">
    <div class="logo">
        <img src="netmarkets/images/cyclops.png" alt="setstate logo"      style="width:auto;">&nbsp&nbsp&nbsp&nbsp<img src="netmarkets/images/database.png" alt="setstate logo" style="width:auto;">
    <div class="searchbox">
        <form action="netmarkets/jsp/myCompany/customHomePageAction.jsp" method="post">
        <input type="hidden" name="obid" value="" />
        <input type="hidden" name="state" value="" />
        <input class="submit-textbox" type="text" name="where" value="<%=wherevalue%>">&nbsp<input class="submit-button" type="submit" value="Search">
<ie:webject name="Search-Objects" type="OBJ">
    <ie:param name="INSTANCE" data="$(properties[0][0])"/>>
    <ie:param name="TYPE" data="wt.epm.EPMDocument"/>
    <ie:param name="VERSION" data="LATEST"/>
    <ie:param name="ITERATION" data="ALL"/>
    <ie:param name="WHERE" data="<%=where%>"/>
    <ie:param name="WHERE" data="CADName='*'" />
    <ie:param name="ATTRIBUTE" data="CADName,name,state.state,versionInfo.identifier.versionId,iteration,obid" delim=","/>
    <ie:param name="GROUP_OUT" data="epmdocument"/>
<ie:webject name="Search-Objects" type="OBJ">
    <ie:param name="INSTANCE" data="$(properties[0][0])"/>
    <ie:param name="TYPE" data="wt.doc.WTDocument"/>
    <ie:param name="VERSION" data="LATEST"/>
    <ie:param name="ITERATION" data="All"/>
    <ie:param name="WHERE" data="<%=where%>"/>
    <ie:param name="WHERE" data="(state.state='*')"/>
    <ie:param name="ATTRIBUTE" data="name,state.state,versionInfo.identifier.versionId,iteration,obid" delim=","/>
    <ie:param name="GROUP_OUT" data="pdfdocument"/>
<ie:webject name="Merge-Groups" type="GRP">
    <ie:param name="CASE_IGNORE" data="true"/>
    <ie:param name="CLASS" data="class"/>
    <ie:param name="COMPARISON" data="ALPHA"/>
    <ie:param name="GROUP_IN" data="epmdocument"/>
    <ie:param name="GROUP_IN" data="pdfdocument"/>
    <ie:param name="GROUP_OUT" data="outdata"/>
    <ie:param name="SORTBY" data="name"/>
    <ie:param name="SORTED" data="ASC"/>
<div class="atable">
    <br />
    <table id="items">
            <th>File Name</th><th>Windchill Name</th><td>Current State</td><td>Rev</td><th></th><th></th><th></th><th></th><th></th>
        <ie:forEach groupIn="outdata" groupOut="row">
                <td><ie:getValue name="CADName"/></td>
                <td><ie:getValue name="name"/></td>
                <td><ie:getValue name="state.state"/></td>
                <td><ie:getValue name="versionInfo.identifier.versionId"/></td>
                <td><ie:getValue name="Iteration"/></td>
    <br />