8.jca客制化table

1.jsp页面内容
2.java代码

<%@ include file="/netmarkets/jsp/util/begin.jspf"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.ptc.com/windchill/taglib/components" prefix="wca"%>

<wca:describeTable var="tableDescriptor" id="netmarkets.project.list" configurable="true"
           type="wt.projmgmt.admin.Project2" label="Project List">
         <wca:setComponentProperty key="actionModel" value="project list"/>
         <wca:describeColumn id="name" label="Name" sortable="true"/>
         <wca:describeColumn id="nmActions" />
         <wca:describeColumn id="owner" need="containerInfo.ownerRef"/>
         <wca:describeColumn id="container" label="Host" need="containerReference"/>
         <wca:describeColumn id="category"/>
         <wca:describeColumn id="phase"/>
         <wca:describeColumn id="state" need="containerTeamManagedInfo.state"/>
         <wca:describeColumn id="projectHealthStatus" need="healthStatus"/>
         <wca:describeColumn id="completionStatus">
                <wca:setComponentProperty key="percent" value="true"/>
         </wca:describeColumn>
         <wca:describeColumn id="modifyStamp" need="thePersistInfo.modifyStamp" sortable="true"
                             defaultSort="true" />
</wca:describeTable>


<wc:getCurrentUser var="user"/>

          <wca:getModel var="tableModel" descriptor="${tableDescriptor}"
                                 serviceName="ext.code.getParts" 
                                 methodName="getPart"> 
                            <comp:addServiceArgument value="${user}"/>
          </wca:getModel>

<wca:renderTable model="${tableModel}"/>

<%@ include file="/netmarkets/jsp/util/end.jspf"%>



2.java代码

package ext;

import wt.fc.PersistenceHelper;
import wt.fc.QueryResult;
import wt.method.RemoteAccess;
import wt.part.WTPart;
import wt.query.QuerySpec;
import wt.util.WTException;
public class SearchPart implements RemoteAccess{
public static QueryResult search() throws WTException{
  QuerySpec qs=new QuerySpec(WTPart.class);
  return PersistenceHelper.manager.find(qs);
}
public static void main(String[] args) {
 
}
}

你可能感兴趣的:(table)