Documentation for Module: fmflds.r ||  Module Index

Context Index
mu Functions: ==>
OVERVIEW get-data menu reset set-values
analyze-usage get-usage mu set-font setv
choice-only hide names set-input type
Control_Variables inline-style pop-label set-reset usage
dual-option-list keys pull set-select validate
dump lable put set-submit value
flush load rec set-textarea verify
get make-script render set-value  

Context: mu

Overview Of: muTopContext IndexNext Function
    syntax: mu object. Form element rendering
    author: Tim Johnson tim@akwebsoft.com
    Initialization: mu/load with refinements and options see doc for load
    Handles: DOM and pseudo-datatypes. See the descriptor object.
    Adding: new pseudo-datatype:
      1: Add to java-script context
         Also to java-script-valid if a user-defined type
      2: Add to descriptor/sub-types along with corresponding real type, if necessary
      3: Add to type switch in function _render
      4: Add context to descriptor, if subtype, see uint example
    Initialization: block - nested blocks for each form element
    example: Of a layout block
    ogin-data: [
      "Login" [type "text" txt[llabel "User: " req 1] atr[size 40 maxlength 90]]
       "Password" [type "password" txt[llabel "Password: " req 1] atr[size 40 ]]
       "Submit" [type "submit" txt[llabel ""] atr[value "Go"]]
      "Reset" [type "reset" txt[llabel ""] atr[value "Clear"]]
       ]
    sublayouts::
      type: DOM -compliant type or pseudto-type
      atr: Dom- compliant attributes and values
      txt: control attributes and values
        llabel: Text displayed to left of widget
        rlabel: Text displayed to right of widget
        slabels: List of labels to be displayed to left of radio buttons
        mlabel: Main label for radio buttons. Comes first.
        NOTE: llabel, rlabel, mlabel may be strings or blocks of two strings.
              If block: First string is used for error, handling, reviewing, etc.
                        Second string concatenated for primary data entry.
        req: Is a selection or data entry required?
        obj: Return object
        reqif: Conditional requirement. Evaluation of code block.
        val: Used to signal use of values option in a select list.
             NOTE!!: Not to be confused with the val attribute of al-class
        data: data block for select list. Not to be confused with the data
          attr key for textarea types
        src: To be implemented: value would be [mysql-table value-column key-column]
        rj: used with label on left (llabel or slabel) to justify label. If integer,
             number of non-breaking space entities to use, if string, use literal value
        lj: Used with label on right (rlabel) to justify label. If integer,
             number of non-breaking space entities to use, if string, use literal value
        dsc: Description, use instead of label when reporting errors
    IMPORTANT!:
       If problems look in the implementation of the al-class -AL!- and blk-class -BLK!- classes.
Function: mu/analyze-usageTopContext IndexPrevious FunctionNext Function
    syntax: mu/analyze-usage Help for the analyze method.
Function: mu/choice-onlyTopContext IndexPrevious FunctionNext Function
    syntax: mu/choice-only <str-word-name>
    description: Truncates a select element so only the selected option item remains.
Function: mu/Control_VariablesTopContext IndexPrevious FunctionNext Function
    syntax: Control_Variables
    js-srcs: block of javascript files used for validation and dates.
    image-dir: Name of images directory
    form-name: Name of form to be rendered
    error-font: Default is red
    advice-font: Default is green
    delim: Delimiter for multiple values in a string. Default is "|"
    auto-js: Automatically load validation javascripts
    Fonts: font-size, font-color, font-class, font-face, font-all - all default to empty
    auto-bold: Set to true for all labels to be bold
    button-class: css class for buttons. Default is "Buttons"
    checkbox-class: css class for checkboxes Default is empty or none
    input-class: css class for input elements. Default is "text"
    input-style: Inline style descriptor for input fields
    submit-style: Inline style descriptor for submit buttons
    reset-style: Inline style descriptor for reset buttons
    textarea-style: Inline style descriptor for text areas
    readonly-style: Inline style descriptor for readonly fields.
    select-style: Inline style descriptor for select elements.
    selection-required: Default text for top line of select option list = "Selection Required"
    list-divider: Dashed line beneath selection-required text.
Function: mu/dual-option-listTopContext IndexPrevious FunctionNext Function
    syntax: mu/dual-option-list <option-block> <any-choice>
    description: Create option list with both text and option values
    args: lst is two-dimensional (nested) block of names and values
Function: mu/dumpTopContext IndexPrevious FunctionNext Function
    syntax: mu/dump <args-block> display the loaded data by keys in <args-block>.
    Note: If args is empty, display all.
Function: mu/flushTopContext IndexPrevious FunctionNext Function
    syntax: mu/flush Clears data so object can reused.
Function: mu/getTopContext IndexPrevious FunctionNext Function
    syntax: mu/get Retrieve info on loaded layout.
    refinement: first-order /TYPE..Return type of name
    refinement: first-order /TEXT..Return any of
       llabel, rlabel, slabels, mlabel, label, req, reqif, val, obj, src
         attributes when used as secondary refinement.
       If no secondary refinements, return the txt object.
    refinements: /ATTRIBUTES: Return any of secondary refinements
       /OBJ......Return atr /object
       /DATA.....List of data for select and radio types
       /CHOICE...Item value chosen for select and radio types
    refinements: /HOWTO..Get help message
Function: mu/get-dataTopContext IndexPrevious FunctionNext Function
    syntax: mu/get-data <word-str-key> return the data attribute for key
Function: mu/get-usageTopContext IndexPrevious FunctionNext Function
    syntax: mu/get-usage Help for the get method.
Function: mu/hideTopContext IndexPrevious FunctionNext Function
    syntax: mu/hide <str-word-name> render a hidden input field
Function: mu/inline-styleTopContext IndexPrevious FunctionNext Function
    syntax: mu/inline-style <block-args> From args, compose an inline style.
    args: alternating keywords and values. keywords checked for validity.
Function: mu/keysTopContext IndexPrevious FunctionNext Function
    syntax: mu/keys Return all keys
Function: mu/lableTopContext IndexPrevious FunctionNext Function
    syntax: mu/lable <word-str-key> Render label, but do not pop
    refinement: /font fontify the label.
Function: mu/loadTopContext IndexPrevious FunctionNext Function
    syntax: mu/load <layout-block> Load the layout block
    refinement: /web - load with the cgi data member as the record
    refinement: /mysql <rec> - load with <rec> as block of alternating column
      names and values.
    refinement: /create create layout from DB descriptor block
    refinement: /nolabels Ignore labels
Function: mu/make-scriptTopContext IndexPrevious FunctionNext Function
    syntax: mu/make-script <str-blk-logic> Writes out validating javascript
    arg: if string or block - javascript source passed.
    arg: if logic - use js-srcs block of javascript sources
    description: - script-body was composed during load. It is now written out.
    refinement: /width <str-block> - addition text added.
    refinement: /provide Return string, do not print
Function: mu/menuTopContext IndexPrevious FunctionNext Function
    syntax: mu/menu <block-lst> Create unordered list type from lst
    refinement: /type <type> Set the type.
Function: mu/muTopContext IndexPrevious FunctionNext Function
    syntax: mu/instyle/set <block-of-args>
    description: Compose and maintain inline style, onMouseOver, and onMouseOut attributes.
    Note: The mu object stores the output as a value
    inStyle is a context and uses set to do its work.
    args: Alternating words and values. Acceptable words follow.
          bg.....background color (AND onmouseout)
          bgh....background color when mouseovered
          fg.....text color (AND onmouseout)
          fs.....font size. <integer>
          fw.....font weight
Function: mu/namesTopContext IndexPrevious FunctionNext Function
    syntax: mu/names Return the loaded names.
Function: mu/pop-labelTopContext IndexPrevious FunctionNext Function
    syntax: mu/pop-label <str-word-key> label for key is rendered and popped.
Function: mu/pullTopContext IndexPrevious FunctionNext Function
    syntax: mu/pull <str-key-name> Pull by name from names and keys
Function: mu/putTopContext IndexPrevious FunctionNext Function
    syntax: mu/put <str-word-name> <any-val> Set storage value as val for name
Function: mu/recTopContext IndexPrevious FunctionNext Function
    syntax: mu/rec <args-block> dump out stored data by args member
    Note: Words are expected
Function: mu/renderTopContext IndexPrevious FunctionNext Function
    syntax: mu/render <str-word-block-key> Render the widget by key.
    NOTE:: The label may have already been written, and if so, was popped.
    If key is a block, multiple renderings.
Function: mu/resetTopContext IndexPrevious FunctionNext Function
    syntax: mu/reset Clear all of the set values. I.E. by storage-key
Function: mu/set-fontTopContext IndexPrevious FunctionNext Function
    syntax: mu/set-font <attrs-block> Set font for labels.
    keywords: size, face, color, class, bold
Function: mu/set-inputTopContext IndexPrevious FunctionNext Function
    syntax: mu/set-input <str-block>
    descriptor: Set inline style rules for input elements with either a string or a block
Function: mu/set-resetTopContext IndexPrevious FunctionNext Function
    syntax: mu/set-reset <str-block>
    descriptor: Set inline style rules for reset buttons with either a string or a block
Function: mu/set-selectTopContext IndexPrevious FunctionNext Function
    syntax: mu/set-select <str-block>
    descriptor: Set inline style rules for select element with either a string or a block
Function: mu/set-submitTopContext IndexPrevious FunctionNext Function
    syntax: mu/set-submit <str-block>
    descriptor: Set inline style rules for submit buttons with either a string or a block
Function: mu/set-textareaTopContext IndexPrevious FunctionNext Function
    syntax: mu/set-textarea <str-block>
    descriptor: Set inline style rules for textareas with either a string or a block
Function: mu/set-valueTopContext IndexPrevious FunctionNext Function
    syntax: mu/set-value <str-word-key> <any-val> Set a stored value in the layout block.
Function: mu/set-valuesTopContext IndexPrevious FunctionNext Function
    syntax: mu/set-values <keyvals-block> Set multiple values for keys
Function: mu/setvTopContext IndexPrevious FunctionNext Function
    syntax: mu/setv <args-block> Set a layout attribute by name sublayout, key and value
    example: mu/setv ["name" [atr[size 40]]]
    description: name/block pairs for atr&txt, name/value pairs for type
Function: mu/typeTopContext IndexPrevious FunctionNext Function
    syntax: mu/type <word-str-key> get type for <key>
Function: mu/usageTopContext IndexPrevious FunctionNext Function
    syntax: mu/usage Help for the the mu context
    Note: HIGHLY recommended. Might be out-of-date
Function: mu/validateTopContext IndexPrevious FunctionNext Function
    syntax: mu/validate Validate/test loaded data.
Function: mu/valueTopContext IndexPrevious FunctionNext Function
    syntax: mu/value <word-str-key> Return stored value for key.
    Note: Not necessarily the value attribute for the element.
Function: mu/verifyTopContext IndexPrevious Function
    syntax: mu/verify Validate loaded data on the server side. Best usage: debugging.