• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Simple question

 
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

<logic:present name="list">
<table border="0" cellspacing="0" cellpadding="0" align="center" width="70%" style="border-collapse:collapse;">
<tr bgcolor="#98AFCC">
<th>User ID</th>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
</tr>
<%boolean even = false; %>
<logic:iterate id="user" name="list">
<% even = !even; %>
<tr bgcolor="<%=even?"#B7D3F5":"#D6E0F5" %>"> (what is #B7D3F5 and #D6E0F5 ? And how does the "even" boolean variable work here?) <td>
<bean:write name="user" property="userId" />
</td>
<td>
<bean:write name="user" property="firstName" />
</td>
<td>
<bean:write name="user" property="lastName" />
</td>
<td>
<bean:write name="user" property="email" />
</td>
</tr>
</logic:iterate>
<tr>
<td colspan="6" align="center">
<a href="adduser.jsp">Add New User</a>
</td>
</tr>
</table>
</logic:present>

 
Ranch Hand
Posts: 466
1
IntelliJ IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is for setting background color.... refer some html tutorial.
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

what is #B7D3F5 and #D6E0F5 ?


Hex color code.

And how does the "even" boolean variable work here?


Its ternary operator, and its takes the boolean as its first parameter, right ?

And Use meaningful subject line and edit the post with code tags.
 
Every time you till, you lose 30% of your organic matter. But this tiny ad is durable:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic