Announcement

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

    Using Custom FormItem in DataSource ds xml

    Hi Support Team,

    We are licensed users of SmartGWT. version : 'v11.0p_2019-06-05/Enterprise Deployment'

    Can we use Custom FormItem in DataSource ds xml file?

    #2
    Hello Revan,

    Sorry, we don't understand the idea behind this question...

    Yes, in general, SmartGWT has a capability of using custom FormItems, which can be specified at the DataSource level (DataSourceField.editorType, for example).

    This is not a capability that is license-limited, if that's what you're asking - it's actually available in the LGPL edition.

    If this doesn't answer your question, please feel free to follow up.

    Comment


      #3
      Thanks for your response.

      Basically, I wanted, application should render my own overwritten TextItem in place of built in TextItem.

      I have written

      public class LeTextItem extends TextItem{

      // do our stuff..
      }

      And in DataSource.ds.xml if I refer type="text", application should render LeTextItem instead of TextItem.

      Comment


        #4
        You can't redefine the type "text" as the framework itself uses fields of that type, so trying to redefine it would cause all kinds of problems in various dialogs and interfaces that the framework provides. Your customized Textitem, for example, would appear in things like the dialog for editing Hilites, whereas what you likely want is just to consistently use your customized TextItem in all of the form that are used to edit Records.

        The correct way to do this is to define your own "text"-derived SimpleType, and use that type pervasively. You could also (or in addition) create a subclass of DynamicForm that automatically uses your customized TextItem for fields of type "text".

        Comment


          #5
          Are there any examples in showcase?

          Comment


            #6
            Here is the SImpleType sample (remember, it's searchable, so it's easy to find):

            https://smartclient.com/smartclient-...customDataType

            Comment


              #7
              Thank you. I think I found what I need.

              Comment

              Working...
              X