This is the little demo of Liferay with the ThemeRoller integrated in to the theme. This project isn't quite done but it's getting there!
Version 3:
Use this if you're running JVM 1.5
http://jdbc.postgresql.org/download/postgresql-8.4-701.jdbc3.jar
Version 4:
Use this if you're running JVM 1.6
http://jdbc.postgresql.org/download/postgresql-8.4-701.jdbc4.jar
Keep in mind that if you're using the Liferay bundle defaults, you're using JVM 1.5.
3. Set the properties in the portal-ext.properties file
jdbc.default.driverClassName=org.postgresql.Driver
jdbc.default.url=jdbc:postgresql://localhost:5432/lportal523
jdbc.default.username=postgres
jdbc.default.password=whateveryourpasswordis
4. Startup Liferay. Your database will look like this:
Enjoy!
ResourceURL resourceURL = renderResponse.createResourceURL();
function delFav(thisFav) {
if(confirm("This will delete your favourite. Are you sure you want to continue?")) {
$("div#showaddfav").html(" Deleting your favourite. Please wait.");
$.post("<%=resourceURL%>", { delFav: thisFav, usersId: "<%=themeDisplay.getUserId()%>" },
function(data){
if(checkType("del-saved", data) != -1) { $("#showaddfav").html("<span class="portlet-msg-success">Your favourite was deleted. Congrats!</span>"); }
if(checkType("error", data) != -1) { $("#showaddfav").html("<span class="portlet-msg-error">An unknown error has occured. Please notify the Administrator.</span>"); }
});
} else { return; }
}
function checkType(expr, thisUrl) {
return thisUrl.search(expr);
}
import java.io.PrintWriter;
import javax.portlet.ResourceRequest;
import javax.portlet.ResourceResponse;
public void serveResource(ResourceRequest req, ResourceResponse resp)
throws PortletException, IOException {
resp.setContentType("text/html");
PrintWriter writer = resp.getWriter();
// User want to delete
String delFav = ParamUtil.getString(req, "delFav");
try {
writer.print("<div id="response-wrap">del-saved</div>");
} catch (PortalException e) {
writer.print(" <div id="response-wrap">error</div>");
e.printStackTrace();
} catch (SystemException e) {
writer.print(" <div id="response-wrap">error</div>");
e.printStackTrace();
}
writer.close();
}