You need to sign in to do that
Don't have an account?
ai2
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>