Announcement

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

    Widgets/enhancements wanted

    I posted a blog entry on my SmartClient experiences as of about a month ago and detailed some widgets and enhancements I would like to see in the framework. Some of these may exist and I haven't found them or maybe someone out there has found a way to do something similar. Here are some of my wish list items for SC:

    Enhanced Text
    A couple of features I would like to see in a text box are case conversion and keypress filtering. Using a transformInput handler I can convert the entered value to uppercase. What I can't do is derive a new TextItemEx that has built-in case conversion without changing the functionality of the derived transformInput such that TextItemEx users don't have to call Super. I also don't want to provide the transformInput override for every form field.

    Keypress filtering is another feature that would enhance some of those widgets listed below as well. I want a numeric entry field that doesn't allow the user to enter any character that is not allowed upon ultimate validation. I'm a proponent of preemptive validation rather than reactive. What that means is if I can trap issues before the user tries to move on they will be happier with the application.

    Date
    Isomorphic offers a date editor that consists of 3 individual text boxes and a popup picker or a single text box and popup picker. This is usable but ideally I would like a masked-like entry to automatically place the slashes (/) or dashes (-). The popup picker is also not the prettiest selector...

    Group box
    I have started using the SectionItem widget in place of group boxes but there are times a group box is just the right way to display some widgets.

    Generic mask
    Take for example a date field. If my application requires the entry of MM/DD/YYYY, I would like a mask of ##/##/#### or such where the user doesn't have to enter the slashes at all but if a slash key is pressed, the carat moves to the next entry section. This is an enhancement of keypress filtering discussed previously.

    I'm aware that implementing a mask field is much more difficult because arrow-key handling is very tricky.

    MDI toolbar
    One layout strategy we use frequently is a tabbed-MDI. That is forms are displayed in a tab that becomes the primary layout. One toolbar for the application has common features that are shared by each tab but in some cases the tab form needs to provide form-specific buttons or enable/disable shared buttons depending on the form state.


    Can anyone share tips on accomplishing any of the above or maybe a place to start building a custom widget?

    #2
    Hi davidj6,

    Sorry for the belated reply. There are some good suggestions here.

    On Enhanced Text:

    It sounds like you want something like a model where you can register multiple text transformers, and there are some built-ins you can just enable with a flag, right?

    Why do you say that you need to define transformInput() on every form field? Why not create a reusable subclass of FormItem - even one where there is a built-in transformInput that is only active (changes the value) if certain flags are set?

    On Group Box:

    This is in 7.0. It's actually in the first beta and shows up in some examples, but is not documented yet.

    On an MDI Toolbar:

    The different panes of a TabSet are actually allowed to be the same widget, so a common strategy here is to have a single VLayout with a toolbar that changes which tools are visible when tabSelected() fires. Quite possibly a toolbar built into the TabSet would be more convenient, however.

    On masked input (and date input as a subcase):

    This should be doable as a custom FormItem with the use of transformInput and keyPress handling, but it would be a chunk of work and it would be better for it to be built in.

    Overall if you are interested in pursuing these it would probably make sense to get set up as a committer to core SmartClient. Alternatively, it's always possible to sponsor feature additions that your company / project needs.

    Comment


      #3
      Thanks for your feedback. I'll be looking into 7.0 closer to the release but it's great to hear about the group box.

      Your suggestion about the tabbed mdi sounds interesting and I will have to give that some thought.

      As for the text input, case conversion is a built-in for windows controls. This is something very handy and I would love to see it at the core level. This is doable currently with a transformInput and I can create a derived class to embed this functionality. This will be fine for my project but for the long term I would like a TextItemEx (or such) that is a drop-in replacement from TextItem but supports case conversion. If I use transformInput to make this work in my subclass, a specific field instance that uses case conversion cannot override transformInput for a special feature without losing the case conversion. Or maybe I need to really test this to be sure.

      As an added feature I have implemented a MaskedTextItem for SmartClient and have posted details on my blog. I'm sure there are bugs but it's a start.

      Comment


        #4
        MaskedTextItem looks really neat. Are you interested in getting this rolled into SmartClient mainline and/or becoming a committer?

        On the transformInput thing: if someone subclasses your TextItemEx and adds a new transformInput() implementation, they should be able to re-use the built-in text transforms by calling Super().

        Comment


          #5
          I would love to see the MaskedTextItem rolled into SC in the future. I'm not sure I ready to be a committer at this point as I'm still learning a great deal about javascript and SC.

          But just to keep things interesting I have now posted an enhanced TextItem called ExtTextItem on my blog. This new widget supports automatic case conversion, keyPress filtering and embedded hints. Let me know what you think.

          Comment


            #6
            Don't sell yourself short David, the key criteria for being a committer is whether you can produce features people want, and you are. We have code review and automated test processes in place that will keep you from doing too much damage ;)

            If it sounds interesting just use the website contact form and we'll get the process started.

            Comment


              #7
              From the previous discussion, it sounds like there was a group box control being developed in version 7. Did that not make it to production/version 8?

              Comment


                #8
                It is still available, but does not appear in the documentation.

                You can add these attributes to any DynamicForm.

                isGroup: boolean
                groupTitle: string, the title of the group box
                groupLabelStyleName: string, the CSS style of the title

                Comment


                  #9
                  This grouping would have been a great feature to use when we first started migrating our old system to our new one - but instead of we got stuck with sections. How come this is not documented?

                  Comment

                  Working...
                  X