Dipl.-Ing. Werner Riegler wrote:
hi there again,
can anybody tell me if it should work to create and save referenced objects within the same form as the object itself ?
i use a standard wizard generated form - but it does not seam to work ? (no error - but noting created)
Class EMEM.Content Extends EMEM.NLSObject [ ClassType = persistent, ProcedureBlock ] { Relationship Body As EMEM.ContentBody [ Cardinality = one, Inverse = Content ]; Relationship Campaigns As EMEM.CampaignContents [ Cardinality = many, Inverse = Contents ]; Relationship Footer As EMEM.ContentFooter [ Cardinality = one, Inverse = Content ]; Relationship Header As EMEM.ContentHeader [ Cardinality = one, Inverse = Content ]; Relationship SubContent As EMEM.SubContent [ Cardinality = many, Inverse = Content ]; Query ContentList() As %SQLQuery(CONTAINID = 1) { SELECT %ID,NameDe FROM Content ORDER BY NameDe } Index BodyIndex On Body; Index FooterIndex On Footer; Index HeaderIndex On Header; }
just try to create/save Content and Header (Property Name for Header):
<!-- use CSP:OBJECT tag to create a reference to an instance of the class --> <csp:object name="objForm" classname="EMEM.Content" OBJID=#(%request.Get("OBJID"))#> <!-- use csp:search tag to create a javascript function to invoke a search page --> <csp:search name="form_search" classname="EMEM.Content" where="NameDe" options="popup,nopredicates" onselect="update"> <form name="form" cspbind="objForm" cspjs="All" onsubmit='return form_validate();'> <center> <table cellpadding="3"> <tr> <td><b><div align="right">NameDe:</div></b></td> <td><input type="text" name="NameDe" cspbind="NameDe" size="80"></td> </tr> <tr> <td><b><div align="right">DescriptionDe:</div></b></td> <td><input type="text" name="DescriptionDe" cspbind="DescriptionDe" size="80"></td> </tr> <tr> <td><font color="#666666"><b><div align="right">Header Name:</div></b></font></td> <td><input type="text" name="HeaderName" cspbind="Header.Name" size="80"
</td>
</tr> </table> </center> </form>
or do I need to modify or create my own form_save method to achive this ?
brg werner
