Menu

Change form order appearance

Help
2008-07-22
2013-04-03
  • Leonardo F. Cardoso

    Hi there,

    great framework! Thanks a lot. I could run it with GWT 1.5 only changing the default i18n messages.

    Is there a way to change form order? I want the "Add" form to be the first one, then I need the "table" and above both the "Edit" form.

    Thanks in advance and forgive English errors
    Leonardo (from Brazil)

     
    • Nazar

      Nazar - 2008-07-22

      Thanks for feedback!

      You can change the order as you want - in your case do the following:
      1. Open class CustomRBWindow.
      2. Find method buildSliders().
      3. Find code:

      if (actions[i] instanceof ISearchFormProvider) {
          if (this.defaultSearchFormSlider == null)
              this.defaultSearchFormSlider = aSlider;
          panel.insert(aSlider, ++lastSearchSliderIndex);
      } else {
          // another sliders - on bottom by order
          panel.add(aSlider);
      }

      4. Replace it with this code:

      if (actions[i] instanceof ISearchFormProvider) {
          if (this.defaultSearchFormSlider == null)
              this.defaultSearchFormSlider = aSlider;
          panel.insert(aSlider, ++lastSearchSliderIndex);
      } if (actions[i] instanceof IAddFormProvider) {
          panel.insert(aSlider, 1);
      } else {
          // another sliders - on bottom by order
          panel.add(aSlider);
      }

      This little change will put all "add" buttons after "header" widget and before "table" (Grid).

       
    • Leonardo F. Cardoso

      Nazar,

      thanks for the fast reply.

      I will put another questions in other thread.

      Sds
      Leonardo

       
      • Nazar

        Nazar - 2008-07-23

        You are welcome!

         

Log in to post a comment.