Announcement

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

    Typo in operatorId enum value

    Hello Isomorphic,

    I just extended my own .ds.xml schema subset with support for operatorId. While collecting the possible values from the source OperatorId.java, I noticed that the value for enum IREGEXP should most likely be iRegexp instead of iregexp, following the schema for all other case insensitive operators.

    Best regards
    Blama

    #2
    We see what you mean, but then pedantically it could also be argued that it should be "iRegExp" - we won't be changing the constant as it has no impact on SmartGWT coders but would change the constant for SmartClient developers, or would create confusion by having the framework allow either.

    Comment


      #3
      Hi Isomorphic,

      no problem for me, although I have a related question:
      As I wrote I was extending my XSD schema for the .ds.xml-subset I use. There I have to use the real value of (in my case "notNull") that would also be used in SmartClient client code (docs).
      So far my logic in .ds.xml was "apply camel casing", which also is not always correct, see ds.xml/DSField.editorType, which has to be the real classname with a capital letter in the start. The SmartClient docs are a bit more detailed here.

      The classname might be a bit special, but for many of the enums it is possible that they have to be used in either .ds.xml or ComponentXML, too.
      Here the SmartGWT docs don't really help as they don't tell the member value of the enum. Is it possible for you to either
      • generate html for the Enum member-value as well in the html or
      • include the member-value in the javadoc text or
      • link to the SmartClient docs in the top, so that one can easily look up the value?
      ?

      Best regards
      Blama

      Comment


        #4
        A simpler approach for you and for us is that any SmartGWT classnames are also accepted.

        We thought we had already made this the case however. Which FormItem types are not working?

        Note that for a *custom subclass* of FormItem you are expected to need to enable SmartGWT Reflection before it will work as an editorType.

        Comment


          #5
          Hi Isomorphic,

          sorry if I was not clear. This is not about an issue with the framework, but only about the docs.

          I was using class names, but I applied camel casing to it, as this is what is correct for your enum-member values most of the time. So I just comboBoxItem instead of ComboBoxItem. This did not work, but one could argue this is my fault, because the classname is available and comboBoxItem is not the classname.

          Let's say I want to use an operatorId in criteria in an operationBinding. How am I supposed to know the value to use? IREGEXP vs iregexp vs iRegexp vs iRegExp?

          You could say "look in the java code" or "look in the SmartClient docs" which should be known as possible information source, once you are so far to need this feature.
          But it would be better if the information was in the docs. That is why I suggested the three options:
          Originally posted by Blama View Post
          Here the SmartGWT docs don't really help as they don't tell the member value of the enum. Is it possible for you to either
          • generate html for the Enum member-value as well in the html or
          • include the member-value in the javadoc text or
          • link to the SmartClient docs in the top, so that one can easily look up the value?
          Best regards
          Blama

          Comment


            #6
            On providing the className as camelcaps, sorry, that one we have to treat as user error.

            But it does make sense for the constant values that are needed for Component XML / .ds.xml files to be more readily available; we'll look at sticking this in the JavaDoc directly.

            Note that valueOf() is another way to discover the value.

            Comment


              #7
              Hi Isomorphic,

              Originally posted by Isomorphic View Post
              On providing the className as camelcaps, sorry, that one we have to treat as user error.
              It is an user error! I was just to accustomed to camelcasing in .ds.xml files, that I did it there as well. I gave this example to show the need for the docs, so that no user uses a (faulty) rule of thumb like "always use camelcasing in ds.xml"

              On the rest: Great, I'm looking forward to it.

              Best regards
              Blama

              Comment


                #8
                We've updated the docs to detail what should be used in Component XML or the ds.xml files. The change is in today's nightly builds of SGWT 4.1p and newer.

                For example see the online docs for OperatorID: http://www.smartclient.com/smartgwt/...peratorId.html

                Comment


                  #9
                  Hi Isomorphic,

                  thank you, that definitely will make looking up the values for .ds.xml-files more easy!

                  Best regards
                  Blama

                  Comment

                  Working...
                  X