Hi Rick,

Rick wrote:
>I have stored in a database Project Related Data which I want to show
on the web using MMBase 
>The DB table consist of the following fields 
>                project.no 
>                project.name 
>                project.responsible 
>                project.hourrate 
> and 
>                hoursheet.no 
>                hoursheet.date 
>                hoursheet.quantity 
>                hoursheet.description 
>                hoursheet.billable
>
> I now create Cloud Objects named Project and HourSheet which should
handle the data access in the cloud.

Yes, that's right. See for example the attached builder for projects
which i used. 

Rick wrote:
> If these objects are working correct I can use them anywhere in the
system and making relations between
> the already existing objects in the cloud

Yes, for instance if you want to relate a project to employee:
(1) you decide what type or relation should exist between projects and
employees. You might for instance need a relation in which you can
archive the role an employee has within a project, then you can use
rolerel
(2 a) if rolerel is not present in your MMBase installation: add the
rolerel builder, restart the application server, add rolerel as an entry
to the RelDef table by using the MMBase editors
(2 b) you add the projects - rolerel -> employees entry to the
RelationType table by using the MMBase editors
(3) you can relate your projects to your employees via the MMBase
editors, JSP-templates (by using the taglib) or the editwizards
 
Rick wrote:
> Jsp-files can be generated making use of the Taglib referring to the
new objects.

To see how: have a look at the applications in the /mmexamples directory
in the MMBase distro or the examples on
http://design.mmbase.org/testing/common/examples/

Good luck!

Regards, Henk.


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE builder PUBLIC "//MMBase - builder//" "http://www.mmbase.org/dtd/builder.dtd";>
<builder maintainer="ilse.nl" version="1">

<!-- <status>
	what is the status of this builder options : active or inactive
-->
<status>active</status>

<!-- <classfile>
	This is a optional tag, it names the classfile that allows you to add
	support routines or changes them on a per builder base. For example
	images has routines to image support etc etc.

	possible values : Dummy or disabled tag makes mmbase use the default setup

		short name : Urls will start class : org.mmbase.module.builders.Urls.class

		long name : nl.vpro.mmbase.module.builders.Urls will start that class
-->
<classfile>Dummy</classfile>

<searchage>9999</searchage>

<!-- <names>
	names defines the different names used in user visible parts, singular for
	for talking about 1 object (Url,Person) and plurar for talking about multiple
	<Urls, people).
>-->
<names>
	<!-- singles per language as defined by ISO 639 -->
	<singular xml:lang="nl">project</singular>
	<singular xml:lang="en">project</singular>
	<!-- multiple per language as defined by ISO 639 -->
	<plural xml:lang="nl">projects</plural>
	<plural xml:lang="en">projects</plural>
</names>

<!-- <descriptions>
	small description of the builder for human reading
-->
<descriptions>
<!-- descriptions per language as defined by ISO 639  -->
	<description xml:lang="nl">Basis project asset type</description>
	<description xml:lang="en">Basic project builder</description>
	<description xml:lang="us">Basic project builder</description>
</descriptions>

<!-- <properties>
you can define properties to be used by the classfile (if used) it uses
a key/value system. Its a optional tag.
-->
<properties>
</properties>

<!-- <fieldlist>
	 defines the different fields in this object, be carefull the order is important
	once defined keep them in the same order.
	If you use number and owner (the 2 default fields, please check the docs for this)
-->
<fieldlist>
	<!-- POS 1 : <field> 'number' is a default field (see docs) -->
	<field>
		<!-- gui related -->
		<gui>
			<guiname xml:lang="nl">Object</guiname>
			<guiname xml:lang="en">Object</guiname>
			<guitype>integer</guitype>
		</gui>
		<!-- editor related  -->
		<editor>
			<positions>
				<!-- position in the input area of the editor -->
				<input>-1</input>
				<!-- position in list area of the editor -->
				<list>10</list>
				<!-- position in search area of the editor -->
				<search>10</search>
			</positions>
		</editor>
		<!-- database related  -->
		<db>
			<!-- name of the field in the database -->
			<name>number</name>
			<!-- MMBase datatype and demands on it -->
			<type state="persistent" notnull="true" key="true">INTEGER</type>
		</db>
	</field>

	<!-- POS 2 : <field> 'owner' is a default field (see docs) -->
	<field>
		<!-- gui related -->
		<gui>
			<guiname xml:lang="nl">Eigenaar</guiname>
			<guiname xml:lang="en">Owner</guiname>
			<guitype>string</guitype>
		</gui>
		<!-- editor related  -->
		<editor>
			<positions>
				<!-- position in the input area of the editor -->
				<input>-1</input>
				<!-- position in list area of the editor -->
				<list>11</list>
				<!-- position in search area of the editor -->
				<search>11</search>
			</positions>
		</editor>
		<!-- database related  -->
		<db>
			<!-- name of the field in the database -->
			<name>owner</name>
			<!-- MMBase datatype and demands on it -->
			<type state="persistent" size="12" notnull="true" key="false">STRING</type>
		</db>
	</field>

	<!-- POS 3 : <field> 'title'  -->
	<field>
		<!-- gui related -->
		<gui>
			<guiname xml:lang="nl">Titel</guiname>
			<guiname xml:lang="en">Title</guiname>
			<guitype>string</guitype>
		</gui>
		<!-- editor related  -->
		<editor>
			<positions>
				<!-- position in the input area of the editor -->
				<input>1</input>
				<!-- position in list area of the editor -->
				<list>1</list>
				<!-- position in search area of the editor -->
				<search>1</search>
			</positions>
		</editor>
		<!-- database related  -->
		<db>
			<!-- name of the field in the database -->
			<name>title</name>
			<!-- MMBase datatype and demands on it -->
			<type state="persistent" size="255" notnull="true" key="false">STRING</type>
		</db>
	</field>

	<!-- POS 4 : <field> 'subtitle'  -->
	<field>
		<!-- gui related -->
		<gui>
			<guiname xml:lang="nl">Subtitel</guiname>
			<guiname xml:lang="en">Subtitle</guiname>
			<guitype>string</guitype>
		</gui>
		<!-- editor related  -->
		<editor>
			<positions>
				<!-- position in the input area of the editor -->
				<input>2</input>
				<!-- position in list area of the editor -->
				<list>-1</list>
				<!-- position in search area of the editor -->
				<search>2</search>
			</positions>
		</editor>
		<!-- database related  -->
		<db>
			<!-- name of the field in the database -->
			<name>subtitle</name>
			<!-- MMBase datatype and demands on it -->
			<type state="persistent" size="255" notnull="false" key="false">STRING</type>
		</db>
	</field>

	<!-- POS 5 : <field> 'text'  -->
	<field>
		<!-- gui related -->
		<gui>
			<guiname xml:lang="nl">Tekst</guiname>
			<guiname xml:lang="en">Text</guiname>
			<guitype>field</guitype>
		</gui>
		<!-- editor related  -->
		<editor>
			<positions>
				<!-- position in the input area of the editor -->
				<input>3</input>
				<!-- position in list area of the editor -->
				<list>-1</list>
				<!-- position in search area of the editor -->
				<search>3</search>
			</positions>
		</editor>
		<!-- database related  -->
		<db>
			<!-- name of the field in the database -->
			<name>text</name>
			<!-- MMBase datatype and demands on it -->
			<type state="persistent" size="1024" notnull="false" key="false">STRING</type>
		</db>
	</field>

	<!-- POS 6 : <field> 'fromdate'  -->
	<field>
		<!-- gui related -->
		<gui>
			<guiname xml:lang="nl">Van</guiname>
			<guiname xml:lang="en">From</guiname>
			<guitype>eventtime</guitype>
		</gui>
		<!-- editor related  -->
		<editor>
			<positions>
				<!-- position in the input area of the editor -->
				<input>4</input>
				<!-- position in list area of the editor -->
				<list>-1</list>
				<!-- position in search area of the editor -->
				<search>4</search>
			</positions>
		</editor>
		<!-- database related  -->
		<db>
			<!-- name of the field in the database -->
			<name>fromdate</name>
			<!-- MMBase datatype and demands on it -->
			<type state="persistent" notnull="false" key="false">INTEGER</type>
		</db>
	</field>

	<!-- POS 7 : <field> 'todate'  -->
	<field>
		<!-- gui related -->
		<gui>
			<guiname xml:lang="nl">Tot</guiname>
			<guiname xml:lang="en">Untill</guiname>
			<guitype>eventtime</guitype>
		</gui>
		<!-- editor related  -->
		<editor>
			<positions>
				<!-- position in the input area of the editor -->
				<input>5</input>
				<!-- position in list area of the editor -->
				<list>-1</list>
				<!-- position in search area of the editor -->
				<search>5</search>
			</positions>
		</editor>
		<!-- database related  -->
		<db>
			<!-- name of the field in the database -->
			<name>todate</name>
			<!-- MMBase datatype and demands on it -->
			<type state="persistent" notnull="false" key="false">INTEGER</type>
		</db>
	</field>
	
    <!-- POS 8 : <field> 'type'  -->
		<field>
			<!-- gui related -->
			<gui>
				<guiname xml:lang="nl">Type</guiname>
				<guiname xml:lang="en">Type</guiname>
				<guitype>project_type</guitype>
			</gui>
			<!-- editor related  -->
			<editor>
				<positions>
					<!-- position in the input area of the editor -->
					<input>6</input>
					<!-- position in list area of the editor -->
					<list>2</list>
					<!-- position in search area of the editor -->
					<search>6</search>
				</positions>
			</editor>
			<!-- database related  -->
			<db>
				<!-- name of the field in the database -->
				<name>type</name>
				<!-- MMBase datatype and demands on it -->
				<type state="persistent" notnull="false" key="false">STRING</type>
			</db>
	</field>
	
	<!-- POS 9 : <field> 'status'  -->
	<field>
		<!-- gui related -->
		<gui>
			<guiname xml:lang="nl">Status</guiname>
			<guiname xml:lang="en">Status</guiname>
			<guitype>status</guitype>
		</gui>
		<!-- editor related  -->
		<editor>
			<positions>
				<!-- position in the input area of the editor -->
				<input>7</input>
				<!-- position in list area of the editor -->
				<list>3</list>
				<!-- position in search area of the editor -->
				<search>7</search>
			</positions>
		</editor>
		<!-- database related  -->
		<db>
			<!-- name of the field in the database -->
			<name>status</name>
			<!-- MMBase datatype and demands on it -->
			<type state="persistent" notnull="false" key="false">STRING</type>
		</db>
	</field>

</fieldlist>

</builder>

Reply via email to