<%-- 
/**
  * Copyright (c) 2004 Red Hat, Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or any later version.
  *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  * USA
  *
  * Component of: Red Hat Application Server
  * 
  * Initial Developers: Aizaz Ahmed
  *                     Vivek Lakshmanan
  *                     Andrew Overholt
  *                     Matthew Wringe
  *
  */
--%>
<%-- This page provides a detailed view for Types. It expects the type 
object ItemLocal to be defined as typeToDisplay. This is clumsy ... if necessary
it should be modified so that the type is loaded into the session and the
name of the type is passed to this page --%>

<%@ page contentType="text/html"
         import="olstore.entity.*"
         import="java.util.Collection"
         import="java.util.Iterator" %>


<div class="TypeView">
<%  TypeLocal type = (TypeLocal) request.getAttribute( "typeToDisplay" );
%>  <h3 class="TypeTitle"><%= type.getName() %></h3><%
    Collection props = type.getProperties();
    Iterator propIt = props.iterator();
%> 
<h5>Properties:</h5>
<ul>
<%
    while ( propIt.hasNext () ) {
        PropertyLocal prop = (PropertyLocal)propIt.next();
%>
            <li> <%= prop.getName () %> </li>
<%
    }
%> 
</div>
