Chris,
Sorry to read about your pain, but I actually prefer the new code! I don't
have to remember what are no worse than proprietary tags and their syntax,
and can easily write code that is going to be infinitely more flexible than
LOOP and INCLUDEIF and EXCLUDEIF can be. And if you align the code like you
have in your first example, it doesn't look that terrible:
<TABLE>
<% RowBean[] rows = results.getRows();
for (int i = 0; i < rows.length; i++) { %>
<TR>
<% CellBean[] cells = rows[i].getCells();
for (int j = 0; j < cells.length; j++) { %>
<TD><%= cells[j] %></TD>
<% } %>
</TR>
<% } %>
</TABLE>
And if you pop this into Homesite 4.0 the color coding will nicely shade the
Java code to distinguish it.
There are formatting beans out there if you want to move the code generation
into a formatting bean. I believe IBM has a number of them. Or you could
easily write a bean to produce your output.
Dan
> ----------
> From: Chris Fesler[SMTP:[EMAIL PROTECTED]]
> Reply To: [EMAIL PROTECTED]
> Sent: Thursday, May 06, 1999 4:44 PM
> To: [EMAIL PROTECTED]
> Subject: The horror of moving from 0.92 to 1.0
>
> I've spent a couple of days mucking about with the new JSP, and I have to
> say, I come down hard in the camp of those who are unhappy. There are some
> great things in 1.0 -- for instance, the retirement of SETONCREATE and
> SETFROMREQUEST -- but the absence of INCLUDEIF, EXCLUDEIF and LOOP are
> killing me. Let me give a quick & easy example.
>
> In the application I'm working on, UI writers often have the need to
> traverse a data set to make a table. In 0.92, this was accomplished in a
> really lovely way:
>
> <USEBEAN name="results" type="ResultsBean">
> ...
> <TABLE>
> <LOOP property="results:rows" propertyelement="row">
> <TR>
> <LOOP property="row:cells" propertyelement="cell">
> <TD><%= cell %></TD>
> </LOOP>
> </TR>
> </LOOP>
> </TABLE>
>
>
> This was great for the following reason: it was really easy for
> non-programmers to both understand and write (I know this from direct
> experience, incidentally). This is, for me & my customers, terrifically
> important.
>
> You can imagine what things look like now, but let me show you, if only
> for
> the cathartic effect I'm hoping it will have on me:
>
> <TABLE>
> <% RowBean[] rows = results.getRows();
> for (int i = 0; i < rows.length; i++) { %>
> <TR>
> <% CellBean[] cells = rows[i].getCells();
> for (int j = 0; j < cells.length; j++) { %>
> <TD><%= cells[j] %></TD>
> <% } %>
> </TR>
> <% } %>
> </TABLE>
>
> To me, this is heinous. It's ugly & error-prone to boot. To my customers,
> it
> may very well be incomprehensible (can you tell I'm unhappy? ;). I'm
> looking
> into solutions (if anybody on the list has one, please say so!) such as
> maybe creating some formatting beans (or even using IBM's JSP alphaBeans),
> but there's no way they will match the high degree of intuitiveness (for
> HTML coders) that the 0.92 version allows.
>
> Am I missing something here?
>
> chris
> [EMAIL PROTECTED]
>
> ==========================================================================
> =
> 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".
>
===========================================================================
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".