webwork/src/resources/web/tests beaninfo-resin.jsp,NONE,1.1 test-resin.jsp,NONE,1.1

[email protected] Mon, 27 May 2002 11:16:41 -0700
Newsgroups gmane.comp.java.webwork.cvs
Message-ID <[email protected]>
Update of /cvsroot/webwork/webwork/src/resources/web/tests
In directory usw-pr-cvs1:/tmp/cvs-serv14518

Added Files:
	beaninfo-resin.jsp test-resin.jsp 
Log Message:
added resin 2.1.1 test

--- NEW FILE: beaninfo-resin.jsp ---
<%@ taglib uri="webwork" prefix="webwork" %>
<webwork:bean name="'webwork.util.BeanInfoUtil'">
  <%--<webwork:param name="'bean'" value=".."/>--%>
<%--
<TABLE BORDER=1>
<webwork:property value="beanInfo/beanDescriptor">
<TH COLSPAN=4>Bean properties (class <webwork:property value="beanClass"/>)</TH>
</webwork:property>

<TR><TH>Property name</TH><TH>Property type</TH><TH>Readable</TH><TH>Writable</TH></TR>
<webwork:iterator value="beanInfo/propertyDescriptors">
<TR><TD><webwork:property value="name"/></TD><TD><webwork:property value="propertyType"/></TD><TD ALIGN=center><webwork:if test="readMethod">X</webwork:if>&nbsp;</TD><TD ALIGN=center><webwork:if test="writeMethod">X</webwork:if>&nbsp;</TD></TR>
</webwork:iterator>

</TABLE>
--%>
</webwork:bean>


--- NEW FILE: test-resin.jsp ---
<%@ taglib uri="webwork" prefix="webwork" %>
<webwork:action name="'test'">

<HTML>
<HEAD>
<TITLE>WebWork miscellaneous tests</TITLE>
</HEAD>
<BODY>

<H1>WebWork miscellaneous tests</H1>

<webwork:bean name="'webwork.util.Timer'" id="timer"/>

<H2>Testing basic name resolution</H2>
Get property "name" from result. Value is: <B>"<webwork:property value="name"/>"</B><br>
Get property "person/name" from result. Value is: <B>"<webwork:property value="person/name"/>"</B><br>
Get property "/person/email" from result. Value is: <B>"<webwork:property value="/person/email"/>"</B>
<P>
Get settings: <BR>
<B>
<webwork:property value="settings">
Foo:<webwork:property value="['foo']"/><br>
Black:<webwork:property value="['black']"/><br>
</webwork:property>
</B>
<br>
Testing Collections access: <webwork:property value="people[0]/name"/><br>
Testing second method call: <webwork:property value="second('one', 'two')"/><br>
Testing embedded second method call: <webwork:property value="second('one', second('one', 'two'))"/><br>
Testing escaped quotes: <webwork:property value="second('one', '\'1\', \'2\'')"/><br>
Testing escaped quotes: <webwork:property value="'O\'Hare'"/><br>
Testing escaped backslash: <webwork:property value="second('one', 'c:\\Program Files\\')"/><br>
Testing embedded slash: <webwork:property value="'this/and/that'"/><br>
<br>
Time:<webwork:property value="@timer/time"/>ms
<P>
<H2>Testing scoping of property names by using .. (relative scoping), @ (absolute scoping using named attribute objects), and / (access top value)</H2>
<webwork:bean name="'webwork.examples.Person'" id="rick">
  <webwork:param name="'name'" value="'Rickard'"/>

  <webwork:bean name="'webwork.examples.Person'">
    <webwork:param name="'name'" value="'Maurice'"/>

   name=<webwork:property value="name"/><BR>
    ../name=<webwork:property value="../name"/><BR>
    @rick/name=<webwork:property value="@rick/name"/><BR>
    /name=<webwork:property value="/name"/><BR>

  </webwork:bean>
</webwork:bean>
Time:<webwork:property value="@timer/time"/>ms
<P>
<H2>Testing iterator and property tags</H2>
<TABLE BORDER=1>
<webwork:iterator value="people">
<TR><TD><webwork:property value="name"/></TD><TD><webwork:property value="email"/></TD></TR>
</webwork:iterator>
</TABLE>
Time:<webwork:property value="@timer/time"/>ms

<P>
<H2>Testing indexed property access</H2>
<webwork:action name="'BookList'">
   Title of book 1: <webwork:property value="bookArray[1]/title"/><BR>
   Author of book 2: <webwork:property value="books[2]/author"/><BR>
</webwork:action>
Time:<webwork:property value="@timer/time"/>ms

<P>
<H2>Testing client info bean</H2>
<webwork:action name="'ClientInfo'">
   Browser:<webwork:property value="browser"/><BR>
   Version:<webwork:property value="version"/><BR>
   Supports GIF:<webwork:if test="supportsType('image/gif') == true">Yes</webwork:if><webwork:else>No</webwork:else><BR>
</webwork:action>

Time:<webwork:property value="@timer/time"/>ms
<P>
<H2>Testing bean-info utility</H2>
<webwork:property value="people[0]">
  <%--<webwork:include value="'beaninfo.jsp'"/>--%>
</webwork:property>

Time:<webwork:property value="@timer/time"/>ms

Total time:<webwork:property value="@timer/total"/>ms
<HR>

</BODY>
</HTML>

</webwork:action>



_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm