Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Calendar in smartClient

    Code:
    isc.DynamicForm.create({
        ID: "exampleForm",
        width: 250,
        fields: [
            {ID:"calendarID",
             type: "date",
             useTextField:"true",
             required: true,
             defaultValue: "bob"
            },
           
        ]
    });
    the above date example gives id "calendarID" to the calendar but not the input field. So, when i click the input field of the calendar and call getFocusItem().id in dynamicForm, it returns the id of the inputfield which is some random id given by sc. So i need a way to set id to the input field.

    #2
    As posted in the other thread, please explain what you are actually trying to accomplish from the end user's perspective, not just the mechanics of attempting to set an ID.

    You are using undocumented internal methods, the only way to get support in this case is to explain what you need to do, and have Support suggest an approach.

    Comment


      #3
      the id we assign to each element has a special structure, by parsing the id we can get the data object in server side which binds to that element and get some useful information.

      Comment


        #4
        For the third time: we are asking for an explanation of what you need to do from the end user's perspective. The end user does not know about your ids and their special structure.

        If this is not clear to you, please confer with your team before posting again.

        Comment


          #5
          Ok. If you look at my example below, I create a dynamic form with a single date field with ID "calendarID". Click on the date input field, and then click on the button. What I am expecting to see is in the popup is "calendarID" which is what I had set the date field ID property to but instead I see "isc_TextItem_24".

          My question is, is this behaviour intended? If so, how do I properly set the ID of the date INPUT field so that I can retrieve it by just calling "exampleForm.getFocusItem().ID".

          Code:
          
          isc.ImgButton.create({
              left: 200,
              title: "CSS Button",canFocus: false,
              icon: "icons/16/icon_add_files.png",
          click: function(){isc.warn(exampleForm.getFocusItem().ID);}
          });
          isc.DynamicForm.create({
              ID: "exampleForm",
              width: 250,left:200,
              fields: [
                  {ID:"calendarID",
                   type: "date",
                   useTextField:"true",
                   required: true
                  },
                 
              ]
          })

          Comment


            #6
            any suggestion?

            Comment


              #7
              Please see the previous message. You're still simply talking about unsupported APIs, and not explain what you need to do. Again, probably a good idea to confer with colleagues if you don't understand what's been asked for.

              Comment


                #8
                Originally posted by kevincy
                any suggestion?
                You can use an undocumented but useful feature
                Code:
                {
                { textFieldProperties: { ID: "calendarID" }},
                name: "...",
                type: "date"
                }

                Comment


                  #9
                  Originally posted by marpetr
                  You can use an undocumented but useful feature
                  Code:
                  {
                  { textFieldProperties: { ID: "calendarID" }},
                  name: "...",
                  type: "date"
                  }
                  thanks marpetr, that is what i want.

                  Comment

                  Working...
                  X