Hi,

Im trying to make a table which design is based on the page 
the user is currently visiting. I.e., in jsp it could look
like this:

<%
String[] menuText = {"Customer", "Manufactures", "Machines" };
String[] menuLink = {"index", "ManufacturePage", "MachinePage" };
%>

<TABLE WIDTH="100%" HEIGHT="30" BORDER="0" CELLSPACING="0" CELLPADDING="0" >
<TR>
 <% for (int i = 0 ; i < menuText.length; i++){%>
   <%if (currentPage.compareTo(menuText[i])==0){%>
     <TD ALIGN=CENTER WIDTH="100" HEIGHT="30" id="type2">
   <%}else{%>
     <TD ALIGN=CENTER WIDTH="100" HEIGHT="30" id="type1">
   <%}%>
   <A HREF="<%=menuLink[i]%>.jsp"><%=menuText[i]%></A>
   </TD>
  <%}%>
  <TD id="type_bottom">
  &nbsp;
  </TD>
</TR>
</TABLE>

Is it possible to do something like this in struts? I have been playing
around with the logig:iterate tage, and allthough it will let me do a 
bean:write on the contents of the string arrays, i cant quite figure out
how to use these values and a in a html:link tag, because the values which
should go there are variables on a bean, not well defined strings?? 

Hope anybody can help, thanks in advance...

^torsten

Reply via email to