Announcement

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

    setValidateOnExit

    Hi,

    I've just had a quick play with the demos. The validation in the unique check (http://www.smartclient.com/smartgwtee/showcase/#validation_unique) has e-mail set to setValidateOnExit(true) and required. However, I can click into the field and tab out without triggering an error. Is this expected behaviour?

    Cheers,
    Flipside

    #2
    Yes. It only validates the field if it changes.

    Comment


      #3
      Thanks for that, David. So, is there no simple way to trigger an error if the user doesn't enter anything at all into a required form field?

      Comment


        #4
        Not at present.

        Comment


          #5
          Okay. Thanks for your help.

          Other than the javadoc and the showcase, is there any further documentation?

          Comment


            #6
            Your starting point should be the QuickStart Guide. Also, as the QuickStart Guide tells you, the JavaDoc contains many conceptual overview chapters in addition to normal reference.

            Comment


              #7
              This has been changed such that for new records the validation is always performed and on existing records (updates) the validation is only performed if the field value is changed. This change should be in the next nightly build.

              Comment


                #8
                I somehow managed to miss the quick-start guide. It's very helpful. I also had a look at com.smartgwt.client.docs but it contains a couple of hundred individual pages, and not many of them seem to have much in the way of conceptual overview. I didn't find the built-in-ds demo in my version of the SDK. I have the 2.2 version from Google Code. Is the demo included only downloads from this site?

                @David. Thanks, I'll keep an eye out for the new build.

                Comment


                  #9
                  There are hundreds of docs, many of them are conceptual overviews. The QuickStart links you to many of the most important ones, and the reference JavaScript for particular properties will point you to the overview material covering usage of that property and related properties (eg ListGrid.canEdit -> ListGrid Editing Overview, FormItem.colSpan -> Form Layout overview).

                  The built-in-ds sample project comes with Pro and better. The best thing right now (with 2.4 so close) is to download a nightly from smartclient.com/builds.

                  Comment


                    #10
                    Okay, I'll do a bit more reading around. I do have a couple of specific questions I've been trying to read up on.


                    Code:
                    Layout layout = new Layout();
                    Canvas canvas = new Canvas();
                    
                    //What's the difference, if any, between these? Is it that only the second is managed?
                    canvas.setParentElement(layout);
                    layout.addMember(canvas);
                    Also, is it possible to apply formatting inline? Something like this:

                    Code:
                    label.setTitleStyle("<span color: red; </span>");
                    Lastly, what's the relationship between the code on this site and that on Google Code?

                    Thanks for your time.

                    Comment


                      #11
                      A Layout manages the size and position of members, but not of non-member children, who manage their own size and position within the Layout (eg, via setting percent size or using snapTo positioning).

                      You can add HTML tags directly to the title itself, but no, setTitleStyle takes a CssClassName, not HTML markup.

                      The downloads at smartclient.com/builds represent the very latest code. The Google Code project is the same codebase, committed whenever we hit internal development milestones. If we mention something is in a nightly, it means smartclient.com/builds.

                      Comment

                      Working...
                      X