function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ai2ai2 

Help converting JSPs into VisualForce

Hey ya'all,

 

I've been looking for help on a real simple task.  I'm trying to grasp of the apex VisualForce syntax for transforming my JSPs into VisualForce pages; but I cannot find a decent howto or tutorial for how to include server side code with no matching controller on a VisualForce page.  I've browsed much of the resources and scavengered the community forums without any luck.  I've included a small sample below that shouldn't take very long to translate.  Any guidance and direction would be much appreciated. Thanks in advance.

 

 

<%@ page import="java.util.*" %>
<%@ page import="java.text.SimpleDateFormat" %>

           
<div class="contentBox">
               
<h2>Upcoming Events</h2>
               
<%
                   
SimpleDateFormat formatter = new SimpleDateFormat("MMM dd, yyyy");
                   
if(session.getAttribute("upcoming")!= null) {

                       
List<Event> upcomingList = (List)session.getAttribute("upcoming");
                       
if(upcomingList!=null) {
                           
for(Event event:upcomingList) {
                           
String date = formatter.format(event.getDate());
                            %>
                   
<p><a href="/doep/ViewEventDetail?id=<%=event.getId()%>" class="titleReg"><%=event.getEventName()%>:<br /></a>
                   
<span class="stamp"><%=date %> / <%=event.getTime() %><br />
                   
<%= event.getAddress()%></span>
               
<%}
                       
}
                   
}  
                    %>

           
</div>

 

 

Message Edited by ai2 on 02-07-2010 08:23 AM
Message Edited by ai2 on 02-09-2010 09:16 AM