Artshow Demo is now available for demo.

Posted Saturday, December 27, 2008 8:21 PM by michelle

merry Christmas all.

 We have a new iphone browser demo to show you.

 You can see some pictures and preview it here.

 Update***

Source is now available in our svn repository.

This prototype differs from the previous prototype , the earlier prototype was a static webpage created with dashcode and integrated with some icefaces components.

This new demo uses two custom icefaces components to create and manage the page. IphoneHelper similar to the version shown in our tutorial is used to construct the general UI, and another component ListViewData , is a custom datatable renderer that renders and manages the data table The javascript is again developed using dashcode and compressed using the yui compressor.

This demo uses a simple dao that builds a list from a directory of images. We hope to have our media servers component sometimes soon.  

Also we take the opputunity to show off the Art Work of a young aspiring Art Major Gabrielle Larose.

 

Enjoy.

 

Here is the code for the jspx page.

 

<f:view xmlns:f="http://java.sun.com/jsf/core"

xmlns:h="http://java.sun.com/jsf/html"

xmlns:ice="http://www.icesoft.com/icefaces/component">

 

<html>

<head>

<title>MMC</title>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<meta name="viewport"

content="width=device-width, minimum-scale=1.0, maximum-scale=1.6" />

<meta name="apple-mobile-web-app-capable" content="YES" />

 

 

 

 

<link href="./xmlhttp/css-iphone/xp/xp.css" rel="stylesheet"

type="text/css" />

<style>

</style>

 

 

</head>

<body onload="load();">

<ice:form>

<ice:iphoneHelper />

 

<ice:listViewData id="data" var="art" value="#{artList.artShows}"

preserveDataModel="true" rows="10" style="width:70%">

 

<ice:column id="type">

 

<ice:outputText value="#{art.type}"></ice:outputText>

</ice:column>

 

<ice:column id="name">

 

<ice:outputText value="#{art.name}"></ice:outputText>

</ice:column>

<ice:column id="location">

 

<ice:outputText value="#{art.location}"></ice:outputText>

</ice:column>

<ice:column id="image">

 

<ice:outputText value="#{art.image}"></ice:outputText>

</ice:column>

 

 

 

</ice:listViewData>

 

 

</ice:form>

</body>

 

 

</html>

</f:view>

 

For the curious here is the dao that builds the table. Again the source for the demo will be on subversion soon.

ackage test;

 

import java.io.*;

import java.util.ArrayList;

import java.util.List;

 

import javax.faces.context.FacesContext;

import javax.servlet.ServletContext;

 

public class ArtShowDAO {

 

 

 

public ArtShowDAO() {

 

}

 

public List<Art> filldata() {

FacesContext facesContext = FacesContext.getCurrentInstance();

ServletContext servletContext = (ServletContext) facesContext.getExternalContext().getContext();

String path = servletContext.getRealPath(
"/");

 

List<Art> artShow =
new ArrayList<Art>();File dir = new File(path+"/images/100044");

String[] chld = dir.list();

if(chld == null){

System.out.println("Specified directory does not exist");

return null;

}else{

 

for(int i = 0; i < chld.length; i++){

String fileName = chld[ i ] ;

artShow.add(
new Art("folder", chld[ i ], "GabZ Larose, Mich USA", "100044/"+chld[ i ]));

 

}

return artShow;

}

}

 

 

}

 

 

 

 

Comments

No Comments