Hi All:

This is the easy part.. it's a template for making your own webject.

BUT, I'm learning how to write my own Customized Webjects and would
appreciate any code for querying for a specific document in a specific
folder in a specific cabinet. (I know I can do this with webjects, but I'd
like to learn how to do it via the Windchill database itself).

Also, any tips for traversing the teams and learning team-member roles would
be very, very much appreciated!

PTC gives no examples on anything related to querying the actual WC database
so if anybody has ANY tips, I would be forever grateful!!

- Rich

** Class stored in Windchill/codebase/web/webjects/WebTest.class **

** This is the custom webject (WebTest.jsp) **

------------------------------------------------------------

package web.webjects;

import com.infoengine.util.IEException;
import com.infoengine.exception.fatal.IEInternalServiceException;
import com.infoengine.procunit.webject.GroupWebjectException;
import com.infoengine.object.factory.*;
import wt.doc.*;
import wt.fc.QueryResult;

import java.util.Enumeration;
import java.util.Vector;

public class WebTest
{
        public static Task getdocdata(Task task) throws IEException
        {
                try {

                    // Insert dbase code here
                } catch (Exception e){
                }

                return(null);
        }
}

** This is the jsp call to the webject (GetDocData.jsp) **

------------------------------------------------------------------------
<%@ taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>

<% String instance=wt.util.WTProperties.getLocalProperties().getProperty("wt.federation.ie.VMName"); %>
<ie:webject name="getdocdata" type="EXT" use="web.webjects.WebTest">
	<ie:param name="group_out"     data="output"/>
</ie:webject>

**Makefile ** 

----------------

SRC =   WebTest.java

CLS =   $(SRC:.java=.class)

CLSPATH = ${CLASSPATH}:/windchill/wc626/ptc/tomcat/lib/common/servlet.jar
CLASSDIR = classes

.SUFFIXES:
.SUFFIXES:      .java .class

all:    do_all

do_all:
        if [ -d classes ]; then rm -rf classes; fi
        mkdir -p classes
        javac -classpath ${CLSPATH} -d ${CLASSDIR} ${SRC}

debug:
        javac -classpath ${CLSPATH} -g -deprecation -d ${CLASSDIR} ${SRC}

.java.class:
        javac -classpath ${CLSPATH} -d ${CLASSDIR} $?

clean:
        rm -f ${CLS}
