[phpwebapp-improvments] [phpwebapp - phpWebApp Improvements] Including WebClass-es
Brought to you by:
dashohoxha
From: SourceForge.net <no...@so...> - 2003-08-05 14:30:58
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=2136667 By: dashohoxha Before using a webobject it has to be included like this: <Include SRC="{{LISTBOX_PATH}}listbox.html" /> where 'listbox.html' contains the declaration of the <WebClass> listbox. Then we use it like this: <WebObject Class="listbox" Name="list1" . . . /> It would be better if the framework knows itself about the location of the standard webclasses and can include them automatically when an instance of this webclass is used. In such a case there would be no need for the first line above. In case that it is not a standard webclass (and the framework does not know about its location), or the developer wants to override a standard webclass, then it can tell to the framework about the path of the webclass using one of the following ways: 1 - <IncludeWebClass ID="my_listbox" PATH="path/to/my_listbox/" /> This is similar to the <Include> above, but has a more specific syntax and there is no need to use it for the standard (registered) webclasses. 2 - <WebObject Class="my_listbox" Path="path/to/listbox/" Name="list1" . . . /> In this case the location of the webclass is specified at the declaration of the webobject (/path/to/listbox/my_listbox.html is the file that will be used by the framework and it should contain the definition of the 'my_listbox' <WebClass>). 3 - WebApp::use_webclass("my_listbox", "path/to/listbox/"); This should be called in init() or in onParse() and it is like registering this webclass so that the framework knows how to find it. ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=135220 |