Java Reference
In-Depth Information
<td style="color: #ffffff; font-weight: bold;">Name</td>
<td style="color: #ffffff; font-weight:
bold;">Amount</td>
<td style="color: #ffffff; font-weight:
bold;">Stage</td>
<td style="color: #ffffff; font-weight:
bold;">Probability</td>
<td style="color: #ffffff; font-weight: bold;">Close
Date</td>
<td style="color: #ffffff; font-weight:
bold;">Order</td>
</tr>
<% for (int i = 0;i<opportunities.size();i++) { %>
<% Opportunity o = (Opportunity)opportunities.get(i); %>
<tr style="background:#ffffff"
onMouseOver="this.style.background='#eeeeee';"
onMouseOut="this.style.background='#ffffff';">
<td nowrap><%= o.getName() %></td>
<td>$<%= o.getAmount() %></td>
<td><%= o.getStageName() %></td>
<td><%= o.getProbability() %>%</td>
<td><%= sdf.format(o.getCloseDate()) %></td>
<td><%= o.getOrderNumber() %></td>
</tr>
<% } %>
</table>
<% } else { %>
<p/><span class="heading">No Opportunities found for <%=
account.getName() %></span>
<% } %>
</body>
</html>
Listing 4-5 contains the code for the Create New Opportunity page, which is shown
in Figure 4-5. This HTML form collects the name of the opportunity, the anticipated
amount of the opportunity, and some additional attributes. Submitting the form
creates the new opportunity in Bigtable and takes users back to the Account Display
page where they can view the newly created opportunity (Figure 4-6).
 
Search WWH ::




Custom Search