Get a Jumpstart with our Sample Apps
Results 1 to 3 of 3

Thread: Formview: How do you define the settings for a pre-defined list control when using JS method for specifying editorSet/editor?

  1. #1
    Member
    Real Name
    Maroine A.
    Join Date
    Apr 2010
    Location
    Rabat, Morocco
    Posts
    106

    Default Formview: How do you define the settings for a pre-defined list control when using JS method for specifying editorSet/editor?

    Hi,

    I receive this error: "You have not specified the Editor Set for this field" when I double click on the Editor Configuration Genie after setting in one of the formview fields that the method for specifying Editor set/Editor is Javascript, although I do in fact return in the javascript code which editor set / editor to be used depending on a specific value in the form.

    Basically the goal is to configure the editor configuration genie in the formview for the pre-defined list editor in order to have it set up in a way that allows the use of client side data cache. Now I am able to do that if I set a field to specifically use that list editor, not in the case of javascript method for defining editor set/editor.

    Here is the settings object that I need it available to the pre-defined list editor by using the javascript method for specifying the editor set/editor:

    Code:
    settings: {helpText: '',title: '',__genieSettings: {"showHelp": true,"showEditorTitle": true,"showTitle": false,"dataSourceType": "Client-side Data Cache","clientSideDataCacheItem": "choices","columnsFromDataToShowInList": "Choice","filterChoices": true,"returnValue": "Choice","allowMultipleSelections": false,"updateFormOnListItemClick": true,"saveButtonLabel": "<Default>","cancelButtonLabel": "<Default>","hideCancelButton": true,"filterExpression": "data.State == '{formData.State}'"} }
    For more information please refer to "Introducing the built-in list control editor" videos more precisely video # 2 & also refer to "Dynamically setting the editor and editor set using javascript" video.

    Thank you

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,164

    Default Re: Formview: How do you define the settings for a pre-defined list control when using JS method for specifying editorSet/edi

    This is working for me.

    I think your "settings" code is not quite right. You're replacing the entire "settings" Object... but you're not allowed to do that. You are, in effect, wiping out the FormView Object that is inside the settings object.

    You're allowed to alter:

    settings.helpText
    settings.title
    settings.__genieSettings

    So, let's say you're already happy with helpText and title. If you only want to affect the __genieSettings... then your code would be...

    Code:
    settings.__genieSettings = {"showHelp": true,"showEditorTitle": true,"showTitle": false,"dataSourceType": "Client-side Data Cache","clientSideDataCacheItem": "choices","columnsFromDataToShowInList": "Choice","filterChoices": true,"returnValue": "Choice","allowMultipleSelections": false,"updateFormOnListItemClick": true,"saveButtonLabel": "<Default>","cancelButtonLabel": "<Default>","hideCancelButton": true,"filterExpression": "data.State == '{formData.State}'"}
    
    return ['EDITORSET_1','EDITOR_2'];

  3. #3
    Member
    Real Name
    Maroine A.
    Join Date
    Apr 2010
    Location
    Rabat, Morocco
    Posts
    106

    Default Re: Formview: How do you define the settings for a pre-defined list control when using JS method for specifying editorSet/edi

    Thanks David, that did it. you right, I only need to set the _genieSettings for the pre-defined list editor inside the conditional javascript code. I tested it and it's working.

    When clicked, the list from the data cache is showing. I still have to play around with client side data cache and storage to be able to get only the filtered list data that is associated with the forms for that user...

Similar Threads

  1. How do I use the Override settings for a UX control with a list box?
    By lvasic in forum Mobile & Browser Applications
    Replies: 2
    Last Post: Today, 05:16 AM
  2. Editors: Pre-Defined List Control Editor
    By Beta Spark in forum Tablet-Optimized Form Capabilities Beta
    Replies: 0
    Last Post: 10-22-2015, 01:11 PM
  3. defined List control button - Synchronize data
    By Td203 in forum Mobile & Browser Applications
    Replies: 9
    Last Post: 10-13-2015, 09:41 AM
  4. padding around static text defined control for list control recordcount
    By kingcarol in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 12-16-2014, 08:37 PM
  5. List Control - action javascript - how to define session variables
    By jcarrallo in forum Mobile & Browser Applications
    Replies: 18
    Last Post: 08-25-2014, 05:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •