<% request.setAttribute("navigation.path","home.march"); %> <%@ include file="/top.jsp" %> <%@ page import="javax.naming.*" %> <%@ page import="javax.ejb.*" %> <%@ page import="org.eypd.ejb.beans.interfaces.*"%> <%@ page import="java.util.*"%> <%@ page import="org.eypd.shared.*"%> <%@ taglib uri="encima" prefix="encima" %> <%@ taglib uri="fmt" prefix="fmt" %> <%@ include file="left.jsp" %>
<fmt:message key=" width="209" height="48"> <% Context lContext = new InitialContext(); SearchLocalHome searchHome = (SearchLocalHome) lContext.lookup("Search"); SearchLocal search = searchHome.create(); String query = DiaryDisplayData.getSelectPart(); // Since the diary items are ordened by diary date descendent, the first one in the collection is the most recent one!! Collection searchResult = search.searchDisplayData(new DiaryDisplayData(query), lang); if (searchResult!=null && searchResult.size()>0) { Iterator it = searchResult.iterator(); DiaryDisplayData diaryData = (DiaryDisplayData) it.next(); int lastDiaryId = diaryData.getId(); DiaryLocalHome diaryHome = (DiaryLocalHome) lContext.lookup("Diary"); //DiaryLangLocalHome diaryLangHome = (DiaryLangLocalHome) lContext.lookup("DiaryLang"); DiaryLocal diary = diaryHome.findByPrimaryKey(new DiaryPK(lastDiaryId)); DiaryLangLocal diaryLang = diary.getLang(diaryData.getLang()); %> <% } String marchCountryCode2 = (String) application.getAttribute("org.eypd2003.march_position.country"); String marchCountry2 = null; if (marchCountryCode2==null) { try { MarchPositionLocalHome positionHome = (MarchPositionLocalHome) lContext.lookup("MarchPosition"); MarchPositionLocal position = positionHome.findByPrimaryKey(new MarchPositionPK(1)); application.setAttribute("org.eypd2003.march_position.country", position.getCountry()); application.setAttribute("org.eypd2003.march_position.city", position.getCity()); ResourceBundle b = ResourceBundle.getBundle("framework",new Locale(lang)); marchCountryCode2 = position.getCountry(); marchCountry2 = b.getString("country."+marchCountryCode2); } catch(Exception e) { marchCountry2 = "unknown"; } } else { ResourceBundle b = ResourceBundle.getBundle("framework",new Locale(lang)); marchCountry2 = b.getString("country."+marchCountryCode2); } %>

<fmt:message key=" height="41">

>

<fmt:bundle basename=" width="165" height="208" align="left">

>

The bus<%=diaryLang.getBody()%>

>
>


    <% int maxItems = 4; EventDisplayData edd = new EventDisplayData(EventDisplayData.getSelectPart() + " AND N.STARTDATE>=TRUNC(SYSDATE) AND N.EVENT_COUNTRY='" + marchCountryCode2 + "' "); Collection events = search.searchDisplayData(edd, lang); search.remove(); Iterator eventit = events.iterator(); for (int i = 0;eventit.hasNext()&&i!=maxItems;i++){ EventDisplayData data = (EventDisplayData)eventit.next(); %>
  • &item_lang=<%=data.getLang()%>"> ()
  • <% } %>
  >
   
<%@ include file="/search_form.jsp" %>
<%@ include file="/right.jsp" %>