Here is my old JSP page, under the .92 spec, followed
by the 1.0 version. Thanks to 1.0, I can't read my
templates anymore, and they are also more cumbersome
to write. Can anybody help me work around these
issues: 1. no nested property display, 2. no loop or
conditional tags, 3. no processRequest() (John
Peterson's suggestion was interesting, I thought).
Before:
-------
<USEBEAN name=page type=babble.page.ThreadsPage
lifespan=page>
<SETFROMREQUEST beanproperty="boardId"
paramname="boardid">
</USEBEAN>
<html>
<body>
Board: <DISPLAY property=page:board:name><p>
<LOOP property=page:threads propertyelement=aThread>
<DISPLAY property=aThread:lastPost>
(<DISPLAY property=aThread:postCount>)
<a href="messages.jsp?threadid=<DISPLAY
property=aThread:threadId>"><DISPLAY
property=aThread:subject></a><br>
</LOOP>
</body>
</html>
After (U-G-L-Y)
-----
<jsp:useBean id="page" class="babble.page.ThreadsPage"
scope="request" />
<jsp:setProperty name="page" property="boardId"
param="boardid" />
<html>
<body>
Board: <%=page.getBoard().getName()%><p>
<%babble.entity.Thread[] threadlist=page.getThreads();
for (int i = 0; i < threadlist.length; i++) { %>
<%=threadlist[i].getLastPost()%>
(<%=threadlist[i].getPostCount()%>)
<a
href="messages.jsp?threadid=<%=threadlist[i].getThreadId()%>"><%=threadlist[i].getSubject()%></a><br>
<% } %>
</body>
</html>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".