Announcement

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

    Hilite and DynamicForm

    Hi,

    I am trying to make hiliting work on my DynamicForm. I define the following hilite:

    Code:
        private static Hilite[] orderStatusHilites = new Hilite[] {  
            new Hilite() {{  
                setFieldNames("_mandays_delta");  
                setCriteria(new Criterion("_mandays_delta", OperatorId.NOT_EQUAL , 0));
                setCssText("color:#00FF00;background-color:#FF0000,font-weight:bold;");  
                setId("0");  
            }},  
        };
    and set it to my DynamicForm via
    form.setHilites(orderStatusHilites);

    _mandays_delta field is bound to a FloatItem in my DynamicForm

    it does not work like this, am I missing something? There is an example in showcase with ListGrid but no on DynamicForm. Could you please post a small example that works on a dynamicform.

    Thanks, Ben.

    #2
    DynamicForm does not current support Hilites, however, you can achieve a similar look via the various formatting APIs available on FormItems.

    Comment


      #3
      Thanks for your quick reply, this will save me a lot of time spent in searching for nothing. Just one question then, why a setHilites() method on DynamicForm?

      BTW thanks for providing such an amazing library.

      regards, Ben

      Comment


        #4
        Hilite functionality is shared by multiple DataBoundComponents so it's being inherited, but is inapplicable in this case.

        Comment


          #5
          I'm struggling with exactly how to mimick the Hilites feature on a DynamicForm. What api is is that lets you dynamically set the text color, for instance, based on a condition in the record the form is displaying, the way Hilites do?

          Comment


            #6
            This will differ depending on the formItem type and exactly what appearance you're after, but you'll probably want to modify the TextBoxStyle of your formItem.
            An explicit markForRedraw() of the form may be required to pick up the changed style.

            Comment


              #7
              Are there any plans to add Hilites to DynamicForm?

              Comment

              Working...
              X