Module cWebBusinessProcess.pkg

     1//****************************************************************************
     2//
     3// $File name  : WebBusinessBrocess.pkg
     4// $Author     : Janne Wassberg
     5// $System     : VDF Internet Server
     6//
     7// Confidential Trade Secret.
     8// Copyright 1998-1999 Data Access Corporation, Miami FL, USA
     9// All Rights reserved
    10// DataFlex is a registered trademark of Data Access Corporation.
    11//
    12//
    13// $Rev History
    14//
    15// JJT 12/1/2000  Combined WA3 NT and Linux Package
    16//
    17// JJT 10/20/00   Added ddXxxxx and WML support
    18// JJT 10/20/00   Changed output to xHtml (lowecase tags, <br />)
    19//                Import WriteWmlXxx messages and WmlXxxx functions for wml support.
    20//                Removed old interface support
    21// JJT 10/20/00   Changes from JVH to support WebApp Integrator (no other changes!)
    22// JJT 8/1/99     changes for WebApp Studio
    23// JJT 8/1/99     merged "01" interface into class
    24//
    25// JW  1998-09-03 Zoom interface for drill down added
    26//
    27// JJT 1998-08-28 Added Write_PainText (encodes HTML) and WriteHtml
    28//                All other messages now go through WriteHtml
    29//
    30// JW  1998-07-08 VDF Internet Server Version 0.8-215
    31//
    32// JW  1998-06-27 Source Merge for Internet by Janne Wassberg
    33//
    34//   1998-06-27 Version 0.8-201
    35//
    36//   98-03-10   Version 110
    37//
    38//   98-02-18   Version 105
    39//
    40//   97-10-01   File header created.
    41//
    42//****************************************************************************
    43Use LanguageTextWebApp.pkg
    44Use cInternetSessionBusinessProcess.pkg  // InternetSessionBusinessProcess
    45Use DataDict.pkg
    46Use HtmlFormat_mixin.pkg     // HTML helper mixin and functions
    47Use HtmlWrite_mixin.pkg
    48
    49Use wmlFormat_mixin.pkg     // wml helper mixin and functions
    50Use wmlWrite_mixin.pkg
    51
    52
    53Define MIN_TEXT_SIZE    for 4
    54Define MAX_TEXT_SIZE    for 40
    55Define DFLT_TEXT_ROWS   for 5
    56Define CONTROL_NAME_SEP for "__"
    57
    58// Define all values for DDValue
    59
    60// reserve 0-99 for DD field information values
    61Define DDCRNTVALUE     for 0 // Field_Current_value
    62Define DDDESC          for 1 // Field_current_Description
    63Define DDLONGLABEL     for 2 // Field_Label DDLONGLABEL
    64Define DDSHORTLABEL    for 3 // Field_Label DDSHORTLABEL
    65Define DDTAGLABEL      for 4 // Field_Label DDTAGLABEL
    66Define DDSTHELP        for 5 // Status_Help
    67Define DDOPT           for 6 // File_Field_options (w/ foreign support)
    68
    69Define DDVALNUM        for 7 // number of val-table items
    70Define DDVALDATA       for 8 // data value for val-table [pass index]
    71Define DDVALDESC       for 9 // desc value for val-table [pass index]
    72
    73// reserve 100-199 for HTML specfic "helper"
    74// return values
    75
    76Define DDSEL           for 103  // returns selected="Selected" if field matches passed value
    77Define DDCHCK          for 104  // returns checked="checked" if field matyches passed value
    78Define DDOPTION        for 105  // returns the <option....> value
    79Define DDREADONLY      for 106  // returns readonly="readdonly" if RO
    80Define DDRECS          for 107  // returns <option...> for all recs (obsolete... use ddrowids)
    81Define DDTITLE         for 108  // returns title="status help" or blank if none.
    82Define DDFIELDERROR    for 109  // returns error string for field (if error exists, else blank)
    83Define DDSHORTFIELDERROR   for 110  // returns shorter error string for field (if error exists, else blank)
    84Define DDROWIDS        for 111  // returns <option...> for all rowids
    85// reserve 200-299 for HTML control
    86Define DDFORM          for 200  // create a single line edit
    87Define DDEDIT          for 201  // create a multi line edit
    88Define DDRADIO         for 202  // create radios for field
    89Define DDCOMBO         for 203  // create a single line list (combo) for val-table
    90Define DDPARENTCOMBO   for 204  // create a single line list of all records
    91Define DDAUTO          for 205  // create the best control type for field
    92
    93Define DDWMLINPUT      for 250  // create WML Input form
    94
    95//
    96// This class stores the interface for Call messages. It is entirely private.
    97//
    98
    99{ ClassLibrary=WebApp Visibility=Private }
   100Class cDDValueInterface is an Array
   101
   102    Function ddValueCount Returns integer
   103        Function_Return (item_count(self)/4)
   104    End_Function
   105
   106    Procedure RegisterDDValue integer iParam1 string sParam1 string sParam2 string sComment
   107        integer iCount
   108        Get Item_Count To iCount
   109        Set Value (iCount)   to iParam1
   110        Set Value (iCount+1) to sParam1
   111        Set Value (iCount+2) to sParam2
   112        Set Value (iCount+3) to sComment
   113    End_Procedure
   114
   115    Function Param1Number Integer iItem Returns Integer
   116        Function_Return (Value(self,iItem*4))
   117    End_Function
   118
   119    Function Param1Str Integer iItem Returns String
   120        Function_Return (Value(self,iItem*4+1))
   121    End_Function
   122
   123    Function Param2Str Integer iItem Returns String
   124        Function_Return (Value(self,iItem*4+2))
   125    End_Function
   126
   127    Function ddValCmnt Integer iItem Returns String
   128        Function_Return (Value(self,iItem*4+3))
   129    End_Function
   130
   131End_Class
   132
   133{ ClassLibrary=WebApp Visibility=Private }
   134Class cWebBusinessProcess_ddValueInterface Is A cDDValueInterface
   135
   136    Procedure RegisterddValues
   137        Send RegisterDDValue DDCRNTVALUE                   '' '' 'Current value - this is the default'
   138        Send RegisterDDValue DDCRNTVALUE  'DDCRNTVALUE'    '' 'Current value'
   139        Send RegisterDDValue DDDESC       'DDDESC'         '' 'Description (validation descriptions)'
   140        Send RegisterDDValue DDLONGLABEL  'DDLONGLABEL'    '' 'Long Label'
   141        Send RegisterDDValue DDLONGLABEL  'DDLONGLABEL'    'iParam' 'Long Label, 1=Error in Red, 2=Show error message'
   142        Send RegisterDDValue DDSHORTLABEL 'DDSHORTLABEL'   '' 'Short Label, 1=Error in Red, 2=Show error message'
   143        Send RegisterDDValue DDSHORTLABEL 'DDSHORTLABEL'   'iParam' 'Short Label, 1=Error in Red, 2=Show error message'
   144        Send RegisterDDValue DDTAGLABEL   'DDTAGLABEL'     '' 'Tag Label'
   145        Send RegisterDDValue DDSTHELP     'DDSTHELP'       '' 'Status_Help'
   146        Send RegisterDDValue DDSTHELP     'DDSTHELP'       'bShowError' 'Status_Help 1=show error in text'
   147        Send RegisterDDValue DDFIELDERROR 'DDFIELDERROR'   '' 'Returns error string for column (if error exists, else blank)'
   148        Send RegisterDDValue DDSHORTFIELDERROR 'DDSHORTFIELDERROR'   '' 'Returns a error short string for column (if error exists, else blank)'
   149        Send RegisterDDValue DDOPT        'DDOPT'          '' 'bit-options (w/ foreign support) -bit values'
   150        Send RegisterDDValue DDVALNUM     'DDVALNUM'       '' 'Number of validation table items'
   151        Send RegisterDDValue DDVALDATA    'DDVALDATA'      'iIndex' 'data value for validation table'
   152        Send RegisterDDValue DDVALDESC    'DDVALDESC'      'iIndex' 'description value for validation table'
   153        Send RegisterDDValue DDSEL        'DDSEL'          'sData' 'Returns selected="selected" if column matches passed value'
   154        Send RegisterDDValue DDCHCK       'DDCHCK'         'sData' 'Returns checked="checked" if column matches passed value'
   155        Send RegisterDDValue DDOPTION     'DDOPTION'       '' 'Returns the  lines for all validation table items'
   156        Send RegisterDDValue DDREADONLY   'DDREADONLY'     '' 'Returns readonly="readonly" if column is Read-only'
   157        Send RegisterDDValue DDRECS       'DDRECS'         '' 'Obsolete, use DDROWIDS. Returns  lines for all records in table'
   158        Send RegisterDDValue DDROWIDS     'DDROWIDS'       '' 'Returns  lines for all rowids in table'
   159        Send RegisterDDValue DDTITLE      'DDTITLE'        '' 'Returns title="status help" or blank if none.'
   160        Send RegisterDDValue DDFORM       'DDFORM'         '' 'Create a single line edit form based on DD information'
   161        Send RegisterDDValue DDFORM       'DDFORM'         'iWidth' 'Create a single line edit form of width iWidth based on DD information'
   162        Send RegisterDDValue DDEDIT       'DDEDIT'         '' 'Create a multi line edit form based on DD information'
   163        Send RegisterDDValue DDEDIT       'DDEDIT'         'iWidth' 'Create a multi line edit form of width iWidth based on DD information'
   164        Send RegisterDDValue DDEDIT       'DDEDIT'         '"Width,Length"' 'Create a multi line edit form of passed size based on DD information'
   165        Send RegisterDDValue DDRADIO      'DDRADIO'        '' 'Create radio control for column based on DD information'
   166        Send RegisterDDValue DDCOMBO      'DDCOMBO'        '' 'Create a single line list (combo) for validation table based on DD Information'
   167        Send RegisterDDValue DDPARENTCOMBO 'DDPARENTCOMBO' '' 'Create a single line list (combo) of a parent table'
   168        Send RegisterDDValue DDAUTO       'DDAUTO'         '' 'Create the best control type for this column'
   169        Send RegisterDDValue DDAUTO       'DDAUTO'         'iWidth' 'Create the best control type of width iWidth for this column'
   170        Send RegisterDDValue DDWMLINPUT   'DDWMLINPUT'     '' 'Create a WML Input form'
   171        Send RegisterDDValue DDWMLINPUT   'DDWMLINPUT'     'sFormat' 'Create a formatted WML Input form'
   172    End_Procedure
   173
   174    Procedure end_construct_object
   175        send RegisterddValues
   176        forward send end_construct_object
   177    End_Procedure
   178
   179End_Class
   180
   181// create a single global instance of this...We only need one of 'em
   182Object oWebBusinessProcess_ddValueInterface Is A cWebBusinessProcess_ddValueInterface
   183End_Object
   184
   185
   186{ ClassLibrary=WebApp Visibility=Private }
   187Class cDDValTbl is an Array
   188
   189    Procedure Construct_Object
   190        forward send construct_object
   191        Property integer CrntValTblFile 0
   192        Property integer CrntValTblField 0
   193    End_Procedure
   194
   195    Procedure WBPO_Fill_Item integer iItem string sValue string sDescription ;
   196                             integer iFile RowId riRec
   197        If sDescription eq '' Move sValue to sDescription
   198        Set Value (iItem*2)   to sValue
   199        Set Value (iItem*2+1) to sDescription
   200    End_Procedure
   201
   202    Procedure Add_Blank_Item String Blank_Desc
   203        Send WBPO_Fill_Item (Item_Count(Self)/2) '' Blank_Desc 0 0
   204    End_Procedure
   205
   206    // Fills the list by loading the entire defined data-file
   207    //
   208    Procedure WBPO_Fill_Field_List integer hMain integer iFile integer iField
   209        integer iObj
   210        If (hMain AND iFile) Begin
   211            Get File_Field_Table_Object of hMain iFile iField to iObj
   212            Send File_Field_Fill_List to hMain iFile iField Self msg_WBPO_Fill_Item
   213            If (iObj AND (Allow_Blank_State(iObj))) ;
   214                Send Add_Blank_Item DD_BLANK_CODE_DESCRIPTION
   215        End
   216    End_Procedure
   217
   218
   219    // Fill the Val table if required. Check current iFile and iField
   220    Function UpdateValTbl integer hMain integer iFile integer iField returns integer
   221        integer iItems
   222        If (iFile<>CrntValTblFile(self) Or iField<>CrntValTblField(self)) Begin
   223            Send Delete_Data // this will clear the entire list
   224            Set CrntValTblFile to iFile
   225            Set CrntValTblField to iField
   226            Send WBPO_Fill_Field_List hMain iFile iField
   227         End
   228         Function_return (Item_Count(self)/2)
   229    End_Function
   230
   231    Function ValTbl_Items integer hMain integer iFile integer iField returns integer
   232        integer iItems
   233        Set CrntValTblFile to 0 // this will force an update of the table
   234        Get UpdateValTbl hMain iFile iField to iItems
   235        Function_return iItems
   236    End_Function
   237
   238    Function ValTbl_ItemData integer hMain integer iFile integer iField integer iItem returns string
   239        integer iItems
   240        Get UpdateValTbl hMain iFile iField to iItems
   241        If iItems gt iItem ;
   242            Function_return (Value(self,iItem*2))
   243    End_Function
   244
   245    Function ValTbl_ItemDesc integer hMain integer iFile integer iField integer iItem returns string
   246        integer iItems
   247        Get UpdateValTbl hMain iFile iField to iItems
   248        If iItems gt iItem ;
   249            Function_return (Value(self,iItem*2+1))
   250    End_Function
   251
   252End_Class
   253
   254
   255{ ClassLibrary=WebApp }
   256{ DDOHost=True }
   257{ ComponentType=WBOClass }
   258{ HelpTopic=cWebBusinessProcess }
   259Class cWebBusinessProcess is a cInternetSessionBusinessProcess
   260
   261    Procedure Construct_object
   262        forward send construct_object
   263        Object oDDValTbl Is A cDDValTbl
   264        End_Object
   265
   266        { Category=Behavior }
   267        Property String psAutoEntryLabelStart ''
   268        { Category=Behavior }
   269        Property String psAutoEntryLabelEnd   ''
   270        { Category=Behavior }
   271        Property String psAutoEntryDataStart  ''
   272        { Category=Behavior }
   273        Property String psAutoEntryDataEnd    ''
   274
   275        { Visibility=Private }
   276        Property integer hDDValueInterface (oWebBusinessProcess_ddValueInterface(self))
   277
   278        { Visibility=Private }
   279        Property integer phAutoWebReport 0
   280
   281        { Visibility=Private }
   282        Property integer phLastFindDD    0
   283        { Visibility=Private }
   284        Property integer piLastFindIndex 0
   285    End_Procedure
   286
   287    //*************************************************************************
   288    //*** Html-interface
   289    //*************************************************************************
   290
   291    Import_Class_Protocol HtmlFormat_Mixin
   292    Import_Class_Protocol HtmlWrite_Mixin
   293
   294    Import_Class_Protocol WmlFormat_Mixin
   295    Import_Class_Protocol WmlWrite_Mixin
   296
   297
   298    //If you use characters that could be understod as a html tag it will be written as a tag.
   299    Procedure WriteHtml string sHtml
   300        Send OutputHTML To ghInetSession sHtml
   301    End_Procedure
   302
   303    Procedure WriteData address pData
   304        Send OutputData To ghInetSession pData
   305    End_Procedure
   306
   307
   308    //Will output everything in the string without destroying the HTML page.
   309    Procedure WriteHtmlPlainText string sTxt
   310        Send OutputPlainText To ghInetSession sTxt
   311    End_Procedure
   312
   313    Function ValTbl_Items integer hMain integer iFile integer iField returns integer
   314        integer iItems
   315        get ValTbl_Items of oDDValTbl hMain iFile iField to iItems
   316        Function_return iItems
   317    End_Function
   318
   319    Function ValTbl_ItemData integer hMain integer iFile integer iField integer iItem returns string
   320        string sValue
   321        get ValTbl_ItemData of oDDValTbl hMain iFile iField iItem to sValue
   322        function_return sValue
   323    End_Function
   324
   325    Function ValTbl_ItemDesc integer hMain integer iFile integer iField integer iItem returns string
   326        string sValue
   327        get ValTbl_ItemDesc of oDDValTbl hMain iFile iField iItem to sValue
   328        function_return sValue
   329    End_Function
   330
   331    Function DDComboOptions integer hMain integer iFile integer iField returns string
   332        Integer i iItems
   333        string sValue sDat sDesc sItem sCrntVal sSelected sCRLF
   334        Move (Character(13)+character(10)) to sCRLF
   335        get file_field_current_value of hMain iFile iField to sCrntVal
   336        Get ValTbl_Items hMain iFile iField to iItems
   337        Decrement iItems
   338        For i  From 0 to iItems
   339            get ValTbl_ItemData hMain iFile iField i to sDat
   340            get ValTbl_ItemDesc hMain iFile iField i to sDesc
   341            Move (if(sCrntVal=sDat, 'selected="selected"', '')) to sSelected
   342            Move (' * sSelected * 'value="' + htmlEncode(sDat) +'" >' + ;
   343                   HtmlEncode(sDesc) + ' ') to sItem
   344            Append sValue sItem //sCRLF
   345        Loop
   346        Function_Return sValue
   347    End_Function
   348
   349    Function DDRecsOptions integer hMain integer iFile integer iField returns string
   350        Integer iIndex hDD iCrec iRec
   351        string sValue sDat sItem sSelected sCRLF
   352        Move (Character(13)+character(10)) to sCRLF
   353        Get Data_Set of hMain iFile to hDD
   354        If hDD Get Current_record of hDD to iCrec
   355        get Field_Main_Index of hMain iFile iField to iIndex
   356        If iIndex lt 0 Move 1 to iIndex
   357        send Request_Read to hMain FIRST_RECORD iFile iIndex
   358        While (Found)
   359            Get_Field_Value iFile 0 to iRec       // compatibility w/ recnum
   360            Get_Field_Value iFile iField to sDat
   361            Move (if(iCRec=iRec,'selected="selected"','')) to sSelected
   362            Move (' * sSelected * ' value="' + string(iRec) + '" >' + HtmlEncode(sDat) + '') to sItem
   363            Append sValue sItem //sCRLF
   364            send Request_Read to hMain NEXT_RECORD iFile iIndex
   365        Loop
   366        Function_Return sValue
   367    End_Function
   368
   369    Function DDRowIdsOptions integer hMain integer iFile integer iField returns string
   370        Integer iIndex hDD
   371        rowId riCrec riRec
   372        string sValue sDat sItem sSelected sCRLF
   373        Move (Character(13)+character(10)) to sCRLF
   374        Get Data_Set of hMain iFile to hDD
   375        If hDD Get CurrentRowId of hDD to riCrec
   376        get Field_Main_Index of hMain iFile iField to iIndex
   377        If iIndex lt 0 Move 1 to iIndex
   378        send Request_Read to hMain FIRST_RECORD iFile iIndex
   379        While (Found)
   380            Move (GetRowId(iFile)) to riRec
   381            Get_Field_Value iFile iField to sDat
   382            Move (if(IsSameRowId(riCRec,riRec),'selected="selected"','')) to sSelected
   383            Move (' * sSelected * ' value="' + SerializeRowId(riRec) + '" >' + HtmlEncode(sDat) + '') to sItem
   384            Append sValue sItem //sCRLF
   385            send Request_Read to hMain NEXT_RECORD iFile iIndex
   386        Loop
   387        Function_Return sValue
   388    End_Function
   389
   390
   391    Function Html_Ctrl_Name integer iFile integer iField returns string
   392        string sName sField
   393        Get_Attribute DF_File_Logical_Name of iFile to sName
   394        Get_Attribute DF_Field_Name of iFile iField to sField
   395        Function_Return (lowercase(sName - CONTROL_NAME_SEP - sField))
   396    End_Function
   397
   398    Function Html_Ctrl_RowId_Name integer iFile returns string
   399        string sName sField
   400        Get_Attribute DF_File_Logical_Name of iFile to sName
   401        Function_Return (lowercase(sName - CONTROL_NAME_SEP - "RowId"))
   402    End_Function
   403
   404
   405    Function DDReadOnlyHTML integer hMain integer iFile integer iField Returns String
   406        string  sRO
   407        integer iOpts
   408        Get file_Field_Options of hMain iFile iField to iOpts
   409        If (iOPTs iAND DD_NOENTER) Move 'readonly="readonly" ' to sRO
   410        Function_Return sRO
   411    End_Function
   412
   413    Function DDTitleHTML integer hMain integer iFile integer iField Returns String
   414        string  sTitle  sErr
   415        integer iItem
   416        Get File_Field_Status_Help of hMain iFile iField to sTitle
   417        Move (trim(HtmlEncode(sTitle))) to sTitle
   418        Get FileFieldErrorItem iFile iField to iItem
   419        If (iItem>=0) Begin
   420            Get ErrorMessage iItem to sErr
   421            Move (pos("
"
,lowercase(sErr))) to iItem 422 If iItem gt 0 Move (left(sErr,iItem-1)) to sErr 423 Append sTitle " **Error** " sErr 424 End 425 If sTitle ne "" Move ('title="'-sTitle-'"') to sTitle 426 Function_Return sTitle 427 End_Function 428 429 430 Function DDFormControl integer hMain integer iFile integer iField string sParams returns string 431 string sValue sDat sReadOnly sTitle 432 integer iSize iType 433 434 Get File_Field_Current_Value of hMain iFile iField to sDat 435 Get HtmlEncode sDat to sDat 436 437 If sParams ne '' ; 438 Move sParams to iSize 439 Else Begin 440 Get_Attribute DF_FIELD_TYPE Of iFile iField To iType 441 If (iType=DF_DATE) ; 442 Move 10 to iSize // date should be enough for xx/xx/xxxx 443 Else If (iType=DF_DATETIME) ; 444 Move 26 to iSize // date should be enough for xx/xx/xxxx hh:mm:ss.fff pm 445 Else ; 446 get_attribute DF_FIELD_LENGTH of iFile iField to iSize 447 If iSize lt MIN_TEXT_SIZE Move MIN_TEXT_SIZE to iSize 448 Else if iSize GT MAX_TEXT_SIZE Move MAX_TEXT_SIZE to iSize 449 end 450 451 Get DDReadOnlyHTML hMain iFile iField to sReadOnly 452 Get DDTitleHTML hMain iFile iField to sTitle 453 454 Move ('+ string(iSize) + '"' * ; 455 sReadOnly * sTitle * 'name="' + Html_Ctrl_Name(Self,iFile,iField) + ; 456 '" value="' + sDat + '" />') to sValue 457 458 Function_Return sValue 459 460 end_function 461 462 Function DDEditControl integer hMain integer iFile integer iField string sParams returns string 463 string sValue sDat sReadOnly sTitle 464 integer iSize iRows iPos 465 466 get file_field_current_value of hMain iFile iFIeld to sdat 467 Get HtmlEncodeNoCrlf sDat to sDat 468 469 Move DFLT_TEXT_ROWS to iRows 470 Move MAX_TEXT_SIZE to iSize 471 If sParams ne '' Begin 472 Move (Pos(",",sParams)) to iPos 473 If iPos Begin 474 Move (left(sParams,iPos-1)) to iSize 475 Move (Mid(sParams,255,iPos+1)) to iRows 476 End 477 Else ; 478 Move sParams to iSize 479 End 480 481 Get DDReadOnlyHTML hMain iFile iField to sReadOnly 482 Get DDTitleHTML hMain iFile iField to sTitle 483 484 Move ('' ) to sValue 487 Function_Return sValue 488 489 end_function 490 491 Function DDComboControl integer hMain integer iFile integer iField string sParams returns string 492 string sValue sReadOnly sTitle 493 Get DDReadOnlyHTML hMain iFile iField to sReadOnly 494 Get DDTitleHTML hMain iFile iField to sTitle 495 Get DDComboOptions hMain iFile iField to sValue 496 Move ('') to sValue 498 //showln "....." (length(svalue)) ' ' (right(svalue,50)) 499 Function_Return sValue 500 end_function 501 502 // changed to use row ids instead of recnums. Should work the same 503 Function DDParentComboControl integer hMain integer iFile integer iField string sParams returns string 504 string sValue sReadOnly sTitle 505 Get DDReadOnlyHTML hMain iFile iField to sReadOnly 506 Get DDTitleHTML hMain iFile iField to sTitle 507 Get DDRowIdsOptions hMain iFile iField to sValue 508 Move ('') to sValue 510 Function_Return sValue 511 end_function 512 513 // in WA/3 we now pass optional decriptions on sParams delmited by "|". e.g. "Yes|No|Maybe". 514 // If passed those are used for the radio item descriptions. If not passed, we use the database values 515 // which is consistent with WA/2. 516 Function DDRadioControl integer hMain integer iFile integer iField string sParams returns string 517 string sValue sDat SReadOnly sChecked sItem sCrntVal sDesc sTitle 518 integer i iItems bChecked iPos 519 520 Get File_Field_Current_Value of hMain iFile iField to sCrntVal 521 Get DDReadOnlyHTML hMain iFile iField to sReadOnly 522 Get DDTitleHTML hMain iFile iField to sTitle 523 Get ValTbl_Items hMain iFile iField to iItems 524 Move (trim(sParams)) to sParams 525 Decrement iItems 526 For i From 0 to iItems 527 get ValTbl_ItemData hMain iFile iField i to sDat 528 // if there are descriptions passed in sParams use them one at a time 529 If (sParams<>"") Begin 530 Move (pos("|",sParams)) to iPos // descriptions are separated by "|" 531 If iPos Begin 532 Move (trim(left(sParams,iPos-1))) to sDesc 533 Move (trim(mid(sParams,255,iPos+1))) to sParams 534 end 535 Else Begin 536 Move sParams to sDesc 537 Move "" to sParams 538 end 539 end 540 else ; // if no sparams use the database description (which works well for Validation tables) 541 get ValTbl_ItemDesc hMain iFile iField i to sDesc 542 Move (if(sCrntVal=sDat, 'checked="checked"', '')) to sChecked 543 If (sChecked<>"") Move 1 to bChecked 544 // if nothing was selected check the list radio (better than nothin') 545 If (not(bChecked) and i=iItems) Move 'checked="checked"' to sChecked 546 Move (' * sChecked * sReadOnly * sTitle * ; 547 'name="'+ Html_Ctrl_Name(Self,iFile,iField) + ; 548 '" value="' + htmlEncode(sDat) + '" />' + ; 549 HtmlEncode(sDesc) ) to sItem 550 Append sValue ' ' sItem 551 Loop 552 Function_Return sValue 553 End_Function 554 555 556 Function DDAutoControl integer hMain integer iFile integer iField string sParams returns string 557 string sValue sReadOnly 558 integer iType iVType hDD 559 Get_Attribute DF_Field_Type of iFile iField to iType 560 If iType eq DF_TEXT ; 561 Get DDEditControl hMain iFile iField sParams to sValue 562 else Begin 563 Get Data_Set of hMain iFile to hDD 564 If not hDD function_return 565 Get Field_Validation_Type of hDD iField to iVType 566 If (iVType=FA_VALIDATION_TYPE_CHECKBOX) ; 567 Get DDRadioControl hMain iFile iField sParams to sValue 568 else if (iVType=FA_VALIDATION_TYPE_CHECK or iVType=FA_VALIDATION_TYPE_TABLE) ; 569 Get DDComboControl hMain iFile iField sParams to sValue 570 else ; 571 Get DDFormControl hMain iFile iField sParams to sValue 572 End 573 //showln "....." (length(svalue)) ' ' (right(svalue,50)) 574 Function_Return sValue 575 end_function 576 577 // create input for WML 578 Function DDWMLInputControl integer hMain integer iFile integer iField string sParams returns string 579 string sValue sDat sReadOnly sFormat 580 integer iSize 581 Get File_Field_Current_Value of hMain iFile iField to sDat 582 Get HtmlEncode sDat to sDat 583 584 Get_attribute DF_FIELD_LENGTH of iFile iField to iSize 585 586 Get DDReadOnlyHTML hMain iFile iField to sReadOnly 587 588 If (sParams<>"") ; 589 Move ('format="'-sParams-'"') to sFormat 590 591 If (sReadOnly="") ; 592 Move ('+ Html_Ctrl_Name(Self,iFile,iField) + ; 593 '" value="' + sDat + ; 594 '" maxlength="' + string(iSize) + ; 595 '"' * sFormat * '/>') to sValue 596 Else ; 597 Move sDat to sValue // if readonly...just return the ddValue 598 599 Function_Return sValue 600 601 end_function 602 603 604 Function DDFieldErr integer hMain integer iFile integer iField integer bShort returns string 605 integer iItem 606 string sErr 607 Get FileFieldErrorItem iFile iField to iItem 608 If (iItem>=0) Begin 609 Get ErrorMessage iItem to sErr 610 If (sErr='') ; 611 Move "Field Error" to sErr 612 Else If bShort Begin 613 Move (pos("
"
,lowercase(sErr))) to iItem 614 If iItem gt 0 Move (left(sErr,iItem-1)) to sErr 615 End 616 Function_return sErr 617 End 618 Function_return sErr 619 End_Function 620 621 622 // This replaces the standard ddValue 623 // 624 Function DDHndValue integer hMain integer iFile integer iField integer iOption string sParams Returns string 625 string sValue sErr 626 integer iMsg iItem iType 627 628 // Note that we use pbEncodeddValue to determine if data should be html encoded. This is set by 629 // the system and you should not change that here. Some ddvalues params always enccode because they 630 // make no sense in any other context (e.g. ddForm, ddAuto) while other are affected by this property 631 // (e.g. ddCrntValue, ddDesc). If this method is augmented you can use this property to determine if 632 // you need an htmlencode of not. 633 634 Case Begin 635 Case iOption eq DDCRNTVALUE 636 Get DDCurrentValue hMain iFile iField to sValue 637 case Break 638 639 Case iOption eq DDLONGLABEL Move DD_LABEL_LONG to iType 640 Case iOption eq DDSHORTLABEL Move DD_LABEL_SHORT to iType 641 Case iOption eq DDTAGLABEL Move DD_LABEL_TAG to iType 642 Get File_Field_Label of hMain iFile iField iType to sValue 643 If (pbEncodeDDValue(self)) ; 644 Get HtmlEncode sValue to sValue 645 If (sParams>0) Begin 646 Get FileFieldErrorItem iFile iField to iItem 647 if iItem ge 0 begin 648 Move ('' * sValue ) to sValue 649 If sParams eq 2 begin 650 Get ErrorMessage iItem to sErr 651 Move (pos("
"
,lowercase(sErr))) to iItem 652 If iItem gt 0 Move (left(sErr,iItem-1)) to sErr 653 Append sValue '
**'
sErr ''
654 End 655 Append sValue ''
656 End 657 end 658 case Break 659 660 Case iOption eq DDDESC Move Get_File_Field_Current_Description to iMsg 661 //Case iOption eq DDSTHELP Move Get_File_Field_Status_Help to iMsg 662 Case iOption eq DDOPT Move Get_File_Field_Options to iMsg 663 // all of the above will drop to here 664 Get iMsg of hMain iFile iField to sValue 665 If (pbEncodeDDValue(self)) ; 666 Get HtmlEncode sValue to sValue 667 Case Break 668 669 Case iOption eq DDSTHELP 670 Get Get_File_Field_Status_Help of hMain iFile iField to sValue 671 If (pbEncodeDDValue(self)) ; 672 Get HtmlEncode sValue to sValue 673 If sParams eq "1" Begin 674 Get FileFieldErrorItem iFile iField to iItem 675 If (iItem>=0) Begin 676 Get ErrorMessage iItem to sErr 677 Append sValue "
Error: "
sErr 678 End 679 End 680 Case Break 681 682 Case iOption eq DDVALNUM 683 Get ValTbl_Items hMain iFile iField to sValue 684 Case Break 685 686 Case iOption eq DDVALDATA 687 Move sParams to iItem 688 Get ValTbl_ItemData hMain iFile iField iItem to sValue 689 If (pbEncodeDDValue(self)) ; 690 Get HtmlEncode sValue to sValue 691 Case Break 692 693 Case iOption eq DDVALDESC 694 Move sParams to iItem 695 Get ValTbl_ItemDesc hMain iFile iField iItem to sValue 696 If (pbEncodeDDValue(self)) ; 697 Get HtmlEncode sValue to sValue 698 Case Break 699 700 // these are HTML helper messages 701 Case iOption eq DDCHCK 702 Move (If(File_Field_Current_value(hMain,iFile,iField)=sParams, 'checked="checked"',"")) to sValue 703 Case Break 704 705 Case iOption eq DDSEL 706 Move (If(File_Field_Current_value(hMain,iFile,iField)=sParams, 'selected="selected"',"")) to sValue 707 Case Break 708 709 Case iOption eq DDOPTION 710 Get DDComboOptions hMain iFile iField to sValue 711 Case Break 712 713 Case iOption eq DDREADONLY 714 Get DDReadOnlyHTML hMain iFile iField to sValue 715 Case Break 716 717 Case iOption eq DDROWIDS 718 Get DDRowIdsOptions hMain iFile iField to sValue 719 Case Break 720 Case iOption eq DDRECS 721 Get DDRecsOptions hMain iFile iField to sValue 722 Case Break 723 Case iOption eq DDTITLE 724 Get DDTitleHtml hMain iFile iField to sValue 725 Case Break 726 Case iOption eq DDFIELDERROR 727 Get DDFieldErr hMain iFile iField 0 to sValue 728 Case Break 729 Case iOption eq DDSHORTFIELDERROR 730 Get DDFieldErr hMain iFile iField 1 to sValue 731 Case Break 732 733 734 // these are dynamic form options. They create the entire html control 735 Case iOption eq DDFORM 736 Get DDFormControl hMain iFile iField sParams to sValue 737 Case Break 738 Case iOption eq DDEDIT 739 Get DDEditControl hMain iFile iField sParams to sValue 740 Case Break 741 Case iOption eq DDCOMBO 742 Get DDComboControl hMain iFile iField sParams to sValue 743 Case Break 744 Case iOption eq DDRADIO 745 Get DDRadioControl hMain iFile iField sParams to sValue 746 Case Break 747 Case iOption eq DDPARENTCOMBO 748 Get DDParentComboControl hMain iFile iField sParams to sValue 749 Case Break 750 Case iOption eq DDAUTO 751 Get DDAutoControl hMain iFile iField sParams to sValue 752 Case Break 753 754 // wml input form 755 Case iOption eq DDWMLINPUT 756 Get DDWmlInputControl hMain iFile iField sParams to sValue 757 Case Break 758 759 Case End 760 Function_return sValue 761 762 End_function 763 764 // This creates an entire HTML output entry form automatically for all fields that 765 // are not binary or overlap 766 Function AutoEntry string sFileName returns integer 767 integer hDD iFile iFlds i iType 768 string sValue sLblStart sLblEnd sDatStart sDatEnd 769 // 770 Get psAutoEntryLabelStart to sLblStart 771 Get psAutoEntryLabelEnd to sLblEnd 772 Get psAutoEntryDataStart to sDatStart 773 Get psAutoEntryDataEnd to sDatEnd 774 // 775 Get MapFileNametoDD sFileName False to hDD // Must find the file 776 If not hDD Function_return 0 777 Get Main_file of hDD to iFile 778 Get_Attribute DF_FILE_NUMBER_FIELDS of iFile to iFlds 779 // create hidden rowid field 780 Move ('+ Html_Ctrl_RowId_Name(Self,iFile) + ; 781 '" value="' + SerializeRowId(CurrentRowId(hdd)) + '" />') to sValue 782 Send WriteHtml sValue 783 // create changed state field 784 Move '' to sValue 785 Send WriteHtml sValue 786 787 788 // 789 Send WriteHtmlTableBegin 'class="EntryTable"' 790 For i from 1 to iFlds 791 Get_Attribute DF_FIELD_TYPE of iFile i to iType 792 If (iType<>DF_OVERLAP and iType<>DF_BINARY) Begin 793 Send WriteHtmlRowBegin 794 Get ddHndValue hDD iFile i DDSHORTLABEL 2 to sValue 795 Send WriteHtml (sLblStart+sValue+sLblEnd) 796 Get ddHndValue hDD iFile i DDAUTO '' to sValue 797 Send WriteHtml (sDatStart+sValue+sDatEnd) 798 Send WriteHtmlRowEnd 799 End 800 Loop 801 Send WriteHtmlTableEnd 802 If not hDD Function_return 1 803 End_function 804 805 // not used. keeps the compiler happy 806 807 Function DoAutoReport integer iIndex string sHref integer iMax integer iStart Returns integer 808 end_function 809 810 // Auto report. 811 // pass: FileName, Index, ASP-href name 812 Function AutoReport string sFileName string iIndex string sHRef integer iMax integer iStart returns integer 813 integer hDD hWBPO bStat 814 integer iFile iField 815 handle hAutoReport 816 Get phAutoWebReport to hAutoReport 817 If (hAutoReport=0) function_return 0 818 819 Get MapFileNametoDD sFileName False to hDD // Must find the file 820 If not hDD Function_return 1 821 Get Main_File of hDD to iFile 822 Move Self to hWBPO 823 // support passing of index number or field name - if 824 // field name is passed, use main index of field 825// Move (trim(sIndex)) to sIndex 826// If sIndex eq '' ; 827// Move 1 to iIndex 828// else If ("0123456789" contains left(sIndex,1)) ; 829// Move sIndex to iIndex 830// else Begin 831// Field_Map iFile sIndex to iField 832// Get_Attribute DF_FIELD_Index of iFile iField to iIndex 833// End 834 If iIndex lt 0 Move 1 to iIndex 835 // 836 Get DoAutoReport of hAutoReport iIndex sHRef iMax iStart to bStat 837 function_return bStat 838 End_function 839 840 // Find by recnum. Pass FileName and record ID 841 Function DoRequestFindbyRecId string sfileName String sRec returns integer 842 Integer hDD 843 integer iFile iRec 844 Send ClearErrors 845 Move sRec to iRec 846 Get MapFileNametoDD sFileName True to hDD // this is the find DD 847 If (hDD=0) function_return True 848 Get Main_file of hDD to iFile // this is the file# 849 Send Find_by_recnum of hDD iFile iRec 850 Function_return (not(HasRecord(hDD))) 851 End_Function 852 853 // Find by rowed. Pass FileName and serialized row id 854 Function DoRequestFindbyRowId string sfileName String sRec returns integer 855 Integer hDD 856 integer iFile 857 Rowid riRec 858 Send ClearErrors 859 Move (DeserializeRowid(sRec)) to riRec 860 Get MapFileNametoDD sFileName True to hDD // this is the find DD 861 If (hDD=0) function_return True 862 Get Main_file of hDD to iFile // this is the file# 863 Send FindByRowId of hDD iFile riRec 864 Function_return (not(HasRecord(hDD))) 865 End_Function 866 867 868 869 // Create a Combo with all Indexes for passed File and current selected fldname 870 // returns control named FindIndex 871 Function CreateFindIndexCombo string sComboName string sfileName integer iDfltIndex returns string 872 Integer hDD 873 integer iFile i iNumFlds iType iNdx 874 string sFldTag sFldName sOption sSel sIndx 875 876 Get MapFileNametoDD sFileName True to hDD // this is the find DD 877 //Showln "in createfindindexcombo " sfilename ' dflt=' sDefaultField ' hdd=' hdd 878 If hDD eq 0 function_return 1 879 880 Get Main_file of hDD to iFile // this is the file# 881 Get_Attribute DF_FILE_NUMBER_FIELDS of iFile to iNumFlds 882 883 Send WriteHtml ('' 900 901 End_Function 902 903 // create index selector for WML 904 Function WmlCreateFindIndexSelect string sComboName string sfileName integer iDfltIndex returns string 905 Integer hDD 906 integer iFile i iNumFlds iType iNdx 907 string sFldTag sFldName sOption sIndx 908 909 Get MapFileNametoDD sFileName True to hDD // this is the find DD 910 If hDD eq 0 function_return 1 911 912 Get Main_file of hDD to iFile // this is the file# 913 Get_Attribute DF_FILE_NUMBER_FIELDS of iFile to iNumFlds 914 Send WriteWml ('' 929 End_Function 930 931 // return field name of first segment in index 932 Function IndexMainField string sfileName integer iIndex returns string 933 Integer hDD 934 integer iFile iFld 935 string sFldName 936 Get MapFileNametoDD sFileName True to hDD // this is the find DD 937 If hDD eq 0 function_return "" 938 Get Main_file of hDD to iFile // this is the file# 939 Get_Attribute DF_INDEX_SEGMENT_FIELD of iFile iIndex 1 to iFld 940 Get_Attribute DF_FIELD_NAME of iFile iFld to sFldName 941 Function_return (lowercase(sFldName)) 942 End_Function 943 944 945 // ddFind 946 // Find Record from primed DD buffer 947 // Note: 2nd param (sFieldName) can be a field (if name passed) or an index (if number passed) 948 // 949 Function ddFind string sFileName string sFieldName Integer iFindMode returns integer 950 Integer hDD iFile iField iIndex 951 integer bErr bIsIndex 952 953 Set phLastFindDD to 0 954 955 Get MapFileNametoDD sFileName True to hDD // this is the find DD 956 Move (hDD=0) to bErr 957 Get Main_file of hDD to iFile // this is the file# 958 if Not bErr Begin 959 Move (trim(sFieldName)) to sFieldName 960 If (sFieldName='') Begin 961 Move 1 to iIndex 962 Move 1 to bIsIndex 963 end 964 else If ("0123456789" contains left(sFieldName,1)) Begin 965 Move sFieldName to iIndex 966 Move 1 to bIsIndex 967 end 968 Else Begin 969 Get MaptoFieldNumber iFile sFieldName To iField 970 If (iField<0) Move 1 to bErr 971 end 972 End 973 974 If Not bErr Begin 975 976 If Not bIsIndex ; 977 Get Field_Main_Index of hDD iFile iField to iIndex 978 If (iIndex>=0) Begin 979 Set phLastFindDD to hDD 980 Set piLastFindIndex to iIndex 981 Send File_Index_Find of hDD iFindMode iFile iIndex True False False // Error will not be reported 982 Function_return (found) 983 end 984 End 985 End_Function 986 987 // ddFindFirst 988 // Find First record. 989 // Note: 2nd param can be a field (if name passed) or an index (if number passed) 990 // 991 Function ddFindFirst string sFile string sField Returns integer 992 Integer bFound 993 Get DDFind sFile sField FIRST_RECORD to bFound 994 Function_return bFound 995 End_function 996 997 // ddFindLast 998 // Find last record. 999 // Note: 2nd param can be a field (if name passed) or an index (if number passed) 1000 // 1001 Function ddFindLast string sFile string sField Returns integer 1002 Integer bFound 1003 Get DDFind sFile sField LAST_RECORD to bFound 1004 Function_return bFound 1005 End_function 1006 1007 // ddFindNext 1008 // Find next record. Must be primed with a ddFind, ddFindFirst or ddFindLast 1009 // This takes no params, it uses last "primed" find data. 1010 // 1011 Function ddFindNext returns integer 1012 Integer hDD iFile iIndx 1013 Get phLastFindDD to hDD 1014 Get piLastFindIndex to iIndx 1015 If hDD Begin 1016 Get Main_file of hDD to iFile 1017 Send Request_Find of hDD GT iFile iIndx 1018 Function_return (Found) 1019 End 1020 End_Function 1021 1022 // ddFindPrev 1023 // Find previous record. Must be primed with a ddFind, ddFindFirst or ddFindLast 1024 // This takes no params, it uses last "primed" find data. 1025 Function ddFindPrev returns integer 1026 Integer hDD iFile iIndx 1027 Get phLastFindDD to hDD 1028 Get piLastFindIndex to iIndx 1029 If hDD Begin 1030 Get Main_file of hDD to iFile 1031 Send Request_Find of hDD LT iFile iIndx 1032 Function_return (Found) 1033 End 1034 End_function 1035 1036 // ddFindbyrecId 1037 // Find by record Id. Pass FileName and record ID 1038 // 1039 Function ddFindbyRecId string sfileName String sRec returns integer 1040 Handle hDD 1041 integer iRec 1042 Move sRec to iRec 1043 Get MapFileNametoDD sFileName True to hDD // this is the find DD 1044 If hDD Begin 1045 Send Find_by_Recnum of hDD (main_file(hDD)) iRec // this will do a DD find by recnum 1046 Function_return (found) 1047 End 1048 End_Function 1049 1050 Function ddFindbyRowId string sfileName string sSerializedRowId returns integer 1051 Handle hDD 1052 Get MapFileNametoDD sFileName True to hDD // this is the find DD 1053 If hDD Begin 1054 Send FindByRowId of hDD (main_file(hDD)) (DeserializeRowId(sSerializedRowId)) // this will do a DD find by row id 1055 Function_return (found) 1056 End 1057 End_Function 1058 1059 1060 // ddClear 1061 // 1062 Function ddClear string sFile returns integer 1063 Handle hDD 1064 Set phLastFindDD to 0 1065 Get MapFileNametoDD sFile True to hDD // this is the find DD 1066 If hDD Begin 1067 Send Clear to hDD 1068 Function_return 1 1069 end 1070 End_function 1071 1072 // ddDelete 1073 // Delete current record in DD 1074 // 1075 Function ddDelete string sFile returns integer 1076 Handle hDD 1077 Integer bErr 1078 Get MapFileNametoDD sFile True to hDD // this is the find DD 1079 If hDD Begin 1080 Send Request_delete of hDD 1081 Move (Err) to bErr 1082 Function_return (not(bErr)) 1083 end 1084 End_Function 1085 1086 // ddSave 1087 // This does a validate and a save. 1088 // 1089 Function ddSave string sFile returns integer 1090 Handle hDD 1091 Integer bErr 1092 Get MapFileNametoDD sFile True to hDD // this is the find DD 1093 If hDD Begin 1094 Get Request_Validate_All of hDD to bErr // Validate-All Fields (includes FindReq) 1095 If Not bErr Begin 1096 Send Request_Save of hDD // Ask DD to save the Record 1097 Move (Err) to bErr // Err indicator is returned if failure 1098 End 1099 Function_return (not(bErr)) 1100 end 1101 End_Function 1102 1103 // ddValidate 1104 // validate all fields (even if error is encountered all fields are validated) 1105 // 1106 Function ddValidate string sFile returns integer 1107 Handle hDD 1108 Integer bErr 1109 Get MapFileNametoDD sFile True to hDD // this is the find DD 1110 If hDD Begin 1111 Get Request_Validate_All of hDD to bErr // Validate-All Fields (includes FindReq) 1112 Function_return (not(bErr)) 1113 end 1114 End_Function 1115 1116 1117 //************************************************************************* 1118 //*** Interface reporting: 1119 //************************************************************************* 1120 1121 // Ideally these two messages belong in the DD class. 1122 1123 // traverse All DDOs starting at the parent most and working down. 1124 1125 Procedure Enumerate_DDOs integer hDD integer hMsg integer hObj string sP1 string sP2 1126 Send Initialize_Visited to hDD True False // False=don't clear Column marks 1127 Send PrivateEnumerate_DDOs hDD hMsg hObj sP1 sP2 1128 End_procedure 1129 1130 1131 Procedure PrivateEnumerate_DDOs integer hDD integer hMsg integer hObj string sP1 string sP2 1132 Integer hDDNext 1133 Integer iCount iMax 1134 // mark visisted so that it does not get revisited by a server looking down 1135 Set Visited_State of hDD to TRUE 1136 // First process all server DDs (and all server's clients) 1137 Get Data_Set_Server_Count of hDD to iMax 1138 Decrement iMax 1139 For iCount from 0 to iMax 1140 Get Data_Set_Server of hDD iCount to hDDNext 1141 If Not (Visited_state(hDDNext)) ; 1142 Send PrivateEnumerate_DDOs hDDNext hMsg hObj sP1 sP2 1143 Loop 1144 // All servers processed, now process self 1145 Send hMsg to hObj hDD sP1 sP2 1146 // Now process all client DDs (and all client's servers) 1147 Get Data_Set_Client_Count of hDD to iMax 1148 Decrement iMax 1149 For iCount from 0 to iMax 1150 Get Data_Set_Client of hDD iCount to hDDNext 1151 If Not (Visited_state(hDDNext)) ; 1152 Send PrivateEnumerate_DDOs hDDNext hMsg hObj sP1 sP2 1153 Loop 1154 End_Procedure 1155 1156 1157 1158 Function YesNo integer bState Returns String 1159 Function_Return (if(bState,"Yes","No")) 1160 End_Function 1161 1162 1163 Function TrueFalse integer bState Returns String 1164 Function_Return (if(bState,"TRUE","FALSE")) 1165 End_Function 1166 1167 1168 Procedure ShowddValue integer hoObj integer hmMsg 1169 string sparam1 sParam2 sComment sStr1 sStr 1170 integer hddv iParam1 iCount i 1171 Get hDDValueInterface to hddv 1172 If hddv Begin 1173 Send hmMsg to hoObj (" DDValue Interface") 1174 Get ddValueCount of hddv to iCount 1175 Move ' Obj.ddValue("sTable.Column"' to sStr1 1176 For i From 0 to (iCount-1) 1177 Get Param1Number of hddv i to iParam1 1178 Get Param1str of hddv i to sParam1 1179 Get Param2Str of hddv i to sParam2 1180 Get ddValCmnt of hddv i to sComment 1181 Move sStr1 to sStr 1182 If (sParam1<>'') begin 1183 Move (sStr + "," * sParam1 ) to sStr 1184 If (sParam2<>'') ; 1185 Move (sStr+ "," * sParam2 ) to sStr 1186 End 1187 Move (sStr + ") /" + "/" * sComment * if(sParam1<>"","("+sParam1+"="+string(iParam1)+")","")) to sStr 1188 Send hmMsg to hoObj sStr 1189 Loop 1190 Send hmMsg to hoObj "" 1191 end 1192 End_Procedure 1193 1194 1195 1196 Procedure ShowDDData integer hDD integer hoObj integer hmMsg 1197 string sTable sColumn 1198 integer iTable iColumns iType i 1199 Boolean bRecnumTable 1200 Send hmMsg to hoObj (" " + Object_Label(hDD) * If(hDD=Main_dd(self),"(Main DDO)","")) 1201 Get Main_file of hDD to iTable 1202 Get_Attribute DF_FILE_LOGICAL_NAME of iTable to sTable 1203 Get_Attribute DF_FILE_NUMBER_FIELDS of iTable to iColumns 1204 Get_Attribute DF_FILE_RECNUM_TABLE of iTable to bRecnumTable 1205 // only add recnum of table supports that type 1206 If (bRecnumTable) begin 1207 Send hmMsg to hoObj (Lowercase(" " + sTable - '.' - "RECNUM")) 1208 end 1209 For i From 1 to iColumns 1210 Get_Attribute DF_FIELD_TYPE of iTable i to iType 1211 If (iType<>DF_OVERLAP AND iType<>DF_BINARY) Begin 1212 Get_Attribute DF_FIELD_NAME of iTable i to sColumn 1213 Send hmMsg to hoObj (Lowercase(" " + sTable - '.' - sColumn)) 1214 End 1215 Loop 1216 End_Procedure 1217 1218 1219 Procedure ShowWBOData integer hoObj integer hmMsg integer iMode 1220 String sName sParams sComment 1221 integer iCount iItem hMainDD 1222 Send hmMsg to hoObj ("WBO:" * Object_Label(self) * "-" * psDescription(self)) 1223 Send hmMsg to hoObj "" 1224 1225 Get Main_dd to hMainDD 1226 If Not hMainDD ; 1227 Send hmMsg to hoObj "Main DD is not Defined" 1228 Else Begin 1229 Send Enumerate_DDOs hMainDD msg_showDDData self hoObj hmMsg 1230 end 1231 Send hmMsg to hoObj "" 1232 Send hmMsg to hoObj (" Allow RequestSave (New):" * YesNo(self,pbAllowSaveNew(self))) 1233 Send hmMsg to hoObj (" Allow RequestSave (Edit):" * YesNo(self,pbAllowSaveEdit(self))) 1234 Send hmMsg to hoObj (" Allow RequestDelete:" * YesNo(self,pbAllowDelete(self))) 1235 Send hmMsg to hoObj (" Allow RequestClear:" * YesNo(self,pbAllowClear(self))) 1236 Send hmMsg to hoObj (" Allow RequestFind:" * YesNo(self,pbAllowFind(self))) 1237 Send hmMsg to hoObj (" Allow RequestDDUpdate:" * YesNo(self,pbAllowDDUpdate(self))) 1238 1239 If (pbUseOpenEvalInterface(Self)) ; 1240 Send hmMsg to hoObj (' Open "eval" interface is enabled for "Call"') 1241 Get InterfaceMessageCount to iCount 1242 If (iCount>0) Begin 1243 Send hmMsg to hoObj "" 1244 Send hmMsg to hoObj (" Call Interface:" * If(pbUseOpenEvalInterface(Self),'Open "eval" interface enabled','')) 1245 For iItem From 0 to (iCount-1) 1246 Get InterfaceMessageName iItem to sName 1247 Get InterfaceMessageParams iItem to sParams 1248 Get InterfaceMessageComment iItem to sComment 1249 Send hmMsg to hoObj (" " + sName * sParams + " /"+"/" * sComment) 1250 Loop 1251 End 1252 Send hmMsg to hoObj "" 1253 Send ShowDDValue hoObj hmMsg 1254 End_Procedure 1255 1256 1257 // FormatXmlObjName 1258 // ---------------- 1259 // This is a cheap way to improve the way that object names appear in WebApp.xml 1260 // At least it is better than ALLCAPS. 1261 1262 1263 Function FormatXmlObjName String sObject Returns String 1264 String sTemp 1265 1266 Move (Lowercase(sObject)) To sObject 1267 1268 If (Length(sObject) > 1) Begin 1269 If (Left(sObject,1) = "o") Begin 1270 Move (Mid(sObject, 1, 2)) To sTemp 1271 Move (Uppercase(sTemp)) To sTemp 1272 Move (Overstrike(sTemp, sObject, 2)) To sObject 1273 End 1274 Else Begin 1275 Move (Mid(sObject, 1, 1)) To sTemp 1276 Move (Uppercase(sTemp)) To sTemp 1277 Move (Overstrike(sTemp, sObject, 1)) To sObject 1278 End 1279 End 1280 Function_Return sObject 1281 End_Function // FormatXmlObjName 1282 1283 // GetParamType 1284 // ------------ 1285 // determine the parameter type by analysing the parameter name. 1286 // The analysis is case-sensitive, so the name must be case-exact... 1287 1288 1289 Function GetParamType String sParamName Returns String 1290 Case Begin 1291 Case (sParamName = "sTable") 1292 Function_Return "ptTableName" 1293 Case Break 1294 1295 Case (sParamName = "sColumn") 1296 Function_Return "ptColumnName" 1297 Case Break 1298 1299 Case (sParamName = "sTableColumn") 1300 Function_Return "ptTableColumnName" 1301 Case Break 1302 1303 Case (sParamName = "iTable") 1304 Function_Return "ptTableNumber" 1305 Case Break 1306 1307 Case (sParamName = "iColumn") 1308 Function_Return "ptColumnNumber" 1309 Case Break 1310 1311 Case Else 1312 Function_Return "ptUnspecified" 1313 Case Break 1314 Case End 1315 End_Function // GetParamType 1316 1317 1318 1319 // ShowXMLddValue 1320 // -------------- 1321 1322 1323 Procedure ShowXMLddValue integer hObj 1324 string sparam1 sParam2 sComment 1325 Handle hddv 1326 Integer iParamNumber iCount i 1327 1328 Get hDDValueInterface to hddv 1329 1330 If (hddv) Begin 1331 Get ddValueCount of hddv to iCount 1332 1333 For i From 0 to (iCount-1) 1334 Get Param1Number of hddv i to iParamNumber 1335 Get Param1str of hddv i to sParam1 1336 Get Param2Str of hddv i to sParam2 1337 Get ddValCmnt of hddv i to sComment 1338 Send Begin_XML_Tag to hObj 'ddValueMessage' // <ddValueMessage> 1339 Send Add_XML_Tag to hObj 'ddValueName' sParam1 ('Constant="' + string(iParamNumber) + '"') 1340 Send Add_XML_Tag to hObj 'ddValueDescription' sComment 1341 1342 If (Trim(sParam2) <> "") Begin 1343 // Output the Param Tag........................ 1344 // Here we create special logic to output extra 1345 // parameter information about specific types 1346 // of ddValueName.............................. 1347 Case Begin 1348 Case (sParam1 = 'DDSTHELP') 1349 Send Begin_XML_Tag to hObj 'Param ParamType="ptBoolean"' 1350 Send Add_XML_Tag to hObj 'ParamName' sParam2 1351 Send End_XML_Tag to hObj 'Param' 1352 Case Break 1353 1354 Case Else 1355 // For all other ddValueNames just do the 1356 // standard parameter name analysis. 1357 Send Begin_XML_Tag to hObj ('Param ParamType="' + GetParamType(Self, sParam2) + '"') 1358 Send Add_XML_Tag to hObj 'ParamName' sParam2 1359 Send End_XML_Tag to hObj 'Param' 1360 Case Break 1361 Case End 1362 End // If sParam2 <> "" 1363 Send End_XML_Tag to hObj "ddValueMessage" // </ddValueMessage> 1364 Loop 1365 end 1366 End_Procedure // ShowXMLddValue 1367 1368 // ShowXMLDDdata 1369 // ------------- 1370 1371 1372 Procedure ShowXMLDDdata integer hDD integer hObj 1373 string sTable sColumn 1374 String sMainDD 1375 integer iTable iColumn icColumn iType 1376 Boolean bRecnumTable 1377 1378 If (Main_dd(Self)=hDD) Move "TRUE" To sMainDD 1379 Else Move "FALSE" To sMainDD 1380 1381 Send Begin_XML_Tag to hObj ('DDO IsMainDDO="' + sMainDD + '"') // <DDO> 1382 Get Main_file of hDD to iTable 1383 Get_Attribute DF_FILE_LOGICAL_NAME of iTable to sTable 1384 Get_Attribute DF_FILE_NUMBER_FIELDS of iTable to icColumn 1385 Get_Attribute DF_FILE_RECNUM_TABLE of iTable to bRecnumTable 1386 1387 Send Add_XML_Tag to hObj "DDOClass" "not implemented" 1388 Send Add_XML_Tag to hObj "DDOName" (FormatXmlObjName(Self, Object_Label(hDD))) 1389 Send Add_XML_Tag to hObj "TableName" (lowercase(sTable)) 1390 Send Add_XML_Tag to hObj "TableNumber" iTable 1391 1392 If (icColumn > 0) Begin 1393 Send Begin_XML_Tag to hObj 'Columns' // <Columns> 1394 1395 // only add recnum of table supports that type 1396 If (bRecnumTable) begin 1397 Send Begin_XML_Tag to hObj 'Column' // <Column> 1398 Send Add_XML_Tag to hObj 'ColumnName' 'recnum' 1399 Send End_XML_Tag to hObj 'Column' // </Column> 1400 end 1401 1402 For iColumn From 1 to icColumn 1403 Get_Attribute DF_FIELD_TYPE of iTable iColumn to iType 1404 If (iType<>DF_OVERLAP AND iType<>DF_BINARY) Begin 1405 Get_Attribute DF_FIELD_NAME of iTable iColumn to sColumn 1406 Send Begin_XML_Tag to hObj 'Column' // <Column> 1407 Send Add_XML_Tag to hObj 'ColumnName' (lowercase(sColumn)) 1408 Send End_XML_Tag to hObj 'Column' // </Column> 1409 End 1410 Loop 1411 Send End_XML_Tag to hObj 'Columns' // </Columns> 1412 End // If there are any columns 1413 Send End_XML_Tag to hObj "DDO" // </DDO> 1414 End_Procedure // ShowXmlDDdata 1415 1416 1417 // ShowXmlMethodParameters 1418 // ----------------------- 1419 // This method parses the sParams and outputs the <Params> collection of WebApp.xml. 1420 // The sParams string is derived from the InterfaceMessageParams property of a given 1421 // interface method. 1422 1423 1424 Procedure ShowXmlMethodParameters Integer hObj String sParams integer bExtendedParams 1425 String sParamType sParamName sUCParamName 1426 String sOriginal 1427 Integer iPos 1428 Integer icLoop 1429 1430 // determine if there are any params.................... 1431 Move (Trim (sParams)) To sParams 1432 Move sParams To sOriginal 1433 1434 If bExtendedParams begin 1435 // if extended and it is returns, we are done. No <params> 1436 Move (Pos(" ",sParams)) To iPos 1437 If (iPos = 0) Move (Length(sParams)) To iPos 1438 Move (lowercase(trim(Left(sParams,iPos)))) To sParamName 1439 If (sParamName="returns") ; // if returns, make string empty to end it 1440 Move "" to sParams 1441 end 1442 1443 If (sParams <> "") Begin 1444 Move 0 To icLoop 1445 1446 Send Begin_XML_Tag to hObj "Params" // <Params> 1447 While (Trim(sParams) <> "") 1448 If bExtendedParams begin 1449 // if extended, strip the datatype. If the DT is returns, we are done. 1450 Move (Pos(" ",sParams)) To iPos 1451 If (iPos = 0) Move (Length(sParams)) To iPos 1452 Move (lowercase(trim(Left(sParams,iPos)))) To sParamName 1453 If (sParamName="returns") ; // if returns, make string empty to end it 1454 Move '' to sParams 1455 else ; 1456 Move (Trim(Remove(sParams, 1, iPos))) To sParams 1457 end 1458 If (sParams<>"") begin // could be empty from extended stuff 1459 // extract the next parameter................... 1460 Move (Pos(" ",sParams)) To iPos 1461 If (iPos = 0) Move (Length(sParams)) To iPos 1462 Move (trim(Left(sParams,iPos))) To sParamName 1463 Move (Remove(sParams, 1, iPos)) To sParams 1464 Move (Trim(sParams)) To sParams 1465 1466 Move (GetParamType(Self, sParamName)) To sParamType 1467 1468 // Output the parameter tag..................... // <Param> 1469 Send Begin_XML_Tag to hObj ('Param ParamType="' - sParamType - '"') 1470 Send Add_XML_Tag to hObj 'ParamName' sParamName 1471 Send End_XML_Tag to hObj 'Param' // </Param> 1472 End 1473 1474 // infinite loop control........................ 1475 Increment icLoop 1476 If (icLoop > 1000) Begin // there should definitely not be more that 1000 loops! 1477 Error DFERR_PROGRAM (SFormat(C_$ParamCountExceeded, sOriginal)) 1478 End 1479 If (icLoop > 1000) Break 1480 Loop 1481 1482 Send End_XML_Tag to hObj "Params" // </Params> 1483 End 1484 End_Procedure // ShowXmlMethodParameters 1485 1486 1487 // ShowXml 1488 // ------- 1489 // XML Output. Both of these messages expect that hOBj understands the messages 1490 // Add_xml_tag, begin_xml_tag and end_xml_tag 1491 1492 1493 Procedure ShowXml integer hObj 1494 String sMethodName sParams sComment 1495 String sMethodType 1496 integer iCount iItem 1497 Handle hMainDD 1498 Integer bExtended 1499 1500 Send Add_XML_Tag to hObj "WBOName" (FormatXmlObjName(Self, Object_Label(self))) 1501 Send Add_XML_Tag to hObj "WBODescription" (psDescription(self)) 1502 1503 // If there is no Main DDO then we can't enumerate 1504 // the DDOs so we cant output these tags.......... 1505 Get Main_dd To hMainDD 1506 1507 If (hMainDD) Begin 1508 Send Begin_XML_Tag to hObj "DDOs" // <DDOs> (0 or 1) 1509 Send Enumerate_DDOs hMainDD msg_showXMLDDdata self hObj "" 1510 Send End_XML_Tag to hObj "DDOs" // </DDOs> 1511 End // If there is a main_DDO 1512 1513 Send Begin_XML_Tag to hObj "AllowRequests" // <AllowRequests> 1514 Send Add_XML_Tag to hObj "AllowRequestSaveNew" (TrueFalse(self,pbAllowSaveNew(self))) 1515 Send Add_XML_Tag to hObj "AllowRequestSaveEdit" (TrueFalse(self,pbAllowSaveEdit(self))) 1516 Send Add_XML_Tag to hObj "AllowRequestDelete" (TrueFalse(self,pbAllowDelete(self))) 1517 Send Add_XML_Tag to hObj "AllowRequestClear" (TrueFalse(self,pbAllowClear(self))) 1518 Send Add_XML_Tag to hObj "AllowRequestFind" (TrueFalse(self,pbAllowFind(self))) 1519 Send Add_XML_Tag to hObj "AllowRequestDDUpdate" (TrueFalse(self,pbAllowDDUpdate(self))) 1520 //Send Add_XML_Tag to hObj "AllowDoProcess" (TrueFalse(self,pbAllowDoProcess(self))) 1521 //If (pbAllowDoProcess(self)) begin 1522 // Send Add_XML_Tag to hObj "DoProcessParams" (psDoProcessParams(self)) 1523 // Send Add_XML_Tag to hObj "DoProcessComment" (psDoProcessComments(self)) 1524 //end 1525 Send End_XML_Tag to hObj "AllowRequests" // </AllowRequests> 1526 1527 Send Begin_XML_Tag to hObj "Methods" // <Methods> 1528 1529 Get InterfaceMessageCount to iCount 1530 1531 For iItem From 0 to (iCount-1) 1532 Get InterfaceMessageName iItem to sMethodName 1533 Get InterfaceMessageParams iItem to sParams 1534 Get InterfaceMessageComment iItem to sComment 1535 Get InterfaceMessageIsExtended iItem to bExtended 1536 // Split the "raw" method name into sMethodType and 1537 // real method name. Raw method name is of the format: 1538 // get_MethodName, set_MethodName or msg_MethodName. 1539 Move (Left (sMethodName, 3)) To sMethodType 1540 Move (lowercase(sMethodType)) To sMethodType 1541 // if the type is unknown default to message...else XML file will not load 1542 // this should not happen with new studio but it could be done manually 1543 If (sMethodType<>"get" AND sMethodType<>"set" AND sMethodType<>"msg") ; 1544 Move "msg" To sMethodType 1545 1546 Move (Remove(sMethodName, 1, 4)) To sMethodName 1547 // <Method> 1548 Send Begin_XML_Tag to hObj ('Method Type="' - sMethodType - '"') 1549 Send Add_XML_Tag to hObj "MethodName" sMethodName 1550 Send Add_XML_Tag to hObj "MethodDescription" sComment 1551 1552 Send ShowXmlMethodParameters hObj sParams bExtended 1553 Send End_XML_Tag to hObj 'Method' // </Method> 1554 Loop 1555 Send End_XML_Tag to hObj 'Methods' // </Methods> 1556 1557 Send Begin_XML_Tag to hObj "ddValueMessages" // <ddValueMessages> 1558 Send ShowXMLddValue hObj 1559 Send End_XML_Tag to hObj "ddValueMessages" // </ddValueMessages> 1560 1561 //Send Begin_XML_Tag to hObj "Properties" // <Properties> 1562 //Send End_XML_Tag to hObj "Properties" // </Properties> 1563 End_Procedure // ShowXml 1564 1565 1566 Procedure RegisterDebugInterface 1567 1568 Send RegisterInterface set_pbVerboseErrors "set_pbVerboseErrors" "boolean bState" ; 1569 "report error back with extra detail (for debugging)" 1570 1571 Send RegisterInterface set_pbAllErrorstoEventLog "set_pbAllErrorstoEventLog" "boolean bState" ; 1572 "Log all errors to the event log - for debugging" 1573 1574 Send RegisterInterface set_pbAllErrorstoLocal "set_pbAllErrorstoLocal" "boolean bState" ; 1575 "report all errors to the console - for debugging" 1576 1577 Send RegisterInterface set_pbAllErrorstoHtml "set_pbAllErrorstoHtml" "boolean bState" ; 1578 "report all errors to browser - for debugging" 1579 1580 Send RegisterInterface set_peHtmlOutput "set_peHtmlOutput" "Integer iMode" ; 1581 "Redirect Html 1-normal, 2-file, 4-consolse (bits) can be ORed" 1582 1583 1584 End_Procedure 1585 1586 Procedure RegisterBasicErrorInterface 1587 1588 Send RegisterInterface msg_ErrorQueueStart "msg_ErrorQueueStart" "" ; 1589 "Start Error Queue /Clear current errors" 1590 1591 Send RegisterInterface msg_ErrorQueueEnd "msg_ErrorQueueEnd" "" ; 1592 "End Error Queue" 1593 1594 Send RegisterInterface msg_ClearErrors "msg_ClearErrors" "" ; 1595 "Clear all errors from error queue" 1596 1597 Send RegisterInterface msg_ReportAllErrors "msg_ReportAllErrors" "string sTitle" ; 1598 "report all errors in error queue" 1599 1600 End_Procedure 1601 1602 1603 Procedure RegisterFullErrorInterface 1604 1605 Send RegisterBasicErrorInterface 1606 1607 Send RegisterInterface msg_ReportLastError "msg_ReportLastError" "boolean bClearError" ; 1608 "report last error in queue" 1609 1610 Send RegisterInterface get_ErrorCount "get_ErrorCount" "returns Integer" ; 1611 "Return number of items in error queue" 1612 1613 Send RegisterInterface msg_ReportErrorItem "msg_ReportErrorItem" "integer iItem" ; 1614 "report error for item" 1615 1616 Send RegisterInterface get_ErrorMessage "get_ErrorMessage" "integer iItem returns string" ; 1617 "return error message text for item" 1618 1619 Send RegisterInterface msg_LogErrorEvent "msg_LogErrorEvent" "integer iErrorNumber string sErrortext" ; 1620 "Place error in event log" 1621 1622 End_procedure 1623 1624 // includes interface to create an auto-entry screen 1625 Procedure RegisterAutoEntryInterface 1626 1627 Send RegisterInterface set_psAutoEntryLabelStart "set_psAutoEntryLabelStart" "string sHtmlTag" ; 1628 "Define start tag for Auto Entry Label" 1629 1630 Send RegisterInterface set_psAutoEntryLabelEnd "set_psAutoEntryLabelEnd" "string sHtmlTag" ; 1631 "Define End tag for Auto Entry Label" 1632 1633 Send RegisterInterface set_psAutoEntryDataStart "set_psAutoEntryDataStart" "string sHtmlTag" ; 1634 "Define start tag for Auto Entry data cell" 1635 1636 Send RegisterInterface set_psAutoEntryDataEnd "set_psAutoEntryDataEnd" "string sHtmlTag" ; 1637 "Define End tag for Auto Entry data cell" 1638 1639 Send RegisterInterface get_AutoEntry "get_AutoEntry" "string sTable" ; 1640 "Create an auto-entry HTML form for every column in DD" 1641 1642 End_procedure 1643 1644 // includes the standard call Interface 1645 Procedure RegisterStandardInterface 1646 1647 Send RegisterInterface set_pbReportErrors "Set_pbReportErrors" "boolean bReportErrors" ; 1648 "Report Request_xxx errors back to Html page" 1649 1650 Send RegisterInterface set_pbClearAfterSave "Set_pbClearAfterSave" "boolean bClear" ; 1651 "Clear DDO after successful save" 1652 1653 Send RegisterInterface get_CreateFindIndexCombo "get_CreateFindIndexCombo" ; 1654 "string sComboName string sTable integer iIndex returns string" ; 1655 "Create an Index combo form" 1656 1657 Send RegisterInterface get_WMLCreateFindIndexSelect "get_WmlCreateFindIndexSelect" ; 1658 "string sSelectName string sTable integer iIndex returns string" ; 1659 "Create an WML Index select" 1660 1661 Send RegisterInterface get_peFieldMultiUser "get_peFieldMultiUser" "returns integer" ; 1662 "Do column level change checking 0=no, 1=yes-required, 2=yes-if possible" 1663 1664 Send RegisterInterface get_IndexMainField "get_IndexMainField" "string sTable integer iIndex returns string" "get main column name of passed index" 1665 1666 Send RegisterBasicErrorInterface 1667 1668 End_Procedure 1669 1670 Procedure RegisterDDInterface 1671 1672 Send RegisterInterface msg_setDdValue "msg_setDDValue" "string sTableColumn string sNewValue" ; 1673 "Set DD file/field value to value" 1674 1675 Send RegisterInterface get_ddFind "get_ddFind" "string sTable string sFieldorIndex integer iFindMode returns boolean" ; 1676 "Find: Pass # for index, name for field, returns True if found" 1677 1678 Send RegisterInterface get_ddFindFirst "get_ddFindFirst" "string sTable string sFieldorIndex returns boolean" ; 1679 "Find first: Pass # for index, name for field, returns True if found" 1680 1681 Send RegisterInterface get_ddFindLast "get_ddFindLast" "string sTable string sFieldorIndex returns boolean" ; 1682 "Find Last: Pass # for index, name for field, returns True if found" 1683 1684 Send RegisterInterface get_ddFindNext "get_ddFindNext" "returns boolean"; 1685 "Find next: returns True if found" 1686 1687 Send RegisterInterface get_ddFindPrev "get_ddFindPrev" "returns boolean"; 1688 "Find Previous: returns True if found" 1689 1690 Send RegisterInterface get_ddFindByRecId "get_ddFindbyRecId" "string sTable string sRecId returns boolean"; 1691 "Obsolete, use ddFindbyRowId - Find by record id: returns True if found" 1692 1693 Send RegisterInterface get_ddFindbyRowId "get_ddFindbyRowId" "string sTable string sSerializedRowId returns boolean"; 1694 "Find by serialized Row id: returns True if found" 1695 1696 Send RegisterInterface get_ddClear "get_ddClear" "string sTable returns boolean" ; 1697 "perform a DD clear, returns true if ok" 1698 1699 Send RegisterInterface get_ddSave "get_ddSave" "string sTable returns boolean" ; 1700 "perform a DD validate and save, returns true if ok" 1701 1702 Send RegisterInterface get_ddDelete "get_ddDelete" "string sTable returns boolean" ; 1703 "perform a DD delete, returns true if ok" 1704 1705 Send RegisterInterface get_ddValidate "get_ddValidate" "string sTable returns boolean" ; 1706 "perform a DD validate, returns true if ok" 1707 1708 Send RegisterInterface get_ddValue "get_ddValue" "string sTableColumn integer iDDOption string sParams returns string" ; 1709 "returns a ddValue with no HtmlEncoding" 1710 1711 Send RegisterInterface get_ddValue "get_ddValueEncode" "string sTableColumn integer iDDOption string sParams returns string" ; 1712 "returns a ddValue with HtmlEncoding. Same as using direct ddValue method." 1713 1714 End_procedure 1715 1716End_Class 1717