Folderish Properties
I have a folderish ZClass with a set of properties. When I create an instance via DTML my code doesn't update the properties from REQUEST. I use exactly (names changed of course) the same code to instantiate a document like ZClass and it works fine. So what's the difference between Folderish ZClasses & Document ZClasses in assigning to their properties? (The instance IS created, just the properties aren't assigned values.) I used the howto on adding instances via DTML change to the '_add' methods in both ZClasses. Here's the code FWIW: --- Document-'ish' --- <dtml-var standard_html_header> <dtml-call "REQUEST.set('id',REQUEST['med_name'])"> <dtml-call "REQUEST.set('title', REQUEST['med_name'])"> <dtml-call "REQUEST.set('online_lookup', REQUEST['online_lookup'])"> <dtml-call "REQUEST.set('indications', REQUEST['indications'])"> <dtml-call "REQUEST.set('contraindications', REQUEST['contraindications'])"> <dtml-call "REQUEST.set('warnings', REQUEST['warnings'])"> <dtml-call "REQUEST.set('alt_names', REQUEST['alt_names'])"> <dtml-call "REQUEST.set('dose_delivery', REQUEST['dose_delivery'])"> <dtml-call "REQUEST.set('doc_type', REQUEST['doc_type'])"> <dtml-with "manage_addProduct['FreePMProduct']"> <dtml-call "DrugClass_add(_.None, _, NoRedir=1)"> </dtml-with> <center> <H2><dtml-var med_name> was added.</H2> <p> <a href="formulary"> Back to Formulary Menu </a> </center> <dtml-var standard_html_footer> --- Folder-'ish' --- <dtml-var standard_html_header> <dtml-call "REQUEST.set('id',REQUEST['login_id'])"> <dtml-call "REQUEST.set('login_id', REQUEST['login_id'])"> <dtml-call "REQUEST.set('first_name', REQUEST['first_name'])"> <dtml-call "REQUEST.set('middle_name', REQUEST['middle_name'])"> <dtml-call "REQUEST.set('last_name', REQUEST['last_name'])"> <dtml-call "REQUEST.set('honorific', REQUEST['honorific'])"> <dtml-call "REQUEST.set('generation', REQUEST['generation'])"> <dtml-call "REQUEST.set('gender', REQUEST['gender'])"> <dtml-call "REQUEST.set('fda_number', REQUEST['fda_number'])"> <dtml-call "REQUEST.set('supervisor_id', REQUEST['supervisor_id'])"> <dtml-call "REQUEST.set('job_title', REQUEST['job_title'])"> <dtml-call "REQUEST.set('created_by', REQUEST['created_time'])"> <dtml-call "REQUEST.set('created_time', REQUEST['created_time'])"> <dtml-with "manage_addProduct['FreePMProduct']"> <dtml-call "ProviderClass_add(_.None, _, NoRedir=1)"> </dtml-with> <center> <H2><dtml-var login_id> was added.</H2> <p> <a href="providers"> Back to Provider Menu </a> </center> <dtml-var standard_html_footer> As Always - Thanks! -- Tim Cook -- FreePM Project Coordinator http://www.freepm.org OS Health Care Alliance Supporter http://www.oshca.org
Tim Cook wrote:
I have a folderish ZClass with a set of properties. When I create an instance via DTML my code doesn't update the properties from REQUEST.
I am sending this for the benefit of the archives. Sorry for the extra traffic. But it may help someone in the future. I know they are important to me. <g> There is no difference between creating 'document-ish' and 'folder-ish' ZClasses. I had failed to make the call to <dtml-call "propertysheets.Basic.manage_editProperties(REQUEST)"> in my constructor method of all my ZClasses after the first one. That's why I THOUGHT there was a difference. -- Tim Cook -- FreePM Project Coordinator http://www.freepm.org OS Health Care Alliance Supporter http://www.oshca.org
participants (1)
-
Tim Cook