Makumba application example

$Revision: 1.1.1.1 $

Data Definition

For explanation please refer to Data Definition section of the specification.

File dataDefinitions/organisation/Partner (somewhere in classpath):

 
name=char[1..40]    ;Name
logo=char[80]       ;Logo (URL)
dept=char[60]       ;Department/Office
streetno=char[60]   ;Street
zipcode=char[10]    ;Zipcode
city=char[40]       ;City
country= ptr general.Country ;Country
phone=char[20]      ;Phone
fax=char[40]        ;Fax
email=char[40]      ;E-Mail
homepage=char[50]   ;Home Page on the Internet
comment=text        ;Other comments
File dataDefinitions/general/country (somewhere in classpath):
 
name=char[60]             ;Country
phonePrefix=char[1..3]    ;Phone prefix
iso2letterCode=char[2..2] fixed ;2-letter ISO code

JSP files

For explanation please referr to Makumba JSP tags section of the specification.

partner-list.jsp

 
<%@ taglib uri="http://www.makumba.org/presentation" prefix="mak" %>

<mak:list from="organisation.Partner p" separator="<br>">

<a href="partner.jsp?partner=<mak:value expr="p"  />">
     <mak:value expr="p.name">
</a>, 
<i><mak:value expr="p.city"/></i>
</mak:list>
is rendered to
 
PlasticWing Airlines, Cambridge
Pasta al'Dente s.p.a, Turin
Some Company Ltd., Somewherewille
ACME gadgets, Death Walley
Protect gamblers, Las Vegas

partner.jsp

 
<%@ taglib uri="http://www.makumba.org/presentation" prefix="mak" %>

<mak:object from="organisation.Partner p" where="p=$partner">

<h2><mak:value expr="p.name"/></h2>
Country: <mak:value expr="p.country.name"/><br>
Home Page on the Internet: <b><mak:value expr="p.homepage"/></b>
<p>
You can send them an email to: <mak:value expr="p.email"/><br>
Call me: <b><mak:value expr="p.phone"/></b><br>
Comment: <mak:value expr="p.comment"/>
</mak:object>
Is rendered to
 

Some company Ltd.

Country: Bangladesh
Home Page on the Internet: http://www.example.com

You can send them an email to: info@example.com
Call me: +1 23 456789
Comment: As seen on http://cnn.com, they are very likely to join BestSupportGroup.
 

New and edit operations will come here soon.


$Id: makumba-example.html,v 1.1.1.1 2003/01/09 18:02:26 cristi Exp $