AW: [opencms-dev] Writing a simple MasterModule

Manuel Wallnöfer mfw at msk-informatik.at
Sat Jan 24 15:10:01 CET 2004


Hi,

Have a look at http://opencms.al-arenal.de/.  

Under Tutorials there is a link called vtab.zip and dbtab.zip.

This is a howto for creating a backoffice module!



Perhaps it helps a little bit.


manuel


 

-----Ursprüngliche Nachricht-----
Von: opencms-dev-admin at opencms.org
[mailto:opencms-dev-admin at opencms.org] Im Auftrag von tol
Gesendet: Samstag, 24. Jänner 2004 14:54
An: opencms-dev at opencms.org
Betreff: [opencms-dev] Writing a simple MasterModule


Hi @all!

I want to understand the concept of the MasterModules. Therfore I trying

to write a first simple MasterModule example - learning by doing ;) I
read the docs in the usermanual again and again. But all questions 
can't be resolved, so I hope someone can help me :)

There have to defined a function called filterAll(...). In the pdf-doc 
is written the following sample-code:

/**
* Filter method.
* @param cms - the CmsObject to get access to the cms ressources.
* @return a Vector of Content Definition.
*/
public static Vector filterAll(CmsObject cms) throws CmsException {
return ((CmsDbAccess)getDbAccessObject(C_SUB_ID)).filterAll
(cms, CmsContentDefinition.class, C_SUB_ID);
}


I assume, the comment

  * @return a Vector of Content Definition.

conflicts with the return statment

   return ((CmsDbAccess)getDbAccessObject

If I understand it right, than the result was changed to CmsDbAccess. 
And that is not equal to ContentDefinition ... What is correct? The 
comment or the changeoperator?

Which CmsDbAccess should be used???
- com.opencms.file.generic.CmsDbAccess
- com.opencms.file.mysql.CmsDbAccess
- com.opencms.defaults.master.generic.CmsDbAccess

None of them semms to implement the filterAll(..) function ... ??

In the return statment there is called the filterAll function  with the 
paramter "CmsContentDefinition.class". m I right CmsContentDefinition is

a Class? ... but there exists no Class called CmsContentDefinition!? .. 
or I couldn't find it ;)

But I found an abstract class A_CmsContentDefinition! Have I to write:
A_CmsContentDefinition.class??

Argh! Feeling confused! If someone can help - I would be very happy!! :)

Tol
-- 
independent internet radio berlin
http://www.recordcaster.de


_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please
visit http://mail.opencms.org/mailman/listinfo/opencms-dev





More information about the opencms-dev mailing list