+

Search Tips   |   Advanced Search

CustomerView.jsp

 

<%@page session="false" contentType="text/html" pageEncoding="ISO-8859-1" import="java.util.*,javax.portlet.*,com.ibm.etools.portlet.jsr286.*" %>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>        
<%@taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portlet-client-model" prefix="portlet-client-model" %>        
<portlet:defineObjects/>
<portlet-client-model:init>
      <portlet-client-model:require module="ibm.portal.xml.*"/>
      <portlet-client-model:require module="ibm.portal.portlet.*"/>   
</portlet-client-model:init>         

<%
     CustomerDetailBean cdb = (CustomerDetailBean) renderRequest.getAttribute(CustomerDetailPortlet.CUSTOMER_DETAIL_BEAN);
 %>


    <table border="0" cellspacing="0" cellpadding="3">

        <% CustomerDetail cd = cdb.getCustomerDetail(); %>

      <tr class="wpsTableShdRow">
        <td>
        Customer_ID
        </td>
        
        <td>
        <%= cd.getCustomerId() %>
        </td>
      </tr>

      <tr class="wpsTableShdRow">
        <td>
        Name
        </td>

        <td>
        <%= cd.getName() %>
        </td>
      </tr>

      <tr class="wpsTableShdRow">
        <td>
        Address
        </td>

        <td>
        <%= cd.getAddress() %>
        </td>
      </tr>

      <tr class="wpsTableShdRow">
        <td>
        Contact
        </td>
        
        <td>
        <%
        String varSubject = "";
    if (cd.getAddress().indexOf(",") > 0) {         
            varSubject = "?subject=" + cd.getAddress().substring(0,cd.getAddress().indexOf(","));
         }
        %>
          <a href="mailto:<%= cd.getContactInfo() %><%= varSubject %>"><%= cd.getContactInfo() %></a>
        </td>

      </tr>
    </table>
    
    <div class="wpsPortletText">
      <FORM method="POST"
            action="<%= cdb.getActionURL() %>"
          enctype="application/x-www-form-urlencoded"
          name="CustomerDetails">
      <LABEL class="wpsLabelText" for="<%= CustomerDetailPortlet.CUSTOMER_ID %>">Enter customer id:</LABEL><BR/>
      <INPUT class="wpsEditField" name="<%= CustomerDetailPortlet.CUSTOMER_ID %>" type="text"/><BR/>
      <INPUT class="wpsButtonText" name="submit" type="submit" value="Submit"/>
      </FORM>
    </div>